{- This file was auto-generated from tensorflow/core/util/memmapped_file_system.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.Util.MemmappedFileSystem (
        MemmappedFileSystemDirectory(),
        MemmappedFileSystemDirectoryElement()
    ) 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
{- | Fields :
     
         * 'Proto.Tensorflow.Core.Util.MemmappedFileSystem_Fields.element' @:: Lens' MemmappedFileSystemDirectory [MemmappedFileSystemDirectoryElement]@
         * 'Proto.Tensorflow.Core.Util.MemmappedFileSystem_Fields.vec'element' @:: Lens' MemmappedFileSystemDirectory (Data.Vector.Vector MemmappedFileSystemDirectoryElement)@ -}
data MemmappedFileSystemDirectory
  = MemmappedFileSystemDirectory'_constructor {MemmappedFileSystemDirectory
-> Vector MemmappedFileSystemDirectoryElement
_MemmappedFileSystemDirectory'element :: !(Data.Vector.Vector MemmappedFileSystemDirectoryElement),
                                               MemmappedFileSystemDirectory -> FieldSet
_MemmappedFileSystemDirectory'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (MemmappedFileSystemDirectory
-> MemmappedFileSystemDirectory -> Bool
(MemmappedFileSystemDirectory
 -> MemmappedFileSystemDirectory -> Bool)
-> (MemmappedFileSystemDirectory
    -> MemmappedFileSystemDirectory -> Bool)
-> Eq MemmappedFileSystemDirectory
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MemmappedFileSystemDirectory
-> MemmappedFileSystemDirectory -> Bool
$c/= :: MemmappedFileSystemDirectory
-> MemmappedFileSystemDirectory -> Bool
== :: MemmappedFileSystemDirectory
-> MemmappedFileSystemDirectory -> Bool
$c== :: MemmappedFileSystemDirectory
-> MemmappedFileSystemDirectory -> Bool
Prelude.Eq, Eq MemmappedFileSystemDirectory
Eq MemmappedFileSystemDirectory =>
(MemmappedFileSystemDirectory
 -> MemmappedFileSystemDirectory -> Ordering)
-> (MemmappedFileSystemDirectory
    -> MemmappedFileSystemDirectory -> Bool)
-> (MemmappedFileSystemDirectory
    -> MemmappedFileSystemDirectory -> Bool)
-> (MemmappedFileSystemDirectory
    -> MemmappedFileSystemDirectory -> Bool)
-> (MemmappedFileSystemDirectory
    -> MemmappedFileSystemDirectory -> Bool)
-> (MemmappedFileSystemDirectory
    -> MemmappedFileSystemDirectory -> MemmappedFileSystemDirectory)
-> (MemmappedFileSystemDirectory
    -> MemmappedFileSystemDirectory -> MemmappedFileSystemDirectory)
-> Ord MemmappedFileSystemDirectory
MemmappedFileSystemDirectory
-> MemmappedFileSystemDirectory -> Bool
MemmappedFileSystemDirectory
-> MemmappedFileSystemDirectory -> Ordering
MemmappedFileSystemDirectory
-> MemmappedFileSystemDirectory -> MemmappedFileSystemDirectory
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 :: MemmappedFileSystemDirectory
-> MemmappedFileSystemDirectory -> MemmappedFileSystemDirectory
$cmin :: MemmappedFileSystemDirectory
-> MemmappedFileSystemDirectory -> MemmappedFileSystemDirectory
max :: MemmappedFileSystemDirectory
-> MemmappedFileSystemDirectory -> MemmappedFileSystemDirectory
$cmax :: MemmappedFileSystemDirectory
-> MemmappedFileSystemDirectory -> MemmappedFileSystemDirectory
>= :: MemmappedFileSystemDirectory
-> MemmappedFileSystemDirectory -> Bool
$c>= :: MemmappedFileSystemDirectory
-> MemmappedFileSystemDirectory -> Bool
> :: MemmappedFileSystemDirectory
-> MemmappedFileSystemDirectory -> Bool
$c> :: MemmappedFileSystemDirectory
-> MemmappedFileSystemDirectory -> Bool
<= :: MemmappedFileSystemDirectory
-> MemmappedFileSystemDirectory -> Bool
$c<= :: MemmappedFileSystemDirectory
-> MemmappedFileSystemDirectory -> Bool
< :: MemmappedFileSystemDirectory
-> MemmappedFileSystemDirectory -> Bool
$c< :: MemmappedFileSystemDirectory
-> MemmappedFileSystemDirectory -> Bool
compare :: MemmappedFileSystemDirectory
-> MemmappedFileSystemDirectory -> Ordering
$ccompare :: MemmappedFileSystemDirectory
-> MemmappedFileSystemDirectory -> Ordering
$cp1Ord :: Eq MemmappedFileSystemDirectory
Prelude.Ord)
instance Prelude.Show MemmappedFileSystemDirectory where
  showsPrec :: Int -> MemmappedFileSystemDirectory -> ShowS
