{-# 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.Versions (
VersionDef()
) 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
data VersionDef
= VersionDef'_constructor {VersionDef -> Int32
_VersionDef'producer :: !Data.Int.Int32,
VersionDef -> Int32
_VersionDef'minConsumer :: !Data.Int.Int32,
VersionDef -> Vector Int32
_VersionDef'badConsumers :: !(Data.Vector.Unboxed.Vector Data.Int.Int32),
VersionDef -> FieldSet
_VersionDef'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (VersionDef -> VersionDef -> Bool
(VersionDef -> VersionDef -> Bool)
-> (VersionDef -> VersionDef -> Bool) -> Eq VersionDef
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VersionDef -> VersionDef -> Bool
$c/= :: VersionDef -> VersionDef -> Bool
== :: VersionDef -> VersionDef -> Bool
$c== :: VersionDef -> VersionDef -> Bool
Prelude.Eq, Eq VersionDef
Eq VersionDef =>
(VersionDef -> VersionDef -> Ordering)
-> (VersionDef -> VersionDef -> Bool)
-> (VersionDef -> VersionDef -> Bool)
-> (VersionDef -> VersionDef -> Bool)
-> (VersionDef -> VersionDef -> Bool)
-> (VersionDef -> VersionDef -> VersionDef)
-> (VersionDef -> VersionDef -> VersionDef)
-> Ord VersionDef
VersionDef -> VersionDef -> Bool
VersionDef -> VersionDef -> Ordering
VersionDef -> VersionDef -> VersionDef
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 :: VersionDef -> VersionDef -> VersionDef
$cmin :: VersionDef -> VersionDef -> VersionDef
max :: VersionDef -> VersionDef -> VersionDef
$cmax :: VersionDef -> VersionDef -> VersionDef
>= :: VersionDef -> VersionDef -> Bool
$c>= :: VersionDef -> VersionDef -> Bool
> :: VersionDef -> VersionDef -> Bool
$c> :: VersionDef -> VersionDef -> Bool
<= :: VersionDef -> VersionDef -> Bool
$c<= :: VersionDef -> VersionDef -> Bool
< :: VersionDef -> VersionDef -> Bool
$c< :: VersionDef -> VersionDef -> Bool
compare :: VersionDef -> VersionDef -> Ordering
$ccompare :: VersionDef -> VersionDef -> Ordering
$cp1Ord :: Eq VersionDef
Prelude.Ord)
instance Prelude.Show VersionDef where
showsPrec :: Int -> VersionDef -> ShowS
showsPrec _ __x :: VersionDef
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(VersionDef -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort VersionDef
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField VersionDef "producer" Data.Int.Int32 where
fieldOf :: Proxy# "producer"
-> (Int32 -> f Int32) -> VersionDef -> f VersionDef
fieldOf _
= ((Int32 -> f Int32) -> VersionDef -> f VersionDef)
-> ((Int32 -> f Int32) -> Int32 -> f Int32)
-> (Int32 -> f Int32)
-> VersionDef
-> f VersionDef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((VersionDef -> Int32)
-> (VersionDef -> Int32 -> VersionDef)
-> Lens VersionDef VersionDef Int32 Int32
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
VersionDef -> Int32
_VersionDef'producer
(\ x__ :: VersionDef
x__ y__ :: Int32
y__ -> VersionDef
x__ {_VersionDef'producer :: Int32
_VersionDef'producer = Int32
y__}))
(Int32 -> f Int32) -> Int32 -> f Int32
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField VersionDef "minConsumer" Data.Int.Int32 where
fieldOf :: Proxy# "minConsumer"
-> (Int32 -> f Int32) -> VersionDef -> f VersionDef
fieldOf _
= ((Int32 -> f Int32) -> VersionDef -> f VersionDef)
-> ((Int32 -> f Int32) -> Int32 -> f Int32)
-> (Int32 -> f Int32)
-> VersionDef
-> f VersionDef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((VersionDef -> Int32)
-> (VersionDef -> Int32 -> VersionDef)
-> Lens VersionDef VersionDef Int32 Int32
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
VersionDef -> Int32
_VersionDef'minConsumer
(\ x__ :: VersionDef
x__ y__ :: Int32
y__ -> VersionDef
x__ {_VersionDef'minConsumer :: Int32
_VersionDef'minConsumer = Int32
y__}))
(Int32 -> f Int32) -> Int32 -> f Int32
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField VersionDef "badConsumers" [Data.Int.Int32] where
fieldOf :: Proxy# "badConsumers"
-> ([Int32] -> f [Int32]) -> VersionDef -> f VersionDef
fieldOf _
= ((Vector Int32 -> f (Vector Int32)) -> VersionDef -> f VersionDef)
-> (([Int32] -> f [Int32]) -> Vector Int32 -> f (Vector Int32))
-> ([Int32] -> f [Int32])
-> VersionDef
-> f VersionDef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((VersionDef -> Vector Int32)
-> (VersionDef -> Vector Int32 -> VersionDef)
-> Lens VersionDef VersionDef (Vector Int32) (Vector Int32)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
VersionDef -> Vector Int32
_VersionDef'badConsumers
(\ x__ :: VersionDef
x__ y__ :: Vector Int32
y__ -> VersionDef
x__ {_VersionDef'badConsumers :: Vector Int32
_VersionDef'badConsumers = Vector Int32
y__}))
((Vector Int32 -> [Int32])
-> (Vector Int32 -> [Int32] -> Vector Int32)
-> Lens (Vector Int32) (Vector Int32) [Int32] [Int32]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Vector Int32 -> [Int32]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
(\ _ y__ :: [Int32]
y__ -> [Int32] -> Vector Int32
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [Int32]
y__))
instance Data.ProtoLens.Field.HasField VersionDef "vec'badConsumers" (Data.Vector.Unboxed.Vector Data.Int.Int32) where
fieldOf :: Proxy# "vec'badConsumers"
-> (Vector Int32 -> f (Vector Int32)) -> VersionDef -> f VersionDef
fieldOf _
= ((Vector Int32 -> f (Vector Int32)) -> VersionDef -> f VersionDef)
-> ((Vector Int32 -> f (Vector Int32))
-> Vector Int32 -> f (Vector Int32))
-> (Vector Int32 -> f (Vector Int32))
-> VersionDef
-> f VersionDef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((VersionDef -> Vector Int32)
-> (VersionDef -> Vector Int32 -> VersionDef)
-> Lens VersionDef VersionDef (Vector Int32) (Vector Int32)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
VersionDef -> Vector Int32
_VersionDef'badConsumers
(\ x__ :: VersionDef
x__ y__ :: Vector Int32
y__ -> VersionDef
x__ {_VersionDef'badConsumers :: Vector Int32
_VersionDef'badConsumers = Vector Int32
y__}))
(Vector Int32 -> f (Vector Int32))
-> Vector Int32 -> f (Vector Int32)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message VersionDef where
messageName :: Proxy VersionDef -> Text
messageName _ = String -> Text
Data.Text.pack "tensorflow.VersionDef"
packedMessageDescriptor :: Proxy VersionDef -> ByteString
packedMessageDescriptor _
= "\n\
\\n\
\VersionDef\DC2\SUB\n\
\\bproducer\CAN\SOH \SOH(\ENQR\bproducer\DC2!\n\
\\fmin_consumer\CAN\STX \SOH(\ENQR\vminConsumer\DC2#\n\
\\rbad_consumers\CAN\ETX \ETX(\ENQR\fbadConsumers"
packedFileDescriptor :: Proxy VersionDef -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor VersionDef)
fieldsByTag
= let
producer__field_descriptor :: FieldDescriptor VersionDef
producer__field_descriptor
= String
-> FieldTypeDescriptor Int32
-> FieldAccessor VersionDef Int32
-> FieldDescriptor VersionDef
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"producer"
(ScalarField Int32 -> FieldTypeDescriptor Int32
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int32
Data.ProtoLens.Int32Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
(WireDefault Int32
-> Lens VersionDef VersionDef Int32 Int32
-> FieldAccessor VersionDef Int32
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Int32
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
(forall s a (f :: * -> *).
(HasField s "producer" 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 @"producer")) ::
Data.ProtoLens.FieldDescriptor VersionDef
minConsumer__field_descriptor :: FieldDescriptor VersionDef
minConsumer__field_descriptor
= String
-> FieldTypeDescriptor Int32
-> FieldAccessor VersionDef Int32
-> FieldDescriptor VersionDef
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"min_consumer"
(ScalarField Int32 -> FieldTypeDescriptor Int32
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int32
Data.ProtoLens.Int32Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
(WireDefault Int32
-> Lens VersionDef VersionDef Int32 Int32
-> FieldAccessor VersionDef Int32
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Int32
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
(forall s a (f :: * -> *).
(HasField s "minConsumer" 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 @"minConsumer")) ::
Data.ProtoLens.FieldDescriptor VersionDef
badConsumers__field_descriptor :: FieldDescriptor VersionDef
badConsumers__field_descriptor
= String
-> FieldTypeDescriptor Int32
-> FieldAccessor VersionDef Int32
-> FieldDescriptor VersionDef
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"bad_consumers"
(ScalarField Int32 -> FieldTypeDescriptor Int32
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int32
Data.ProtoLens.Int32Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
(Packing
-> Lens' VersionDef [Int32] -> FieldAccessor VersionDef Int32
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
Packing
Data.ProtoLens.Packed
(forall s a (f :: * -> *).
(HasField s "badConsumers" 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 @"badConsumers")) ::
Data.ProtoLens.FieldDescriptor VersionDef
in
[(Tag, FieldDescriptor VersionDef)]
-> Map Tag (FieldDescriptor VersionDef)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor VersionDef
producer__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor VersionDef
minConsumer__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 3, FieldDescriptor VersionDef
badConsumers__field_descriptor)]
unknownFields :: LensLike' f VersionDef FieldSet
unknownFields
= (VersionDef -> FieldSet)
-> (VersionDef -> FieldSet -> VersionDef)
-> Lens' VersionDef FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
VersionDef -> FieldSet
_VersionDef'_unknownFields
(\ x__ :: VersionDef
x__ y__ :: FieldSet
y__ -> VersionDef
x__ {_VersionDef'_unknownFields :: FieldSet
_VersionDef'_unknownFields = FieldSet
y__})
defMessage :: VersionDef
defMessage
= $WVersionDef'_constructor :: Int32 -> Int32 -> Vector Int32 -> FieldSet -> VersionDef
VersionDef'_constructor
{_VersionDef'producer :: Int32
_VersionDef'producer = Int32
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_VersionDef'minConsumer :: Int32
_VersionDef'minConsumer = Int32
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_VersionDef'badConsumers :: Vector Int32
_VersionDef'badConsumers = Vector Int32
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
_VersionDef'_unknownFields :: FieldSet
_VersionDef'_unknownFields = []}
parseMessage :: Parser VersionDef
parseMessage
= let
loop ::
VersionDef
-> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Unboxed.Vector Data.ProtoLens.Encoding.Growing.RealWorld Data.Int.Int32
-> Data.ProtoLens.Encoding.Bytes.Parser VersionDef
loop :: VersionDef -> Growing Vector RealWorld Int32 -> Parser VersionDef
loop x :: VersionDef
x mutable'badConsumers :: Growing Vector RealWorld Int32
mutable'badConsumers
= do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if Bool
end then
do Vector Int32
frozen'badConsumers <- IO (Vector Int32) -> Parser (Vector Int32)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) Int32 -> IO (Vector Int32)
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 Int32
Growing Vector (PrimState IO) Int32
mutable'badConsumers)
(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]))))
VersionDef -> Parser VersionDef
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter VersionDef VersionDef FieldSet FieldSet
-> (FieldSet -> FieldSet) -> VersionDef -> VersionDef
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 VersionDef VersionDef FieldSet FieldSet
Data.ProtoLens.unknownFields
(\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
(Setter VersionDef VersionDef (Vector Int32) (Vector Int32)
-> Vector Int32 -> VersionDef -> VersionDef
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "vec'badConsumers" 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'badConsumers")
Vector Int32
frozen'badConsumers
VersionDef
x))
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
8 -> do Int32
y <- Parser Int32 -> String -> Parser Int32
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Int32) -> Parser Word64 -> Parser Int32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Int32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"producer"
VersionDef -> Growing Vector RealWorld Int32 -> Parser VersionDef
loop
(Setter VersionDef VersionDef Int32 Int32
-> Int32 -> VersionDef -> VersionDef
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "producer" 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 @"producer") Int32
y VersionDef
x)
Growing Vector RealWorld Int32
mutable'badConsumers
16
-> do Int32
y <- Parser Int32 -> String -> Parser Int32
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Int32) -> Parser Word64 -> Parser Int32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Int32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"min_consumer"
VersionDef -> Growing Vector RealWorld Int32 -> Parser VersionDef
loop
(Setter VersionDef VersionDef Int32 Int32
-> Int32 -> VersionDef -> VersionDef
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "minConsumer" 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 @"minConsumer") Int32
y VersionDef
x)
Growing Vector RealWorld Int32
mutable'badConsumers
24
-> do !Int32
y <- Parser Int32 -> String -> Parser Int32
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Int32) -> Parser Word64 -> Parser Int32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Int32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"bad_consumers"
Growing Vector RealWorld Int32
v <- IO (Growing Vector RealWorld Int32)
-> Parser (Growing Vector RealWorld Int32)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) Int32
-> Int32 -> IO (Growing Vector (PrimState IO) Int32)
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 Int32
Growing Vector (PrimState IO) Int32
mutable'badConsumers Int32
y)
VersionDef -> Growing Vector RealWorld Int32 -> Parser VersionDef
loop VersionDef
x Growing Vector RealWorld Int32
v
26
-> do Growing Vector RealWorld Int32
y <- do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int
-> Parser (Growing Vector RealWorld Int32)
-> Parser (Growing Vector RealWorld Int32)
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)
((let
ploop :: Growing v RealWorld a -> Parser (Growing v RealWorld a)
ploop qs :: Growing v RealWorld a
qs
= do Bool
packedEnd <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if Bool
packedEnd then
Growing v RealWorld a -> Parser (Growing v RealWorld a)
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return Growing v RealWorld a
qs
else
do !a
q <- Parser a -> String -> Parser a
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> a) -> Parser Word64 -> Parser a
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> a
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"bad_consumers"
Growing v RealWorld a
qs' <- IO (Growing v RealWorld a) -> Parser (Growing v RealWorld a)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing v (PrimState IO) a -> a -> IO (Growing v (PrimState IO) a)
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 v RealWorld a
Growing v (PrimState IO) a
qs a
q)
Growing v RealWorld a -> Parser (Growing v RealWorld a)
ploop Growing v RealWorld a
qs'
in forall a (v :: * -> *).
(Num a, Vector v a) =>
Growing v RealWorld a -> Parser (Growing v RealWorld a)
ploop)
Growing Vector RealWorld Int32
mutable'badConsumers)
VersionDef -> Growing Vector RealWorld Int32 -> Parser VersionDef
loop VersionDef
x Growing Vector RealWorld Int32
y
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
VersionDef -> Growing Vector RealWorld Int32 -> Parser VersionDef
loop
(Setter VersionDef VersionDef FieldSet FieldSet
-> (FieldSet -> FieldSet) -> VersionDef -> VersionDef
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 VersionDef VersionDef FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) VersionDef
x)
Growing Vector RealWorld Int32
mutable'badConsumers
in
Parser VersionDef -> String -> Parser VersionDef
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Growing Vector RealWorld Int32
mutable'badConsumers <- IO (Growing Vector RealWorld Int32)
-> Parser (Growing Vector RealWorld Int32)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
IO (Growing Vector RealWorld Int32)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
VersionDef -> Growing Vector RealWorld Int32 -> Parser VersionDef
loop VersionDef
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld Int32
mutable'badConsumers)
"VersionDef"
buildMessage :: VersionDef -> Builder
buildMessage
= \ _x :: VersionDef
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Int32
_v = FoldLike Int32 VersionDef VersionDef Int32 Int32
-> VersionDef -> Int32
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "producer" 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 @"producer") VersionDef
_x
in
if Int32 -> Int32 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int32
_v Int32
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) -> (Int32 -> Word64) -> Int32 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Int32 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Int32
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Int32
_v
= FoldLike Int32 VersionDef VersionDef Int32 Int32
-> VersionDef -> Int32
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "minConsumer" 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 @"minConsumer") VersionDef
_x
in
if Int32 -> Int32 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Int32
_v Int32
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 16)
((Word64 -> Builder) -> (Int32 -> Word64) -> Int32 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Int32 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Int32
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
p :: Vector Int32
p = FoldLike
(Vector Int32) VersionDef VersionDef (Vector Int32) (Vector Int32)
-> VersionDef -> Vector Int32
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "vec'badConsumers" 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'badConsumers") VersionDef
_x
in
if Vector Int32 -> Bool
forall (v :: * -> *) a. Vector v a => v a -> Bool
Data.Vector.Generic.null Vector Int32
p 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)
((\ 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))
(Builder -> ByteString
Data.ProtoLens.Encoding.Bytes.runBuilder
((Int32 -> Builder) -> Vector Int32 -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
((Word64 -> Builder) -> (Int32 -> Word64) -> Int32 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
Int32 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral)
Vector Int32
p))))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet VersionDef VersionDef FieldSet FieldSet
-> VersionDef -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet VersionDef VersionDef FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields VersionDef
_x))))
instance Control.DeepSeq.NFData VersionDef where
rnf :: VersionDef -> ()
rnf
= \ x__ :: VersionDef
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(VersionDef -> FieldSet
_VersionDef'_unknownFields VersionDef
x__)
(Int32 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(VersionDef -> Int32
_VersionDef'producer VersionDef
x__)
(Int32 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(VersionDef -> Int32
_VersionDef'minConsumer VersionDef
x__)
(Vector Int32 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (VersionDef -> Vector Int32
_VersionDef'badConsumers VersionDef
x__) ())))
packedFileDescriptor :: Data.ByteString.ByteString
packedFileDescriptor :: ByteString
packedFileDescriptor
= "\n\
\(tensorflow/core/framework/versions.proto\DC2\n\
\tensorflow\"p\n\
\\n\
\VersionDef\DC2\SUB\n\
\\bproducer\CAN\SOH \SOH(\ENQR\bproducer\DC2!\n\
\\fmin_consumer\CAN\STX \SOH(\ENQR\vminConsumer\DC2#\n\
\\rbad_consumers\CAN\ETX \ETX(\ENQR\fbadConsumersB\128\SOH\n\
\\CANorg.tensorflow.frameworkB\SOVersionsProtosP\SOHZOgithub.com/tensorflow/tensorflow/tensorflow/go/core/framework/versions_go_proto\248\SOH\SOHJ\178\a\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\
\\b\n\
\\SOH\b\DC2\ETX\EOT\NUL\US\n\
\\t\n\
\\STX\b\US\DC2\ETX\EOT\NUL\US\n\
\\b\n\
\\SOH\b\DC2\ETX\ENQ\NUL/\n\
\\t\n\
\\STX\b\b\DC2\ETX\ENQ\NUL/\n\
\\b\n\
\\SOH\b\DC2\ETX\ACK\NUL\"\n\
\\t\n\
\\STX\b\n\
\\DC2\ETX\ACK\NUL\"\n\
\\b\n\
\\SOH\b\DC2\ETX\a\NUL1\n\
\\t\n\
\\STX\b\SOH\DC2\ETX\a\NUL1\n\
\\b\n\
\\SOH\b\DC2\ETX\b\NULf\n\
\\t\n\
\\STX\b\v\DC2\ETX\b\NULf\n\
\\168\ETX\n\
\\STX\EOT\NUL\DC2\EOT\ETB\NUL \SOH\SUB\155\ETX Version information for a piece of serialized data\n\
\\n\
\ There are different types of versions for each type of data\n\
\ (GraphDef, etc.), but they all have the same common shape\n\
\ described here.\n\
\\n\
\ Each consumer has \"consumer\" and \"min_producer\" versions (specified\n\
\ elsewhere). A consumer is allowed to consume this data if\n\
\\n\
\ producer >= min_producer\n\
\ consumer >= min_consumer\n\
\ consumer not in bad_consumers\n\
\\n\
\\n\
\\n\
\\n\
\\ETX\EOT\NUL\SOH\DC2\ETX\ETB\b\DC2\n\
\?\n\
\\EOT\EOT\NUL\STX\NUL\DC2\ETX\EM\STX\NAK\SUB2 The version of the code that produced this data.\n\
\\n\
\\f\n\
\\ENQ\EOT\NUL\STX\NUL\ENQ\DC2\ETX\EM\STX\a\n\
\\f\n\
\\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX\EM\b\DLE\n\
\\f\n\
\\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX\EM\DC3\DC4\n\
\S\n\
\\EOT\EOT\NUL\STX\SOH\DC2\ETX\FS\STX\EM\SUBF Any consumer below this version is not allowed to consume this data.\n\
\\n\
\\f\n\
\\ENQ\EOT\NUL\STX\SOH\ENQ\DC2\ETX\FS\STX\a\n\
\\f\n\
\\ENQ\EOT\NUL\STX\SOH\SOH\DC2\ETX\FS\b\DC4\n\
\\f\n\
\\ENQ\EOT\NUL\STX\SOH\ETX\DC2\ETX\FS\ETB\CAN\n\
\R\n\
\\EOT\EOT\NUL\STX\STX\DC2\ETX\US\STX#\SUBE Specific consumer versions which are disallowed (e.g. due to bugs).\n\
\\n\
\\f\n\
\\ENQ\EOT\NUL\STX\STX\EOT\DC2\ETX\US\STX\n\
\\n\
\\f\n\
\\ENQ\EOT\NUL\STX\STX\ENQ\DC2\ETX\US\v\DLE\n\
\\f\n\
\\ENQ\EOT\NUL\STX\STX\SOH\DC2\ETX\US\DC1\RS\n\
\\f\n\
\\ENQ\EOT\NUL\STX\STX\ETX\DC2\ETX\US!\"b\ACKproto3"