{- This file was auto-generated from tensorflow/core/protobuf/saved_model.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.Protobuf.SavedModel (
        SavedModel()
    ) 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.Protobuf.MetaGraph
{- | Fields :
     
         * 'Proto.Tensorflow.Core.Protobuf.SavedModel_Fields.savedModelSchemaVersion' @:: Lens' SavedModel Data.Int.Int64@
         * 'Proto.Tensorflow.Core.Protobuf.SavedModel_Fields.metaGraphs' @:: Lens' SavedModel [Proto.Tensorflow.Core.Protobuf.MetaGraph.MetaGraphDef]@
         * 'Proto.Tensorflow.Core.Protobuf.SavedModel_Fields.vec'metaGraphs' @:: Lens' SavedModel (Data.Vector.Vector Proto.Tensorflow.Core.Protobuf.MetaGraph.MetaGraphDef)@ -}
data SavedModel
  = SavedModel'_constructor {SavedModel -> Int64
_SavedModel'savedModelSchemaVersion :: !Data.Int.Int64,
                             SavedModel -> Vector MetaGraphDef
_SavedModel'metaGraphs :: !(Data.Vector.Vector Proto.Tensorflow.Core.Protobuf.MetaGraph.MetaGraphDef),
                             SavedModel -> FieldSet
_SavedModel'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (SavedModel -> SavedModel -> Bool
(SavedModel -> SavedModel -> Bool)
-> (SavedModel -> SavedModel -> Bool) -> Eq SavedModel
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SavedModel -> SavedModel -> Bool
$c/= :: SavedModel -> SavedModel -> Bool
== :: SavedModel -> SavedModel -> Bool
$c== :: SavedModel -> SavedModel -> Bool
Prelude.Eq, Eq SavedModel
Eq SavedModel =>
(SavedModel -> SavedModel -> Ordering)
-> (SavedModel -> SavedModel -> Bool)
-> (SavedModel -> SavedModel -> Bool)
-> (SavedModel -> SavedModel -> Bool)
-> (SavedModel -> SavedModel -> Bool)
-> (SavedModel -> SavedModel -> SavedModel)
-> (SavedModel -> SavedModel -> SavedModel)
-> Ord SavedModel
SavedModel -> SavedModel -> Bool
SavedModel -> SavedModel -> Ordering
SavedModel -> SavedModel -> SavedModel
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 :: SavedModel -> SavedModel -> SavedModel
$cmin :: SavedModel -> SavedModel -> SavedModel
max :: SavedModel -> SavedModel -> SavedModel
$cmax :: SavedModel -> SavedModel -> SavedModel
>= :: SavedModel -> SavedModel -> Bool
$c>= :: SavedModel -> SavedModel -> Bool
> :: SavedModel -> SavedModel -> Bool
$c> :: SavedModel -> SavedModel -> Bool
<= :: SavedModel -> SavedModel -> Bool
$c<= :: SavedModel -> SavedModel -> Bool
< :: SavedModel -> SavedModel -> Bool
$c< :: SavedModel -> SavedModel -> Bool
compare :: SavedModel -> SavedModel -> Ordering
$ccompare :: SavedModel -> SavedModel -> Ordering
$cp1Ord :: Eq SavedModel
Prelude.Ord)
instance Prelude.Show SavedModel where
  showsPrec :: Int -> SavedModel -> ShowS