showsPrec _ __x :: MemmappedFileSystemDirectory
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (MemmappedFileSystemDirectory -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort MemmappedFileSystemDirectory
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField MemmappedFileSystemDirectory "element" [MemmappedFileSystemDirectoryElement] where
  fieldOf :: Proxy# "element"
-> ([MemmappedFileSystemDirectoryElement]
    -> f [MemmappedFileSystemDirectoryElement])
-> MemmappedFileSystemDirectory
-> f MemmappedFileSystemDirectory
fieldOf _
    = ((Vector MemmappedFileSystemDirectoryElement
  -> f (Vector MemmappedFileSystemDirectoryElement))
 -> MemmappedFileSystemDirectory -> f MemmappedFileSystemDirectory)
-> (([MemmappedFileSystemDirectoryElement]
     -> f [MemmappedFileSystemDirectoryElement])
    -> Vector MemmappedFileSystemDirectoryElement
    -> f (Vector MemmappedFileSystemDirectoryElement))
-> ([MemmappedFileSystemDirectoryElement]
    -> f [MemmappedFileSystemDirectoryElement])
-> MemmappedFileSystemDirectory
-> f MemmappedFileSystemDirectory
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((MemmappedFileSystemDirectory
 -> Vector MemmappedFileSystemDirectoryElement)
-> (MemmappedFileSystemDirectory
    -> Vector MemmappedFileSystemDirectoryElement
    -> MemmappedFileSystemDirectory)
-> Lens
     MemmappedFileSystemDirectory
     MemmappedFileSystemDirectory
     (Vector MemmappedFileSystemDirectoryElement)
     (Vector MemmappedFileSystemDirectoryElement)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           MemmappedFileSystemDirectory
-> Vector MemmappedFileSystemDirectoryElement
_MemmappedFileSystemDirectory'element
           (\ x__ :: MemmappedFileSystemDirectory
x__ y__ :: Vector MemmappedFileSystemDirectoryElement
y__ -> MemmappedFileSystemDirectory
x__ {_MemmappedFileSystemDirectory'element :: Vector MemmappedFileSystemDirectoryElement
_MemmappedFileSystemDirectory'element = Vector MemmappedFileSystemDirectoryElement
y__}))
        ((Vector MemmappedFileSystemDirectoryElement
 -> [MemmappedFileSystemDirectoryElement])
-> (Vector MemmappedFileSystemDirectoryElement
    -> [MemmappedFileSystemDirectoryElement]
    -> Vector MemmappedFileSystemDirectoryElement)
-> Lens
     (Vector MemmappedFileSystemDirectoryElement)
     (Vector MemmappedFileSystemDirectoryElement)
     [MemmappedFileSystemDirectoryElement]
     [MemmappedFileSystemDirectoryElement]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Vector MemmappedFileSystemDirectoryElement
-> [MemmappedFileSystemDirectoryElement]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
           (\ _ y__ :: [MemmappedFileSystemDirectoryElement]
y__ -> [MemmappedFileSystemDirectoryElement]
-> Vector MemmappedFileSystemDirectoryElement
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [MemmappedFileSystemDirectoryElement]
y__))
instance Data.ProtoLens.Field.HasField MemmappedFileSystemDirectory "vec'element" (Data.Vector.Vector MemmappedFileSystemDirectoryElement) where
  fieldOf :: Proxy# "vec'element"
-> (Vector MemmappedFileSystemDirectoryElement
    -> f (Vector MemmappedFileSystemDirectoryElement))
-> MemmappedFileSystemDirectory
-> f MemmappedFileSystemDirectory
fieldOf _
    = ((Vector MemmappedFileSystemDirectoryElement
  -> f (Vector MemmappedFileSystemDirectoryElement))
 -> MemmappedFileSystemDirectory -> f MemmappedFileSystemDirectory)
-> ((Vector MemmappedFileSystemDirectoryElement
     -> f (Vector MemmappedFileSystemDirectoryElement))
    -> Vector MemmappedFileSystemDirectoryElement
    -> f (Vector MemmappedFileSystemDirectoryElement))
-> (Vector MemmappedFileSystemDirectoryElement
    -> f (Vector MemmappedFileSystemDirectoryElement))
-> MemmappedFileSystemDirectory
-> f MemmappedFileSystemDirectory
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((MemmappedFileSystemDirectory
 -> Vector MemmappedFileSystemDirectoryElement)
-> (MemmappedFileSystemDirectory
    -> Vector MemmappedFileSystemDirectoryElement
    -> MemmappedFileSystemDirectory)
-> Lens
     MemmappedFileSystemDirectory
     MemmappedFileSystemDirectory
     (Vector MemmappedFileSystemDirectoryElement)
     (Vector MemmappedFileSystemDirectoryElement)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           MemmappedFileSystemDirectory
-> Vector MemmappedFileSystemDirectoryElement
_MemmappedFileSystemDirectory'element
           (\ x__ :: MemmappedFileSystemDirectory
x__ y__ :: Vector MemmappedFileSystemDirectoryElement
y__ -> MemmappedFileSystemDirectory
x__ {_MemmappedFileSystemDirectory'element :: Vector MemmappedFileSystemDirectoryElement
_MemmappedFileSystemDirectory'element = Vector MemmappedFileSystemDirectoryElement
y__}))
        (Vector MemmappedFileSystemDirectoryElement
 -> f (Vector MemmappedFileSystemDirectoryElement))
-> Vector MemmappedFileSystemDirectoryElement
-> f (Vector MemmappedFileSystemDirectoryElement)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message MemmappedFileSystemDirectory where
  messageName :: Proxy MemmappedFileSystemDirectory -> Text
messageName _
    = String -> Text
Data.Text.pack "tensorflow.MemmappedFileSystemDirectory"
  packedMessageDescriptor :: Proxy MemmappedFileSystemDirectory -> ByteString
packedMessageDescriptor _
    = "\n\
      \\FSMemmappedFileSystemDirectory\DC2I\n\
      \\aelement\CAN\SOH \ETX(\v2/.tensorflow.MemmappedFileSystemDirectoryElementR\aelement"
  packedFileDescriptor :: Proxy MemmappedFileSystemDirectory -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor MemmappedFileSystemDirectory)
fieldsByTag
    = let
        element__field_descriptor :: FieldDescriptor MemmappedFileSystemDirectory
element__field_descriptor
          = String
-> FieldTypeDescriptor MemmappedFileSystemDirectoryElement
-> FieldAccessor
     MemmappedFileSystemDirectory MemmappedFileSystemDirectoryElement
-> FieldDescriptor MemmappedFileSystemDirectory
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "element"
              (MessageOrGroup
-> FieldTypeDescriptor MemmappedFileSystemDirectoryElement
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor MemmappedFileSystemDirectoryElement)
              (Packing
-> Lens'
     MemmappedFileSystemDirectory [MemmappedFileSystemDirectoryElement]
-> FieldAccessor
     MemmappedFileSystemDirectory MemmappedFileSystemDirectoryElement
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
                 Packing
Data.ProtoLens.Unpacked (forall s a (f :: * -> *).
(HasField s "element" 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 @"element")) ::
              Data.ProtoLens.FieldDescriptor MemmappedFileSystemDirectory
      in
        [(Tag, FieldDescriptor MemmappedFileSystemDirectory)]
-> Map Tag (FieldDescriptor MemmappedFileSystemDirectory)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor MemmappedFileSystemDirectory
element__field_descriptor)]
  unknownFields :: LensLike' f MemmappedFileSystemDirectory FieldSet
unknownFields
    = (MemmappedFileSystemDirectory -> FieldSet)
-> (MemmappedFileSystemDirectory
    -> FieldSet -> MemmappedFileSystemDirectory)
-> Lens' MemmappedFileSystemDirectory FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        MemmappedFileSystemDirectory -> FieldSet
_MemmappedFileSystemDirectory'_unknownFields
        (\ x__ :: MemmappedFileSystemDirectory
x__ y__ :: FieldSet
y__
           -> MemmappedFileSystemDirectory
x__ {_MemmappedFileSystemDirectory'_unknownFields :: FieldSet
_MemmappedFileSystemDirectory'_unknownFields = FieldSet
y__})
  defMessage :: MemmappedFileSystemDirectory
defMessage
    = $WMemmappedFileSystemDirectory'_constructor :: Vector MemmappedFileSystemDirectoryElement
-> FieldSet -> MemmappedFileSystemDirectory
MemmappedFileSystemDirectory'_constructor
        {_MemmappedFileSystemDirectory'element :: Vector MemmappedFileSystemDirectoryElement
_MemmappedFileSystemDirectory'element = Vector MemmappedFileSystemDirectoryElement
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
         _MemmappedFileSystemDirectory'_unknownFields :: FieldSet
_MemmappedFileSystemDirectory'_unknownFields = []}
  parseMessage :: Parser MemmappedFileSystemDirectory
parseMessage
    = let
        loop ::
          MemmappedFileSystemDirectory
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld MemmappedFileSystemDirectoryElement
             -> Data.ProtoLens.Encoding.Bytes.Parser MemmappedFileSystemDirectory
        loop :: MemmappedFileSystemDirectory
-> Growing Vector RealWorld MemmappedFileSystemDirectoryElement
-> Parser MemmappedFileSystemDirectory
loop x :: MemmappedFileSystemDirectory
x mutable'element :: Growing Vector RealWorld MemmappedFileSystemDirectoryElement
mutable'element
          = do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
               if Bool
end then
                   do Vector MemmappedFileSystemDirectoryElement
frozen'element <- IO (Vector MemmappedFileSystemDirectoryElement)
-> Parser (Vector MemmappedFileSystemDirectoryElement)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                          (Growing Vector (PrimState IO) MemmappedFileSystemDirectoryElement
-> IO (Vector MemmappedFileSystemDirectoryElement)
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 MemmappedFileSystemDirectoryElement
Growing Vector (PrimState IO) MemmappedFileSystemDirectoryElement
mutable'element)
                      (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]))))
                      MemmappedFileSystemDirectory -> Parser MemmappedFileSystemDirectory
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter
  MemmappedFileSystemDirectory
  MemmappedFileSystemDirectory
  FieldSet
  FieldSet
-> (FieldSet -> FieldSet)
-> MemmappedFileSystemDirectory
-> MemmappedFileSystemDirectory
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
  MemmappedFileSystemDirectory
  MemmappedFileSystemDirectory
  FieldSet
  FieldSet