showsPrec _ __x :: SavedModel
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (SavedModel -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort SavedModel
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField SavedModel "savedModelSchemaVersion" Data.Int.Int64 where
  fieldOf :: Proxy# "savedModelSchemaVersion"
-> (Int64 -> f Int64) -> SavedModel -> f SavedModel
fieldOf _
    = ((Int64 -> f Int64) -> SavedModel -> f SavedModel)
-> ((Int64 -> f Int64) -> Int64 -> f Int64)
-> (Int64 -> f Int64)
-> SavedModel
-> f SavedModel
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((SavedModel -> Int64)
-> (SavedModel -> Int64 -> SavedModel)
-> Lens SavedModel SavedModel Int64 Int64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           SavedModel -> Int64
_SavedModel'savedModelSchemaVersion
           (\ x__ :: SavedModel
x__ y__ :: Int64
y__ -> SavedModel
x__ {_SavedModel'savedModelSchemaVersion :: Int64
_SavedModel'savedModelSchemaVersion = Int64
y__}))
        (Int64 -> f Int64) -> Int64 -> f Int64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField SavedModel "metaGraphs" [Proto.Tensorflow.Core.Protobuf.MetaGraph.MetaGraphDef] where
  fieldOf :: Proxy# "metaGraphs"
-> ([MetaGraphDef] -> f [MetaGraphDef])
-> SavedModel
-> f SavedModel
fieldOf _
    = ((Vector MetaGraphDef -> f (Vector MetaGraphDef))
 -> SavedModel -> f SavedModel)
-> (([MetaGraphDef] -> f [MetaGraphDef])
    -> Vector MetaGraphDef -> f (Vector MetaGraphDef))
-> ([MetaGraphDef] -> f [MetaGraphDef])
-> SavedModel
-> f SavedModel
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((SavedModel -> Vector MetaGraphDef)
-> (SavedModel -> Vector MetaGraphDef -> SavedModel)
-> Lens
     SavedModel SavedModel (Vector MetaGraphDef) (Vector MetaGraphDef)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           SavedModel -> Vector MetaGraphDef
_SavedModel'metaGraphs
           (\ x__ :: SavedModel
x__ y__ :: Vector MetaGraphDef
y__ -> SavedModel
x__ {_SavedModel'metaGraphs :: Vector MetaGraphDef
_SavedModel'metaGraphs = Vector MetaGraphDef
y__}))
        ((Vector MetaGraphDef -> [MetaGraphDef])
-> (Vector MetaGraphDef -> [MetaGraphDef] -> Vector MetaGraphDef)
-> Lens
     (Vector MetaGraphDef)
     (Vector MetaGraphDef)
     [MetaGraphDef]
     [MetaGraphDef]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Vector MetaGraphDef -> [MetaGraphDef]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
           (\ _ y__ :: [MetaGraphDef]
y__ -> [MetaGraphDef] -> Vector MetaGraphDef
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [MetaGraphDef]
y__))
instance Data.ProtoLens.Field.HasField SavedModel "vec'metaGraphs" (Data.Vector.Vector Proto.Tensorflow.Core.Protobuf.MetaGraph.MetaGraphDef) where
  fieldOf :: Proxy# "vec'metaGraphs"
-> (Vector MetaGraphDef -> f (Vector MetaGraphDef))
-> SavedModel
-> f SavedModel
fieldOf _
    = ((Vector MetaGraphDef -> f (Vector MetaGraphDef))
 -> SavedModel -> f SavedModel)
-> ((Vector MetaGraphDef -> f (Vector MetaGraphDef))
    -> Vector MetaGraphDef -> f (Vector MetaGraphDef))
-> (Vector MetaGraphDef -> f (Vector MetaGraphDef))
-> SavedModel
-> f SavedModel
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((SavedModel -> Vector MetaGraphDef)
-> (SavedModel -> Vector MetaGraphDef -> SavedModel)
-> Lens
     SavedModel SavedModel (Vector MetaGraphDef) (Vector MetaGraphDef)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           SavedModel -> Vector MetaGraphDef
_SavedModel'metaGraphs
           (\ x__ :: SavedModel
x__ y__ :: Vector MetaGraphDef
y__ -> SavedModel
x__ {_SavedModel'metaGraphs :: Vector MetaGraphDef
_SavedModel'metaGraphs = Vector MetaGraphDef
y__}))
        (Vector MetaGraphDef -> f (Vector MetaGraphDef))
-> Vector MetaGraphDef -> f (Vector MetaGraphDef)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message SavedModel where
  messageName :: Proxy SavedModel -> Text
messageName _ = String -> Text
Data.Text.pack "tensorflow.SavedModel"
  packedMessageDescriptor :: Proxy SavedModel -> ByteString
packedMessageDescriptor _
    = "\n\
      \\n\
      \SavedModel\DC2;\n\
      \\SUBsaved_model_schema_version\CAN\SOH \SOH(\ETXR\ETBsavedModelSchemaVersion\DC29\n\
      \\vmeta_graphs\CAN\STX \ETX(\v2\CAN.tensorflow.MetaGraphDefR\n\
      \metaGraphs"
  packedFileDescriptor :: Proxy SavedModel -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor SavedModel)