Data.ProtoLens.unknownFields
                           (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
                           (Setter
  MemmappedFileSystemDirectory
  MemmappedFileSystemDirectory
  (Vector MemmappedFileSystemDirectoryElement)
  (Vector MemmappedFileSystemDirectoryElement)
-> Vector MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectory
-> MemmappedFileSystemDirectory
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
                              (forall s a (f :: * -> *).
(HasField s "vec'element" 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'element") Vector MemmappedFileSystemDirectoryElement
frozen'element MemmappedFileSystemDirectory
x))
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        10
                          -> do !MemmappedFileSystemDirectoryElement
y <- Parser MemmappedFileSystemDirectoryElement
-> String -> Parser MemmappedFileSystemDirectoryElement
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Int
-> Parser MemmappedFileSystemDirectoryElement
-> Parser MemmappedFileSystemDirectoryElement
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 MemmappedFileSystemDirectoryElement
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                        "element"
                                Growing Vector RealWorld MemmappedFileSystemDirectoryElement
v <- IO (Growing Vector RealWorld MemmappedFileSystemDirectoryElement)
-> Parser
     (Growing Vector RealWorld MemmappedFileSystemDirectoryElement)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Growing Vector (PrimState IO) MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement
-> IO
     (Growing Vector (PrimState IO) MemmappedFileSystemDirectoryElement)
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 MemmappedFileSystemDirectoryElement
Growing Vector (PrimState IO) MemmappedFileSystemDirectoryElement
mutable'element MemmappedFileSystemDirectoryElement
y)
                                MemmappedFileSystemDirectory
-> Growing Vector RealWorld MemmappedFileSystemDirectoryElement
-> Parser MemmappedFileSystemDirectory
loop MemmappedFileSystemDirectory
x Growing Vector RealWorld MemmappedFileSystemDirectoryElement
v
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                MemmappedFileSystemDirectory
-> Growing Vector RealWorld MemmappedFileSystemDirectoryElement
-> Parser MemmappedFileSystemDirectory
loop
                                  (Setter
  MemmappedFileSystemDirectory
  MemmappedFileSystemDirectory
  FieldSet
  FieldSet
-> (FieldSet -> FieldSet)
-> MemmappedFileSystemDirectory
-> MemmappedFileSystemDirectory
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
  MemmappedFileSystemDirectory
  MemmappedFileSystemDirectory
  FieldSet
  FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) MemmappedFileSystemDirectory
x)
                                  Growing Vector RealWorld MemmappedFileSystemDirectoryElement
mutable'element
      in
        Parser MemmappedFileSystemDirectory
-> String -> Parser MemmappedFileSystemDirectory
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do Growing Vector RealWorld MemmappedFileSystemDirectoryElement
mutable'element <- IO (Growing Vector RealWorld MemmappedFileSystemDirectoryElement)
-> Parser
     (Growing Vector RealWorld MemmappedFileSystemDirectoryElement)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                   IO (Growing Vector RealWorld MemmappedFileSystemDirectoryElement)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
              MemmappedFileSystemDirectory
-> Growing Vector RealWorld MemmappedFileSystemDirectoryElement
-> Parser MemmappedFileSystemDirectory
loop MemmappedFileSystemDirectory
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld MemmappedFileSystemDirectoryElement
mutable'element)
          "MemmappedFileSystemDirectory"
  buildMessage :: MemmappedFileSystemDirectory -> Builder
buildMessage
    = \ _x :: MemmappedFileSystemDirectory
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             ((MemmappedFileSystemDirectoryElement -> Builder)
-> Vector MemmappedFileSystemDirectoryElement -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                (\ _v :: MemmappedFileSystemDirectoryElement
_v
                   -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                        (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                        ((ByteString -> Builder)
-> (MemmappedFileSystemDirectoryElement -> ByteString)
-> MemmappedFileSystemDirectoryElement
-> 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))
                           MemmappedFileSystemDirectoryElement -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
                           MemmappedFileSystemDirectoryElement
_v))
                (FoldLike
  (Vector MemmappedFileSystemDirectoryElement)
  MemmappedFileSystemDirectory
  MemmappedFileSystemDirectory
  (Vector MemmappedFileSystemDirectoryElement)
  (Vector MemmappedFileSystemDirectoryElement)
-> MemmappedFileSystemDirectory
-> Vector MemmappedFileSystemDirectoryElement
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "vec'element" 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'element") MemmappedFileSystemDirectory
_x))
             (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                (FoldLike
  FieldSet
  MemmappedFileSystemDirectory
  MemmappedFileSystemDirectory
  FieldSet
  FieldSet
-> MemmappedFileSystemDirectory -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
  FieldSet
  MemmappedFileSystemDirectory
  MemmappedFileSystemDirectory
  FieldSet
  FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields MemmappedFileSystemDirectory
_x))
instance Control.DeepSeq.NFData MemmappedFileSystemDirectory where
  rnf :: MemmappedFileSystemDirectory -> ()