fieldsByTag
    = let
        savedModelSchemaVersion__field_descriptor :: FieldDescriptor SavedModel
savedModelSchemaVersion__field_descriptor
          = String
-> FieldTypeDescriptor Int64
-> FieldAccessor SavedModel Int64
-> FieldDescriptor SavedModel
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "saved_model_schema_version"
              (ScalarField Int64 -> FieldTypeDescriptor Int64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int64
Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (WireDefault Int64
-> Lens SavedModel SavedModel Int64 Int64
-> FieldAccessor SavedModel Int64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault Int64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
                 (forall s a (f :: * -> *).
(HasField s "savedModelSchemaVersion" 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 @"savedModelSchemaVersion")) ::
              Data.ProtoLens.FieldDescriptor SavedModel
        metaGraphs__field_descriptor :: FieldDescriptor SavedModel
metaGraphs__field_descriptor
          = String
-> FieldTypeDescriptor MetaGraphDef
-> FieldAccessor SavedModel MetaGraphDef
-> FieldDescriptor SavedModel
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "meta_graphs"
              (MessageOrGroup -> FieldTypeDescriptor MetaGraphDef
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Proto.Tensorflow.Core.Protobuf.MetaGraph.MetaGraphDef)
              (Packing
-> Lens' SavedModel [MetaGraphDef]
-> FieldAccessor SavedModel MetaGraphDef
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
                 Packing
Data.ProtoLens.Unpacked
                 (forall s a (f :: * -> *).
(HasField s "metaGraphs" 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 @"metaGraphs")) ::
              Data.ProtoLens.FieldDescriptor SavedModel
      in
        [(Tag, FieldDescriptor SavedModel)]
-> Map Tag (FieldDescriptor SavedModel)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor SavedModel
savedModelSchemaVersion__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor SavedModel
metaGraphs__field_descriptor)]
  unknownFields :: LensLike' f SavedModel FieldSet
unknownFields
    = (SavedModel -> FieldSet)
-> (SavedModel -> FieldSet -> SavedModel)
-> Lens' SavedModel FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        SavedModel -> FieldSet
_SavedModel'_unknownFields
        (\ x__ :: SavedModel
x__ y__ :: FieldSet
y__ -> SavedModel
x__ {_SavedModel'_unknownFields :: FieldSet
_SavedModel'_unknownFields = FieldSet
y__})
  defMessage :: SavedModel
defMessage
    = $WSavedModel'_constructor :: Int64 -> Vector MetaGraphDef -> FieldSet -> SavedModel
SavedModel'_constructor
        {_SavedModel'savedModelSchemaVersion :: Int64
_SavedModel'savedModelSchemaVersion = Int64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _SavedModel'metaGraphs :: Vector MetaGraphDef
_SavedModel'metaGraphs = Vector MetaGraphDef
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
         _SavedModel'_unknownFields :: FieldSet
_SavedModel'_unknownFields = []}
  parseMessage :: Parser SavedModel
parseMessage
    = let
        loop ::
          SavedModel
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Proto.Tensorflow.Core.Protobuf.MetaGraph.MetaGraphDef
             -> Data.ProtoLens.Encoding.Bytes.Parser SavedModel
        loop :: SavedModel
-> Growing Vector RealWorld MetaGraphDef -> Parser SavedModel
loop x :: SavedModel
x mutable'metaGraphs :: Growing Vector RealWorld MetaGraphDef
mutable'metaGraphs
          = do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
               if Bool
end then
                   do Vector MetaGraphDef
frozen'metaGraphs <- IO (Vector MetaGraphDef) -> Parser (Vector MetaGraphDef)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                             (Growing Vector (PrimState IO) MetaGraphDef
-> IO (Vector MetaGraphDef)
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 MetaGraphDef
Growing Vector (PrimState IO) MetaGraphDef
mutable'metaGraphs)
                      (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]))))
                      SavedModel -> Parser SavedModel
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter SavedModel SavedModel FieldSet FieldSet
-> (FieldSet -> FieldSet) -> SavedModel -> SavedModel
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 SavedModel SavedModel FieldSet FieldSet
Data.ProtoLens.unknownFields
                           (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
                           (Setter
  SavedModel SavedModel (Vector MetaGraphDef) (Vector MetaGraphDef)
-> Vector MetaGraphDef -> SavedModel -> SavedModel
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
                              (forall s a (f :: * -> *).
(HasField s "vec'metaGraphs" 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'metaGraphs")
                              Vector MetaGraphDef
frozen'metaGraphs
                              SavedModel
x))
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        8 -> do Int64
y <- Parser Int64 -> String -> Parser Int64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       ((Word64 -> Int64) -> Parser Word64 -> Parser Int64
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
                                          Word64 -> Int64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
                                          Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
                                       "saved_model_schema_version"
                                SavedModel
-> Growing Vector RealWorld MetaGraphDef -> Parser SavedModel
loop
                                  (Setter SavedModel SavedModel Int64 Int64
-> Int64 -> SavedModel -> SavedModel
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
                                     (forall s a (f :: * -> *).
(HasField s "savedModelSchemaVersion" 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 @"savedModelSchemaVersion") Int64
y SavedModel
x)
                                  Growing Vector RealWorld MetaGraphDef
mutable'metaGraphs
                        18
                          -> do !MetaGraphDef
y <- Parser MetaGraphDef -> String -> Parser MetaGraphDef
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Int -> Parser MetaGraphDef -> Parser MetaGraphDef
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 MetaGraphDef
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                        "meta_graphs"
                                Growing Vector RealWorld MetaGraphDef
v <- IO (Growing Vector RealWorld MetaGraphDef)
-> Parser (Growing Vector RealWorld MetaGraphDef)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Growing Vector (PrimState IO) MetaGraphDef
-> MetaGraphDef -> IO (Growing Vector (PrimState IO) MetaGraphDef)
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 MetaGraphDef
Growing Vector (PrimState IO) MetaGraphDef
mutable'metaGraphs MetaGraphDef
y)
                                SavedModel
-> Growing Vector RealWorld MetaGraphDef -> Parser SavedModel
loop SavedModel
x Growing Vector RealWorld MetaGraphDef
v
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                SavedModel
-> Growing Vector RealWorld MetaGraphDef -> Parser SavedModel
loop
                                  (Setter SavedModel SavedModel FieldSet FieldSet
-> (FieldSet -> FieldSet) -> SavedModel -> SavedModel
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 SavedModel SavedModel FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) SavedModel
x)
                                  Growing Vector RealWorld MetaGraphDef
mutable'metaGraphs
      in
        Parser SavedModel -> String -> Parser SavedModel
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do Growing Vector RealWorld MetaGraphDef
mutable'metaGraphs <- IO (Growing Vector RealWorld MetaGraphDef)
-> Parser (Growing Vector RealWorld MetaGraphDef)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                      IO (Growing Vector RealWorld MetaGraphDef)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
              SavedModel
-> Growing Vector RealWorld MetaGraphDef -> Parser SavedModel
loop SavedModel
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld MetaGraphDef
mutable'metaGraphs)
          "SavedModel"
  buildMessage :: SavedModel -> Builder
buildMessage
    = \ _x :: SavedModel
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let
                _v :: Int64
_v
                  = FoldLike Int64 SavedModel SavedModel Int64 Int64
-> SavedModel -> Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
                      (forall s a (f :: * -> *).
(HasField s "savedModelSchemaVersion" 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 @"savedModelSchemaVersion") SavedModel
_x
              in
                if Int64 -> Int64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int64
_v Int64
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) -> (Int64 -> Word64) -> Int64 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                         Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Int64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Int64
_v))
             (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                ((MetaGraphDef -> Builder) -> Vector MetaGraphDef -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                   (\ _v :: MetaGraphDef
_v
                      -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                           (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                           ((ByteString -> Builder)
-> (MetaGraphDef -> ByteString) -> MetaGraphDef -> 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))
                              MetaGraphDef -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
                              MetaGraphDef
_v))
                   (FoldLike
  (Vector MetaGraphDef)
  SavedModel
  SavedModel
  (Vector MetaGraphDef)
  (Vector MetaGraphDef)
-> SavedModel -> Vector MetaGraphDef
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
                      (forall s a (f :: * -> *).
(HasField s "vec'metaGraphs" 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'metaGraphs") SavedModel
_x))
                (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (FoldLike FieldSet SavedModel SavedModel FieldSet FieldSet
-> SavedModel -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet SavedModel SavedModel FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields SavedModel
_x)))
instance Control.DeepSeq.NFData SavedModel where
  rnf :: SavedModel -> ()
rnf
    = \ x__ :: SavedModel
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (SavedModel -> FieldSet
_SavedModel'_unknownFields SavedModel
x__)
             (Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (SavedModel -> Int64
_SavedModel'savedModelSchemaVersion SavedModel
x__)
                (Vector MetaGraphDef -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (SavedModel -> Vector MetaGraphDef
_SavedModel'metaGraphs SavedModel
x__) ()))
packedFileDescriptor :: Data.ByteString.ByteString
packedFileDescriptor :: ByteString
packedFileDescriptor
  = "\n\
    \*tensorflow/core/protobuf/saved_model.proto\DC2\n\
    \tensorflow\SUB)tensorflow/core/protobuf/meta_graph.proto\"\132\SOH\n\
    \\n\
    \SavedModel\DC2;\n\
    \\SUBsaved_model_schema_version\CAN\SOH \SOH(\ETXR\ETBsavedModelSchemaVersion\DC29\n\
    \\vmeta_graphs\CAN\STX \ETX(\v2\CAN.tensorflow.MetaGraphDefR\n\
    \metaGraphsB{\n\
    \\CANorg.tensorflow.frameworkB\DLESavedModelProtosP\SOHZHgithub.com/tensorflow/tensorflow/tensorflow/go/core/core_protos_go_proto\248\SOH\SOHJ\131\ENQ\n\
    \\ACK\DC2\EOT\NUL\NUL\SYN\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\NUL3\n\
    \\b\n\
    \\SOH\b\DC2\ETX\ACK\NUL\US\n\
    \\t\n\
    \\STX\b\US\DC2\ETX\ACK\NUL\US\n\
    \\b\n\
    \\SOH\b\DC2\ETX\a\NUL1\n\
    \\t\n\
    \\STX\b\b\DC2\ETX\a\NUL1\n\
    \\b\n\
    \\SOH\b\DC2\ETX\b\NUL\"\n\
    \\t\n\
    \\STX\b\n\
    \\DC2\ETX\b\NUL\"\n\
    \\b\n\
    \\SOH\b\DC2\ETX\t\NUL1\n\
    \\t\n\
    \\STX\b\SOH\DC2\ETX\t\NUL1\n\
    \\b\n\
    \\SOH\b\DC2\ETX\n\
    \\NUL_\n\
    \\t\n\
    \\STX\b\v\DC2\ETX\n\
    \\NUL_\n\
    \\159\SOH\n\
    \\STX\EOT\NUL\DC2\EOT\SO\NUL\SYN\SOH\SUB\146\SOH SavedModel is the high level serialization format for TensorFlow Models.\n\
    \ See [todo: doc links, similar to session_bundle] for more information.\n\
    \\n\
    \\n\
    \\n\
    \\ETX\EOT\NUL\SOH\DC2\ETX\SO\b\DC2\n\
    \\184\SOH\n\
    \\EOT\EOT\NUL\STX\NUL\DC2\ETX\DC2\STX'\SUB\170\SOH The schema version of the SavedModel instance. Used for versioning when\n\
    \ making future changes to the specification/implementation. Initial value\n\
    \ at release will be 1.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\ENQ\DC2\ETX\DC2\STX\a\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX\DC2\b\"\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX\DC2%&\n\
    \&\n\
    \\EOT\EOT\NUL\STX\SOH\DC2\ETX\NAK\STX(\SUB\EM One or more MetaGraphs.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\SOH\EOT\DC2\ETX\NAK\STX\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\SOH\ACK\DC2\ETX\NAK\v\ETB\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\SOH\SOH\DC2\ETX\NAK\CAN#\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\SOH\ETX\DC2\ETX\NAK&'b\ACKproto3"