rnf
    = \ x__ :: MemmappedFileSystemDirectory
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (MemmappedFileSystemDirectory -> FieldSet
_MemmappedFileSystemDirectory'_unknownFields MemmappedFileSystemDirectory
x__)
             (Vector MemmappedFileSystemDirectoryElement -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (MemmappedFileSystemDirectory
-> Vector MemmappedFileSystemDirectoryElement
_MemmappedFileSystemDirectory'element MemmappedFileSystemDirectory
x__) ())
{- | Fields :
     
         * 'Proto.Tensorflow.Core.Util.MemmappedFileSystem_Fields.offset' @:: Lens' MemmappedFileSystemDirectoryElement Data.Word.Word64@
         * 'Proto.Tensorflow.Core.Util.MemmappedFileSystem_Fields.name' @:: Lens' MemmappedFileSystemDirectoryElement Data.Text.Text@
         * 'Proto.Tensorflow.Core.Util.MemmappedFileSystem_Fields.length' @:: Lens' MemmappedFileSystemDirectoryElement Data.Word.Word64@ -}
data MemmappedFileSystemDirectoryElement
  = MemmappedFileSystemDirectoryElement'_constructor {MemmappedFileSystemDirectoryElement -> Word64
_MemmappedFileSystemDirectoryElement'offset :: !Data.Word.Word64,
                                                      MemmappedFileSystemDirectoryElement -> Text
_MemmappedFileSystemDirectoryElement'name :: !Data.Text.Text,
                                                      MemmappedFileSystemDirectoryElement -> Word64
_MemmappedFileSystemDirectoryElement'length :: !Data.Word.Word64,
                                                      MemmappedFileSystemDirectoryElement -> FieldSet
_MemmappedFileSystemDirectoryElement'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement -> Bool
(MemmappedFileSystemDirectoryElement
 -> MemmappedFileSystemDirectoryElement -> Bool)
-> (MemmappedFileSystemDirectoryElement
    -> MemmappedFileSystemDirectoryElement -> Bool)
-> Eq MemmappedFileSystemDirectoryElement
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement -> Bool
$c/= :: MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement -> Bool
== :: MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement -> Bool
$c== :: MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement -> Bool
Prelude.Eq, Eq MemmappedFileSystemDirectoryElement
Eq MemmappedFileSystemDirectoryElement =>
(MemmappedFileSystemDirectoryElement
 -> MemmappedFileSystemDirectoryElement -> Ordering)
-> (MemmappedFileSystemDirectoryElement
    -> MemmappedFileSystemDirectoryElement -> Bool)
-> (MemmappedFileSystemDirectoryElement
    -> MemmappedFileSystemDirectoryElement -> Bool)
-> (MemmappedFileSystemDirectoryElement
    -> MemmappedFileSystemDirectoryElement -> Bool)
-> (MemmappedFileSystemDirectoryElement
    -> MemmappedFileSystemDirectoryElement -> Bool)
-> (MemmappedFileSystemDirectoryElement
    -> MemmappedFileSystemDirectoryElement
    -> MemmappedFileSystemDirectoryElement)
-> (MemmappedFileSystemDirectoryElement
    -> MemmappedFileSystemDirectoryElement
    -> MemmappedFileSystemDirectoryElement)
-> Ord MemmappedFileSystemDirectoryElement
MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement -> Bool
MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement -> Ordering
MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement
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 :: MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement
$cmin :: MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement
max :: MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement
$cmax :: MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement
>= :: MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement -> Bool
$c>= :: MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement -> Bool
> :: MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement -> Bool
$c> :: MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement -> Bool
<= :: MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement -> Bool
$c<= :: MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement -> Bool
< :: MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement -> Bool
$c< :: MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement -> Bool
compare :: MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement -> Ordering
$ccompare :: MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement -> Ordering
$cp1Ord :: Eq MemmappedFileSystemDirectoryElement
Prelude.Ord)
instance Prelude.Show MemmappedFileSystemDirectoryElement where
  showsPrec :: Int -> MemmappedFileSystemDirectoryElement -> ShowS
showsPrec _ __x :: MemmappedFileSystemDirectoryElement
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (MemmappedFileSystemDirectoryElement -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort MemmappedFileSystemDirectoryElement
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField MemmappedFileSystemDirectoryElement "offset" Data.Word.Word64 where
  fieldOf :: Proxy# "offset"
-> (Word64 -> f Word64)
-> MemmappedFileSystemDirectoryElement
-> f MemmappedFileSystemDirectoryElement
fieldOf _
    = ((Word64 -> f Word64)
 -> MemmappedFileSystemDirectoryElement
 -> f MemmappedFileSystemDirectoryElement)
-> ((Word64 -> f Word64) -> Word64 -> f Word64)
-> (Word64 -> f Word64)
-> MemmappedFileSystemDirectoryElement
-> f MemmappedFileSystemDirectoryElement
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((MemmappedFileSystemDirectoryElement -> Word64)
-> (MemmappedFileSystemDirectoryElement
    -> Word64 -> MemmappedFileSystemDirectoryElement)
-> Lens
     MemmappedFileSystemDirectoryElement
     MemmappedFileSystemDirectoryElement
     Word64
     Word64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           MemmappedFileSystemDirectoryElement -> Word64
_MemmappedFileSystemDirectoryElement'offset
           (\ x__ :: MemmappedFileSystemDirectoryElement
x__ y__ :: Word64
y__
              -> MemmappedFileSystemDirectoryElement
x__ {_MemmappedFileSystemDirectoryElement'offset :: Word64
_MemmappedFileSystemDirectoryElement'offset = Word64
y__}))
        (Word64 -> f Word64) -> Word64 -> f Word64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField MemmappedFileSystemDirectoryElement "name" Data.Text.Text where
  fieldOf :: Proxy# "name"
-> (Text -> f Text)
-> MemmappedFileSystemDirectoryElement
-> f MemmappedFileSystemDirectoryElement
fieldOf _
    = ((Text -> f Text)
 -> MemmappedFileSystemDirectoryElement
 -> f MemmappedFileSystemDirectoryElement)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> MemmappedFileSystemDirectoryElement
-> f MemmappedFileSystemDirectoryElement
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((MemmappedFileSystemDirectoryElement -> Text)
-> (MemmappedFileSystemDirectoryElement
    -> Text -> MemmappedFileSystemDirectoryElement)
-> Lens
     MemmappedFileSystemDirectoryElement
     MemmappedFileSystemDirectoryElement
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           MemmappedFileSystemDirectoryElement -> Text
_MemmappedFileSystemDirectoryElement'name
           (\ x__ :: MemmappedFileSystemDirectoryElement
x__ y__ :: Text
y__
              -> MemmappedFileSystemDirectoryElement
x__ {_MemmappedFileSystemDirectoryElement'name :: Text
_MemmappedFileSystemDirectoryElement'name = Text
y__}))
        (Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField MemmappedFileSystemDirectoryElement "length" Data.Word.Word64 where
  fieldOf :: Proxy# "length"
-> (Word64 -> f Word64)
-> MemmappedFileSystemDirectoryElement
-> f MemmappedFileSystemDirectoryElement
fieldOf _
    = ((Word64 -> f Word64)
 -> MemmappedFileSystemDirectoryElement
 -> f MemmappedFileSystemDirectoryElement)
-> ((Word64 -> f Word64) -> Word64 -> f Word64)
-> (Word64 -> f Word64)
-> MemmappedFileSystemDirectoryElement
-> f MemmappedFileSystemDirectoryElement
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((MemmappedFileSystemDirectoryElement -> Word64)
-> (MemmappedFileSystemDirectoryElement
    -> Word64 -> MemmappedFileSystemDirectoryElement)
-> Lens
     MemmappedFileSystemDirectoryElement
     MemmappedFileSystemDirectoryElement
     Word64
     Word64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           MemmappedFileSystemDirectoryElement -> Word64
_MemmappedFileSystemDirectoryElement'length
           (\ x__ :: MemmappedFileSystemDirectoryElement
x__ y__ :: Word64
y__
              -> MemmappedFileSystemDirectoryElement
x__ {_MemmappedFileSystemDirectoryElement'length :: Word64
_MemmappedFileSystemDirectoryElement'length = Word64
y__}))
        (Word64 -> f Word64) -> Word64 -> f Word64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message MemmappedFileSystemDirectoryElement where
  messageName :: Proxy MemmappedFileSystemDirectoryElement -> Text
messageName _
    = String -> Text
Data.Text.pack "tensorflow.MemmappedFileSystemDirectoryElement"
  packedMessageDescriptor :: Proxy MemmappedFileSystemDirectoryElement -> ByteString
packedMessageDescriptor _
    = "\n\
      \#MemmappedFileSystemDirectoryElement\DC2\SYN\n\
      \\ACKoffset\CAN\SOH \SOH(\EOTR\ACKoffset\DC2\DC2\n\
      \\EOTname\CAN\STX \SOH(\tR\EOTname\DC2\SYN\n\
      \\ACKlength\CAN\ETX \SOH(\EOTR\ACKlength"
  packedFileDescriptor :: Proxy MemmappedFileSystemDirectoryElement -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor MemmappedFileSystemDirectoryElement)
fieldsByTag
    = let
        offset__field_descriptor :: FieldDescriptor MemmappedFileSystemDirectoryElement
offset__field_descriptor
          = String
-> FieldTypeDescriptor Word64
-> FieldAccessor MemmappedFileSystemDirectoryElement Word64
-> FieldDescriptor MemmappedFileSystemDirectoryElement
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "offset"
              (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
     MemmappedFileSystemDirectoryElement
     MemmappedFileSystemDirectoryElement
     Word64
     Word64
-> FieldAccessor MemmappedFileSystemDirectoryElement 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 "offset" 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 @"offset")) ::
              Data.ProtoLens.FieldDescriptor MemmappedFileSystemDirectoryElement
        name__field_descriptor :: FieldDescriptor MemmappedFileSystemDirectoryElement
name__field_descriptor
          = String
-> FieldTypeDescriptor Text
-> FieldAccessor MemmappedFileSystemDirectoryElement Text
-> FieldDescriptor MemmappedFileSystemDirectoryElement
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
     MemmappedFileSystemDirectoryElement
     MemmappedFileSystemDirectoryElement
     Text
     Text
-> FieldAccessor MemmappedFileSystemDirectoryElement 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 MemmappedFileSystemDirectoryElement
        length__field_descriptor :: FieldDescriptor MemmappedFileSystemDirectoryElement
length__field_descriptor
          = String
-> FieldTypeDescriptor Word64
-> FieldAccessor MemmappedFileSystemDirectoryElement Word64
-> FieldDescriptor MemmappedFileSystemDirectoryElement
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "length"
              (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
     MemmappedFileSystemDirectoryElement
     MemmappedFileSystemDirectoryElement
     Word64
     Word64
-> FieldAccessor MemmappedFileSystemDirectoryElement 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 "length" 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 @"length")) ::
              Data.ProtoLens.FieldDescriptor MemmappedFileSystemDirectoryElement
      in
        [(Tag, FieldDescriptor MemmappedFileSystemDirectoryElement)]
-> Map Tag (FieldDescriptor MemmappedFileSystemDirectoryElement)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor MemmappedFileSystemDirectoryElement
offset__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor MemmappedFileSystemDirectoryElement
name__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 3, FieldDescriptor MemmappedFileSystemDirectoryElement
length__field_descriptor)]
  unknownFields :: LensLike' f MemmappedFileSystemDirectoryElement FieldSet
unknownFields
    = (MemmappedFileSystemDirectoryElement -> FieldSet)
-> (MemmappedFileSystemDirectoryElement
    -> FieldSet -> MemmappedFileSystemDirectoryElement)
-> Lens' MemmappedFileSystemDirectoryElement FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        MemmappedFileSystemDirectoryElement -> FieldSet
_MemmappedFileSystemDirectoryElement'_unknownFields
        (\ x__ :: MemmappedFileSystemDirectoryElement
x__ y__ :: FieldSet
y__
           -> MemmappedFileSystemDirectoryElement
x__ {_MemmappedFileSystemDirectoryElement'_unknownFields :: FieldSet
_MemmappedFileSystemDirectoryElement'_unknownFields = FieldSet
y__})
  defMessage :: MemmappedFileSystemDirectoryElement
defMessage
    = $WMemmappedFileSystemDirectoryElement'_constructor :: Word64
-> Text
-> Word64
-> FieldSet
-> MemmappedFileSystemDirectoryElement
MemmappedFileSystemDirectoryElement'_constructor
        {_MemmappedFileSystemDirectoryElement'offset :: Word64
_MemmappedFileSystemDirectoryElement'offset = Word64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _MemmappedFileSystemDirectoryElement'name :: Text
_MemmappedFileSystemDirectoryElement'name = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _MemmappedFileSystemDirectoryElement'length :: Word64
_MemmappedFileSystemDirectoryElement'length = Word64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _MemmappedFileSystemDirectoryElement'_unknownFields :: FieldSet
_MemmappedFileSystemDirectoryElement'_unknownFields = []}
  parseMessage :: Parser MemmappedFileSystemDirectoryElement
parseMessage
    = let
        loop ::
          MemmappedFileSystemDirectoryElement
          -> Data.ProtoLens.Encoding.Bytes.Parser MemmappedFileSystemDirectoryElement
        loop :: MemmappedFileSystemDirectoryElement
-> Parser MemmappedFileSystemDirectoryElement
loop x :: MemmappedFileSystemDirectoryElement
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]))))
                      MemmappedFileSystemDirectoryElement
-> Parser MemmappedFileSystemDirectoryElement
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter
  MemmappedFileSystemDirectoryElement
  MemmappedFileSystemDirectoryElement
  FieldSet
  FieldSet
-> (FieldSet -> FieldSet)
-> MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement
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
  MemmappedFileSystemDirectoryElement
  MemmappedFileSystemDirectoryElement
  FieldSet
  FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) MemmappedFileSystemDirectoryElement
x)
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        8 -> 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 "offset"
                                MemmappedFileSystemDirectoryElement
-> Parser MemmappedFileSystemDirectoryElement
loop (Setter
  MemmappedFileSystemDirectoryElement
  MemmappedFileSystemDirectoryElement
  Word64
  Word64
-> Word64
-> MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "offset" 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 @"offset") Word64
y MemmappedFileSystemDirectoryElement
x)
                        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))
                                       "name"
                                MemmappedFileSystemDirectoryElement
-> Parser MemmappedFileSystemDirectoryElement
loop (Setter
  MemmappedFileSystemDirectoryElement
  MemmappedFileSystemDirectoryElement
  Text
  Text
-> Text
-> MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement
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 MemmappedFileSystemDirectoryElement
x)
                        24
                          -> 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 "length"
                                MemmappedFileSystemDirectoryElement
-> Parser MemmappedFileSystemDirectoryElement
loop (Setter
  MemmappedFileSystemDirectoryElement
  MemmappedFileSystemDirectoryElement
  Word64
  Word64
-> Word64
-> MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "length" 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 @"length") Word64
y MemmappedFileSystemDirectoryElement
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                MemmappedFileSystemDirectoryElement
-> Parser MemmappedFileSystemDirectoryElement
loop
                                  (Setter
  MemmappedFileSystemDirectoryElement
  MemmappedFileSystemDirectoryElement
  FieldSet
  FieldSet
-> (FieldSet -> FieldSet)
-> MemmappedFileSystemDirectoryElement
-> MemmappedFileSystemDirectoryElement
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
  MemmappedFileSystemDirectoryElement
  MemmappedFileSystemDirectoryElement
  FieldSet
  FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) MemmappedFileSystemDirectoryElement
x)
      in
        Parser MemmappedFileSystemDirectoryElement
-> String -> Parser MemmappedFileSystemDirectoryElement
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do MemmappedFileSystemDirectoryElement
-> Parser MemmappedFileSystemDirectoryElement
loop MemmappedFileSystemDirectoryElement
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
          "MemmappedFileSystemDirectoryElement"
  buildMessage :: MemmappedFileSystemDirectoryElement -> Builder
buildMessage
    = \ _x :: MemmappedFileSystemDirectoryElement
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let
                _v :: Word64
_v = FoldLike
  Word64
  MemmappedFileSystemDirectoryElement
  MemmappedFileSystemDirectoryElement
  Word64
  Word64
-> MemmappedFileSystemDirectoryElement -> Word64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "offset" 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 @"offset") MemmappedFileSystemDirectoryElement
_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 8)
                      (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
  MemmappedFileSystemDirectoryElement
  MemmappedFileSystemDirectoryElement
  Text
  Text
-> MemmappedFileSystemDirectoryElement -> 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") MemmappedFileSystemDirectoryElement
_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 :: Word64
_v = FoldLike
  Word64
  MemmappedFileSystemDirectoryElement
  MemmappedFileSystemDirectoryElement
  Word64
  Word64
-> MemmappedFileSystemDirectoryElement -> Word64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "length" 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 @"length") MemmappedFileSystemDirectoryElement
_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 24)
                            (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
_v))
                   (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                      (FoldLike
  FieldSet
  MemmappedFileSystemDirectoryElement
  MemmappedFileSystemDirectoryElement
  FieldSet
  FieldSet
-> MemmappedFileSystemDirectoryElement -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
  FieldSet
  MemmappedFileSystemDirectoryElement
  MemmappedFileSystemDirectoryElement
  FieldSet
  FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields MemmappedFileSystemDirectoryElement
_x))))
instance Control.DeepSeq.NFData MemmappedFileSystemDirectoryElement where
  rnf :: MemmappedFileSystemDirectoryElement -> ()
rnf
    = \ x__ :: MemmappedFileSystemDirectoryElement
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (MemmappedFileSystemDirectoryElement -> FieldSet
_MemmappedFileSystemDirectoryElement'_unknownFields MemmappedFileSystemDirectoryElement
x__)
             (Word64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (MemmappedFileSystemDirectoryElement -> Word64
_MemmappedFileSystemDirectoryElement'offset MemmappedFileSystemDirectoryElement
x__)
                (Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                   (MemmappedFileSystemDirectoryElement -> Text
_MemmappedFileSystemDirectoryElement'name MemmappedFileSystemDirectoryElement
x__)
                   (Word64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                      (MemmappedFileSystemDirectoryElement -> Word64
_MemmappedFileSystemDirectoryElement'length MemmappedFileSystemDirectoryElement
x__) ())))
packedFileDescriptor :: Data.ByteString.ByteString
packedFileDescriptor :: ByteString
packedFileDescriptor
  = "\n\
    \0tensorflow/core/util/memmapped_file_system.proto\DC2\n\
    \tensorflow\"i\n\
    \#MemmappedFileSystemDirectoryElement\DC2\SYN\n\
    \\ACKoffset\CAN\SOH \SOH(\EOTR\ACKoffset\DC2\DC2\n\
    \\EOTname\CAN\STX \SOH(\tR\EOTname\DC2\SYN\n\
    \\ACKlength\CAN\ETX \SOH(\EOTR\ACKlength\"i\n\
    \\FSMemmappedFileSystemDirectory\DC2I\n\
    \\aelement\CAN\SOH \ETX(\v2/.tensorflow.MemmappedFileSystemDirectoryElementR\aelementB\ETX\248\SOH\SOHJ\204\b\n\
    \\ACK\DC2\EOT\SO\NUL\RS\SOH\n\
    \\159\ENQ\n\
    \\SOH\f\DC2\ETX\SO\NUL\DC2\SUB\148\ENQ Copyright 2016 The TensorFlow Authors. All Rights Reserved.\n\
    \\n\
    \Licensed under the Apache License, Version 2.0 (the \"License\");\n\
    \you may not use this file except in compliance with the License.\n\
    \You may obtain a copy of the License at\n\
    \\n\
    \http://www.apache.org/licenses/LICENSE-2.0\n\
    \\n\
    \Unless required by applicable law or agreed to in writing, software\n\
    \distributed under the License is distributed on an \"AS IS\" BASIS,\n\
    \WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\
    \See the License for the specific language governing permissions and\n\
    \limitations under the License.\n\
    \==============================================================================\n\
    \\b\n\
    \\SOH\STX\DC2\ETX\DLE\NUL\DC3\n\
    \\b\n\
    \\SOH\b\DC2\ETX\DC2\NUL\US\n\
    \\t\n\
    \\STX\b\US\DC2\ETX\DC2\NUL\US\n\
    \D\n\
    \\STX\EOT\NUL\DC2\EOT\NAK\NUL\EM\SOH\SUB8 A message that describes one region of memmapped file.\n\
    \\n\
    \\n\
    \\n\
    \\ETX\EOT\NUL\SOH\DC2\ETX\NAK\b+\n\
    \\v\n\
    \\EOT\EOT\NUL\STX\NUL\DC2\ETX\SYN\STX\DC4\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\ENQ\DC2\ETX\SYN\STX\b\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX\SYN\t\SI\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX\SYN\DC2\DC3\n\
    \\v\n\
    \\EOT\EOT\NUL\STX\SOH\DC2\ETX\ETB\STX\DC2\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\SOH\ENQ\DC2\ETX\ETB\STX\b\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\SOH\SOH\DC2\ETX\ETB\t\r\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\SOH\ETX\DC2\ETX\ETB\DLE\DC1\n\
    \\v\n\
    \\EOT\EOT\NUL\STX\STX\DC2\ETX\CAN\STX\DC4\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\SI\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\STX\ETX\DC2\ETX\CAN\DC2\DC3\n\
    \9\n\
    \\STX\EOT\SOH\DC2\EOT\FS\NUL\RS\SOH\SUB- A directory of regions in a memmapped file.\n\
    \\n\
    \\n\
    \\n\
    \\ETX\EOT\SOH\SOH\DC2\ETX\FS\b$\n\
    \\v\n\
    \\EOT\EOT\SOH\STX\NUL\DC2\ETX\GS\STX;\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\NUL\EOT\DC2\ETX\GS\STX\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\NUL\ACK\DC2\ETX\GS\v.\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\NUL\SOH\DC2\ETX\GS/6\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\NUL\ETX\DC2\ETX\GS9:b\ACKproto3"