{-# 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.Function (
FunctionDef(), FunctionDef'ArgAttrEntry(), FunctionDef'ArgAttrs(),
FunctionDef'ArgAttrs'AttrEntry(), FunctionDef'AttrEntry(),
FunctionDef'ControlRetEntry(),
FunctionDef'ResourceArgUniqueIdEntry(), FunctionDef'RetEntry(),
FunctionDefLibrary(), GradientDef()
) where
import qualified Data.ProtoLens.Runtime.Control.DeepSeq as Control.DeepSeq
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Prism as Data.ProtoLens.Prism
import qualified Data.ProtoLens.Runtime.Prelude as Prelude
import qualified Data.ProtoLens.Runtime.Data.Int as Data.Int
import qualified Data.ProtoLens.Runtime.Data.Monoid as Data.Monoid
import qualified Data.ProtoLens.Runtime.Data.Word as Data.Word
import qualified Data.ProtoLens.Runtime.Data.ProtoLens as Data.ProtoLens
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Bytes as Data.ProtoLens.Encoding.Bytes
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Growing as Data.ProtoLens.Encoding.Growing
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Parser.Unsafe as Data.ProtoLens.Encoding.Parser.Unsafe
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Wire as Data.ProtoLens.Encoding.Wire
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Field as Data.ProtoLens.Field
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Message.Enum as Data.ProtoLens.Message.Enum
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Service.Types as Data.ProtoLens.Service.Types
import qualified Data.ProtoLens.Runtime.Lens.Family2 as Lens.Family2
import qualified Data.ProtoLens.Runtime.Lens.Family2.Unchecked as Lens.Family2.Unchecked
import qualified Data.ProtoLens.Runtime.Data.Text as Data.Text
import qualified Data.ProtoLens.Runtime.Data.Map as Data.Map
import qualified Data.ProtoLens.Runtime.Data.ByteString as Data.ByteString
import qualified Data.ProtoLens.Runtime.Data.ByteString.Char8 as Data.ByteString.Char8
import qualified Data.ProtoLens.Runtime.Data.Text.Encoding as Data.Text.Encoding
import qualified Data.ProtoLens.Runtime.Data.Vector as Data.Vector
import qualified Data.ProtoLens.Runtime.Data.Vector.Generic as Data.Vector.Generic
import qualified Data.ProtoLens.Runtime.Data.Vector.Unboxed as Data.Vector.Unboxed
import qualified Data.ProtoLens.Runtime.Text.Read as Text.Read
import qualified Proto.Tensorflow.Core.Framework.AttrValue
import qualified Proto.Tensorflow.Core.Framework.NodeDef
import qualified Proto.Tensorflow.Core.Framework.OpDef
data FunctionDef
= FunctionDef'_constructor {FunctionDef -> Maybe OpDef
_FunctionDef'signature :: !(Prelude.Maybe Proto.Tensorflow.Core.Framework.OpDef.OpDef),
FunctionDef -> Map Text AttrValue
_FunctionDef'attr :: !(Data.Map.Map Data.Text.Text Proto.Tensorflow.Core.Framework.AttrValue.AttrValue),
FunctionDef -> Map Word32 FunctionDef'ArgAttrs
_FunctionDef'argAttr :: !(Data.Map.Map Data.Word.Word32 FunctionDef'ArgAttrs),
FunctionDef -> Map Word32 Word32
_FunctionDef'resourceArgUniqueId :: !(Data.Map.Map Data.Word.Word32 Data.Word.Word32),
FunctionDef -> Vector NodeDef
_FunctionDef'nodeDef :: !(Data.Vector.Vector Proto.Tensorflow.Core.Framework.NodeDef.NodeDef),
FunctionDef -> Map Text Text
_FunctionDef'ret :: !(Data.Map.Map Data.Text.Text Data.Text.Text),
FunctionDef -> Map Text Text
_FunctionDef'controlRet :: !(Data.Map.Map Data.Text.Text Data.Text.Text),
FunctionDef -> FieldSet
_FunctionDef'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (FunctionDef -> FunctionDef -> Bool
(FunctionDef -> FunctionDef -> Bool)
-> (FunctionDef -> FunctionDef -> Bool) -> Eq FunctionDef
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FunctionDef -> FunctionDef -> Bool
$c/= :: FunctionDef -> FunctionDef -> Bool
== :: FunctionDef -> FunctionDef -> Bool
$c== :: FunctionDef -> FunctionDef -> Bool
Prelude.Eq, Eq FunctionDef
Eq FunctionDef =>
(FunctionDef -> FunctionDef -> Ordering)
-> (FunctionDef -> FunctionDef -> Bool)
-> (FunctionDef -> FunctionDef -> Bool)
-> (FunctionDef -> FunctionDef -> Bool)
-> (FunctionDef -> FunctionDef -> Bool)
-> (FunctionDef -> FunctionDef -> FunctionDef)
-> (FunctionDef -> FunctionDef -> FunctionDef)
-> Ord FunctionDef
FunctionDef -> FunctionDef -> Bool
FunctionDef -> FunctionDef -> Ordering
FunctionDef -> FunctionDef -> FunctionDef
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 :: FunctionDef -> FunctionDef -> FunctionDef
$cmin :: FunctionDef -> FunctionDef -> FunctionDef
max :: FunctionDef -> FunctionDef -> FunctionDef
$cmax :: FunctionDef -> FunctionDef -> FunctionDef
>= :: FunctionDef -> FunctionDef -> Bool
$c>= :: FunctionDef -> FunctionDef -> Bool
> :: FunctionDef -> FunctionDef -> Bool
$c> :: FunctionDef -> FunctionDef -> Bool
<= :: FunctionDef -> FunctionDef -> Bool
$c<= :: FunctionDef -> FunctionDef -> Bool
< :: FunctionDef -> FunctionDef -> Bool
$c< :: FunctionDef -> FunctionDef -> Bool
compare :: FunctionDef -> FunctionDef -> Ordering
$ccompare :: FunctionDef -> FunctionDef -> Ordering
$cp1Ord :: Eq FunctionDef
Prelude.Ord)
instance Prelude.Show FunctionDef where
showsPrec :: Int -> FunctionDef -> ShowS
showsPrec _ __x :: FunctionDef
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(FunctionDef -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort FunctionDef
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField FunctionDef "signature" Proto.Tensorflow.Core.Framework.OpDef.OpDef where
fieldOf :: Proxy# "signature"
-> (OpDef -> f OpDef) -> FunctionDef -> f FunctionDef
fieldOf _
= ((Maybe OpDef -> f (Maybe OpDef)) -> FunctionDef -> f FunctionDef)
-> ((OpDef -> f OpDef) -> Maybe OpDef -> f (Maybe OpDef))
-> (OpDef -> f OpDef)
-> FunctionDef
-> f FunctionDef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((FunctionDef -> Maybe OpDef)
-> (FunctionDef -> Maybe OpDef -> FunctionDef)
-> Lens FunctionDef FunctionDef (Maybe OpDef) (Maybe OpDef)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef -> Maybe OpDef
_FunctionDef'signature
(\ x__ :: FunctionDef
x__ y__ :: Maybe OpDef
y__ -> FunctionDef
x__ {_FunctionDef'signature :: Maybe OpDef
_FunctionDef'signature = Maybe OpDef
y__}))
(OpDef -> Lens' (Maybe OpDef) OpDef
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens OpDef
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField FunctionDef "maybe'signature" (Prelude.Maybe Proto.Tensorflow.Core.Framework.OpDef.OpDef) where
fieldOf :: Proxy# "maybe'signature"
-> (Maybe OpDef -> f (Maybe OpDef)) -> FunctionDef -> f FunctionDef
fieldOf _
= ((Maybe OpDef -> f (Maybe OpDef)) -> FunctionDef -> f FunctionDef)
-> ((Maybe OpDef -> f (Maybe OpDef))
-> Maybe OpDef -> f (Maybe OpDef))
-> (Maybe OpDef -> f (Maybe OpDef))
-> FunctionDef
-> f FunctionDef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((FunctionDef -> Maybe OpDef)
-> (FunctionDef -> Maybe OpDef -> FunctionDef)
-> Lens FunctionDef FunctionDef (Maybe OpDef) (Maybe OpDef)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef -> Maybe OpDef
_FunctionDef'signature
(\ x__ :: FunctionDef
x__ y__ :: Maybe OpDef
y__ -> FunctionDef
x__ {_FunctionDef'signature :: Maybe OpDef
_FunctionDef'signature = Maybe OpDef
y__}))
(Maybe OpDef -> f (Maybe OpDef)) -> Maybe OpDef -> f (Maybe OpDef)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField FunctionDef "attr" (Data.Map.Map Data.Text.Text Proto.Tensorflow.Core.Framework.AttrValue.AttrValue) where
fieldOf :: Proxy# "attr"
-> (Map Text AttrValue -> f (Map Text AttrValue))
-> FunctionDef
-> f FunctionDef
fieldOf _
= ((Map Text AttrValue -> f (Map Text AttrValue))
-> FunctionDef -> f FunctionDef)
-> ((Map Text AttrValue -> f (Map Text AttrValue))
-> Map Text AttrValue -> f (Map Text AttrValue))
-> (Map Text AttrValue -> f (Map Text AttrValue))
-> FunctionDef
-> f FunctionDef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((FunctionDef -> Map Text AttrValue)
-> (FunctionDef -> Map Text AttrValue -> FunctionDef)
-> Lens
FunctionDef FunctionDef (Map Text AttrValue) (Map Text AttrValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef -> Map Text AttrValue
_FunctionDef'attr (\ x__ :: FunctionDef
x__ y__ :: Map Text AttrValue
y__ -> FunctionDef
x__ {_FunctionDef'attr :: Map Text AttrValue
_FunctionDef'attr = Map Text AttrValue
y__}))
(Map Text AttrValue -> f (Map Text AttrValue))
-> Map Text AttrValue -> f (Map Text AttrValue)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField FunctionDef "argAttr" (Data.Map.Map Data.Word.Word32 FunctionDef'ArgAttrs) where
fieldOf :: Proxy# "argAttr"
-> (Map Word32 FunctionDef'ArgAttrs
-> f (Map Word32 FunctionDef'ArgAttrs))
-> FunctionDef
-> f FunctionDef
fieldOf _
= ((Map Word32 FunctionDef'ArgAttrs
-> f (Map Word32 FunctionDef'ArgAttrs))
-> FunctionDef -> f FunctionDef)
-> ((Map Word32 FunctionDef'ArgAttrs
-> f (Map Word32 FunctionDef'ArgAttrs))
-> Map Word32 FunctionDef'ArgAttrs
-> f (Map Word32 FunctionDef'ArgAttrs))
-> (Map Word32 FunctionDef'ArgAttrs
-> f (Map Word32 FunctionDef'ArgAttrs))
-> FunctionDef
-> f FunctionDef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((FunctionDef -> Map Word32 FunctionDef'ArgAttrs)
-> (FunctionDef -> Map Word32 FunctionDef'ArgAttrs -> FunctionDef)
-> Lens
FunctionDef
FunctionDef
(Map Word32 FunctionDef'ArgAttrs)
(Map Word32 FunctionDef'ArgAttrs)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef -> Map Word32 FunctionDef'ArgAttrs
_FunctionDef'argAttr
(\ x__ :: FunctionDef
x__ y__ :: Map Word32 FunctionDef'ArgAttrs
y__ -> FunctionDef
x__ {_FunctionDef'argAttr :: Map Word32 FunctionDef'ArgAttrs
_FunctionDef'argAttr = Map Word32 FunctionDef'ArgAttrs
y__}))
(Map Word32 FunctionDef'ArgAttrs
-> f (Map Word32 FunctionDef'ArgAttrs))
-> Map Word32 FunctionDef'ArgAttrs
-> f (Map Word32 FunctionDef'ArgAttrs)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField FunctionDef "resourceArgUniqueId" (Data.Map.Map Data.Word.Word32 Data.Word.Word32) where
fieldOf :: Proxy# "resourceArgUniqueId"
-> (Map Word32 Word32 -> f (Map Word32 Word32))
-> FunctionDef
-> f FunctionDef
fieldOf _
= ((Map Word32 Word32 -> f (Map Word32 Word32))
-> FunctionDef -> f FunctionDef)
-> ((Map Word32 Word32 -> f (Map Word32 Word32))
-> Map Word32 Word32 -> f (Map Word32 Word32))
-> (Map Word32 Word32 -> f (Map Word32 Word32))
-> FunctionDef
-> f FunctionDef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((FunctionDef -> Map Word32 Word32)
-> (FunctionDef -> Map Word32 Word32 -> FunctionDef)
-> Lens
FunctionDef FunctionDef (Map Word32 Word32) (Map Word32 Word32)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef -> Map Word32 Word32
_FunctionDef'resourceArgUniqueId
(\ x__ :: FunctionDef
x__ y__ :: Map Word32 Word32
y__ -> FunctionDef
x__ {_FunctionDef'resourceArgUniqueId :: Map Word32 Word32
_FunctionDef'resourceArgUniqueId = Map Word32 Word32
y__}))
(Map Word32 Word32 -> f (Map Word32 Word32))
-> Map Word32 Word32 -> f (Map Word32 Word32)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField FunctionDef "nodeDef" [Proto.Tensorflow.Core.Framework.NodeDef.NodeDef] where
fieldOf :: Proxy# "nodeDef"
-> ([NodeDef] -> f [NodeDef]) -> FunctionDef -> f FunctionDef
fieldOf _
= ((Vector NodeDef -> f (Vector NodeDef))
-> FunctionDef -> f FunctionDef)
-> (([NodeDef] -> f [NodeDef])
-> Vector NodeDef -> f (Vector NodeDef))
-> ([NodeDef] -> f [NodeDef])
-> FunctionDef
-> f FunctionDef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((FunctionDef -> Vector NodeDef)
-> (FunctionDef -> Vector NodeDef -> FunctionDef)
-> Lens FunctionDef FunctionDef (Vector NodeDef) (Vector NodeDef)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef -> Vector NodeDef
_FunctionDef'nodeDef
(\ x__ :: FunctionDef
x__ y__ :: Vector NodeDef
y__ -> FunctionDef
x__ {_FunctionDef'nodeDef :: Vector NodeDef
_FunctionDef'nodeDef = Vector NodeDef
y__}))
((Vector NodeDef -> [NodeDef])
-> (Vector NodeDef -> [NodeDef] -> Vector NodeDef)
-> Lens (Vector NodeDef) (Vector NodeDef) [NodeDef] [NodeDef]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Vector NodeDef -> [NodeDef]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
(\ _ y__ :: [NodeDef]
y__ -> [NodeDef] -> Vector NodeDef
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [NodeDef]
y__))
instance Data.ProtoLens.Field.HasField FunctionDef "vec'nodeDef" (Data.Vector.Vector Proto.Tensorflow.Core.Framework.NodeDef.NodeDef) where
fieldOf :: Proxy# "vec'nodeDef"
-> (Vector NodeDef -> f (Vector NodeDef))
-> FunctionDef
-> f FunctionDef
fieldOf _
= ((Vector NodeDef -> f (Vector NodeDef))
-> FunctionDef -> f FunctionDef)
-> ((Vector NodeDef -> f (Vector NodeDef))
-> Vector NodeDef -> f (Vector NodeDef))
-> (Vector NodeDef -> f (Vector NodeDef))
-> FunctionDef
-> f FunctionDef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((FunctionDef -> Vector NodeDef)
-> (FunctionDef -> Vector NodeDef -> FunctionDef)
-> Lens FunctionDef FunctionDef (Vector NodeDef) (Vector NodeDef)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef -> Vector NodeDef
_FunctionDef'nodeDef
(\ x__ :: FunctionDef
x__ y__ :: Vector NodeDef
y__ -> FunctionDef
x__ {_FunctionDef'nodeDef :: Vector NodeDef
_FunctionDef'nodeDef = Vector NodeDef
y__}))
(Vector NodeDef -> f (Vector NodeDef))
-> Vector NodeDef -> f (Vector NodeDef)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField FunctionDef "ret" (Data.Map.Map Data.Text.Text Data.Text.Text) where
fieldOf :: Proxy# "ret"
-> (Map Text Text -> f (Map Text Text))
-> FunctionDef
-> f FunctionDef
fieldOf _
= ((Map Text Text -> f (Map Text Text))
-> FunctionDef -> f FunctionDef)
-> ((Map Text Text -> f (Map Text Text))
-> Map Text Text -> f (Map Text Text))
-> (Map Text Text -> f (Map Text Text))
-> FunctionDef
-> f FunctionDef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((FunctionDef -> Map Text Text)
-> (FunctionDef -> Map Text Text -> FunctionDef)
-> Lens FunctionDef FunctionDef (Map Text Text) (Map Text Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef -> Map Text Text
_FunctionDef'ret (\ x__ :: FunctionDef
x__ y__ :: Map Text Text
y__ -> FunctionDef
x__ {_FunctionDef'ret :: Map Text Text
_FunctionDef'ret = Map Text Text
y__}))
(Map Text Text -> f (Map Text Text))
-> Map Text Text -> f (Map Text Text)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField FunctionDef "controlRet" (Data.Map.Map Data.Text.Text Data.Text.Text) where
fieldOf :: Proxy# "controlRet"
-> (Map Text Text -> f (Map Text Text))
-> FunctionDef
-> f FunctionDef
fieldOf _
= ((Map Text Text -> f (Map Text Text))
-> FunctionDef -> f FunctionDef)
-> ((Map Text Text -> f (Map Text Text))
-> Map Text Text -> f (Map Text Text))
-> (Map Text Text -> f (Map Text Text))
-> FunctionDef
-> f FunctionDef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((FunctionDef -> Map Text Text)
-> (FunctionDef -> Map Text Text -> FunctionDef)
-> Lens FunctionDef FunctionDef (Map Text Text) (Map Text Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef -> Map Text Text
_FunctionDef'controlRet
(\ x__ :: FunctionDef
x__ y__ :: Map Text Text
y__ -> FunctionDef
x__ {_FunctionDef'controlRet :: Map Text Text
_FunctionDef'controlRet = Map Text Text
y__}))
(Map Text Text -> f (Map Text Text))
-> Map Text Text -> f (Map Text Text)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message FunctionDef where
messageName :: Proxy FunctionDef -> Text
messageName _ = String -> Text
Data.Text.pack "tensorflow.FunctionDef"
packedMessageDescriptor :: Proxy FunctionDef -> ByteString
packedMessageDescriptor _
= "\n\
\\vFunctionDef\DC2/\n\
\\tsignature\CAN\SOH \SOH(\v2\DC1.tensorflow.OpDefR\tsignature\DC25\n\
\\EOTattr\CAN\ENQ \ETX(\v2!.tensorflow.FunctionDef.AttrEntryR\EOTattr\DC2?\n\
\\barg_attr\CAN\a \ETX(\v2$.tensorflow.FunctionDef.ArgAttrEntryR\aargAttr\DC2e\n\
\\SYNresource_arg_unique_id\CAN\b \ETX(\v20.tensorflow.FunctionDef.ResourceArgUniqueIdEntryR\DC3resourceArgUniqueId\DC2.\n\
\\bnode_def\CAN\ETX \ETX(\v2\DC3.tensorflow.NodeDefR\anodeDef\DC22\n\
\\ETXret\CAN\EOT \ETX(\v2 .tensorflow.FunctionDef.RetEntryR\ETXret\DC2H\n\
\\vcontrol_ret\CAN\ACK \ETX(\v2'.tensorflow.FunctionDef.ControlRetEntryR\n\
\controlRet\SUBN\n\
\\tAttrEntry\DC2\DLE\n\
\\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2+\n\
\\ENQvalue\CAN\STX \SOH(\v2\NAK.tensorflow.AttrValueR\ENQvalue:\STX8\SOH\SUB\154\SOH\n\
\\bArgAttrs\DC2>\n\
\\EOTattr\CAN\SOH \ETX(\v2*.tensorflow.FunctionDef.ArgAttrs.AttrEntryR\EOTattr\SUBN\n\
\\tAttrEntry\DC2\DLE\n\
\\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2+\n\
\\ENQvalue\CAN\STX \SOH(\v2\NAK.tensorflow.AttrValueR\ENQvalue:\STX8\SOH\SUB\\\n\
\\fArgAttrEntry\DC2\DLE\n\
\\ETXkey\CAN\SOH \SOH(\rR\ETXkey\DC26\n\
\\ENQvalue\CAN\STX \SOH(\v2 .tensorflow.FunctionDef.ArgAttrsR\ENQvalue:\STX8\SOH\SUBF\n\
\\CANResourceArgUniqueIdEntry\DC2\DLE\n\
\\ETXkey\CAN\SOH \SOH(\rR\ETXkey\DC2\DC4\n\
\\ENQvalue\CAN\STX \SOH(\rR\ENQvalue:\STX8\SOH\SUB6\n\
\\bRetEntry\DC2\DLE\n\
\\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
\\ENQvalue\CAN\STX \SOH(\tR\ENQvalue:\STX8\SOH\SUB=\n\
\\SIControlRetEntry\DC2\DLE\n\
\\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
\\ENQvalue\CAN\STX \SOH(\tR\ENQvalue:\STX8\SOHJ\EOT\b\STX\DLE\ETX"
packedFileDescriptor :: Proxy FunctionDef -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor FunctionDef)
fieldsByTag
= let
signature__field_descriptor :: FieldDescriptor FunctionDef
signature__field_descriptor
= String
-> FieldTypeDescriptor OpDef
-> FieldAccessor FunctionDef OpDef
-> FieldDescriptor FunctionDef
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"signature"
(MessageOrGroup -> FieldTypeDescriptor OpDef
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor Proto.Tensorflow.Core.Framework.OpDef.OpDef)
(Lens FunctionDef FunctionDef (Maybe OpDef) (Maybe OpDef)
-> FieldAccessor FunctionDef OpDef
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'signature" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'signature")) ::
Data.ProtoLens.FieldDescriptor FunctionDef
attr__field_descriptor :: FieldDescriptor FunctionDef
attr__field_descriptor
= String
-> FieldTypeDescriptor FunctionDef'AttrEntry
-> FieldAccessor FunctionDef FunctionDef'AttrEntry
-> FieldDescriptor FunctionDef
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"attr"
(MessageOrGroup -> FieldTypeDescriptor FunctionDef'AttrEntry
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor FunctionDef'AttrEntry)
(Lens' FunctionDef'AttrEntry Text
-> Lens' FunctionDef'AttrEntry AttrValue
-> Lens
FunctionDef FunctionDef (Map Text AttrValue) (Map Text AttrValue)
-> FieldAccessor FunctionDef FunctionDef'AttrEntry
forall key value value1 msg.
(Ord key, Message value) =>
Lens' value key
-> Lens' value value1
-> Lens' msg (Map key value1)
-> FieldAccessor msg value
Data.ProtoLens.MapField
(forall s a (f :: * -> *).
(HasField s "key" 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 @"key")
(forall s a (f :: * -> *).
(HasField s "value" 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 @"value")
(forall s a (f :: * -> *).
(HasField s "attr" 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 @"attr")) ::
Data.ProtoLens.FieldDescriptor FunctionDef
argAttr__field_descriptor :: FieldDescriptor FunctionDef
argAttr__field_descriptor
= String
-> FieldTypeDescriptor FunctionDef'ArgAttrEntry
-> FieldAccessor FunctionDef FunctionDef'ArgAttrEntry
-> FieldDescriptor FunctionDef
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"arg_attr"
(MessageOrGroup -> FieldTypeDescriptor FunctionDef'ArgAttrEntry
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor FunctionDef'ArgAttrEntry)
(Lens' FunctionDef'ArgAttrEntry Word32
-> Lens' FunctionDef'ArgAttrEntry FunctionDef'ArgAttrs
-> Lens
FunctionDef
FunctionDef
(Map Word32 FunctionDef'ArgAttrs)
(Map Word32 FunctionDef'ArgAttrs)
-> FieldAccessor FunctionDef FunctionDef'ArgAttrEntry
forall key value value1 msg.
(Ord key, Message value) =>
Lens' value key
-> Lens' value value1
-> Lens' msg (Map key value1)
-> FieldAccessor msg value
Data.ProtoLens.MapField
(forall s a (f :: * -> *).
(HasField s "key" 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 @"key")
(forall s a (f :: * -> *).
(HasField s "value" 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 @"value")
(forall s a (f :: * -> *).
(HasField s "argAttr" 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 @"argAttr")) ::
Data.ProtoLens.FieldDescriptor FunctionDef
resourceArgUniqueId__field_descriptor :: FieldDescriptor FunctionDef
resourceArgUniqueId__field_descriptor
= String
-> FieldTypeDescriptor FunctionDef'ResourceArgUniqueIdEntry
-> FieldAccessor FunctionDef FunctionDef'ResourceArgUniqueIdEntry
-> FieldDescriptor FunctionDef
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"resource_arg_unique_id"
(MessageOrGroup
-> FieldTypeDescriptor FunctionDef'ResourceArgUniqueIdEntry
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor FunctionDef'ResourceArgUniqueIdEntry)
(Lens' FunctionDef'ResourceArgUniqueIdEntry Word32
-> Lens' FunctionDef'ResourceArgUniqueIdEntry Word32
-> Lens
FunctionDef FunctionDef (Map Word32 Word32) (Map Word32 Word32)
-> FieldAccessor FunctionDef FunctionDef'ResourceArgUniqueIdEntry
forall key value value1 msg.
(Ord key, Message value) =>
Lens' value key
-> Lens' value value1
-> Lens' msg (Map key value1)
-> FieldAccessor msg value
Data.ProtoLens.MapField
(forall s a (f :: * -> *).
(HasField s "key" 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 @"key")
(forall s a (f :: * -> *).
(HasField s "value" 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 @"value")
(forall s a (f :: * -> *).
(HasField s "resourceArgUniqueId" 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 @"resourceArgUniqueId")) ::
Data.ProtoLens.FieldDescriptor FunctionDef
nodeDef__field_descriptor :: FieldDescriptor FunctionDef
nodeDef__field_descriptor
= String
-> FieldTypeDescriptor NodeDef
-> FieldAccessor FunctionDef NodeDef
-> FieldDescriptor FunctionDef
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"node_def"
(MessageOrGroup -> FieldTypeDescriptor NodeDef
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor Proto.Tensorflow.Core.Framework.NodeDef.NodeDef)
(Packing
-> Lens' FunctionDef [NodeDef] -> FieldAccessor FunctionDef NodeDef
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
Packing
Data.ProtoLens.Unpacked (forall s a (f :: * -> *).
(HasField s "nodeDef" 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 @"nodeDef")) ::
Data.ProtoLens.FieldDescriptor FunctionDef
ret__field_descriptor :: FieldDescriptor FunctionDef
ret__field_descriptor
= String
-> FieldTypeDescriptor FunctionDef'RetEntry
-> FieldAccessor FunctionDef FunctionDef'RetEntry
-> FieldDescriptor FunctionDef
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"ret"
(MessageOrGroup -> FieldTypeDescriptor FunctionDef'RetEntry
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor FunctionDef'RetEntry)
(Lens' FunctionDef'RetEntry Text
-> Lens' FunctionDef'RetEntry Text
-> Lens FunctionDef FunctionDef (Map Text Text) (Map Text Text)
-> FieldAccessor FunctionDef FunctionDef'RetEntry
forall key value value1 msg.
(Ord key, Message value) =>
Lens' value key
-> Lens' value value1
-> Lens' msg (Map key value1)
-> FieldAccessor msg value
Data.ProtoLens.MapField
(forall s a (f :: * -> *).
(HasField s "key" 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 @"key")
(forall s a (f :: * -> *).
(HasField s "value" 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 @"value")
(forall s a (f :: * -> *).
(HasField s "ret" 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 @"ret")) ::
Data.ProtoLens.FieldDescriptor FunctionDef
controlRet__field_descriptor :: FieldDescriptor FunctionDef
controlRet__field_descriptor
= String
-> FieldTypeDescriptor FunctionDef'ControlRetEntry
-> FieldAccessor FunctionDef FunctionDef'ControlRetEntry
-> FieldDescriptor FunctionDef
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"control_ret"
(MessageOrGroup -> FieldTypeDescriptor FunctionDef'ControlRetEntry
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor FunctionDef'ControlRetEntry)
(Lens' FunctionDef'ControlRetEntry Text
-> Lens' FunctionDef'ControlRetEntry Text
-> Lens FunctionDef FunctionDef (Map Text Text) (Map Text Text)
-> FieldAccessor FunctionDef FunctionDef'ControlRetEntry
forall key value value1 msg.
(Ord key, Message value) =>
Lens' value key
-> Lens' value value1
-> Lens' msg (Map key value1)
-> FieldAccessor msg value
Data.ProtoLens.MapField
(forall s a (f :: * -> *).
(HasField s "key" 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 @"key")
(forall s a (f :: * -> *).
(HasField s "value" 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 @"value")
(forall s a (f :: * -> *).
(HasField s "controlRet" 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 @"controlRet")) ::
Data.ProtoLens.FieldDescriptor FunctionDef
in
[(Tag, FieldDescriptor FunctionDef)]
-> Map Tag (FieldDescriptor FunctionDef)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor FunctionDef
signature__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 5, FieldDescriptor FunctionDef
attr__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 7, FieldDescriptor FunctionDef
argAttr__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 8, FieldDescriptor FunctionDef
resourceArgUniqueId__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 3, FieldDescriptor FunctionDef
nodeDef__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 4, FieldDescriptor FunctionDef
ret__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 6, FieldDescriptor FunctionDef
controlRet__field_descriptor)]
unknownFields :: LensLike' f FunctionDef FieldSet
unknownFields
= (FunctionDef -> FieldSet)
-> (FunctionDef -> FieldSet -> FunctionDef)
-> Lens' FunctionDef FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef -> FieldSet
_FunctionDef'_unknownFields
(\ x__ :: FunctionDef
x__ y__ :: FieldSet
y__ -> FunctionDef
x__ {_FunctionDef'_unknownFields :: FieldSet
_FunctionDef'_unknownFields = FieldSet
y__})
defMessage :: FunctionDef
defMessage
= $WFunctionDef'_constructor :: Maybe OpDef
-> Map Text AttrValue
-> Map Word32 FunctionDef'ArgAttrs
-> Map Word32 Word32
-> Vector NodeDef
-> Map Text Text
-> Map Text Text
-> FieldSet
-> FunctionDef
FunctionDef'_constructor
{_FunctionDef'signature :: Maybe OpDef
_FunctionDef'signature = Maybe OpDef
forall a. Maybe a
Prelude.Nothing,
_FunctionDef'attr :: Map Text AttrValue
_FunctionDef'attr = Map Text AttrValue
forall k a. Map k a
Data.Map.empty,
_FunctionDef'argAttr :: Map Word32 FunctionDef'ArgAttrs
_FunctionDef'argAttr = Map Word32 FunctionDef'ArgAttrs
forall k a. Map k a
Data.Map.empty,
_FunctionDef'resourceArgUniqueId :: Map Word32 Word32
_FunctionDef'resourceArgUniqueId = Map Word32 Word32
forall k a. Map k a
Data.Map.empty,
_FunctionDef'nodeDef :: Vector NodeDef
_FunctionDef'nodeDef = Vector NodeDef
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
_FunctionDef'ret :: Map Text Text
_FunctionDef'ret = Map Text Text
forall k a. Map k a
Data.Map.empty,
_FunctionDef'controlRet :: Map Text Text
_FunctionDef'controlRet = Map Text Text
forall k a. Map k a
Data.Map.empty,
_FunctionDef'_unknownFields :: FieldSet
_FunctionDef'_unknownFields = []}
parseMessage :: Parser FunctionDef
parseMessage
= let
loop ::
FunctionDef
-> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Proto.Tensorflow.Core.Framework.NodeDef.NodeDef
-> Data.ProtoLens.Encoding.Bytes.Parser FunctionDef
loop :: FunctionDef
-> Growing Vector RealWorld NodeDef -> Parser FunctionDef
loop x :: FunctionDef
x mutable'nodeDef :: Growing Vector RealWorld NodeDef
mutable'nodeDef
= do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if Bool
end then
do Vector NodeDef
frozen'nodeDef <- IO (Vector NodeDef) -> Parser (Vector NodeDef)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) NodeDef -> IO (Vector NodeDef)
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 NodeDef
Growing Vector (PrimState IO) NodeDef
mutable'nodeDef)
(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]))))
FunctionDef -> Parser FunctionDef
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter FunctionDef FunctionDef FieldSet FieldSet
-> (FieldSet -> FieldSet) -> FunctionDef -> FunctionDef
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 FunctionDef FunctionDef FieldSet FieldSet
Data.ProtoLens.unknownFields
(\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
(Setter FunctionDef FunctionDef (Vector NodeDef) (Vector NodeDef)
-> Vector NodeDef -> FunctionDef -> FunctionDef
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "vec'nodeDef" 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'nodeDef") Vector NodeDef
frozen'nodeDef FunctionDef
x))
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
10
-> do OpDef
y <- Parser OpDef -> String -> Parser OpDef
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser OpDef -> Parser OpDef
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 OpDef
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"signature"
FunctionDef
-> Growing Vector RealWorld NodeDef -> Parser FunctionDef
loop
(Setter FunctionDef FunctionDef OpDef OpDef
-> OpDef -> FunctionDef -> FunctionDef
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "signature" 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 @"signature") OpDef
y FunctionDef
x)
Growing Vector RealWorld NodeDef
mutable'nodeDef
42
-> do !(FunctionDef'AttrEntry
entry :: FunctionDef'AttrEntry) <- Parser FunctionDef'AttrEntry
-> String -> Parser FunctionDef'AttrEntry
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser FunctionDef'AttrEntry -> Parser FunctionDef'AttrEntry
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 FunctionDef'AttrEntry
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"attr"
(let
key :: Text
key = FoldLike Text FunctionDef'AttrEntry FunctionDef'AttrEntry Text Text
-> FunctionDef'AttrEntry -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "key" 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 @"key") FunctionDef'AttrEntry
entry
value :: AttrValue
value
= FoldLike
AttrValue
FunctionDef'AttrEntry
FunctionDef'AttrEntry
AttrValue
AttrValue
-> FunctionDef'AttrEntry -> AttrValue
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "value" 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 @"value") FunctionDef'AttrEntry
entry
in
FunctionDef
-> Growing Vector RealWorld NodeDef -> Parser FunctionDef
loop
(Setter
FunctionDef FunctionDef (Map Text AttrValue) (Map Text AttrValue)
-> (Map Text AttrValue -> Map Text AttrValue)
-> FunctionDef
-> FunctionDef
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
(forall s a (f :: * -> *).
(HasField s "attr" 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 @"attr")
(\ !Map Text AttrValue
t -> Text -> AttrValue -> Map Text AttrValue -> Map Text AttrValue
forall k a. Ord k => k -> a -> Map k a -> Map k a
Data.Map.insert Text
key AttrValue
value Map Text AttrValue
t)
FunctionDef
x)
Growing Vector RealWorld NodeDef
mutable'nodeDef)
58
-> do !(FunctionDef'ArgAttrEntry
entry :: FunctionDef'ArgAttrEntry) <- Parser FunctionDef'ArgAttrEntry
-> String -> Parser FunctionDef'ArgAttrEntry
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int
-> Parser FunctionDef'ArgAttrEntry
-> Parser FunctionDef'ArgAttrEntry
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 FunctionDef'ArgAttrEntry
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"arg_attr"
(let
key :: Word32
key = FoldLike
Word32
FunctionDef'ArgAttrEntry
FunctionDef'ArgAttrEntry
Word32
Word32
-> FunctionDef'ArgAttrEntry -> Word32
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "key" 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 @"key") FunctionDef'ArgAttrEntry
entry
value :: FunctionDef'ArgAttrs
value
= FoldLike
FunctionDef'ArgAttrs
FunctionDef'ArgAttrEntry
FunctionDef'ArgAttrEntry
FunctionDef'ArgAttrs
FunctionDef'ArgAttrs
-> FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrs
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "value" 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 @"value") FunctionDef'ArgAttrEntry
entry
in
FunctionDef
-> Growing Vector RealWorld NodeDef -> Parser FunctionDef
loop
(Setter
FunctionDef
FunctionDef
(Map Word32 FunctionDef'ArgAttrs)
(Map Word32 FunctionDef'ArgAttrs)
-> (Map Word32 FunctionDef'ArgAttrs
-> Map Word32 FunctionDef'ArgAttrs)
-> FunctionDef
-> FunctionDef
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
(forall s a (f :: * -> *).
(HasField s "argAttr" 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 @"argAttr")
(\ !Map Word32 FunctionDef'ArgAttrs
t -> Word32
-> FunctionDef'ArgAttrs
-> Map Word32 FunctionDef'ArgAttrs
-> Map Word32 FunctionDef'ArgAttrs
forall k a. Ord k => k -> a -> Map k a -> Map k a
Data.Map.insert Word32
key FunctionDef'ArgAttrs
value Map Word32 FunctionDef'ArgAttrs
t)
FunctionDef
x)
Growing Vector RealWorld NodeDef
mutable'nodeDef)
66
-> do !(FunctionDef'ResourceArgUniqueIdEntry
entry :: FunctionDef'ResourceArgUniqueIdEntry) <- Parser FunctionDef'ResourceArgUniqueIdEntry
-> String -> Parser FunctionDef'ResourceArgUniqueIdEntry
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int
-> Parser FunctionDef'ResourceArgUniqueIdEntry
-> Parser FunctionDef'ResourceArgUniqueIdEntry
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 FunctionDef'ResourceArgUniqueIdEntry
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"resource_arg_unique_id"
(let
key :: Word32
key = FoldLike
Word32
FunctionDef'ResourceArgUniqueIdEntry
FunctionDef'ResourceArgUniqueIdEntry
Word32
Word32
-> FunctionDef'ResourceArgUniqueIdEntry -> Word32
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "key" 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 @"key") FunctionDef'ResourceArgUniqueIdEntry
entry
value :: Word32
value
= FoldLike
Word32
FunctionDef'ResourceArgUniqueIdEntry
FunctionDef'ResourceArgUniqueIdEntry
Word32
Word32
-> FunctionDef'ResourceArgUniqueIdEntry -> Word32
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "value" 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 @"value") FunctionDef'ResourceArgUniqueIdEntry
entry
in
FunctionDef
-> Growing Vector RealWorld NodeDef -> Parser FunctionDef
loop
(Setter
FunctionDef FunctionDef (Map Word32 Word32) (Map Word32 Word32)
-> (Map Word32 Word32 -> Map Word32 Word32)
-> FunctionDef
-> FunctionDef
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
(forall s a (f :: * -> *).
(HasField s "resourceArgUniqueId" 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 @"resourceArgUniqueId")
(\ !Map Word32 Word32
t -> Word32 -> Word32 -> Map Word32 Word32 -> Map Word32 Word32
forall k a. Ord k => k -> a -> Map k a -> Map k a
Data.Map.insert Word32
key Word32
value Map Word32 Word32
t)
FunctionDef
x)
Growing Vector RealWorld NodeDef
mutable'nodeDef)
26
-> do !NodeDef
y <- Parser NodeDef -> String -> Parser NodeDef
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser NodeDef -> Parser NodeDef
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 NodeDef
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"node_def"
Growing Vector RealWorld NodeDef
v <- IO (Growing Vector RealWorld NodeDef)
-> Parser (Growing Vector RealWorld NodeDef)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) NodeDef
-> NodeDef -> IO (Growing Vector (PrimState IO) NodeDef)
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 NodeDef
Growing Vector (PrimState IO) NodeDef
mutable'nodeDef NodeDef
y)
FunctionDef
-> Growing Vector RealWorld NodeDef -> Parser FunctionDef
loop FunctionDef
x Growing Vector RealWorld NodeDef
v
34
-> do !(FunctionDef'RetEntry
entry :: FunctionDef'RetEntry) <- Parser FunctionDef'RetEntry
-> String -> Parser FunctionDef'RetEntry
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser FunctionDef'RetEntry -> Parser FunctionDef'RetEntry
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 FunctionDef'RetEntry
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"ret"
(let
key :: Text
key = FoldLike Text FunctionDef'RetEntry FunctionDef'RetEntry Text Text
-> FunctionDef'RetEntry -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "key" 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 @"key") FunctionDef'RetEntry
entry
value :: Text
value
= FoldLike Text FunctionDef'RetEntry FunctionDef'RetEntry Text Text
-> FunctionDef'RetEntry -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "value" 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 @"value") FunctionDef'RetEntry
entry
in
FunctionDef
-> Growing Vector RealWorld NodeDef -> Parser FunctionDef
loop
(Setter FunctionDef FunctionDef (Map Text Text) (Map Text Text)
-> (Map Text Text -> Map Text Text) -> FunctionDef -> FunctionDef
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
(forall s a (f :: * -> *).
(HasField s "ret" 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 @"ret")
(\ !Map Text Text
t -> Text -> Text -> Map Text Text -> Map Text Text
forall k a. Ord k => k -> a -> Map k a -> Map k a
Data.Map.insert Text
key Text
value Map Text Text
t)
FunctionDef
x)
Growing Vector RealWorld NodeDef
mutable'nodeDef)
50
-> do !(FunctionDef'ControlRetEntry
entry :: FunctionDef'ControlRetEntry) <- Parser FunctionDef'ControlRetEntry
-> String -> Parser FunctionDef'ControlRetEntry
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int
-> Parser FunctionDef'ControlRetEntry
-> Parser FunctionDef'ControlRetEntry
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 FunctionDef'ControlRetEntry
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"control_ret"
(let
key :: Text
key = FoldLike
Text
FunctionDef'ControlRetEntry
FunctionDef'ControlRetEntry
Text
Text
-> FunctionDef'ControlRetEntry -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "key" 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 @"key") FunctionDef'ControlRetEntry
entry
value :: Text
value
= FoldLike
Text
FunctionDef'ControlRetEntry
FunctionDef'ControlRetEntry
Text
Text
-> FunctionDef'ControlRetEntry -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "value" 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 @"value") FunctionDef'ControlRetEntry
entry
in
FunctionDef
-> Growing Vector RealWorld NodeDef -> Parser FunctionDef
loop
(Setter FunctionDef FunctionDef (Map Text Text) (Map Text Text)
-> (Map Text Text -> Map Text Text) -> FunctionDef -> FunctionDef
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
(forall s a (f :: * -> *).
(HasField s "controlRet" 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 @"controlRet")
(\ !Map Text Text
t -> Text -> Text -> Map Text Text -> Map Text Text
forall k a. Ord k => k -> a -> Map k a -> Map k a
Data.Map.insert Text
key Text
value Map Text Text
t)
FunctionDef
x)
Growing Vector RealWorld NodeDef
mutable'nodeDef)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
FunctionDef
-> Growing Vector RealWorld NodeDef -> Parser FunctionDef
loop
(Setter FunctionDef FunctionDef FieldSet FieldSet
-> (FieldSet -> FieldSet) -> FunctionDef -> FunctionDef
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 FunctionDef FunctionDef FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) FunctionDef
x)
Growing Vector RealWorld NodeDef
mutable'nodeDef
in
Parser FunctionDef -> String -> Parser FunctionDef
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Growing Vector RealWorld NodeDef
mutable'nodeDef <- IO (Growing Vector RealWorld NodeDef)
-> Parser (Growing Vector RealWorld NodeDef)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
IO (Growing Vector RealWorld NodeDef)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
FunctionDef
-> Growing Vector RealWorld NodeDef -> Parser FunctionDef
loop FunctionDef
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld NodeDef
mutable'nodeDef)
"FunctionDef"
buildMessage :: FunctionDef -> Builder
buildMessage
= \ _x :: FunctionDef
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe OpDef) FunctionDef FunctionDef (Maybe OpDef) (Maybe OpDef)
-> FunctionDef -> Maybe OpDef
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "maybe'signature" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'signature") FunctionDef
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just _v :: OpDef
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
((ByteString -> Builder)
-> (OpDef -> ByteString) -> OpDef -> 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))
OpDef -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
OpDef
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
([Builder] -> Builder
forall a. Monoid a => [a] -> a
Data.Monoid.mconcat
(((Text, AttrValue) -> Builder) -> [(Text, AttrValue)] -> [Builder]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map
(\ _v :: (Text, AttrValue)
_v
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 42)
((ByteString -> Builder)
-> (FunctionDef'AttrEntry -> ByteString)
-> FunctionDef'AttrEntry
-> 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))
FunctionDef'AttrEntry -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
(Setter FunctionDef'AttrEntry FunctionDef'AttrEntry Text Text
-> Text -> FunctionDef'AttrEntry -> FunctionDef'AttrEntry
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "key" 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 @"key")
((Text, AttrValue) -> Text
forall a b. (a, b) -> a
Prelude.fst (Text, AttrValue)
_v)
(Setter
FunctionDef'AttrEntry FunctionDef'AttrEntry AttrValue AttrValue
-> AttrValue -> FunctionDef'AttrEntry -> FunctionDef'AttrEntry
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "value" 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 @"value")
((Text, AttrValue) -> AttrValue
forall a b. (a, b) -> b
Prelude.snd (Text, AttrValue)
_v)
(FunctionDef'AttrEntry
forall msg. Message msg => msg
Data.ProtoLens.defMessage :: FunctionDef'AttrEntry)))))
(Map Text AttrValue -> [(Text, AttrValue)]
forall k a. Map k a -> [(k, a)]
Data.Map.toList
(FoldLike
(Map Text AttrValue)
FunctionDef
FunctionDef
(Map Text AttrValue)
(Map Text AttrValue)
-> FunctionDef -> Map Text AttrValue
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "attr" 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 @"attr") FunctionDef
_x))))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
([Builder] -> Builder
forall a. Monoid a => [a] -> a
Data.Monoid.mconcat
(((Word32, FunctionDef'ArgAttrs) -> Builder)
-> [(Word32, FunctionDef'ArgAttrs)] -> [Builder]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map
(\ _v :: (Word32, FunctionDef'ArgAttrs)
_v
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 58)
((ByteString -> Builder)
-> (FunctionDef'ArgAttrEntry -> ByteString)
-> FunctionDef'ArgAttrEntry
-> 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))
FunctionDef'ArgAttrEntry -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
(Setter
FunctionDef'ArgAttrEntry FunctionDef'ArgAttrEntry Word32 Word32
-> Word32 -> FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "key" 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 @"key")
((Word32, FunctionDef'ArgAttrs) -> Word32
forall a b. (a, b) -> a
Prelude.fst (Word32, FunctionDef'ArgAttrs)
_v)
(Setter
FunctionDef'ArgAttrEntry
FunctionDef'ArgAttrEntry
FunctionDef'ArgAttrs
FunctionDef'ArgAttrs
-> FunctionDef'ArgAttrs
-> FunctionDef'ArgAttrEntry
-> FunctionDef'ArgAttrEntry
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "value" 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 @"value")
((Word32, FunctionDef'ArgAttrs) -> FunctionDef'ArgAttrs
forall a b. (a, b) -> b
Prelude.snd (Word32, FunctionDef'ArgAttrs)
_v)
(FunctionDef'ArgAttrEntry
forall msg. Message msg => msg
Data.ProtoLens.defMessage ::
FunctionDef'ArgAttrEntry)))))
(Map Word32 FunctionDef'ArgAttrs -> [(Word32, FunctionDef'ArgAttrs)]
forall k a. Map k a -> [(k, a)]
Data.Map.toList
(FoldLike
(Map Word32 FunctionDef'ArgAttrs)
FunctionDef
FunctionDef
(Map Word32 FunctionDef'ArgAttrs)
(Map Word32 FunctionDef'ArgAttrs)
-> FunctionDef -> Map Word32 FunctionDef'ArgAttrs
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "argAttr" 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 @"argAttr") FunctionDef
_x))))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
([Builder] -> Builder
forall a. Monoid a => [a] -> a
Data.Monoid.mconcat
(((Word32, Word32) -> Builder) -> [(Word32, Word32)] -> [Builder]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map
(\ _v :: (Word32, Word32)
_v
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 66)
((ByteString -> Builder)
-> (FunctionDef'ResourceArgUniqueIdEntry -> ByteString)
-> FunctionDef'ResourceArgUniqueIdEntry
-> 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))
FunctionDef'ResourceArgUniqueIdEntry -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
(Setter
FunctionDef'ResourceArgUniqueIdEntry
FunctionDef'ResourceArgUniqueIdEntry
Word32
Word32
-> Word32
-> FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "key" 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 @"key")
((Word32, Word32) -> Word32
forall a b. (a, b) -> a
Prelude.fst (Word32, Word32)
_v)
(Setter
FunctionDef'ResourceArgUniqueIdEntry
FunctionDef'ResourceArgUniqueIdEntry
Word32
Word32
-> Word32
-> FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "value" 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 @"value")
((Word32, Word32) -> Word32
forall a b. (a, b) -> b
Prelude.snd (Word32, Word32)
_v)
(FunctionDef'ResourceArgUniqueIdEntry
forall msg. Message msg => msg
Data.ProtoLens.defMessage ::
FunctionDef'ResourceArgUniqueIdEntry)))))
(Map Word32 Word32 -> [(Word32, Word32)]
forall k a. Map k a -> [(k, a)]
Data.Map.toList
(FoldLike
(Map Word32 Word32)
FunctionDef
FunctionDef
(Map Word32 Word32)
(Map Word32 Word32)
-> FunctionDef -> Map Word32 Word32
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "resourceArgUniqueId" 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 @"resourceArgUniqueId") FunctionDef
_x))))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
((NodeDef -> Builder) -> Vector NodeDef -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
(\ _v :: NodeDef
_v
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 26)
((ByteString -> Builder)
-> (NodeDef -> ByteString) -> NodeDef -> 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))
NodeDef -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
NodeDef
_v))
(FoldLike
(Vector NodeDef)
FunctionDef
FunctionDef
(Vector NodeDef)
(Vector NodeDef)
-> FunctionDef -> Vector NodeDef
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "vec'nodeDef" 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'nodeDef") FunctionDef
_x))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
([Builder] -> Builder
forall a. Monoid a => [a] -> a
Data.Monoid.mconcat
(((Text, Text) -> Builder) -> [(Text, Text)] -> [Builder]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map
(\ _v :: (Text, Text)
_v
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 34)
((ByteString -> Builder)
-> (FunctionDef'RetEntry -> ByteString)
-> FunctionDef'RetEntry
-> 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))
FunctionDef'RetEntry -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
(Setter FunctionDef'RetEntry FunctionDef'RetEntry Text Text
-> Text -> FunctionDef'RetEntry -> FunctionDef'RetEntry
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "key" 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 @"key")
((Text, Text) -> Text
forall a b. (a, b) -> a
Prelude.fst (Text, Text)
_v)
(Setter FunctionDef'RetEntry FunctionDef'RetEntry Text Text
-> Text -> FunctionDef'RetEntry -> FunctionDef'RetEntry
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "value" 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 @"value")
((Text, Text) -> Text
forall a b. (a, b) -> b
Prelude.snd (Text, Text)
_v)
(FunctionDef'RetEntry
forall msg. Message msg => msg
Data.ProtoLens.defMessage ::
FunctionDef'RetEntry)))))
(Map Text Text -> [(Text, Text)]
forall k a. Map k a -> [(k, a)]
Data.Map.toList
(FoldLike
(Map Text Text)
FunctionDef
FunctionDef
(Map Text Text)
(Map Text Text)
-> FunctionDef -> Map Text Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "ret" 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 @"ret") FunctionDef
_x))))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
([Builder] -> Builder
forall a. Monoid a => [a] -> a
Data.Monoid.mconcat
(((Text, Text) -> Builder) -> [(Text, Text)] -> [Builder]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map
(\ _v :: (Text, Text)
_v
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 50)
((ByteString -> Builder)
-> (FunctionDef'ControlRetEntry -> ByteString)
-> FunctionDef'ControlRetEntry
-> 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))
FunctionDef'ControlRetEntry -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
(Setter
FunctionDef'ControlRetEntry FunctionDef'ControlRetEntry Text Text
-> Text
-> FunctionDef'ControlRetEntry
-> FunctionDef'ControlRetEntry
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "key" 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 @"key")
((Text, Text) -> Text
forall a b. (a, b) -> a
Prelude.fst (Text, Text)
_v)
(Setter
FunctionDef'ControlRetEntry FunctionDef'ControlRetEntry Text Text
-> Text
-> FunctionDef'ControlRetEntry
-> FunctionDef'ControlRetEntry
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "value" 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 @"value")
((Text, Text) -> Text
forall a b. (a, b) -> b
Prelude.snd (Text, Text)
_v)
(FunctionDef'ControlRetEntry
forall msg. Message msg => msg
Data.ProtoLens.defMessage ::
FunctionDef'ControlRetEntry)))))
(Map Text Text -> [(Text, Text)]
forall k a. Map k a -> [(k, a)]
Data.Map.toList
(FoldLike
(Map Text Text)
FunctionDef
FunctionDef
(Map Text Text)
(Map Text Text)
-> FunctionDef -> Map Text Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "controlRet" 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 @"controlRet") FunctionDef
_x))))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet FunctionDef FunctionDef FieldSet FieldSet
-> FunctionDef -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet FunctionDef FunctionDef FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields FunctionDef
_x))))))))
instance Control.DeepSeq.NFData FunctionDef where
rnf :: FunctionDef -> ()
rnf
= \ x__ :: FunctionDef
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(FunctionDef -> FieldSet
_FunctionDef'_unknownFields FunctionDef
x__)
(Maybe OpDef -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(FunctionDef -> Maybe OpDef
_FunctionDef'signature FunctionDef
x__)
(Map Text AttrValue -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(FunctionDef -> Map Text AttrValue
_FunctionDef'attr FunctionDef
x__)
(Map Word32 FunctionDef'ArgAttrs -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(FunctionDef -> Map Word32 FunctionDef'ArgAttrs
_FunctionDef'argAttr FunctionDef
x__)
(Map Word32 Word32 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(FunctionDef -> Map Word32 Word32
_FunctionDef'resourceArgUniqueId FunctionDef
x__)
(Vector NodeDef -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(FunctionDef -> Vector NodeDef
_FunctionDef'nodeDef FunctionDef
x__)
(Map Text Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(FunctionDef -> Map Text Text
_FunctionDef'ret FunctionDef
x__)
(Map Text Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (FunctionDef -> Map Text Text
_FunctionDef'controlRet FunctionDef
x__) ())))))))
data FunctionDef'ArgAttrEntry
= FunctionDef'ArgAttrEntry'_constructor {FunctionDef'ArgAttrEntry -> Word32
_FunctionDef'ArgAttrEntry'key :: !Data.Word.Word32,
FunctionDef'ArgAttrEntry -> Maybe FunctionDef'ArgAttrs
_FunctionDef'ArgAttrEntry'value :: !(Prelude.Maybe FunctionDef'ArgAttrs),
FunctionDef'ArgAttrEntry -> FieldSet
_FunctionDef'ArgAttrEntry'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry -> Bool
(FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry -> Bool)
-> (FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry -> Bool)
-> Eq FunctionDef'ArgAttrEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry -> Bool
$c/= :: FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry -> Bool
== :: FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry -> Bool
$c== :: FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry -> Bool
Prelude.Eq, Eq FunctionDef'ArgAttrEntry
Eq FunctionDef'ArgAttrEntry =>
(FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry -> Ordering)
-> (FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry -> Bool)
-> (FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry -> Bool)
-> (FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry -> Bool)
-> (FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry -> Bool)
-> (FunctionDef'ArgAttrEntry
-> FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry)
-> (FunctionDef'ArgAttrEntry
-> FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry)
-> Ord FunctionDef'ArgAttrEntry
FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry -> Bool
FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry -> Ordering
FunctionDef'ArgAttrEntry
-> FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry
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 :: FunctionDef'ArgAttrEntry
-> FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry
$cmin :: FunctionDef'ArgAttrEntry
-> FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry
max :: FunctionDef'ArgAttrEntry
-> FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry
$cmax :: FunctionDef'ArgAttrEntry
-> FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry
>= :: FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry -> Bool
$c>= :: FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry -> Bool
> :: FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry -> Bool
$c> :: FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry -> Bool
<= :: FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry -> Bool
$c<= :: FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry -> Bool
< :: FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry -> Bool
$c< :: FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry -> Bool
compare :: FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry -> Ordering
$ccompare :: FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry -> Ordering
$cp1Ord :: Eq FunctionDef'ArgAttrEntry
Prelude.Ord)
instance Prelude.Show FunctionDef'ArgAttrEntry where
showsPrec :: Int -> FunctionDef'ArgAttrEntry -> ShowS
showsPrec _ __x :: FunctionDef'ArgAttrEntry
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(FunctionDef'ArgAttrEntry -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort FunctionDef'ArgAttrEntry
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField FunctionDef'ArgAttrEntry "key" Data.Word.Word32 where
fieldOf :: Proxy# "key"
-> (Word32 -> f Word32)
-> FunctionDef'ArgAttrEntry
-> f FunctionDef'ArgAttrEntry
fieldOf _
= ((Word32 -> f Word32)
-> FunctionDef'ArgAttrEntry -> f FunctionDef'ArgAttrEntry)
-> ((Word32 -> f Word32) -> Word32 -> f Word32)
-> (Word32 -> f Word32)
-> FunctionDef'ArgAttrEntry
-> f FunctionDef'ArgAttrEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((FunctionDef'ArgAttrEntry -> Word32)
-> (FunctionDef'ArgAttrEntry -> Word32 -> FunctionDef'ArgAttrEntry)
-> Lens' FunctionDef'ArgAttrEntry Word32
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef'ArgAttrEntry -> Word32
_FunctionDef'ArgAttrEntry'key
(\ x__ :: FunctionDef'ArgAttrEntry
x__ y__ :: Word32
y__ -> FunctionDef'ArgAttrEntry
x__ {_FunctionDef'ArgAttrEntry'key :: Word32
_FunctionDef'ArgAttrEntry'key = Word32
y__}))
(Word32 -> f Word32) -> Word32 -> f Word32
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField FunctionDef'ArgAttrEntry "value" FunctionDef'ArgAttrs where
fieldOf :: Proxy# "value"
-> (FunctionDef'ArgAttrs -> f FunctionDef'ArgAttrs)
-> FunctionDef'ArgAttrEntry
-> f FunctionDef'ArgAttrEntry
fieldOf _
= ((Maybe FunctionDef'ArgAttrs -> f (Maybe FunctionDef'ArgAttrs))
-> FunctionDef'ArgAttrEntry -> f FunctionDef'ArgAttrEntry)
-> ((FunctionDef'ArgAttrs -> f FunctionDef'ArgAttrs)
-> Maybe FunctionDef'ArgAttrs -> f (Maybe FunctionDef'ArgAttrs))
-> (FunctionDef'ArgAttrs -> f FunctionDef'ArgAttrs)
-> FunctionDef'ArgAttrEntry
-> f FunctionDef'ArgAttrEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((FunctionDef'ArgAttrEntry -> Maybe FunctionDef'ArgAttrs)
-> (FunctionDef'ArgAttrEntry
-> Maybe FunctionDef'ArgAttrs -> FunctionDef'ArgAttrEntry)
-> Lens
FunctionDef'ArgAttrEntry
FunctionDef'ArgAttrEntry
(Maybe FunctionDef'ArgAttrs)
(Maybe FunctionDef'ArgAttrs)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef'ArgAttrEntry -> Maybe FunctionDef'ArgAttrs
_FunctionDef'ArgAttrEntry'value
(\ x__ :: FunctionDef'ArgAttrEntry
x__ y__ :: Maybe FunctionDef'ArgAttrs
y__ -> FunctionDef'ArgAttrEntry
x__ {_FunctionDef'ArgAttrEntry'value :: Maybe FunctionDef'ArgAttrs
_FunctionDef'ArgAttrEntry'value = Maybe FunctionDef'ArgAttrs
y__}))
(FunctionDef'ArgAttrs
-> Lens' (Maybe FunctionDef'ArgAttrs) FunctionDef'ArgAttrs
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens FunctionDef'ArgAttrs
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField FunctionDef'ArgAttrEntry "maybe'value" (Prelude.Maybe FunctionDef'ArgAttrs) where
fieldOf :: Proxy# "maybe'value"
-> (Maybe FunctionDef'ArgAttrs -> f (Maybe FunctionDef'ArgAttrs))
-> FunctionDef'ArgAttrEntry
-> f FunctionDef'ArgAttrEntry
fieldOf _
= ((Maybe FunctionDef'ArgAttrs -> f (Maybe FunctionDef'ArgAttrs))
-> FunctionDef'ArgAttrEntry -> f FunctionDef'ArgAttrEntry)
-> ((Maybe FunctionDef'ArgAttrs -> f (Maybe FunctionDef'ArgAttrs))
-> Maybe FunctionDef'ArgAttrs -> f (Maybe FunctionDef'ArgAttrs))
-> (Maybe FunctionDef'ArgAttrs -> f (Maybe FunctionDef'ArgAttrs))
-> FunctionDef'ArgAttrEntry
-> f FunctionDef'ArgAttrEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((FunctionDef'ArgAttrEntry -> Maybe FunctionDef'ArgAttrs)
-> (FunctionDef'ArgAttrEntry
-> Maybe FunctionDef'ArgAttrs -> FunctionDef'ArgAttrEntry)
-> Lens
FunctionDef'ArgAttrEntry
FunctionDef'ArgAttrEntry
(Maybe FunctionDef'ArgAttrs)
(Maybe FunctionDef'ArgAttrs)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef'ArgAttrEntry -> Maybe FunctionDef'ArgAttrs
_FunctionDef'ArgAttrEntry'value
(\ x__ :: FunctionDef'ArgAttrEntry
x__ y__ :: Maybe FunctionDef'ArgAttrs
y__ -> FunctionDef'ArgAttrEntry
x__ {_FunctionDef'ArgAttrEntry'value :: Maybe FunctionDef'ArgAttrs
_FunctionDef'ArgAttrEntry'value = Maybe FunctionDef'ArgAttrs
y__}))
(Maybe FunctionDef'ArgAttrs -> f (Maybe FunctionDef'ArgAttrs))
-> Maybe FunctionDef'ArgAttrs -> f (Maybe FunctionDef'ArgAttrs)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message FunctionDef'ArgAttrEntry where
messageName :: Proxy FunctionDef'ArgAttrEntry -> Text
messageName _
= String -> Text
Data.Text.pack "tensorflow.FunctionDef.ArgAttrEntry"
packedMessageDescriptor :: Proxy FunctionDef'ArgAttrEntry -> ByteString
packedMessageDescriptor _
= "\n\
\\fArgAttrEntry\DC2\DLE\n\
\\ETXkey\CAN\SOH \SOH(\rR\ETXkey\DC26\n\
\\ENQvalue\CAN\STX \SOH(\v2 .tensorflow.FunctionDef.ArgAttrsR\ENQvalue:\STX8\SOH"
packedFileDescriptor :: Proxy FunctionDef'ArgAttrEntry -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor FunctionDef'ArgAttrEntry)
fieldsByTag
= let
key__field_descriptor :: FieldDescriptor FunctionDef'ArgAttrEntry
key__field_descriptor
= String
-> FieldTypeDescriptor Word32
-> FieldAccessor FunctionDef'ArgAttrEntry Word32
-> FieldDescriptor FunctionDef'ArgAttrEntry
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"key"
(ScalarField Word32 -> FieldTypeDescriptor Word32
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Word32
Data.ProtoLens.UInt32Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
(WireDefault Word32
-> Lens' FunctionDef'ArgAttrEntry Word32
-> FieldAccessor FunctionDef'ArgAttrEntry Word32
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Word32
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "key" 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 @"key")) ::
Data.ProtoLens.FieldDescriptor FunctionDef'ArgAttrEntry
value__field_descriptor :: FieldDescriptor FunctionDef'ArgAttrEntry
value__field_descriptor
= String
-> FieldTypeDescriptor FunctionDef'ArgAttrs
-> FieldAccessor FunctionDef'ArgAttrEntry FunctionDef'ArgAttrs
-> FieldDescriptor FunctionDef'ArgAttrEntry
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"value"
(MessageOrGroup -> FieldTypeDescriptor FunctionDef'ArgAttrs
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor FunctionDef'ArgAttrs)
(Lens
FunctionDef'ArgAttrEntry
FunctionDef'ArgAttrEntry
(Maybe FunctionDef'ArgAttrs)
(Maybe FunctionDef'ArgAttrs)
-> FieldAccessor FunctionDef'ArgAttrEntry FunctionDef'ArgAttrs
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'value" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'value")) ::
Data.ProtoLens.FieldDescriptor FunctionDef'ArgAttrEntry
in
[(Tag, FieldDescriptor FunctionDef'ArgAttrEntry)]
-> Map Tag (FieldDescriptor FunctionDef'ArgAttrEntry)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor FunctionDef'ArgAttrEntry
key__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor FunctionDef'ArgAttrEntry
value__field_descriptor)]
unknownFields :: LensLike' f FunctionDef'ArgAttrEntry FieldSet
unknownFields
= (FunctionDef'ArgAttrEntry -> FieldSet)
-> (FunctionDef'ArgAttrEntry
-> FieldSet -> FunctionDef'ArgAttrEntry)
-> Lens' FunctionDef'ArgAttrEntry FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef'ArgAttrEntry -> FieldSet
_FunctionDef'ArgAttrEntry'_unknownFields
(\ x__ :: FunctionDef'ArgAttrEntry
x__ y__ :: FieldSet
y__ -> FunctionDef'ArgAttrEntry
x__ {_FunctionDef'ArgAttrEntry'_unknownFields :: FieldSet
_FunctionDef'ArgAttrEntry'_unknownFields = FieldSet
y__})
defMessage :: FunctionDef'ArgAttrEntry
defMessage
= $WFunctionDef'ArgAttrEntry'_constructor :: Word32
-> Maybe FunctionDef'ArgAttrs
-> FieldSet
-> FunctionDef'ArgAttrEntry
FunctionDef'ArgAttrEntry'_constructor
{_FunctionDef'ArgAttrEntry'key :: Word32
_FunctionDef'ArgAttrEntry'key = Word32
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_FunctionDef'ArgAttrEntry'value :: Maybe FunctionDef'ArgAttrs
_FunctionDef'ArgAttrEntry'value = Maybe FunctionDef'ArgAttrs
forall a. Maybe a
Prelude.Nothing,
_FunctionDef'ArgAttrEntry'_unknownFields :: FieldSet
_FunctionDef'ArgAttrEntry'_unknownFields = []}
parseMessage :: Parser FunctionDef'ArgAttrEntry
parseMessage
= let
loop ::
FunctionDef'ArgAttrEntry
-> Data.ProtoLens.Encoding.Bytes.Parser FunctionDef'ArgAttrEntry
loop :: FunctionDef'ArgAttrEntry -> Parser FunctionDef'ArgAttrEntry
loop x :: FunctionDef'ArgAttrEntry
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]))))
FunctionDef'ArgAttrEntry -> Parser FunctionDef'ArgAttrEntry
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter
FunctionDef'ArgAttrEntry FunctionDef'ArgAttrEntry FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> FunctionDef'ArgAttrEntry
-> FunctionDef'ArgAttrEntry
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
FunctionDef'ArgAttrEntry FunctionDef'ArgAttrEntry FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) FunctionDef'ArgAttrEntry
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
8 -> do Word32
y <- Parser Word32 -> String -> Parser Word32
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Word32) -> Parser Word64 -> Parser Word32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"key"
FunctionDef'ArgAttrEntry -> Parser FunctionDef'ArgAttrEntry
loop (Setter
FunctionDef'ArgAttrEntry FunctionDef'ArgAttrEntry Word32 Word32
-> Word32 -> FunctionDef'ArgAttrEntry -> FunctionDef'ArgAttrEntry
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "key" 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 @"key") Word32
y FunctionDef'ArgAttrEntry
x)
18
-> do FunctionDef'ArgAttrs
y <- Parser FunctionDef'ArgAttrs
-> String -> Parser FunctionDef'ArgAttrs
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser FunctionDef'ArgAttrs -> Parser FunctionDef'ArgAttrs
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 FunctionDef'ArgAttrs
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"value"
FunctionDef'ArgAttrEntry -> Parser FunctionDef'ArgAttrEntry
loop (Setter
FunctionDef'ArgAttrEntry
FunctionDef'ArgAttrEntry
FunctionDef'ArgAttrs
FunctionDef'ArgAttrs
-> FunctionDef'ArgAttrs
-> FunctionDef'ArgAttrEntry
-> FunctionDef'ArgAttrEntry
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "value" 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 @"value") FunctionDef'ArgAttrs
y FunctionDef'ArgAttrEntry
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
FunctionDef'ArgAttrEntry -> Parser FunctionDef'ArgAttrEntry
loop
(Setter
FunctionDef'ArgAttrEntry FunctionDef'ArgAttrEntry FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> FunctionDef'ArgAttrEntry
-> FunctionDef'ArgAttrEntry
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
FunctionDef'ArgAttrEntry FunctionDef'ArgAttrEntry FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) FunctionDef'ArgAttrEntry
x)
in
Parser FunctionDef'ArgAttrEntry
-> String -> Parser FunctionDef'ArgAttrEntry
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do FunctionDef'ArgAttrEntry -> Parser FunctionDef'ArgAttrEntry
loop FunctionDef'ArgAttrEntry
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "ArgAttrEntry"
buildMessage :: FunctionDef'ArgAttrEntry -> Builder
buildMessage
= \ _x :: FunctionDef'ArgAttrEntry
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: Word32
_v = FoldLike
Word32
FunctionDef'ArgAttrEntry
FunctionDef'ArgAttrEntry
Word32
Word32
-> FunctionDef'ArgAttrEntry -> Word32
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "key" 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 @"key") FunctionDef'ArgAttrEntry
_x
in
if Word32 -> Word32 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Word32
_v Word32
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) -> (Word32 -> Word64) -> Word32 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word32 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word32
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe FunctionDef'ArgAttrs)
FunctionDef'ArgAttrEntry
FunctionDef'ArgAttrEntry
(Maybe FunctionDef'ArgAttrs)
(Maybe FunctionDef'ArgAttrs)
-> FunctionDef'ArgAttrEntry -> Maybe FunctionDef'ArgAttrs
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maybe'value" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'value") FunctionDef'ArgAttrEntry
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just _v :: FunctionDef'ArgAttrs
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
((ByteString -> Builder)
-> (FunctionDef'ArgAttrs -> ByteString)
-> FunctionDef'ArgAttrs
-> 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))
FunctionDef'ArgAttrs -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
FunctionDef'ArgAttrs
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike
FieldSet
FunctionDef'ArgAttrEntry
FunctionDef'ArgAttrEntry
FieldSet
FieldSet
-> FunctionDef'ArgAttrEntry -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
FieldSet
FunctionDef'ArgAttrEntry
FunctionDef'ArgAttrEntry
FieldSet
FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields FunctionDef'ArgAttrEntry
_x)))
instance Control.DeepSeq.NFData FunctionDef'ArgAttrEntry where
rnf :: FunctionDef'ArgAttrEntry -> ()
rnf
= \ x__ :: FunctionDef'ArgAttrEntry
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(FunctionDef'ArgAttrEntry -> FieldSet
_FunctionDef'ArgAttrEntry'_unknownFields FunctionDef'ArgAttrEntry
x__)
(Word32 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(FunctionDef'ArgAttrEntry -> Word32
_FunctionDef'ArgAttrEntry'key FunctionDef'ArgAttrEntry
x__)
(Maybe FunctionDef'ArgAttrs -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (FunctionDef'ArgAttrEntry -> Maybe FunctionDef'ArgAttrs
_FunctionDef'ArgAttrEntry'value FunctionDef'ArgAttrEntry
x__) ()))
data FunctionDef'ArgAttrs
= FunctionDef'ArgAttrs'_constructor {FunctionDef'ArgAttrs -> Map Text AttrValue
_FunctionDef'ArgAttrs'attr :: !(Data.Map.Map Data.Text.Text Proto.Tensorflow.Core.Framework.AttrValue.AttrValue),
FunctionDef'ArgAttrs -> FieldSet
_FunctionDef'ArgAttrs'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs -> Bool
(FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs -> Bool)
-> (FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs -> Bool)
-> Eq FunctionDef'ArgAttrs
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs -> Bool
$c/= :: FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs -> Bool
== :: FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs -> Bool
$c== :: FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs -> Bool
Prelude.Eq, Eq FunctionDef'ArgAttrs
Eq FunctionDef'ArgAttrs =>
(FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs -> Ordering)
-> (FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs -> Bool)
-> (FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs -> Bool)
-> (FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs -> Bool)
-> (FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs -> Bool)
-> (FunctionDef'ArgAttrs
-> FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs)
-> (FunctionDef'ArgAttrs
-> FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs)
-> Ord FunctionDef'ArgAttrs
FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs -> Bool
FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs -> Ordering
FunctionDef'ArgAttrs
-> FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs
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 :: FunctionDef'ArgAttrs
-> FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs
$cmin :: FunctionDef'ArgAttrs
-> FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs
max :: FunctionDef'ArgAttrs
-> FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs
$cmax :: FunctionDef'ArgAttrs
-> FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs
>= :: FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs -> Bool
$c>= :: FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs -> Bool
> :: FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs -> Bool
$c> :: FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs -> Bool
<= :: FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs -> Bool
$c<= :: FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs -> Bool
< :: FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs -> Bool
$c< :: FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs -> Bool
compare :: FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs -> Ordering
$ccompare :: FunctionDef'ArgAttrs -> FunctionDef'ArgAttrs -> Ordering
$cp1Ord :: Eq FunctionDef'ArgAttrs
Prelude.Ord)
instance Prelude.Show FunctionDef'ArgAttrs where
showsPrec :: Int -> FunctionDef'ArgAttrs -> ShowS
showsPrec _ __x :: FunctionDef'ArgAttrs
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(FunctionDef'ArgAttrs -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort FunctionDef'ArgAttrs
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField FunctionDef'ArgAttrs "attr" (Data.Map.Map Data.Text.Text Proto.Tensorflow.Core.Framework.AttrValue.AttrValue) where
fieldOf :: Proxy# "attr"
-> (Map Text AttrValue -> f (Map Text AttrValue))
-> FunctionDef'ArgAttrs
-> f FunctionDef'ArgAttrs
fieldOf _
= ((Map Text AttrValue -> f (Map Text AttrValue))
-> FunctionDef'ArgAttrs -> f FunctionDef'ArgAttrs)
-> ((Map Text AttrValue -> f (Map Text AttrValue))
-> Map Text AttrValue -> f (Map Text AttrValue))
-> (Map Text AttrValue -> f (Map Text AttrValue))
-> FunctionDef'ArgAttrs
-> f FunctionDef'ArgAttrs
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((FunctionDef'ArgAttrs -> Map Text AttrValue)
-> (FunctionDef'ArgAttrs
-> Map Text AttrValue -> FunctionDef'ArgAttrs)
-> Lens
FunctionDef'ArgAttrs
FunctionDef'ArgAttrs
(Map Text AttrValue)
(Map Text AttrValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef'ArgAttrs -> Map Text AttrValue
_FunctionDef'ArgAttrs'attr
(\ x__ :: FunctionDef'ArgAttrs
x__ y__ :: Map Text AttrValue
y__ -> FunctionDef'ArgAttrs
x__ {_FunctionDef'ArgAttrs'attr :: Map Text AttrValue
_FunctionDef'ArgAttrs'attr = Map Text AttrValue
y__}))
(Map Text AttrValue -> f (Map Text AttrValue))
-> Map Text AttrValue -> f (Map Text AttrValue)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message FunctionDef'ArgAttrs where
messageName :: Proxy FunctionDef'ArgAttrs -> Text
messageName _ = String -> Text
Data.Text.pack "tensorflow.FunctionDef.ArgAttrs"
packedMessageDescriptor :: Proxy FunctionDef'ArgAttrs -> ByteString
packedMessageDescriptor _
= "\n\
\\bArgAttrs\DC2>\n\
\\EOTattr\CAN\SOH \ETX(\v2*.tensorflow.FunctionDef.ArgAttrs.AttrEntryR\EOTattr\SUBN\n\
\\tAttrEntry\DC2\DLE\n\
\\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2+\n\
\\ENQvalue\CAN\STX \SOH(\v2\NAK.tensorflow.AttrValueR\ENQvalue:\STX8\SOH"
packedFileDescriptor :: Proxy FunctionDef'ArgAttrs -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor FunctionDef'ArgAttrs)
fieldsByTag
= let
attr__field_descriptor :: FieldDescriptor FunctionDef'ArgAttrs
attr__field_descriptor
= String
-> FieldTypeDescriptor FunctionDef'ArgAttrs'AttrEntry
-> FieldAccessor
FunctionDef'ArgAttrs FunctionDef'ArgAttrs'AttrEntry
-> FieldDescriptor FunctionDef'ArgAttrs
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"attr"
(MessageOrGroup
-> FieldTypeDescriptor FunctionDef'ArgAttrs'AttrEntry
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor FunctionDef'ArgAttrs'AttrEntry)
(Lens' FunctionDef'ArgAttrs'AttrEntry Text
-> Lens' FunctionDef'ArgAttrs'AttrEntry AttrValue
-> Lens
FunctionDef'ArgAttrs
FunctionDef'ArgAttrs
(Map Text AttrValue)
(Map Text AttrValue)
-> FieldAccessor
FunctionDef'ArgAttrs FunctionDef'ArgAttrs'AttrEntry
forall key value value1 msg.
(Ord key, Message value) =>
Lens' value key
-> Lens' value value1
-> Lens' msg (Map key value1)
-> FieldAccessor msg value
Data.ProtoLens.MapField
(forall s a (f :: * -> *).
(HasField s "key" 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 @"key")
(forall s a (f :: * -> *).
(HasField s "value" 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 @"value")
(forall s a (f :: * -> *).
(HasField s "attr" 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 @"attr")) ::
Data.ProtoLens.FieldDescriptor FunctionDef'ArgAttrs
in
[(Tag, FieldDescriptor FunctionDef'ArgAttrs)]
-> Map Tag (FieldDescriptor FunctionDef'ArgAttrs)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor FunctionDef'ArgAttrs
attr__field_descriptor)]
unknownFields :: LensLike' f FunctionDef'ArgAttrs FieldSet
unknownFields
= (FunctionDef'ArgAttrs -> FieldSet)
-> (FunctionDef'ArgAttrs -> FieldSet -> FunctionDef'ArgAttrs)
-> Lens' FunctionDef'ArgAttrs FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef'ArgAttrs -> FieldSet
_FunctionDef'ArgAttrs'_unknownFields
(\ x__ :: FunctionDef'ArgAttrs
x__ y__ :: FieldSet
y__ -> FunctionDef'ArgAttrs
x__ {_FunctionDef'ArgAttrs'_unknownFields :: FieldSet
_FunctionDef'ArgAttrs'_unknownFields = FieldSet
y__})
defMessage :: FunctionDef'ArgAttrs
defMessage
= $WFunctionDef'ArgAttrs'_constructor :: Map Text AttrValue -> FieldSet -> FunctionDef'ArgAttrs
FunctionDef'ArgAttrs'_constructor
{_FunctionDef'ArgAttrs'attr :: Map Text AttrValue
_FunctionDef'ArgAttrs'attr = Map Text AttrValue
forall k a. Map k a
Data.Map.empty,
_FunctionDef'ArgAttrs'_unknownFields :: FieldSet
_FunctionDef'ArgAttrs'_unknownFields = []}
parseMessage :: Parser FunctionDef'ArgAttrs
parseMessage
= let
loop ::
FunctionDef'ArgAttrs
-> Data.ProtoLens.Encoding.Bytes.Parser FunctionDef'ArgAttrs
loop :: FunctionDef'ArgAttrs -> Parser FunctionDef'ArgAttrs
loop x :: FunctionDef'ArgAttrs
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]))))
FunctionDef'ArgAttrs -> Parser FunctionDef'ArgAttrs
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter FunctionDef'ArgAttrs FunctionDef'ArgAttrs FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> FunctionDef'ArgAttrs
-> FunctionDef'ArgAttrs
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 FunctionDef'ArgAttrs FunctionDef'ArgAttrs FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) FunctionDef'ArgAttrs
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
10
-> do !(FunctionDef'ArgAttrs'AttrEntry
entry :: FunctionDef'ArgAttrs'AttrEntry) <- Parser FunctionDef'ArgAttrs'AttrEntry
-> String -> Parser FunctionDef'ArgAttrs'AttrEntry
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int
-> Parser FunctionDef'ArgAttrs'AttrEntry
-> Parser FunctionDef'ArgAttrs'AttrEntry
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 FunctionDef'ArgAttrs'AttrEntry
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"attr"
(let
key :: Text
key = FoldLike
Text
FunctionDef'ArgAttrs'AttrEntry
FunctionDef'ArgAttrs'AttrEntry
Text
Text
-> FunctionDef'ArgAttrs'AttrEntry -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "key" 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 @"key") FunctionDef'ArgAttrs'AttrEntry
entry
value :: AttrValue
value
= FoldLike
AttrValue
FunctionDef'ArgAttrs'AttrEntry
FunctionDef'ArgAttrs'AttrEntry
AttrValue
AttrValue
-> FunctionDef'ArgAttrs'AttrEntry -> AttrValue
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "value" 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 @"value") FunctionDef'ArgAttrs'AttrEntry
entry
in
FunctionDef'ArgAttrs -> Parser FunctionDef'ArgAttrs
loop
(Setter
FunctionDef'ArgAttrs
FunctionDef'ArgAttrs
(Map Text AttrValue)
(Map Text AttrValue)
-> (Map Text AttrValue -> Map Text AttrValue)
-> FunctionDef'ArgAttrs
-> FunctionDef'ArgAttrs
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
(forall s a (f :: * -> *).
(HasField s "attr" 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 @"attr")
(\ !Map Text AttrValue
t -> Text -> AttrValue -> Map Text AttrValue -> Map Text AttrValue
forall k a. Ord k => k -> a -> Map k a -> Map k a
Data.Map.insert Text
key AttrValue
value Map Text AttrValue
t)
FunctionDef'ArgAttrs
x))
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
FunctionDef'ArgAttrs -> Parser FunctionDef'ArgAttrs
loop
(Setter FunctionDef'ArgAttrs FunctionDef'ArgAttrs FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> FunctionDef'ArgAttrs
-> FunctionDef'ArgAttrs
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 FunctionDef'ArgAttrs FunctionDef'ArgAttrs FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) FunctionDef'ArgAttrs
x)
in
Parser FunctionDef'ArgAttrs
-> String -> Parser FunctionDef'ArgAttrs
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do FunctionDef'ArgAttrs -> Parser FunctionDef'ArgAttrs
loop FunctionDef'ArgAttrs
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "ArgAttrs"
buildMessage :: FunctionDef'ArgAttrs -> Builder
buildMessage
= \ _x :: FunctionDef'ArgAttrs
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
([Builder] -> Builder
forall a. Monoid a => [a] -> a
Data.Monoid.mconcat
(((Text, AttrValue) -> Builder) -> [(Text, AttrValue)] -> [Builder]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map
(\ _v :: (Text, AttrValue)
_v
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
((ByteString -> Builder)
-> (FunctionDef'ArgAttrs'AttrEntry -> ByteString)
-> FunctionDef'ArgAttrs'AttrEntry
-> 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))
FunctionDef'ArgAttrs'AttrEntry -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
(Setter
FunctionDef'ArgAttrs'AttrEntry
FunctionDef'ArgAttrs'AttrEntry
Text
Text
-> Text
-> FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "key" 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 @"key")
((Text, AttrValue) -> Text
forall a b. (a, b) -> a
Prelude.fst (Text, AttrValue)
_v)
(Setter
FunctionDef'ArgAttrs'AttrEntry
FunctionDef'ArgAttrs'AttrEntry
AttrValue
AttrValue
-> AttrValue
-> FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "value" 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 @"value")
((Text, AttrValue) -> AttrValue
forall a b. (a, b) -> b
Prelude.snd (Text, AttrValue)
_v)
(FunctionDef'ArgAttrs'AttrEntry
forall msg. Message msg => msg
Data.ProtoLens.defMessage ::
FunctionDef'ArgAttrs'AttrEntry)))))
(Map Text AttrValue -> [(Text, AttrValue)]
forall k a. Map k a -> [(k, a)]
Data.Map.toList
(FoldLike
(Map Text AttrValue)
FunctionDef'ArgAttrs
FunctionDef'ArgAttrs
(Map Text AttrValue)
(Map Text AttrValue)
-> FunctionDef'ArgAttrs -> Map Text AttrValue
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "attr" 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 @"attr") FunctionDef'ArgAttrs
_x))))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike
FieldSet
FunctionDef'ArgAttrs
FunctionDef'ArgAttrs
FieldSet
FieldSet
-> FunctionDef'ArgAttrs -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
FieldSet
FunctionDef'ArgAttrs
FunctionDef'ArgAttrs
FieldSet
FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields FunctionDef'ArgAttrs
_x))
instance Control.DeepSeq.NFData FunctionDef'ArgAttrs where
rnf :: FunctionDef'ArgAttrs -> ()
rnf
= \ x__ :: FunctionDef'ArgAttrs
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(FunctionDef'ArgAttrs -> FieldSet
_FunctionDef'ArgAttrs'_unknownFields FunctionDef'ArgAttrs
x__)
(Map Text AttrValue -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (FunctionDef'ArgAttrs -> Map Text AttrValue
_FunctionDef'ArgAttrs'attr FunctionDef'ArgAttrs
x__) ())
data FunctionDef'ArgAttrs'AttrEntry
= FunctionDef'ArgAttrs'AttrEntry'_constructor {FunctionDef'ArgAttrs'AttrEntry -> Text
_FunctionDef'ArgAttrs'AttrEntry'key :: !Data.Text.Text,
FunctionDef'ArgAttrs'AttrEntry -> Maybe AttrValue
_FunctionDef'ArgAttrs'AttrEntry'value :: !(Prelude.Maybe Proto.Tensorflow.Core.Framework.AttrValue.AttrValue),
FunctionDef'ArgAttrs'AttrEntry -> FieldSet
_FunctionDef'ArgAttrs'AttrEntry'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry -> Bool
(FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry -> Bool)
-> (FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry -> Bool)
-> Eq FunctionDef'ArgAttrs'AttrEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry -> Bool
$c/= :: FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry -> Bool
== :: FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry -> Bool
$c== :: FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry -> Bool
Prelude.Eq, Eq FunctionDef'ArgAttrs'AttrEntry
Eq FunctionDef'ArgAttrs'AttrEntry =>
(FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry -> Ordering)
-> (FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry -> Bool)
-> (FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry -> Bool)
-> (FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry -> Bool)
-> (FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry -> Bool)
-> (FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry)
-> (FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry)
-> Ord FunctionDef'ArgAttrs'AttrEntry
FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry -> Bool
FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry -> Ordering
FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry -> FunctionDef'ArgAttrs'AttrEntry
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 :: FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry -> FunctionDef'ArgAttrs'AttrEntry
$cmin :: FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry -> FunctionDef'ArgAttrs'AttrEntry
max :: FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry -> FunctionDef'ArgAttrs'AttrEntry
$cmax :: FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry -> FunctionDef'ArgAttrs'AttrEntry
>= :: FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry -> Bool
$c>= :: FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry -> Bool
> :: FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry -> Bool
$c> :: FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry -> Bool
<= :: FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry -> Bool
$c<= :: FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry -> Bool
< :: FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry -> Bool
$c< :: FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry -> Bool
compare :: FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry -> Ordering
$ccompare :: FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry -> Ordering
$cp1Ord :: Eq FunctionDef'ArgAttrs'AttrEntry
Prelude.Ord)
instance Prelude.Show FunctionDef'ArgAttrs'AttrEntry where
showsPrec :: Int -> FunctionDef'ArgAttrs'AttrEntry -> ShowS
showsPrec _ __x :: FunctionDef'ArgAttrs'AttrEntry
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(FunctionDef'ArgAttrs'AttrEntry -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort FunctionDef'ArgAttrs'AttrEntry
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField FunctionDef'ArgAttrs'AttrEntry "key" Data.Text.Text where
fieldOf :: Proxy# "key"
-> (Text -> f Text)
-> FunctionDef'ArgAttrs'AttrEntry
-> f FunctionDef'ArgAttrs'AttrEntry
fieldOf _
= ((Text -> f Text)
-> FunctionDef'ArgAttrs'AttrEntry
-> f FunctionDef'ArgAttrs'AttrEntry)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> FunctionDef'ArgAttrs'AttrEntry
-> f FunctionDef'ArgAttrs'AttrEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((FunctionDef'ArgAttrs'AttrEntry -> Text)
-> (FunctionDef'ArgAttrs'AttrEntry
-> Text -> FunctionDef'ArgAttrs'AttrEntry)
-> Lens' FunctionDef'ArgAttrs'AttrEntry Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef'ArgAttrs'AttrEntry -> Text
_FunctionDef'ArgAttrs'AttrEntry'key
(\ x__ :: FunctionDef'ArgAttrs'AttrEntry
x__ y__ :: Text
y__ -> FunctionDef'ArgAttrs'AttrEntry
x__ {_FunctionDef'ArgAttrs'AttrEntry'key :: Text
_FunctionDef'ArgAttrs'AttrEntry'key = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField FunctionDef'ArgAttrs'AttrEntry "value" Proto.Tensorflow.Core.Framework.AttrValue.AttrValue where
fieldOf :: Proxy# "value"
-> (AttrValue -> f AttrValue)
-> FunctionDef'ArgAttrs'AttrEntry
-> f FunctionDef'ArgAttrs'AttrEntry
fieldOf _
= ((Maybe AttrValue -> f (Maybe AttrValue))
-> FunctionDef'ArgAttrs'AttrEntry
-> f FunctionDef'ArgAttrs'AttrEntry)
-> ((AttrValue -> f AttrValue)
-> Maybe AttrValue -> f (Maybe AttrValue))
-> (AttrValue -> f AttrValue)
-> FunctionDef'ArgAttrs'AttrEntry
-> f FunctionDef'ArgAttrs'AttrEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((FunctionDef'ArgAttrs'AttrEntry -> Maybe AttrValue)
-> (FunctionDef'ArgAttrs'AttrEntry
-> Maybe AttrValue -> FunctionDef'ArgAttrs'AttrEntry)
-> Lens
FunctionDef'ArgAttrs'AttrEntry
FunctionDef'ArgAttrs'AttrEntry
(Maybe AttrValue)
(Maybe AttrValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef'ArgAttrs'AttrEntry -> Maybe AttrValue
_FunctionDef'ArgAttrs'AttrEntry'value
(\ x__ :: FunctionDef'ArgAttrs'AttrEntry
x__ y__ :: Maybe AttrValue
y__ -> FunctionDef'ArgAttrs'AttrEntry
x__ {_FunctionDef'ArgAttrs'AttrEntry'value :: Maybe AttrValue
_FunctionDef'ArgAttrs'AttrEntry'value = Maybe AttrValue
y__}))
(AttrValue -> Lens' (Maybe AttrValue) AttrValue
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens AttrValue
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField FunctionDef'ArgAttrs'AttrEntry "maybe'value" (Prelude.Maybe Proto.Tensorflow.Core.Framework.AttrValue.AttrValue) where
fieldOf :: Proxy# "maybe'value"
-> (Maybe AttrValue -> f (Maybe AttrValue))
-> FunctionDef'ArgAttrs'AttrEntry
-> f FunctionDef'ArgAttrs'AttrEntry
fieldOf _
= ((Maybe AttrValue -> f (Maybe AttrValue))
-> FunctionDef'ArgAttrs'AttrEntry
-> f FunctionDef'ArgAttrs'AttrEntry)
-> ((Maybe AttrValue -> f (Maybe AttrValue))
-> Maybe AttrValue -> f (Maybe AttrValue))
-> (Maybe AttrValue -> f (Maybe AttrValue))
-> FunctionDef'ArgAttrs'AttrEntry
-> f FunctionDef'ArgAttrs'AttrEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((FunctionDef'ArgAttrs'AttrEntry -> Maybe AttrValue)
-> (FunctionDef'ArgAttrs'AttrEntry
-> Maybe AttrValue -> FunctionDef'ArgAttrs'AttrEntry)
-> Lens
FunctionDef'ArgAttrs'AttrEntry
FunctionDef'ArgAttrs'AttrEntry
(Maybe AttrValue)
(Maybe AttrValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef'ArgAttrs'AttrEntry -> Maybe AttrValue
_FunctionDef'ArgAttrs'AttrEntry'value
(\ x__ :: FunctionDef'ArgAttrs'AttrEntry
x__ y__ :: Maybe AttrValue
y__ -> FunctionDef'ArgAttrs'AttrEntry
x__ {_FunctionDef'ArgAttrs'AttrEntry'value :: Maybe AttrValue
_FunctionDef'ArgAttrs'AttrEntry'value = Maybe AttrValue
y__}))
(Maybe AttrValue -> f (Maybe AttrValue))
-> Maybe AttrValue -> f (Maybe AttrValue)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message FunctionDef'ArgAttrs'AttrEntry where
messageName :: Proxy FunctionDef'ArgAttrs'AttrEntry -> Text
messageName _
= String -> Text
Data.Text.pack "tensorflow.FunctionDef.ArgAttrs.AttrEntry"
packedMessageDescriptor :: Proxy FunctionDef'ArgAttrs'AttrEntry -> ByteString
packedMessageDescriptor _
= "\n\
\\tAttrEntry\DC2\DLE\n\
\\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2+\n\
\\ENQvalue\CAN\STX \SOH(\v2\NAK.tensorflow.AttrValueR\ENQvalue:\STX8\SOH"
packedFileDescriptor :: Proxy FunctionDef'ArgAttrs'AttrEntry -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor FunctionDef'ArgAttrs'AttrEntry)
fieldsByTag
= let
key__field_descriptor :: FieldDescriptor FunctionDef'ArgAttrs'AttrEntry
key__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor FunctionDef'ArgAttrs'AttrEntry Text
-> FieldDescriptor FunctionDef'ArgAttrs'AttrEntry
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"key"
(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' FunctionDef'ArgAttrs'AttrEntry Text
-> FieldAccessor FunctionDef'ArgAttrs'AttrEntry 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 "key" 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 @"key")) ::
Data.ProtoLens.FieldDescriptor FunctionDef'ArgAttrs'AttrEntry
value__field_descriptor :: FieldDescriptor FunctionDef'ArgAttrs'AttrEntry
value__field_descriptor
= String
-> FieldTypeDescriptor AttrValue
-> FieldAccessor FunctionDef'ArgAttrs'AttrEntry AttrValue
-> FieldDescriptor FunctionDef'ArgAttrs'AttrEntry
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"value"
(MessageOrGroup -> FieldTypeDescriptor AttrValue
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor Proto.Tensorflow.Core.Framework.AttrValue.AttrValue)
(Lens
FunctionDef'ArgAttrs'AttrEntry
FunctionDef'ArgAttrs'AttrEntry
(Maybe AttrValue)
(Maybe AttrValue)
-> FieldAccessor FunctionDef'ArgAttrs'AttrEntry AttrValue
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'value" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'value")) ::
Data.ProtoLens.FieldDescriptor FunctionDef'ArgAttrs'AttrEntry
in
[(Tag, FieldDescriptor FunctionDef'ArgAttrs'AttrEntry)]
-> Map Tag (FieldDescriptor FunctionDef'ArgAttrs'AttrEntry)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor FunctionDef'ArgAttrs'AttrEntry
key__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor FunctionDef'ArgAttrs'AttrEntry
value__field_descriptor)]
unknownFields :: LensLike' f FunctionDef'ArgAttrs'AttrEntry FieldSet
unknownFields
= (FunctionDef'ArgAttrs'AttrEntry -> FieldSet)
-> (FunctionDef'ArgAttrs'AttrEntry
-> FieldSet -> FunctionDef'ArgAttrs'AttrEntry)
-> Lens' FunctionDef'ArgAttrs'AttrEntry FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef'ArgAttrs'AttrEntry -> FieldSet
_FunctionDef'ArgAttrs'AttrEntry'_unknownFields
(\ x__ :: FunctionDef'ArgAttrs'AttrEntry
x__ y__ :: FieldSet
y__
-> FunctionDef'ArgAttrs'AttrEntry
x__ {_FunctionDef'ArgAttrs'AttrEntry'_unknownFields :: FieldSet
_FunctionDef'ArgAttrs'AttrEntry'_unknownFields = FieldSet
y__})
defMessage :: FunctionDef'ArgAttrs'AttrEntry
defMessage
= $WFunctionDef'ArgAttrs'AttrEntry'_constructor :: Text
-> Maybe AttrValue -> FieldSet -> FunctionDef'ArgAttrs'AttrEntry
FunctionDef'ArgAttrs'AttrEntry'_constructor
{_FunctionDef'ArgAttrs'AttrEntry'key :: Text
_FunctionDef'ArgAttrs'AttrEntry'key = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_FunctionDef'ArgAttrs'AttrEntry'value :: Maybe AttrValue
_FunctionDef'ArgAttrs'AttrEntry'value = Maybe AttrValue
forall a. Maybe a
Prelude.Nothing,
_FunctionDef'ArgAttrs'AttrEntry'_unknownFields :: FieldSet
_FunctionDef'ArgAttrs'AttrEntry'_unknownFields = []}
parseMessage :: Parser FunctionDef'ArgAttrs'AttrEntry
parseMessage
= let
loop ::
FunctionDef'ArgAttrs'AttrEntry
-> Data.ProtoLens.Encoding.Bytes.Parser FunctionDef'ArgAttrs'AttrEntry
loop :: FunctionDef'ArgAttrs'AttrEntry
-> Parser FunctionDef'ArgAttrs'AttrEntry
loop x :: FunctionDef'ArgAttrs'AttrEntry
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]))))
FunctionDef'ArgAttrs'AttrEntry
-> Parser FunctionDef'ArgAttrs'AttrEntry
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter
FunctionDef'ArgAttrs'AttrEntry
FunctionDef'ArgAttrs'AttrEntry
FieldSet
FieldSet
-> (FieldSet -> FieldSet)
-> FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry
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
FunctionDef'ArgAttrs'AttrEntry
FunctionDef'ArgAttrs'AttrEntry
FieldSet
FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) FunctionDef'ArgAttrs'AttrEntry
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
10
-> do Text
y <- Parser Text -> String -> Parser Text
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do ByteString
value <- do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ByteString
Data.ProtoLens.Encoding.Bytes.getBytes
(Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
Either String Text -> Parser Text
forall a. Either String a -> Parser a
Data.ProtoLens.Encoding.Bytes.runEither
(case ByteString -> Either UnicodeException Text
Data.Text.Encoding.decodeUtf8' ByteString
value of
(Prelude.Left err :: UnicodeException
err)
-> String -> Either String Text
forall a b. a -> Either a b
Prelude.Left (UnicodeException -> String
forall a. Show a => a -> String
Prelude.show UnicodeException
err)
(Prelude.Right r :: Text
r) -> Text -> Either String Text
forall a b. b -> Either a b
Prelude.Right Text
r))
"key"
FunctionDef'ArgAttrs'AttrEntry
-> Parser FunctionDef'ArgAttrs'AttrEntry
loop (Setter
FunctionDef'ArgAttrs'AttrEntry
FunctionDef'ArgAttrs'AttrEntry
Text
Text
-> Text
-> FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "key" 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 @"key") Text
y FunctionDef'ArgAttrs'AttrEntry
x)
18
-> do AttrValue
y <- Parser AttrValue -> String -> Parser AttrValue
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser AttrValue -> Parser AttrValue
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 AttrValue
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"value"
FunctionDef'ArgAttrs'AttrEntry
-> Parser FunctionDef'ArgAttrs'AttrEntry
loop (Setter
FunctionDef'ArgAttrs'AttrEntry
FunctionDef'ArgAttrs'AttrEntry
AttrValue
AttrValue
-> AttrValue
-> FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "value" 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 @"value") AttrValue
y FunctionDef'ArgAttrs'AttrEntry
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
FunctionDef'ArgAttrs'AttrEntry
-> Parser FunctionDef'ArgAttrs'AttrEntry
loop
(Setter
FunctionDef'ArgAttrs'AttrEntry
FunctionDef'ArgAttrs'AttrEntry
FieldSet
FieldSet
-> (FieldSet -> FieldSet)
-> FunctionDef'ArgAttrs'AttrEntry
-> FunctionDef'ArgAttrs'AttrEntry
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
FunctionDef'ArgAttrs'AttrEntry
FunctionDef'ArgAttrs'AttrEntry
FieldSet
FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) FunctionDef'ArgAttrs'AttrEntry
x)
in
Parser FunctionDef'ArgAttrs'AttrEntry
-> String -> Parser FunctionDef'ArgAttrs'AttrEntry
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do FunctionDef'ArgAttrs'AttrEntry
-> Parser FunctionDef'ArgAttrs'AttrEntry
loop FunctionDef'ArgAttrs'AttrEntry
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "AttrEntry"
buildMessage :: FunctionDef'ArgAttrs'AttrEntry -> Builder
buildMessage
= \ _x :: FunctionDef'ArgAttrs'AttrEntry
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: Text
_v = FoldLike
Text
FunctionDef'ArgAttrs'AttrEntry
FunctionDef'ArgAttrs'AttrEntry
Text
Text
-> FunctionDef'ArgAttrs'AttrEntry -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "key" 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 @"key") FunctionDef'ArgAttrs'AttrEntry
_x
in
if Text -> Text -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Text
_v Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
Builder
forall a. Monoid a => a
Data.Monoid.mempty
else
Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
((ByteString -> Builder) -> (Text -> ByteString) -> Text -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
(\ bs :: ByteString
bs
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
(Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
(ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
Text -> ByteString
Data.Text.Encoding.encodeUtf8
Text
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe AttrValue)
FunctionDef'ArgAttrs'AttrEntry
FunctionDef'ArgAttrs'AttrEntry
(Maybe AttrValue)
(Maybe AttrValue)
-> FunctionDef'ArgAttrs'AttrEntry -> Maybe AttrValue
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maybe'value" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'value") FunctionDef'ArgAttrs'AttrEntry
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just _v :: AttrValue
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
((ByteString -> Builder)
-> (AttrValue -> ByteString) -> AttrValue -> 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))
AttrValue -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
AttrValue
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike
FieldSet
FunctionDef'ArgAttrs'AttrEntry
FunctionDef'ArgAttrs'AttrEntry
FieldSet
FieldSet
-> FunctionDef'ArgAttrs'AttrEntry -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
FieldSet
FunctionDef'ArgAttrs'AttrEntry
FunctionDef'ArgAttrs'AttrEntry
FieldSet
FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields FunctionDef'ArgAttrs'AttrEntry
_x)))
instance Control.DeepSeq.NFData FunctionDef'ArgAttrs'AttrEntry where
rnf :: FunctionDef'ArgAttrs'AttrEntry -> ()
rnf
= \ x__ :: FunctionDef'ArgAttrs'AttrEntry
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(FunctionDef'ArgAttrs'AttrEntry -> FieldSet
_FunctionDef'ArgAttrs'AttrEntry'_unknownFields FunctionDef'ArgAttrs'AttrEntry
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(FunctionDef'ArgAttrs'AttrEntry -> Text
_FunctionDef'ArgAttrs'AttrEntry'key FunctionDef'ArgAttrs'AttrEntry
x__)
(Maybe AttrValue -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(FunctionDef'ArgAttrs'AttrEntry -> Maybe AttrValue
_FunctionDef'ArgAttrs'AttrEntry'value FunctionDef'ArgAttrs'AttrEntry
x__) ()))
data FunctionDef'AttrEntry
= FunctionDef'AttrEntry'_constructor {FunctionDef'AttrEntry -> Text
_FunctionDef'AttrEntry'key :: !Data.Text.Text,
FunctionDef'AttrEntry -> Maybe AttrValue
_FunctionDef'AttrEntry'value :: !(Prelude.Maybe Proto.Tensorflow.Core.Framework.AttrValue.AttrValue),
FunctionDef'AttrEntry -> FieldSet
_FunctionDef'AttrEntry'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (FunctionDef'AttrEntry -> FunctionDef'AttrEntry -> Bool
(FunctionDef'AttrEntry -> FunctionDef'AttrEntry -> Bool)
-> (FunctionDef'AttrEntry -> FunctionDef'AttrEntry -> Bool)
-> Eq FunctionDef'AttrEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FunctionDef'AttrEntry -> FunctionDef'AttrEntry -> Bool
$c/= :: FunctionDef'AttrEntry -> FunctionDef'AttrEntry -> Bool
== :: FunctionDef'AttrEntry -> FunctionDef'AttrEntry -> Bool
$c== :: FunctionDef'AttrEntry -> FunctionDef'AttrEntry -> Bool
Prelude.Eq, Eq FunctionDef'AttrEntry
Eq FunctionDef'AttrEntry =>
(FunctionDef'AttrEntry -> FunctionDef'AttrEntry -> Ordering)
-> (FunctionDef'AttrEntry -> FunctionDef'AttrEntry -> Bool)
-> (FunctionDef'AttrEntry -> FunctionDef'AttrEntry -> Bool)
-> (FunctionDef'AttrEntry -> FunctionDef'AttrEntry -> Bool)
-> (FunctionDef'AttrEntry -> FunctionDef'AttrEntry -> Bool)
-> (FunctionDef'AttrEntry
-> FunctionDef'AttrEntry -> FunctionDef'AttrEntry)
-> (FunctionDef'AttrEntry
-> FunctionDef'AttrEntry -> FunctionDef'AttrEntry)
-> Ord FunctionDef'AttrEntry
FunctionDef'AttrEntry -> FunctionDef'AttrEntry -> Bool
FunctionDef'AttrEntry -> FunctionDef'AttrEntry -> Ordering
FunctionDef'AttrEntry
-> FunctionDef'AttrEntry -> FunctionDef'AttrEntry
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 :: FunctionDef'AttrEntry
-> FunctionDef'AttrEntry -> FunctionDef'AttrEntry
$cmin :: FunctionDef'AttrEntry
-> FunctionDef'AttrEntry -> FunctionDef'AttrEntry
max :: FunctionDef'AttrEntry
-> FunctionDef'AttrEntry -> FunctionDef'AttrEntry
$cmax :: FunctionDef'AttrEntry
-> FunctionDef'AttrEntry -> FunctionDef'AttrEntry
>= :: FunctionDef'AttrEntry -> FunctionDef'AttrEntry -> Bool
$c>= :: FunctionDef'AttrEntry -> FunctionDef'AttrEntry -> Bool
> :: FunctionDef'AttrEntry -> FunctionDef'AttrEntry -> Bool
$c> :: FunctionDef'AttrEntry -> FunctionDef'AttrEntry -> Bool
<= :: FunctionDef'AttrEntry -> FunctionDef'AttrEntry -> Bool
$c<= :: FunctionDef'AttrEntry -> FunctionDef'AttrEntry -> Bool
< :: FunctionDef'AttrEntry -> FunctionDef'AttrEntry -> Bool
$c< :: FunctionDef'AttrEntry -> FunctionDef'AttrEntry -> Bool
compare :: FunctionDef'AttrEntry -> FunctionDef'AttrEntry -> Ordering
$ccompare :: FunctionDef'AttrEntry -> FunctionDef'AttrEntry -> Ordering
$cp1Ord :: Eq FunctionDef'AttrEntry
Prelude.Ord)
instance Prelude.Show FunctionDef'AttrEntry where
showsPrec :: Int -> FunctionDef'AttrEntry -> ShowS
showsPrec _ __x :: FunctionDef'AttrEntry
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(FunctionDef'AttrEntry -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort FunctionDef'AttrEntry
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField FunctionDef'AttrEntry "key" Data.Text.Text where
fieldOf :: Proxy# "key"
-> (Text -> f Text)
-> FunctionDef'AttrEntry
-> f FunctionDef'AttrEntry
fieldOf _
= ((Text -> f Text)
-> FunctionDef'AttrEntry -> f FunctionDef'AttrEntry)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> FunctionDef'AttrEntry
-> f FunctionDef'AttrEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((FunctionDef'AttrEntry -> Text)
-> (FunctionDef'AttrEntry -> Text -> FunctionDef'AttrEntry)
-> Lens' FunctionDef'AttrEntry Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef'AttrEntry -> Text
_FunctionDef'AttrEntry'key
(\ x__ :: FunctionDef'AttrEntry
x__ y__ :: Text
y__ -> FunctionDef'AttrEntry
x__ {_FunctionDef'AttrEntry'key :: Text
_FunctionDef'AttrEntry'key = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField FunctionDef'AttrEntry "value" Proto.Tensorflow.Core.Framework.AttrValue.AttrValue where
fieldOf :: Proxy# "value"
-> (AttrValue -> f AttrValue)
-> FunctionDef'AttrEntry
-> f FunctionDef'AttrEntry
fieldOf _
= ((Maybe AttrValue -> f (Maybe AttrValue))
-> FunctionDef'AttrEntry -> f FunctionDef'AttrEntry)
-> ((AttrValue -> f AttrValue)
-> Maybe AttrValue -> f (Maybe AttrValue))
-> (AttrValue -> f AttrValue)
-> FunctionDef'AttrEntry
-> f FunctionDef'AttrEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((FunctionDef'AttrEntry -> Maybe AttrValue)
-> (FunctionDef'AttrEntry
-> Maybe AttrValue -> FunctionDef'AttrEntry)
-> Lens
FunctionDef'AttrEntry
FunctionDef'AttrEntry
(Maybe AttrValue)
(Maybe AttrValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef'AttrEntry -> Maybe AttrValue
_FunctionDef'AttrEntry'value
(\ x__ :: FunctionDef'AttrEntry
x__ y__ :: Maybe AttrValue
y__ -> FunctionDef'AttrEntry
x__ {_FunctionDef'AttrEntry'value :: Maybe AttrValue
_FunctionDef'AttrEntry'value = Maybe AttrValue
y__}))
(AttrValue -> Lens' (Maybe AttrValue) AttrValue
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens AttrValue
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField FunctionDef'AttrEntry "maybe'value" (Prelude.Maybe Proto.Tensorflow.Core.Framework.AttrValue.AttrValue) where
fieldOf :: Proxy# "maybe'value"
-> (Maybe AttrValue -> f (Maybe AttrValue))
-> FunctionDef'AttrEntry
-> f FunctionDef'AttrEntry
fieldOf _
= ((Maybe AttrValue -> f (Maybe AttrValue))
-> FunctionDef'AttrEntry -> f FunctionDef'AttrEntry)
-> ((Maybe AttrValue -> f (Maybe AttrValue))
-> Maybe AttrValue -> f (Maybe AttrValue))
-> (Maybe AttrValue -> f (Maybe AttrValue))
-> FunctionDef'AttrEntry
-> f FunctionDef'AttrEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((FunctionDef'AttrEntry -> Maybe AttrValue)
-> (FunctionDef'AttrEntry
-> Maybe AttrValue -> FunctionDef'AttrEntry)
-> Lens
FunctionDef'AttrEntry
FunctionDef'AttrEntry
(Maybe AttrValue)
(Maybe AttrValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef'AttrEntry -> Maybe AttrValue
_FunctionDef'AttrEntry'value
(\ x__ :: FunctionDef'AttrEntry
x__ y__ :: Maybe AttrValue
y__ -> FunctionDef'AttrEntry
x__ {_FunctionDef'AttrEntry'value :: Maybe AttrValue
_FunctionDef'AttrEntry'value = Maybe AttrValue
y__}))
(Maybe AttrValue -> f (Maybe AttrValue))
-> Maybe AttrValue -> f (Maybe AttrValue)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message FunctionDef'AttrEntry where
messageName :: Proxy FunctionDef'AttrEntry -> Text
messageName _ = String -> Text
Data.Text.pack "tensorflow.FunctionDef.AttrEntry"
packedMessageDescriptor :: Proxy FunctionDef'AttrEntry -> ByteString
packedMessageDescriptor _
= "\n\
\\tAttrEntry\DC2\DLE\n\
\\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2+\n\
\\ENQvalue\CAN\STX \SOH(\v2\NAK.tensorflow.AttrValueR\ENQvalue:\STX8\SOH"
packedFileDescriptor :: Proxy FunctionDef'AttrEntry -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor FunctionDef'AttrEntry)
fieldsByTag
= let
key__field_descriptor :: FieldDescriptor FunctionDef'AttrEntry
key__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor FunctionDef'AttrEntry Text
-> FieldDescriptor FunctionDef'AttrEntry
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"key"
(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' FunctionDef'AttrEntry Text
-> FieldAccessor FunctionDef'AttrEntry 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 "key" 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 @"key")) ::
Data.ProtoLens.FieldDescriptor FunctionDef'AttrEntry
value__field_descriptor :: FieldDescriptor FunctionDef'AttrEntry
value__field_descriptor
= String
-> FieldTypeDescriptor AttrValue
-> FieldAccessor FunctionDef'AttrEntry AttrValue
-> FieldDescriptor FunctionDef'AttrEntry
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"value"
(MessageOrGroup -> FieldTypeDescriptor AttrValue
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor Proto.Tensorflow.Core.Framework.AttrValue.AttrValue)
(Lens
FunctionDef'AttrEntry
FunctionDef'AttrEntry
(Maybe AttrValue)
(Maybe AttrValue)
-> FieldAccessor FunctionDef'AttrEntry AttrValue
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
(forall s a (f :: * -> *).
(HasField s "maybe'value" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'value")) ::
Data.ProtoLens.FieldDescriptor FunctionDef'AttrEntry
in
[(Tag, FieldDescriptor FunctionDef'AttrEntry)]
-> Map Tag (FieldDescriptor FunctionDef'AttrEntry)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor FunctionDef'AttrEntry
key__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor FunctionDef'AttrEntry
value__field_descriptor)]
unknownFields :: LensLike' f FunctionDef'AttrEntry FieldSet
unknownFields
= (FunctionDef'AttrEntry -> FieldSet)
-> (FunctionDef'AttrEntry -> FieldSet -> FunctionDef'AttrEntry)
-> Lens' FunctionDef'AttrEntry FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef'AttrEntry -> FieldSet
_FunctionDef'AttrEntry'_unknownFields
(\ x__ :: FunctionDef'AttrEntry
x__ y__ :: FieldSet
y__ -> FunctionDef'AttrEntry
x__ {_FunctionDef'AttrEntry'_unknownFields :: FieldSet
_FunctionDef'AttrEntry'_unknownFields = FieldSet
y__})
defMessage :: FunctionDef'AttrEntry
defMessage
= $WFunctionDef'AttrEntry'_constructor :: Text -> Maybe AttrValue -> FieldSet -> FunctionDef'AttrEntry
FunctionDef'AttrEntry'_constructor
{_FunctionDef'AttrEntry'key :: Text
_FunctionDef'AttrEntry'key = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_FunctionDef'AttrEntry'value :: Maybe AttrValue
_FunctionDef'AttrEntry'value = Maybe AttrValue
forall a. Maybe a
Prelude.Nothing,
_FunctionDef'AttrEntry'_unknownFields :: FieldSet
_FunctionDef'AttrEntry'_unknownFields = []}
parseMessage :: Parser FunctionDef'AttrEntry
parseMessage
= let
loop ::
FunctionDef'AttrEntry
-> Data.ProtoLens.Encoding.Bytes.Parser FunctionDef'AttrEntry
loop :: FunctionDef'AttrEntry -> Parser FunctionDef'AttrEntry
loop x :: FunctionDef'AttrEntry
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]))))
FunctionDef'AttrEntry -> Parser FunctionDef'AttrEntry
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter
FunctionDef'AttrEntry FunctionDef'AttrEntry FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> FunctionDef'AttrEntry
-> FunctionDef'AttrEntry
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
FunctionDef'AttrEntry FunctionDef'AttrEntry FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) FunctionDef'AttrEntry
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
10
-> do Text
y <- Parser Text -> String -> Parser Text
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do ByteString
value <- do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ByteString
Data.ProtoLens.Encoding.Bytes.getBytes
(Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
Either String Text -> Parser Text
forall a. Either String a -> Parser a
Data.ProtoLens.Encoding.Bytes.runEither
(case ByteString -> Either UnicodeException Text
Data.Text.Encoding.decodeUtf8' ByteString
value of
(Prelude.Left err :: UnicodeException
err)
-> String -> Either String Text
forall a b. a -> Either a b
Prelude.Left (UnicodeException -> String
forall a. Show a => a -> String
Prelude.show UnicodeException
err)
(Prelude.Right r :: Text
r) -> Text -> Either String Text
forall a b. b -> Either a b
Prelude.Right Text
r))
"key"
FunctionDef'AttrEntry -> Parser FunctionDef'AttrEntry
loop (Setter FunctionDef'AttrEntry FunctionDef'AttrEntry Text Text
-> Text -> FunctionDef'AttrEntry -> FunctionDef'AttrEntry
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "key" 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 @"key") Text
y FunctionDef'AttrEntry
x)
18
-> do AttrValue
y <- Parser AttrValue -> String -> Parser AttrValue
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser AttrValue -> Parser AttrValue
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 AttrValue
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"value"
FunctionDef'AttrEntry -> Parser FunctionDef'AttrEntry
loop (Setter
FunctionDef'AttrEntry FunctionDef'AttrEntry AttrValue AttrValue
-> AttrValue -> FunctionDef'AttrEntry -> FunctionDef'AttrEntry
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "value" 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 @"value") AttrValue
y FunctionDef'AttrEntry
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
FunctionDef'AttrEntry -> Parser FunctionDef'AttrEntry
loop
(Setter
FunctionDef'AttrEntry FunctionDef'AttrEntry FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> FunctionDef'AttrEntry
-> FunctionDef'AttrEntry
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
FunctionDef'AttrEntry FunctionDef'AttrEntry FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) FunctionDef'AttrEntry
x)
in
Parser FunctionDef'AttrEntry
-> String -> Parser FunctionDef'AttrEntry
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do FunctionDef'AttrEntry -> Parser FunctionDef'AttrEntry
loop FunctionDef'AttrEntry
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "AttrEntry"
buildMessage :: FunctionDef'AttrEntry -> Builder
buildMessage
= \ _x :: FunctionDef'AttrEntry
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: Text
_v = FoldLike Text FunctionDef'AttrEntry FunctionDef'AttrEntry Text Text
-> FunctionDef'AttrEntry -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "key" 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 @"key") FunctionDef'AttrEntry
_x
in
if Text -> Text -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Text
_v Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
Builder
forall a. Monoid a => a
Data.Monoid.mempty
else
Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
((ByteString -> Builder) -> (Text -> ByteString) -> Text -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
(\ bs :: ByteString
bs
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
(Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
(ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
Text -> ByteString
Data.Text.Encoding.encodeUtf8
Text
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(case
FoldLike
(Maybe AttrValue)
FunctionDef'AttrEntry
FunctionDef'AttrEntry
(Maybe AttrValue)
(Maybe AttrValue)
-> FunctionDef'AttrEntry -> Maybe AttrValue
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maybe'value" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'value") FunctionDef'AttrEntry
_x
of
Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
(Prelude.Just _v :: AttrValue
_v)
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
((ByteString -> Builder)
-> (AttrValue -> ByteString) -> AttrValue -> 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))
AttrValue -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
AttrValue
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike
FieldSet
FunctionDef'AttrEntry
FunctionDef'AttrEntry
FieldSet
FieldSet
-> FunctionDef'AttrEntry -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
FieldSet
FunctionDef'AttrEntry
FunctionDef'AttrEntry
FieldSet
FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields FunctionDef'AttrEntry
_x)))
instance Control.DeepSeq.NFData FunctionDef'AttrEntry where
rnf :: FunctionDef'AttrEntry -> ()
rnf
= \ x__ :: FunctionDef'AttrEntry
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(FunctionDef'AttrEntry -> FieldSet
_FunctionDef'AttrEntry'_unknownFields FunctionDef'AttrEntry
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(FunctionDef'AttrEntry -> Text
_FunctionDef'AttrEntry'key FunctionDef'AttrEntry
x__)
(Maybe AttrValue -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (FunctionDef'AttrEntry -> Maybe AttrValue
_FunctionDef'AttrEntry'value FunctionDef'AttrEntry
x__) ()))
data FunctionDef'ControlRetEntry
= FunctionDef'ControlRetEntry'_constructor {FunctionDef'ControlRetEntry -> Text
_FunctionDef'ControlRetEntry'key :: !Data.Text.Text,
FunctionDef'ControlRetEntry -> Text
_FunctionDef'ControlRetEntry'value :: !Data.Text.Text,
FunctionDef'ControlRetEntry -> FieldSet
_FunctionDef'ControlRetEntry'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (FunctionDef'ControlRetEntry -> FunctionDef'ControlRetEntry -> Bool
(FunctionDef'ControlRetEntry
-> FunctionDef'ControlRetEntry -> Bool)
-> (FunctionDef'ControlRetEntry
-> FunctionDef'ControlRetEntry -> Bool)
-> Eq FunctionDef'ControlRetEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FunctionDef'ControlRetEntry -> FunctionDef'ControlRetEntry -> Bool
$c/= :: FunctionDef'ControlRetEntry -> FunctionDef'ControlRetEntry -> Bool
== :: FunctionDef'ControlRetEntry -> FunctionDef'ControlRetEntry -> Bool
$c== :: FunctionDef'ControlRetEntry -> FunctionDef'ControlRetEntry -> Bool
Prelude.Eq, Eq FunctionDef'ControlRetEntry
Eq FunctionDef'ControlRetEntry =>
(FunctionDef'ControlRetEntry
-> FunctionDef'ControlRetEntry -> Ordering)
-> (FunctionDef'ControlRetEntry
-> FunctionDef'ControlRetEntry -> Bool)
-> (FunctionDef'ControlRetEntry
-> FunctionDef'ControlRetEntry -> Bool)
-> (FunctionDef'ControlRetEntry
-> FunctionDef'ControlRetEntry -> Bool)
-> (FunctionDef'ControlRetEntry
-> FunctionDef'ControlRetEntry -> Bool)
-> (FunctionDef'ControlRetEntry
-> FunctionDef'ControlRetEntry -> FunctionDef'ControlRetEntry)
-> (FunctionDef'ControlRetEntry
-> FunctionDef'ControlRetEntry -> FunctionDef'ControlRetEntry)
-> Ord FunctionDef'ControlRetEntry
FunctionDef'ControlRetEntry -> FunctionDef'ControlRetEntry -> Bool
FunctionDef'ControlRetEntry
-> FunctionDef'ControlRetEntry -> Ordering
FunctionDef'ControlRetEntry
-> FunctionDef'ControlRetEntry -> FunctionDef'ControlRetEntry
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 :: FunctionDef'ControlRetEntry
-> FunctionDef'ControlRetEntry -> FunctionDef'ControlRetEntry
$cmin :: FunctionDef'ControlRetEntry
-> FunctionDef'ControlRetEntry -> FunctionDef'ControlRetEntry
max :: FunctionDef'ControlRetEntry
-> FunctionDef'ControlRetEntry -> FunctionDef'ControlRetEntry
$cmax :: FunctionDef'ControlRetEntry
-> FunctionDef'ControlRetEntry -> FunctionDef'ControlRetEntry
>= :: FunctionDef'ControlRetEntry -> FunctionDef'ControlRetEntry -> Bool
$c>= :: FunctionDef'ControlRetEntry -> FunctionDef'ControlRetEntry -> Bool
> :: FunctionDef'ControlRetEntry -> FunctionDef'ControlRetEntry -> Bool
$c> :: FunctionDef'ControlRetEntry -> FunctionDef'ControlRetEntry -> Bool
<= :: FunctionDef'ControlRetEntry -> FunctionDef'ControlRetEntry -> Bool
$c<= :: FunctionDef'ControlRetEntry -> FunctionDef'ControlRetEntry -> Bool
< :: FunctionDef'ControlRetEntry -> FunctionDef'ControlRetEntry -> Bool
$c< :: FunctionDef'ControlRetEntry -> FunctionDef'ControlRetEntry -> Bool
compare :: FunctionDef'ControlRetEntry
-> FunctionDef'ControlRetEntry -> Ordering
$ccompare :: FunctionDef'ControlRetEntry
-> FunctionDef'ControlRetEntry -> Ordering
$cp1Ord :: Eq FunctionDef'ControlRetEntry
Prelude.Ord)
instance Prelude.Show FunctionDef'ControlRetEntry where
showsPrec :: Int -> FunctionDef'ControlRetEntry -> ShowS
showsPrec _ __x :: FunctionDef'ControlRetEntry
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(FunctionDef'ControlRetEntry -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort FunctionDef'ControlRetEntry
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField FunctionDef'ControlRetEntry "key" Data.Text.Text where
fieldOf :: Proxy# "key"
-> (Text -> f Text)
-> FunctionDef'ControlRetEntry
-> f FunctionDef'ControlRetEntry
fieldOf _
= ((Text -> f Text)
-> FunctionDef'ControlRetEntry -> f FunctionDef'ControlRetEntry)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> FunctionDef'ControlRetEntry
-> f FunctionDef'ControlRetEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((FunctionDef'ControlRetEntry -> Text)
-> (FunctionDef'ControlRetEntry
-> Text -> FunctionDef'ControlRetEntry)
-> Lens' FunctionDef'ControlRetEntry Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef'ControlRetEntry -> Text
_FunctionDef'ControlRetEntry'key
(\ x__ :: FunctionDef'ControlRetEntry
x__ y__ :: Text
y__ -> FunctionDef'ControlRetEntry
x__ {_FunctionDef'ControlRetEntry'key :: Text
_FunctionDef'ControlRetEntry'key = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField FunctionDef'ControlRetEntry "value" Data.Text.Text where
fieldOf :: Proxy# "value"
-> (Text -> f Text)
-> FunctionDef'ControlRetEntry
-> f FunctionDef'ControlRetEntry
fieldOf _
= ((Text -> f Text)
-> FunctionDef'ControlRetEntry -> f FunctionDef'ControlRetEntry)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> FunctionDef'ControlRetEntry
-> f FunctionDef'ControlRetEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((FunctionDef'ControlRetEntry -> Text)
-> (FunctionDef'ControlRetEntry
-> Text -> FunctionDef'ControlRetEntry)
-> Lens' FunctionDef'ControlRetEntry Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef'ControlRetEntry -> Text
_FunctionDef'ControlRetEntry'value
(\ x__ :: FunctionDef'ControlRetEntry
x__ y__ :: Text
y__ -> FunctionDef'ControlRetEntry
x__ {_FunctionDef'ControlRetEntry'value :: Text
_FunctionDef'ControlRetEntry'value = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message FunctionDef'ControlRetEntry where
messageName :: Proxy FunctionDef'ControlRetEntry -> Text
messageName _
= String -> Text
Data.Text.pack "tensorflow.FunctionDef.ControlRetEntry"
packedMessageDescriptor :: Proxy FunctionDef'ControlRetEntry -> ByteString
packedMessageDescriptor _
= "\n\
\\SIControlRetEntry\DC2\DLE\n\
\\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
\\ENQvalue\CAN\STX \SOH(\tR\ENQvalue:\STX8\SOH"
packedFileDescriptor :: Proxy FunctionDef'ControlRetEntry -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor FunctionDef'ControlRetEntry)
fieldsByTag
= let
key__field_descriptor :: FieldDescriptor FunctionDef'ControlRetEntry
key__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor FunctionDef'ControlRetEntry Text
-> FieldDescriptor FunctionDef'ControlRetEntry
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"key"
(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' FunctionDef'ControlRetEntry Text
-> FieldAccessor FunctionDef'ControlRetEntry 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 "key" 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 @"key")) ::
Data.ProtoLens.FieldDescriptor FunctionDef'ControlRetEntry
value__field_descriptor :: FieldDescriptor FunctionDef'ControlRetEntry
value__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor FunctionDef'ControlRetEntry Text
-> FieldDescriptor FunctionDef'ControlRetEntry
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"value"
(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' FunctionDef'ControlRetEntry Text
-> FieldAccessor FunctionDef'ControlRetEntry 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 "value" 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 @"value")) ::
Data.ProtoLens.FieldDescriptor FunctionDef'ControlRetEntry
in
[(Tag, FieldDescriptor FunctionDef'ControlRetEntry)]
-> Map Tag (FieldDescriptor FunctionDef'ControlRetEntry)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor FunctionDef'ControlRetEntry
key__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor FunctionDef'ControlRetEntry
value__field_descriptor)]
unknownFields :: LensLike' f FunctionDef'ControlRetEntry FieldSet
unknownFields
= (FunctionDef'ControlRetEntry -> FieldSet)
-> (FunctionDef'ControlRetEntry
-> FieldSet -> FunctionDef'ControlRetEntry)
-> Lens' FunctionDef'ControlRetEntry FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef'ControlRetEntry -> FieldSet
_FunctionDef'ControlRetEntry'_unknownFields
(\ x__ :: FunctionDef'ControlRetEntry
x__ y__ :: FieldSet
y__
-> FunctionDef'ControlRetEntry
x__ {_FunctionDef'ControlRetEntry'_unknownFields :: FieldSet
_FunctionDef'ControlRetEntry'_unknownFields = FieldSet
y__})
defMessage :: FunctionDef'ControlRetEntry
defMessage
= $WFunctionDef'ControlRetEntry'_constructor :: Text -> Text -> FieldSet -> FunctionDef'ControlRetEntry
FunctionDef'ControlRetEntry'_constructor
{_FunctionDef'ControlRetEntry'key :: Text
_FunctionDef'ControlRetEntry'key = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_FunctionDef'ControlRetEntry'value :: Text
_FunctionDef'ControlRetEntry'value = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_FunctionDef'ControlRetEntry'_unknownFields :: FieldSet
_FunctionDef'ControlRetEntry'_unknownFields = []}
parseMessage :: Parser FunctionDef'ControlRetEntry
parseMessage
= let
loop ::
FunctionDef'ControlRetEntry
-> Data.ProtoLens.Encoding.Bytes.Parser FunctionDef'ControlRetEntry
loop :: FunctionDef'ControlRetEntry -> Parser FunctionDef'ControlRetEntry
loop x :: FunctionDef'ControlRetEntry
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]))))
FunctionDef'ControlRetEntry -> Parser FunctionDef'ControlRetEntry
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter
FunctionDef'ControlRetEntry
FunctionDef'ControlRetEntry
FieldSet
FieldSet
-> (FieldSet -> FieldSet)
-> FunctionDef'ControlRetEntry
-> FunctionDef'ControlRetEntry
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
FunctionDef'ControlRetEntry
FunctionDef'ControlRetEntry
FieldSet
FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) FunctionDef'ControlRetEntry
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
10
-> do Text
y <- Parser Text -> String -> Parser Text
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do ByteString
value <- do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ByteString
Data.ProtoLens.Encoding.Bytes.getBytes
(Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
Either String Text -> Parser Text
forall a. Either String a -> Parser a
Data.ProtoLens.Encoding.Bytes.runEither
(case ByteString -> Either UnicodeException Text
Data.Text.Encoding.decodeUtf8' ByteString
value of
(Prelude.Left err :: UnicodeException
err)
-> String -> Either String Text
forall a b. a -> Either a b
Prelude.Left (UnicodeException -> String
forall a. Show a => a -> String
Prelude.show UnicodeException
err)
(Prelude.Right r :: Text
r) -> Text -> Either String Text
forall a b. b -> Either a b
Prelude.Right Text
r))
"key"
FunctionDef'ControlRetEntry -> Parser FunctionDef'ControlRetEntry
loop (Setter
FunctionDef'ControlRetEntry FunctionDef'ControlRetEntry Text Text
-> Text
-> FunctionDef'ControlRetEntry
-> FunctionDef'ControlRetEntry
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "key" 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 @"key") Text
y FunctionDef'ControlRetEntry
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))
"value"
FunctionDef'ControlRetEntry -> Parser FunctionDef'ControlRetEntry
loop (Setter
FunctionDef'ControlRetEntry FunctionDef'ControlRetEntry Text Text
-> Text
-> FunctionDef'ControlRetEntry
-> FunctionDef'ControlRetEntry
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "value" 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 @"value") Text
y FunctionDef'ControlRetEntry
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
FunctionDef'ControlRetEntry -> Parser FunctionDef'ControlRetEntry
loop
(Setter
FunctionDef'ControlRetEntry
FunctionDef'ControlRetEntry
FieldSet
FieldSet
-> (FieldSet -> FieldSet)
-> FunctionDef'ControlRetEntry
-> FunctionDef'ControlRetEntry
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
FunctionDef'ControlRetEntry
FunctionDef'ControlRetEntry
FieldSet
FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) FunctionDef'ControlRetEntry
x)
in
Parser FunctionDef'ControlRetEntry
-> String -> Parser FunctionDef'ControlRetEntry
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do FunctionDef'ControlRetEntry -> Parser FunctionDef'ControlRetEntry
loop FunctionDef'ControlRetEntry
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "ControlRetEntry"
buildMessage :: FunctionDef'ControlRetEntry -> Builder
buildMessage
= \ _x :: FunctionDef'ControlRetEntry
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: Text
_v = FoldLike
Text
FunctionDef'ControlRetEntry
FunctionDef'ControlRetEntry
Text
Text
-> FunctionDef'ControlRetEntry -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "key" 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 @"key") FunctionDef'ControlRetEntry
_x
in
if Text -> Text -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Text
_v Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
Builder
forall a. Monoid a => a
Data.Monoid.mempty
else
Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
((ByteString -> Builder) -> (Text -> ByteString) -> Text -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
(\ bs :: ByteString
bs
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
(Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
(ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
Text -> ByteString
Data.Text.Encoding.encodeUtf8
Text
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Text
_v = FoldLike
Text
FunctionDef'ControlRetEntry
FunctionDef'ControlRetEntry
Text
Text
-> FunctionDef'ControlRetEntry -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "value" 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 @"value") FunctionDef'ControlRetEntry
_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))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike
FieldSet
FunctionDef'ControlRetEntry
FunctionDef'ControlRetEntry
FieldSet
FieldSet
-> FunctionDef'ControlRetEntry -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
FieldSet
FunctionDef'ControlRetEntry
FunctionDef'ControlRetEntry
FieldSet
FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields FunctionDef'ControlRetEntry
_x)))
instance Control.DeepSeq.NFData FunctionDef'ControlRetEntry where
rnf :: FunctionDef'ControlRetEntry -> ()
rnf
= \ x__ :: FunctionDef'ControlRetEntry
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(FunctionDef'ControlRetEntry -> FieldSet
_FunctionDef'ControlRetEntry'_unknownFields FunctionDef'ControlRetEntry
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(FunctionDef'ControlRetEntry -> Text
_FunctionDef'ControlRetEntry'key FunctionDef'ControlRetEntry
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(FunctionDef'ControlRetEntry -> Text
_FunctionDef'ControlRetEntry'value FunctionDef'ControlRetEntry
x__) ()))
data FunctionDef'ResourceArgUniqueIdEntry
= FunctionDef'ResourceArgUniqueIdEntry'_constructor {FunctionDef'ResourceArgUniqueIdEntry -> Word32
_FunctionDef'ResourceArgUniqueIdEntry'key :: !Data.Word.Word32,
FunctionDef'ResourceArgUniqueIdEntry -> Word32
_FunctionDef'ResourceArgUniqueIdEntry'value :: !Data.Word.Word32,
FunctionDef'ResourceArgUniqueIdEntry -> FieldSet
_FunctionDef'ResourceArgUniqueIdEntry'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry -> Bool
(FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry -> Bool)
-> (FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry -> Bool)
-> Eq FunctionDef'ResourceArgUniqueIdEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry -> Bool
$c/= :: FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry -> Bool
== :: FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry -> Bool
$c== :: FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry -> Bool
Prelude.Eq, Eq FunctionDef'ResourceArgUniqueIdEntry
Eq FunctionDef'ResourceArgUniqueIdEntry =>
(FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry -> Ordering)
-> (FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry -> Bool)
-> (FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry -> Bool)
-> (FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry -> Bool)
-> (FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry -> Bool)
-> (FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry)
-> (FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry)
-> Ord FunctionDef'ResourceArgUniqueIdEntry
FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry -> Bool
FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry -> Ordering
FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry
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 :: FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry
$cmin :: FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry
max :: FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry
$cmax :: FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry
>= :: FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry -> Bool
$c>= :: FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry -> Bool
> :: FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry -> Bool
$c> :: FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry -> Bool
<= :: FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry -> Bool
$c<= :: FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry -> Bool
< :: FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry -> Bool
$c< :: FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry -> Bool
compare :: FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry -> Ordering
$ccompare :: FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry -> Ordering
$cp1Ord :: Eq FunctionDef'ResourceArgUniqueIdEntry
Prelude.Ord)
instance Prelude.Show FunctionDef'ResourceArgUniqueIdEntry where
showsPrec :: Int -> FunctionDef'ResourceArgUniqueIdEntry -> ShowS
showsPrec _ __x :: FunctionDef'ResourceArgUniqueIdEntry
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(FunctionDef'ResourceArgUniqueIdEntry -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort FunctionDef'ResourceArgUniqueIdEntry
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField FunctionDef'ResourceArgUniqueIdEntry "key" Data.Word.Word32 where
fieldOf :: Proxy# "key"
-> (Word32 -> f Word32)
-> FunctionDef'ResourceArgUniqueIdEntry
-> f FunctionDef'ResourceArgUniqueIdEntry
fieldOf _
= ((Word32 -> f Word32)
-> FunctionDef'ResourceArgUniqueIdEntry
-> f FunctionDef'ResourceArgUniqueIdEntry)
-> ((Word32 -> f Word32) -> Word32 -> f Word32)
-> (Word32 -> f Word32)
-> FunctionDef'ResourceArgUniqueIdEntry
-> f FunctionDef'ResourceArgUniqueIdEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((FunctionDef'ResourceArgUniqueIdEntry -> Word32)
-> (FunctionDef'ResourceArgUniqueIdEntry
-> Word32 -> FunctionDef'ResourceArgUniqueIdEntry)
-> Lens' FunctionDef'ResourceArgUniqueIdEntry Word32
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef'ResourceArgUniqueIdEntry -> Word32
_FunctionDef'ResourceArgUniqueIdEntry'key
(\ x__ :: FunctionDef'ResourceArgUniqueIdEntry
x__ y__ :: Word32
y__
-> FunctionDef'ResourceArgUniqueIdEntry
x__ {_FunctionDef'ResourceArgUniqueIdEntry'key :: Word32
_FunctionDef'ResourceArgUniqueIdEntry'key = Word32
y__}))
(Word32 -> f Word32) -> Word32 -> f Word32
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField FunctionDef'ResourceArgUniqueIdEntry "value" Data.Word.Word32 where
fieldOf :: Proxy# "value"
-> (Word32 -> f Word32)
-> FunctionDef'ResourceArgUniqueIdEntry
-> f FunctionDef'ResourceArgUniqueIdEntry
fieldOf _
= ((Word32 -> f Word32)
-> FunctionDef'ResourceArgUniqueIdEntry
-> f FunctionDef'ResourceArgUniqueIdEntry)
-> ((Word32 -> f Word32) -> Word32 -> f Word32)
-> (Word32 -> f Word32)
-> FunctionDef'ResourceArgUniqueIdEntry
-> f FunctionDef'ResourceArgUniqueIdEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((FunctionDef'ResourceArgUniqueIdEntry -> Word32)
-> (FunctionDef'ResourceArgUniqueIdEntry
-> Word32 -> FunctionDef'ResourceArgUniqueIdEntry)
-> Lens' FunctionDef'ResourceArgUniqueIdEntry Word32
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef'ResourceArgUniqueIdEntry -> Word32
_FunctionDef'ResourceArgUniqueIdEntry'value
(\ x__ :: FunctionDef'ResourceArgUniqueIdEntry
x__ y__ :: Word32
y__
-> FunctionDef'ResourceArgUniqueIdEntry
x__ {_FunctionDef'ResourceArgUniqueIdEntry'value :: Word32
_FunctionDef'ResourceArgUniqueIdEntry'value = Word32
y__}))
(Word32 -> f Word32) -> Word32 -> f Word32
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message FunctionDef'ResourceArgUniqueIdEntry where
messageName :: Proxy FunctionDef'ResourceArgUniqueIdEntry -> Text
messageName _
= String -> Text
Data.Text.pack "tensorflow.FunctionDef.ResourceArgUniqueIdEntry"
packedMessageDescriptor :: Proxy FunctionDef'ResourceArgUniqueIdEntry -> ByteString
packedMessageDescriptor _
= "\n\
\\CANResourceArgUniqueIdEntry\DC2\DLE\n\
\\ETXkey\CAN\SOH \SOH(\rR\ETXkey\DC2\DC4\n\
\\ENQvalue\CAN\STX \SOH(\rR\ENQvalue:\STX8\SOH"
packedFileDescriptor :: Proxy FunctionDef'ResourceArgUniqueIdEntry -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor FunctionDef'ResourceArgUniqueIdEntry)
fieldsByTag
= let
key__field_descriptor :: FieldDescriptor FunctionDef'ResourceArgUniqueIdEntry
key__field_descriptor
= String
-> FieldTypeDescriptor Word32
-> FieldAccessor FunctionDef'ResourceArgUniqueIdEntry Word32
-> FieldDescriptor FunctionDef'ResourceArgUniqueIdEntry
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"key"
(ScalarField Word32 -> FieldTypeDescriptor Word32
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Word32
Data.ProtoLens.UInt32Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
(WireDefault Word32
-> Lens' FunctionDef'ResourceArgUniqueIdEntry Word32
-> FieldAccessor FunctionDef'ResourceArgUniqueIdEntry Word32
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Word32
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "key" 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 @"key")) ::
Data.ProtoLens.FieldDescriptor FunctionDef'ResourceArgUniqueIdEntry
value__field_descriptor :: FieldDescriptor FunctionDef'ResourceArgUniqueIdEntry
value__field_descriptor
= String
-> FieldTypeDescriptor Word32
-> FieldAccessor FunctionDef'ResourceArgUniqueIdEntry Word32
-> FieldDescriptor FunctionDef'ResourceArgUniqueIdEntry
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"value"
(ScalarField Word32 -> FieldTypeDescriptor Word32
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Word32
Data.ProtoLens.UInt32Field ::
Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32)
(WireDefault Word32
-> Lens' FunctionDef'ResourceArgUniqueIdEntry Word32
-> FieldAccessor FunctionDef'ResourceArgUniqueIdEntry Word32
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
WireDefault Word32
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "value" 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 @"value")) ::
Data.ProtoLens.FieldDescriptor FunctionDef'ResourceArgUniqueIdEntry
in
[(Tag, FieldDescriptor FunctionDef'ResourceArgUniqueIdEntry)]
-> Map Tag (FieldDescriptor FunctionDef'ResourceArgUniqueIdEntry)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor FunctionDef'ResourceArgUniqueIdEntry
key__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor FunctionDef'ResourceArgUniqueIdEntry
value__field_descriptor)]
unknownFields :: LensLike' f FunctionDef'ResourceArgUniqueIdEntry FieldSet
unknownFields
= (FunctionDef'ResourceArgUniqueIdEntry -> FieldSet)
-> (FunctionDef'ResourceArgUniqueIdEntry
-> FieldSet -> FunctionDef'ResourceArgUniqueIdEntry)
-> Lens' FunctionDef'ResourceArgUniqueIdEntry FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef'ResourceArgUniqueIdEntry -> FieldSet
_FunctionDef'ResourceArgUniqueIdEntry'_unknownFields
(\ x__ :: FunctionDef'ResourceArgUniqueIdEntry
x__ y__ :: FieldSet
y__
-> FunctionDef'ResourceArgUniqueIdEntry
x__
{_FunctionDef'ResourceArgUniqueIdEntry'_unknownFields :: FieldSet
_FunctionDef'ResourceArgUniqueIdEntry'_unknownFields = FieldSet
y__})
defMessage :: FunctionDef'ResourceArgUniqueIdEntry
defMessage
= $WFunctionDef'ResourceArgUniqueIdEntry'_constructor :: Word32
-> Word32 -> FieldSet -> FunctionDef'ResourceArgUniqueIdEntry
FunctionDef'ResourceArgUniqueIdEntry'_constructor
{_FunctionDef'ResourceArgUniqueIdEntry'key :: Word32
_FunctionDef'ResourceArgUniqueIdEntry'key = Word32
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_FunctionDef'ResourceArgUniqueIdEntry'value :: Word32
_FunctionDef'ResourceArgUniqueIdEntry'value = Word32
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_FunctionDef'ResourceArgUniqueIdEntry'_unknownFields :: FieldSet
_FunctionDef'ResourceArgUniqueIdEntry'_unknownFields = []}
parseMessage :: Parser FunctionDef'ResourceArgUniqueIdEntry
parseMessage
= let
loop ::
FunctionDef'ResourceArgUniqueIdEntry
-> Data.ProtoLens.Encoding.Bytes.Parser FunctionDef'ResourceArgUniqueIdEntry
loop :: FunctionDef'ResourceArgUniqueIdEntry
-> Parser FunctionDef'ResourceArgUniqueIdEntry
loop x :: FunctionDef'ResourceArgUniqueIdEntry
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]))))
FunctionDef'ResourceArgUniqueIdEntry
-> Parser FunctionDef'ResourceArgUniqueIdEntry
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter
FunctionDef'ResourceArgUniqueIdEntry
FunctionDef'ResourceArgUniqueIdEntry
FieldSet
FieldSet
-> (FieldSet -> FieldSet)
-> FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry
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
FunctionDef'ResourceArgUniqueIdEntry
FunctionDef'ResourceArgUniqueIdEntry
FieldSet
FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) FunctionDef'ResourceArgUniqueIdEntry
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
8 -> do Word32
y <- Parser Word32 -> String -> Parser Word32
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Word32) -> Parser Word64 -> Parser Word32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"key"
FunctionDef'ResourceArgUniqueIdEntry
-> Parser FunctionDef'ResourceArgUniqueIdEntry
loop (Setter
FunctionDef'ResourceArgUniqueIdEntry
FunctionDef'ResourceArgUniqueIdEntry
Word32
Word32
-> Word32
-> FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "key" 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 @"key") Word32
y FunctionDef'ResourceArgUniqueIdEntry
x)
16
-> do Word32
y <- Parser Word32 -> String -> Parser Word32
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
((Word64 -> Word32) -> Parser Word64 -> Parser Word32
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
Word64 -> Word32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
"value"
FunctionDef'ResourceArgUniqueIdEntry
-> Parser FunctionDef'ResourceArgUniqueIdEntry
loop (Setter
FunctionDef'ResourceArgUniqueIdEntry
FunctionDef'ResourceArgUniqueIdEntry
Word32
Word32
-> Word32
-> FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "value" 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 @"value") Word32
y FunctionDef'ResourceArgUniqueIdEntry
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
FunctionDef'ResourceArgUniqueIdEntry
-> Parser FunctionDef'ResourceArgUniqueIdEntry
loop
(Setter
FunctionDef'ResourceArgUniqueIdEntry
FunctionDef'ResourceArgUniqueIdEntry
FieldSet
FieldSet
-> (FieldSet -> FieldSet)
-> FunctionDef'ResourceArgUniqueIdEntry
-> FunctionDef'ResourceArgUniqueIdEntry
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
FunctionDef'ResourceArgUniqueIdEntry
FunctionDef'ResourceArgUniqueIdEntry
FieldSet
FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) FunctionDef'ResourceArgUniqueIdEntry
x)
in
Parser FunctionDef'ResourceArgUniqueIdEntry
-> String -> Parser FunctionDef'ResourceArgUniqueIdEntry
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do FunctionDef'ResourceArgUniqueIdEntry
-> Parser FunctionDef'ResourceArgUniqueIdEntry
loop FunctionDef'ResourceArgUniqueIdEntry
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "ResourceArgUniqueIdEntry"
buildMessage :: FunctionDef'ResourceArgUniqueIdEntry -> Builder
buildMessage
= \ _x :: FunctionDef'ResourceArgUniqueIdEntry
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: Word32
_v = FoldLike
Word32
FunctionDef'ResourceArgUniqueIdEntry
FunctionDef'ResourceArgUniqueIdEntry
Word32
Word32
-> FunctionDef'ResourceArgUniqueIdEntry -> Word32
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "key" 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 @"key") FunctionDef'ResourceArgUniqueIdEntry
_x
in
if Word32 -> Word32 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Word32
_v Word32
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) -> (Word32 -> Word64) -> Word32 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word32 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word32
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Word32
_v = FoldLike
Word32
FunctionDef'ResourceArgUniqueIdEntry
FunctionDef'ResourceArgUniqueIdEntry
Word32
Word32
-> FunctionDef'ResourceArgUniqueIdEntry -> Word32
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "value" 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 @"value") FunctionDef'ResourceArgUniqueIdEntry
_x
in
if Word32 -> Word32 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Word32
_v Word32
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) -> (Word32 -> Word64) -> Word32 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word32 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word32
_v))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike
FieldSet
FunctionDef'ResourceArgUniqueIdEntry
FunctionDef'ResourceArgUniqueIdEntry
FieldSet
FieldSet
-> FunctionDef'ResourceArgUniqueIdEntry -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
FieldSet
FunctionDef'ResourceArgUniqueIdEntry
FunctionDef'ResourceArgUniqueIdEntry
FieldSet
FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields FunctionDef'ResourceArgUniqueIdEntry
_x)))
instance Control.DeepSeq.NFData FunctionDef'ResourceArgUniqueIdEntry where
rnf :: FunctionDef'ResourceArgUniqueIdEntry -> ()
rnf
= \ x__ :: FunctionDef'ResourceArgUniqueIdEntry
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(FunctionDef'ResourceArgUniqueIdEntry -> FieldSet
_FunctionDef'ResourceArgUniqueIdEntry'_unknownFields FunctionDef'ResourceArgUniqueIdEntry
x__)
(Word32 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(FunctionDef'ResourceArgUniqueIdEntry -> Word32
_FunctionDef'ResourceArgUniqueIdEntry'key FunctionDef'ResourceArgUniqueIdEntry
x__)
(Word32 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(FunctionDef'ResourceArgUniqueIdEntry -> Word32
_FunctionDef'ResourceArgUniqueIdEntry'value FunctionDef'ResourceArgUniqueIdEntry
x__) ()))
data FunctionDef'RetEntry
= FunctionDef'RetEntry'_constructor {FunctionDef'RetEntry -> Text
_FunctionDef'RetEntry'key :: !Data.Text.Text,
FunctionDef'RetEntry -> Text
_FunctionDef'RetEntry'value :: !Data.Text.Text,
FunctionDef'RetEntry -> FieldSet
_FunctionDef'RetEntry'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (FunctionDef'RetEntry -> FunctionDef'RetEntry -> Bool
(FunctionDef'RetEntry -> FunctionDef'RetEntry -> Bool)
-> (FunctionDef'RetEntry -> FunctionDef'RetEntry -> Bool)
-> Eq FunctionDef'RetEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FunctionDef'RetEntry -> FunctionDef'RetEntry -> Bool
$c/= :: FunctionDef'RetEntry -> FunctionDef'RetEntry -> Bool
== :: FunctionDef'RetEntry -> FunctionDef'RetEntry -> Bool
$c== :: FunctionDef'RetEntry -> FunctionDef'RetEntry -> Bool
Prelude.Eq, Eq FunctionDef'RetEntry
Eq FunctionDef'RetEntry =>
(FunctionDef'RetEntry -> FunctionDef'RetEntry -> Ordering)
-> (FunctionDef'RetEntry -> FunctionDef'RetEntry -> Bool)
-> (FunctionDef'RetEntry -> FunctionDef'RetEntry -> Bool)
-> (FunctionDef'RetEntry -> FunctionDef'RetEntry -> Bool)
-> (FunctionDef'RetEntry -> FunctionDef'RetEntry -> Bool)
-> (FunctionDef'RetEntry
-> FunctionDef'RetEntry -> FunctionDef'RetEntry)
-> (FunctionDef'RetEntry
-> FunctionDef'RetEntry -> FunctionDef'RetEntry)
-> Ord FunctionDef'RetEntry
FunctionDef'RetEntry -> FunctionDef'RetEntry -> Bool
FunctionDef'RetEntry -> FunctionDef'RetEntry -> Ordering
FunctionDef'RetEntry
-> FunctionDef'RetEntry -> FunctionDef'RetEntry
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 :: FunctionDef'RetEntry
-> FunctionDef'RetEntry -> FunctionDef'RetEntry
$cmin :: FunctionDef'RetEntry
-> FunctionDef'RetEntry -> FunctionDef'RetEntry
max :: FunctionDef'RetEntry
-> FunctionDef'RetEntry -> FunctionDef'RetEntry
$cmax :: FunctionDef'RetEntry
-> FunctionDef'RetEntry -> FunctionDef'RetEntry
>= :: FunctionDef'RetEntry -> FunctionDef'RetEntry -> Bool
$c>= :: FunctionDef'RetEntry -> FunctionDef'RetEntry -> Bool
> :: FunctionDef'RetEntry -> FunctionDef'RetEntry -> Bool
$c> :: FunctionDef'RetEntry -> FunctionDef'RetEntry -> Bool
<= :: FunctionDef'RetEntry -> FunctionDef'RetEntry -> Bool
$c<= :: FunctionDef'RetEntry -> FunctionDef'RetEntry -> Bool
< :: FunctionDef'RetEntry -> FunctionDef'RetEntry -> Bool
$c< :: FunctionDef'RetEntry -> FunctionDef'RetEntry -> Bool
compare :: FunctionDef'RetEntry -> FunctionDef'RetEntry -> Ordering
$ccompare :: FunctionDef'RetEntry -> FunctionDef'RetEntry -> Ordering
$cp1Ord :: Eq FunctionDef'RetEntry
Prelude.Ord)
instance Prelude.Show FunctionDef'RetEntry where
showsPrec :: Int -> FunctionDef'RetEntry -> ShowS
showsPrec _ __x :: FunctionDef'RetEntry
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(FunctionDef'RetEntry -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort FunctionDef'RetEntry
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField FunctionDef'RetEntry "key" Data.Text.Text where
fieldOf :: Proxy# "key"
-> (Text -> f Text)
-> FunctionDef'RetEntry
-> f FunctionDef'RetEntry
fieldOf _
= ((Text -> f Text)
-> FunctionDef'RetEntry -> f FunctionDef'RetEntry)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> FunctionDef'RetEntry
-> f FunctionDef'RetEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((FunctionDef'RetEntry -> Text)
-> (FunctionDef'RetEntry -> Text -> FunctionDef'RetEntry)
-> Lens' FunctionDef'RetEntry Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef'RetEntry -> Text
_FunctionDef'RetEntry'key
(\ x__ :: FunctionDef'RetEntry
x__ y__ :: Text
y__ -> FunctionDef'RetEntry
x__ {_FunctionDef'RetEntry'key :: Text
_FunctionDef'RetEntry'key = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField FunctionDef'RetEntry "value" Data.Text.Text where
fieldOf :: Proxy# "value"
-> (Text -> f Text)
-> FunctionDef'RetEntry
-> f FunctionDef'RetEntry
fieldOf _
= ((Text -> f Text)
-> FunctionDef'RetEntry -> f FunctionDef'RetEntry)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> FunctionDef'RetEntry
-> f FunctionDef'RetEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((FunctionDef'RetEntry -> Text)
-> (FunctionDef'RetEntry -> Text -> FunctionDef'RetEntry)
-> Lens' FunctionDef'RetEntry Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef'RetEntry -> Text
_FunctionDef'RetEntry'value
(\ x__ :: FunctionDef'RetEntry
x__ y__ :: Text
y__ -> FunctionDef'RetEntry
x__ {_FunctionDef'RetEntry'value :: Text
_FunctionDef'RetEntry'value = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message FunctionDef'RetEntry where
messageName :: Proxy FunctionDef'RetEntry -> Text
messageName _ = String -> Text
Data.Text.pack "tensorflow.FunctionDef.RetEntry"
packedMessageDescriptor :: Proxy FunctionDef'RetEntry -> ByteString
packedMessageDescriptor _
= "\n\
\\bRetEntry\DC2\DLE\n\
\\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
\\ENQvalue\CAN\STX \SOH(\tR\ENQvalue:\STX8\SOH"
packedFileDescriptor :: Proxy FunctionDef'RetEntry -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor FunctionDef'RetEntry)
fieldsByTag
= let
key__field_descriptor :: FieldDescriptor FunctionDef'RetEntry
key__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor FunctionDef'RetEntry Text
-> FieldDescriptor FunctionDef'RetEntry
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"key"
(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' FunctionDef'RetEntry Text
-> FieldAccessor FunctionDef'RetEntry 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 "key" 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 @"key")) ::
Data.ProtoLens.FieldDescriptor FunctionDef'RetEntry
value__field_descriptor :: FieldDescriptor FunctionDef'RetEntry
value__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor FunctionDef'RetEntry Text
-> FieldDescriptor FunctionDef'RetEntry
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"value"
(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' FunctionDef'RetEntry Text
-> FieldAccessor FunctionDef'RetEntry 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 "value" 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 @"value")) ::
Data.ProtoLens.FieldDescriptor FunctionDef'RetEntry
in
[(Tag, FieldDescriptor FunctionDef'RetEntry)]
-> Map Tag (FieldDescriptor FunctionDef'RetEntry)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor FunctionDef'RetEntry
key__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor FunctionDef'RetEntry
value__field_descriptor)]
unknownFields :: LensLike' f FunctionDef'RetEntry FieldSet
unknownFields
= (FunctionDef'RetEntry -> FieldSet)
-> (FunctionDef'RetEntry -> FieldSet -> FunctionDef'RetEntry)
-> Lens' FunctionDef'RetEntry FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDef'RetEntry -> FieldSet
_FunctionDef'RetEntry'_unknownFields
(\ x__ :: FunctionDef'RetEntry
x__ y__ :: FieldSet
y__ -> FunctionDef'RetEntry
x__ {_FunctionDef'RetEntry'_unknownFields :: FieldSet
_FunctionDef'RetEntry'_unknownFields = FieldSet
y__})
defMessage :: FunctionDef'RetEntry
defMessage
= $WFunctionDef'RetEntry'_constructor :: Text -> Text -> FieldSet -> FunctionDef'RetEntry
FunctionDef'RetEntry'_constructor
{_FunctionDef'RetEntry'key :: Text
_FunctionDef'RetEntry'key = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_FunctionDef'RetEntry'value :: Text
_FunctionDef'RetEntry'value = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_FunctionDef'RetEntry'_unknownFields :: FieldSet
_FunctionDef'RetEntry'_unknownFields = []}
parseMessage :: Parser FunctionDef'RetEntry
parseMessage
= let
loop ::
FunctionDef'RetEntry
-> Data.ProtoLens.Encoding.Bytes.Parser FunctionDef'RetEntry
loop :: FunctionDef'RetEntry -> Parser FunctionDef'RetEntry
loop x :: FunctionDef'RetEntry
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]))))
FunctionDef'RetEntry -> Parser FunctionDef'RetEntry
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter FunctionDef'RetEntry FunctionDef'RetEntry FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> FunctionDef'RetEntry
-> FunctionDef'RetEntry
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 FunctionDef'RetEntry FunctionDef'RetEntry FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) FunctionDef'RetEntry
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
10
-> do Text
y <- Parser Text -> String -> Parser Text
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do ByteString
value <- do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ByteString
Data.ProtoLens.Encoding.Bytes.getBytes
(Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
Either String Text -> Parser Text
forall a. Either String a -> Parser a
Data.ProtoLens.Encoding.Bytes.runEither
(case ByteString -> Either UnicodeException Text
Data.Text.Encoding.decodeUtf8' ByteString
value of
(Prelude.Left err :: UnicodeException
err)
-> String -> Either String Text
forall a b. a -> Either a b
Prelude.Left (UnicodeException -> String
forall a. Show a => a -> String
Prelude.show UnicodeException
err)
(Prelude.Right r :: Text
r) -> Text -> Either String Text
forall a b. b -> Either a b
Prelude.Right Text
r))
"key"
FunctionDef'RetEntry -> Parser FunctionDef'RetEntry
loop (Setter FunctionDef'RetEntry FunctionDef'RetEntry Text Text
-> Text -> FunctionDef'RetEntry -> FunctionDef'RetEntry
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "key" 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 @"key") Text
y FunctionDef'RetEntry
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))
"value"
FunctionDef'RetEntry -> Parser FunctionDef'RetEntry
loop (Setter FunctionDef'RetEntry FunctionDef'RetEntry Text Text
-> Text -> FunctionDef'RetEntry -> FunctionDef'RetEntry
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "value" 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 @"value") Text
y FunctionDef'RetEntry
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
FunctionDef'RetEntry -> Parser FunctionDef'RetEntry
loop
(Setter FunctionDef'RetEntry FunctionDef'RetEntry FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> FunctionDef'RetEntry
-> FunctionDef'RetEntry
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 FunctionDef'RetEntry FunctionDef'RetEntry FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) FunctionDef'RetEntry
x)
in
Parser FunctionDef'RetEntry
-> String -> Parser FunctionDef'RetEntry
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do FunctionDef'RetEntry -> Parser FunctionDef'RetEntry
loop FunctionDef'RetEntry
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "RetEntry"
buildMessage :: FunctionDef'RetEntry -> Builder
buildMessage
= \ _x :: FunctionDef'RetEntry
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let _v :: Text
_v = FoldLike Text FunctionDef'RetEntry FunctionDef'RetEntry Text Text
-> FunctionDef'RetEntry -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "key" 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 @"key") FunctionDef'RetEntry
_x
in
if Text -> Text -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Text
_v Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
Builder
forall a. Monoid a => a
Data.Monoid.mempty
else
Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
((ByteString -> Builder) -> (Text -> ByteString) -> Text -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
(\ bs :: ByteString
bs
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
(Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
(ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
Text -> ByteString
Data.Text.Encoding.encodeUtf8
Text
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Text
_v = FoldLike Text FunctionDef'RetEntry FunctionDef'RetEntry Text Text
-> FunctionDef'RetEntry -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "value" 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 @"value") FunctionDef'RetEntry
_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))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike
FieldSet
FunctionDef'RetEntry
FunctionDef'RetEntry
FieldSet
FieldSet
-> FunctionDef'RetEntry -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
FieldSet
FunctionDef'RetEntry
FunctionDef'RetEntry
FieldSet
FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields FunctionDef'RetEntry
_x)))
instance Control.DeepSeq.NFData FunctionDef'RetEntry where
rnf :: FunctionDef'RetEntry -> ()
rnf
= \ x__ :: FunctionDef'RetEntry
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(FunctionDef'RetEntry -> FieldSet
_FunctionDef'RetEntry'_unknownFields FunctionDef'RetEntry
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(FunctionDef'RetEntry -> Text
_FunctionDef'RetEntry'key FunctionDef'RetEntry
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (FunctionDef'RetEntry -> Text
_FunctionDef'RetEntry'value FunctionDef'RetEntry
x__) ()))
data FunctionDefLibrary
= FunctionDefLibrary'_constructor {FunctionDefLibrary -> Vector FunctionDef
_FunctionDefLibrary'function :: !(Data.Vector.Vector FunctionDef),
FunctionDefLibrary -> Vector GradientDef
_FunctionDefLibrary'gradient :: !(Data.Vector.Vector GradientDef),
FunctionDefLibrary -> FieldSet
_FunctionDefLibrary'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (FunctionDefLibrary -> FunctionDefLibrary -> Bool
(FunctionDefLibrary -> FunctionDefLibrary -> Bool)
-> (FunctionDefLibrary -> FunctionDefLibrary -> Bool)
-> Eq FunctionDefLibrary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FunctionDefLibrary -> FunctionDefLibrary -> Bool
$c/= :: FunctionDefLibrary -> FunctionDefLibrary -> Bool
== :: FunctionDefLibrary -> FunctionDefLibrary -> Bool
$c== :: FunctionDefLibrary -> FunctionDefLibrary -> Bool
Prelude.Eq, Eq FunctionDefLibrary
Eq FunctionDefLibrary =>
(FunctionDefLibrary -> FunctionDefLibrary -> Ordering)
-> (FunctionDefLibrary -> FunctionDefLibrary -> Bool)
-> (FunctionDefLibrary -> FunctionDefLibrary -> Bool)
-> (FunctionDefLibrary -> FunctionDefLibrary -> Bool)
-> (FunctionDefLibrary -> FunctionDefLibrary -> Bool)
-> (FunctionDefLibrary -> FunctionDefLibrary -> FunctionDefLibrary)
-> (FunctionDefLibrary -> FunctionDefLibrary -> FunctionDefLibrary)
-> Ord FunctionDefLibrary
FunctionDefLibrary -> FunctionDefLibrary -> Bool
FunctionDefLibrary -> FunctionDefLibrary -> Ordering
FunctionDefLibrary -> FunctionDefLibrary -> FunctionDefLibrary
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 :: FunctionDefLibrary -> FunctionDefLibrary -> FunctionDefLibrary
$cmin :: FunctionDefLibrary -> FunctionDefLibrary -> FunctionDefLibrary
max :: FunctionDefLibrary -> FunctionDefLibrary -> FunctionDefLibrary
$cmax :: FunctionDefLibrary -> FunctionDefLibrary -> FunctionDefLibrary
>= :: FunctionDefLibrary -> FunctionDefLibrary -> Bool
$c>= :: FunctionDefLibrary -> FunctionDefLibrary -> Bool
> :: FunctionDefLibrary -> FunctionDefLibrary -> Bool
$c> :: FunctionDefLibrary -> FunctionDefLibrary -> Bool
<= :: FunctionDefLibrary -> FunctionDefLibrary -> Bool
$c<= :: FunctionDefLibrary -> FunctionDefLibrary -> Bool
< :: FunctionDefLibrary -> FunctionDefLibrary -> Bool
$c< :: FunctionDefLibrary -> FunctionDefLibrary -> Bool
compare :: FunctionDefLibrary -> FunctionDefLibrary -> Ordering
$ccompare :: FunctionDefLibrary -> FunctionDefLibrary -> Ordering
$cp1Ord :: Eq FunctionDefLibrary
Prelude.Ord)
instance Prelude.Show FunctionDefLibrary where
showsPrec :: Int -> FunctionDefLibrary -> ShowS
showsPrec _ __x :: FunctionDefLibrary
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(FunctionDefLibrary -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort FunctionDefLibrary
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField FunctionDefLibrary "function" [FunctionDef] where
fieldOf :: Proxy# "function"
-> ([FunctionDef] -> f [FunctionDef])
-> FunctionDefLibrary
-> f FunctionDefLibrary
fieldOf _
= ((Vector FunctionDef -> f (Vector FunctionDef))
-> FunctionDefLibrary -> f FunctionDefLibrary)
-> (([FunctionDef] -> f [FunctionDef])
-> Vector FunctionDef -> f (Vector FunctionDef))
-> ([FunctionDef] -> f [FunctionDef])
-> FunctionDefLibrary
-> f FunctionDefLibrary
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((FunctionDefLibrary -> Vector FunctionDef)
-> (FunctionDefLibrary -> Vector FunctionDef -> FunctionDefLibrary)
-> Lens
FunctionDefLibrary
FunctionDefLibrary
(Vector FunctionDef)
(Vector FunctionDef)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDefLibrary -> Vector FunctionDef
_FunctionDefLibrary'function
(\ x__ :: FunctionDefLibrary
x__ y__ :: Vector FunctionDef
y__ -> FunctionDefLibrary
x__ {_FunctionDefLibrary'function :: Vector FunctionDef
_FunctionDefLibrary'function = Vector FunctionDef
y__}))
((Vector FunctionDef -> [FunctionDef])
-> (Vector FunctionDef -> [FunctionDef] -> Vector FunctionDef)
-> Lens
(Vector FunctionDef)
(Vector FunctionDef)
[FunctionDef]
[FunctionDef]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Vector FunctionDef -> [FunctionDef]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
(\ _ y__ :: [FunctionDef]
y__ -> [FunctionDef] -> Vector FunctionDef
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [FunctionDef]
y__))
instance Data.ProtoLens.Field.HasField FunctionDefLibrary "vec'function" (Data.Vector.Vector FunctionDef) where
fieldOf :: Proxy# "vec'function"
-> (Vector FunctionDef -> f (Vector FunctionDef))
-> FunctionDefLibrary
-> f FunctionDefLibrary
fieldOf _
= ((Vector FunctionDef -> f (Vector FunctionDef))
-> FunctionDefLibrary -> f FunctionDefLibrary)
-> ((Vector FunctionDef -> f (Vector FunctionDef))
-> Vector FunctionDef -> f (Vector FunctionDef))
-> (Vector FunctionDef -> f (Vector FunctionDef))
-> FunctionDefLibrary
-> f FunctionDefLibrary
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((FunctionDefLibrary -> Vector FunctionDef)
-> (FunctionDefLibrary -> Vector FunctionDef -> FunctionDefLibrary)
-> Lens
FunctionDefLibrary
FunctionDefLibrary
(Vector FunctionDef)
(Vector FunctionDef)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDefLibrary -> Vector FunctionDef
_FunctionDefLibrary'function
(\ x__ :: FunctionDefLibrary
x__ y__ :: Vector FunctionDef
y__ -> FunctionDefLibrary
x__ {_FunctionDefLibrary'function :: Vector FunctionDef
_FunctionDefLibrary'function = Vector FunctionDef
y__}))
(Vector FunctionDef -> f (Vector FunctionDef))
-> Vector FunctionDef -> f (Vector FunctionDef)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField FunctionDefLibrary "gradient" [GradientDef] where
fieldOf :: Proxy# "gradient"
-> ([GradientDef] -> f [GradientDef])
-> FunctionDefLibrary
-> f FunctionDefLibrary
fieldOf _
= ((Vector GradientDef -> f (Vector GradientDef))
-> FunctionDefLibrary -> f FunctionDefLibrary)
-> (([GradientDef] -> f [GradientDef])
-> Vector GradientDef -> f (Vector GradientDef))
-> ([GradientDef] -> f [GradientDef])
-> FunctionDefLibrary
-> f FunctionDefLibrary
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((FunctionDefLibrary -> Vector GradientDef)
-> (FunctionDefLibrary -> Vector GradientDef -> FunctionDefLibrary)
-> Lens
FunctionDefLibrary
FunctionDefLibrary
(Vector GradientDef)
(Vector GradientDef)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDefLibrary -> Vector GradientDef
_FunctionDefLibrary'gradient
(\ x__ :: FunctionDefLibrary
x__ y__ :: Vector GradientDef
y__ -> FunctionDefLibrary
x__ {_FunctionDefLibrary'gradient :: Vector GradientDef
_FunctionDefLibrary'gradient = Vector GradientDef
y__}))
((Vector GradientDef -> [GradientDef])
-> (Vector GradientDef -> [GradientDef] -> Vector GradientDef)
-> Lens
(Vector GradientDef)
(Vector GradientDef)
[GradientDef]
[GradientDef]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
Vector GradientDef -> [GradientDef]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
(\ _ y__ :: [GradientDef]
y__ -> [GradientDef] -> Vector GradientDef
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [GradientDef]
y__))
instance Data.ProtoLens.Field.HasField FunctionDefLibrary "vec'gradient" (Data.Vector.Vector GradientDef) where
fieldOf :: Proxy# "vec'gradient"
-> (Vector GradientDef -> f (Vector GradientDef))
-> FunctionDefLibrary
-> f FunctionDefLibrary
fieldOf _
= ((Vector GradientDef -> f (Vector GradientDef))
-> FunctionDefLibrary -> f FunctionDefLibrary)
-> ((Vector GradientDef -> f (Vector GradientDef))
-> Vector GradientDef -> f (Vector GradientDef))
-> (Vector GradientDef -> f (Vector GradientDef))
-> FunctionDefLibrary
-> f FunctionDefLibrary
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((FunctionDefLibrary -> Vector GradientDef)
-> (FunctionDefLibrary -> Vector GradientDef -> FunctionDefLibrary)
-> Lens
FunctionDefLibrary
FunctionDefLibrary
(Vector GradientDef)
(Vector GradientDef)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDefLibrary -> Vector GradientDef
_FunctionDefLibrary'gradient
(\ x__ :: FunctionDefLibrary
x__ y__ :: Vector GradientDef
y__ -> FunctionDefLibrary
x__ {_FunctionDefLibrary'gradient :: Vector GradientDef
_FunctionDefLibrary'gradient = Vector GradientDef
y__}))
(Vector GradientDef -> f (Vector GradientDef))
-> Vector GradientDef -> f (Vector GradientDef)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message FunctionDefLibrary where
messageName :: Proxy FunctionDefLibrary -> Text
messageName _ = String -> Text
Data.Text.pack "tensorflow.FunctionDefLibrary"
packedMessageDescriptor :: Proxy FunctionDefLibrary -> ByteString
packedMessageDescriptor _
= "\n\
\\DC2FunctionDefLibrary\DC23\n\
\\bfunction\CAN\SOH \ETX(\v2\ETB.tensorflow.FunctionDefR\bfunction\DC23\n\
\\bgradient\CAN\STX \ETX(\v2\ETB.tensorflow.GradientDefR\bgradient"
packedFileDescriptor :: Proxy FunctionDefLibrary -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor FunctionDefLibrary)
fieldsByTag
= let
function__field_descriptor :: FieldDescriptor FunctionDefLibrary
function__field_descriptor
= String
-> FieldTypeDescriptor FunctionDef
-> FieldAccessor FunctionDefLibrary FunctionDef
-> FieldDescriptor FunctionDefLibrary
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"function"
(MessageOrGroup -> FieldTypeDescriptor FunctionDef
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor FunctionDef)
(Packing
-> Lens' FunctionDefLibrary [FunctionDef]
-> FieldAccessor FunctionDefLibrary FunctionDef
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
Packing
Data.ProtoLens.Unpacked
(forall s a (f :: * -> *).
(HasField s "function" 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 @"function")) ::
Data.ProtoLens.FieldDescriptor FunctionDefLibrary
gradient__field_descriptor :: FieldDescriptor FunctionDefLibrary
gradient__field_descriptor
= String
-> FieldTypeDescriptor GradientDef
-> FieldAccessor FunctionDefLibrary GradientDef
-> FieldDescriptor FunctionDefLibrary
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"gradient"
(MessageOrGroup -> FieldTypeDescriptor GradientDef
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
Data.ProtoLens.FieldTypeDescriptor GradientDef)
(Packing
-> Lens' FunctionDefLibrary [GradientDef]
-> FieldAccessor FunctionDefLibrary GradientDef
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
Packing
Data.ProtoLens.Unpacked
(forall s a (f :: * -> *).
(HasField s "gradient" 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 @"gradient")) ::
Data.ProtoLens.FieldDescriptor FunctionDefLibrary
in
[(Tag, FieldDescriptor FunctionDefLibrary)]
-> Map Tag (FieldDescriptor FunctionDefLibrary)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor FunctionDefLibrary
function__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor FunctionDefLibrary
gradient__field_descriptor)]
unknownFields :: LensLike' f FunctionDefLibrary FieldSet
unknownFields
= (FunctionDefLibrary -> FieldSet)
-> (FunctionDefLibrary -> FieldSet -> FunctionDefLibrary)
-> Lens' FunctionDefLibrary FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
FunctionDefLibrary -> FieldSet
_FunctionDefLibrary'_unknownFields
(\ x__ :: FunctionDefLibrary
x__ y__ :: FieldSet
y__ -> FunctionDefLibrary
x__ {_FunctionDefLibrary'_unknownFields :: FieldSet
_FunctionDefLibrary'_unknownFields = FieldSet
y__})
defMessage :: FunctionDefLibrary
defMessage
= $WFunctionDefLibrary'_constructor :: Vector FunctionDef
-> Vector GradientDef -> FieldSet -> FunctionDefLibrary
FunctionDefLibrary'_constructor
{_FunctionDefLibrary'function :: Vector FunctionDef
_FunctionDefLibrary'function = Vector FunctionDef
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
_FunctionDefLibrary'gradient :: Vector GradientDef
_FunctionDefLibrary'gradient = Vector GradientDef
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
_FunctionDefLibrary'_unknownFields :: FieldSet
_FunctionDefLibrary'_unknownFields = []}
parseMessage :: Parser FunctionDefLibrary
parseMessage
= let
loop ::
FunctionDefLibrary
-> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld FunctionDef
-> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld GradientDef
-> Data.ProtoLens.Encoding.Bytes.Parser FunctionDefLibrary
loop :: FunctionDefLibrary
-> Growing Vector RealWorld FunctionDef
-> Growing Vector RealWorld GradientDef
-> Parser FunctionDefLibrary
loop x :: FunctionDefLibrary
x mutable'function :: Growing Vector RealWorld FunctionDef
mutable'function mutable'gradient :: Growing Vector RealWorld GradientDef
mutable'gradient
= do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
if Bool
end then
do Vector FunctionDef
frozen'function <- IO (Vector FunctionDef) -> Parser (Vector FunctionDef)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) FunctionDef
-> IO (Vector FunctionDef)
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 FunctionDef
Growing Vector (PrimState IO) FunctionDef
mutable'function)
Vector GradientDef
frozen'gradient <- IO (Vector GradientDef) -> Parser (Vector GradientDef)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) GradientDef
-> IO (Vector GradientDef)
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 GradientDef
Growing Vector (PrimState IO) GradientDef
mutable'gradient)
(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]))))
FunctionDefLibrary -> Parser FunctionDefLibrary
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter FunctionDefLibrary FunctionDefLibrary FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> FunctionDefLibrary
-> FunctionDefLibrary
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 FunctionDefLibrary FunctionDefLibrary FieldSet FieldSet
Data.ProtoLens.unknownFields
(\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
(Setter
FunctionDefLibrary
FunctionDefLibrary
(Vector FunctionDef)
(Vector FunctionDef)
-> Vector FunctionDef -> FunctionDefLibrary -> FunctionDefLibrary
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "vec'function" 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'function")
Vector FunctionDef
frozen'function
(Setter
FunctionDefLibrary
FunctionDefLibrary
(Vector GradientDef)
(Vector GradientDef)
-> Vector GradientDef -> FunctionDefLibrary -> FunctionDefLibrary
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "vec'gradient" 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'gradient") Vector GradientDef
frozen'gradient FunctionDefLibrary
x)))
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
10
-> do !FunctionDef
y <- Parser FunctionDef -> String -> Parser FunctionDef
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser FunctionDef -> Parser FunctionDef
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 FunctionDef
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"function"
Growing Vector RealWorld FunctionDef
v <- IO (Growing Vector RealWorld FunctionDef)
-> Parser (Growing Vector RealWorld FunctionDef)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) FunctionDef
-> FunctionDef -> IO (Growing Vector (PrimState IO) FunctionDef)
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 FunctionDef
Growing Vector (PrimState IO) FunctionDef
mutable'function FunctionDef
y)
FunctionDefLibrary
-> Growing Vector RealWorld FunctionDef
-> Growing Vector RealWorld GradientDef
-> Parser FunctionDefLibrary
loop FunctionDefLibrary
x Growing Vector RealWorld FunctionDef
v Growing Vector RealWorld GradientDef
mutable'gradient
18
-> do !GradientDef
y <- Parser GradientDef -> String -> Parser GradientDef
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser GradientDef -> Parser GradientDef
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 GradientDef
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
"gradient"
Growing Vector RealWorld GradientDef
v <- IO (Growing Vector RealWorld GradientDef)
-> Parser (Growing Vector RealWorld GradientDef)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
(Growing Vector (PrimState IO) GradientDef
-> GradientDef -> IO (Growing Vector (PrimState IO) GradientDef)
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 GradientDef
Growing Vector (PrimState IO) GradientDef
mutable'gradient GradientDef
y)
FunctionDefLibrary
-> Growing Vector RealWorld FunctionDef
-> Growing Vector RealWorld GradientDef
-> Parser FunctionDefLibrary
loop FunctionDefLibrary
x Growing Vector RealWorld FunctionDef
mutable'function Growing Vector RealWorld GradientDef
v
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
FunctionDefLibrary
-> Growing Vector RealWorld FunctionDef
-> Growing Vector RealWorld GradientDef
-> Parser FunctionDefLibrary
loop
(Setter FunctionDefLibrary FunctionDefLibrary FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> FunctionDefLibrary
-> FunctionDefLibrary
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 FunctionDefLibrary FunctionDefLibrary FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) FunctionDefLibrary
x)
Growing Vector RealWorld FunctionDef
mutable'function
Growing Vector RealWorld GradientDef
mutable'gradient
in
Parser FunctionDefLibrary -> String -> Parser FunctionDefLibrary
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do Growing Vector RealWorld FunctionDef
mutable'function <- IO (Growing Vector RealWorld FunctionDef)
-> Parser (Growing Vector RealWorld FunctionDef)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
IO (Growing Vector RealWorld FunctionDef)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
Growing Vector RealWorld GradientDef
mutable'gradient <- IO (Growing Vector RealWorld GradientDef)
-> Parser (Growing Vector RealWorld GradientDef)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
IO (Growing Vector RealWorld GradientDef)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
FunctionDefLibrary
-> Growing Vector RealWorld FunctionDef
-> Growing Vector RealWorld GradientDef
-> Parser FunctionDefLibrary
loop FunctionDefLibrary
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld FunctionDef
mutable'function Growing Vector RealWorld GradientDef
mutable'gradient)
"FunctionDefLibrary"
buildMessage :: FunctionDefLibrary -> Builder
buildMessage
= \ _x :: FunctionDefLibrary
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
((FunctionDef -> Builder) -> Vector FunctionDef -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
(\ _v :: FunctionDef
_v
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
((ByteString -> Builder)
-> (FunctionDef -> ByteString) -> FunctionDef -> 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))
FunctionDef -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
FunctionDef
_v))
(FoldLike
(Vector FunctionDef)
FunctionDefLibrary
FunctionDefLibrary
(Vector FunctionDef)
(Vector FunctionDef)
-> FunctionDefLibrary -> Vector FunctionDef
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "vec'function" 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'function") FunctionDefLibrary
_x))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
((GradientDef -> Builder) -> Vector GradientDef -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
(\ _v :: GradientDef
_v
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
((ByteString -> Builder)
-> (GradientDef -> ByteString) -> GradientDef -> 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))
GradientDef -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
GradientDef
_v))
(FoldLike
(Vector GradientDef)
FunctionDefLibrary
FunctionDefLibrary
(Vector GradientDef)
(Vector GradientDef)
-> FunctionDefLibrary -> Vector GradientDef
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
(forall s a (f :: * -> *).
(HasField s "vec'gradient" 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'gradient") FunctionDefLibrary
_x))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike
FieldSet FunctionDefLibrary FunctionDefLibrary FieldSet FieldSet
-> FunctionDefLibrary -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
FieldSet FunctionDefLibrary FunctionDefLibrary FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields FunctionDefLibrary
_x)))
instance Control.DeepSeq.NFData FunctionDefLibrary where
rnf :: FunctionDefLibrary -> ()
rnf
= \ x__ :: FunctionDefLibrary
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(FunctionDefLibrary -> FieldSet
_FunctionDefLibrary'_unknownFields FunctionDefLibrary
x__)
(Vector FunctionDef -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(FunctionDefLibrary -> Vector FunctionDef
_FunctionDefLibrary'function FunctionDefLibrary
x__)
(Vector GradientDef -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (FunctionDefLibrary -> Vector GradientDef
_FunctionDefLibrary'gradient FunctionDefLibrary
x__) ()))
data GradientDef
= GradientDef'_constructor {GradientDef -> Text
_GradientDef'functionName :: !Data.Text.Text,
GradientDef -> Text
_GradientDef'gradientFunc :: !Data.Text.Text,
GradientDef -> FieldSet
_GradientDef'_unknownFields :: !Data.ProtoLens.FieldSet}
deriving stock (GradientDef -> GradientDef -> Bool
(GradientDef -> GradientDef -> Bool)
-> (GradientDef -> GradientDef -> Bool) -> Eq GradientDef
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GradientDef -> GradientDef -> Bool
$c/= :: GradientDef -> GradientDef -> Bool
== :: GradientDef -> GradientDef -> Bool
$c== :: GradientDef -> GradientDef -> Bool
Prelude.Eq, Eq GradientDef
Eq GradientDef =>
(GradientDef -> GradientDef -> Ordering)
-> (GradientDef -> GradientDef -> Bool)
-> (GradientDef -> GradientDef -> Bool)
-> (GradientDef -> GradientDef -> Bool)
-> (GradientDef -> GradientDef -> Bool)
-> (GradientDef -> GradientDef -> GradientDef)
-> (GradientDef -> GradientDef -> GradientDef)
-> Ord GradientDef
GradientDef -> GradientDef -> Bool
GradientDef -> GradientDef -> Ordering
GradientDef -> GradientDef -> GradientDef
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 :: GradientDef -> GradientDef -> GradientDef
$cmin :: GradientDef -> GradientDef -> GradientDef
max :: GradientDef -> GradientDef -> GradientDef
$cmax :: GradientDef -> GradientDef -> GradientDef
>= :: GradientDef -> GradientDef -> Bool
$c>= :: GradientDef -> GradientDef -> Bool
> :: GradientDef -> GradientDef -> Bool
$c> :: GradientDef -> GradientDef -> Bool
<= :: GradientDef -> GradientDef -> Bool
$c<= :: GradientDef -> GradientDef -> Bool
< :: GradientDef -> GradientDef -> Bool
$c< :: GradientDef -> GradientDef -> Bool
compare :: GradientDef -> GradientDef -> Ordering
$ccompare :: GradientDef -> GradientDef -> Ordering
$cp1Ord :: Eq GradientDef
Prelude.Ord)
instance Prelude.Show GradientDef where
showsPrec :: Int -> GradientDef -> ShowS
showsPrec _ __x :: GradientDef
__x __s :: String
__s
= Char -> ShowS
Prelude.showChar
'{'
(String -> ShowS
Prelude.showString
(GradientDef -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort GradientDef
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField GradientDef "functionName" Data.Text.Text where
fieldOf :: Proxy# "functionName"
-> (Text -> f Text) -> GradientDef -> f GradientDef
fieldOf _
= ((Text -> f Text) -> GradientDef -> f GradientDef)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> GradientDef
-> f GradientDef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((GradientDef -> Text)
-> (GradientDef -> Text -> GradientDef)
-> Lens GradientDef GradientDef Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
GradientDef -> Text
_GradientDef'functionName
(\ x__ :: GradientDef
x__ y__ :: Text
y__ -> GradientDef
x__ {_GradientDef'functionName :: Text
_GradientDef'functionName = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField GradientDef "gradientFunc" Data.Text.Text where
fieldOf :: Proxy# "gradientFunc"
-> (Text -> f Text) -> GradientDef -> f GradientDef
fieldOf _
= ((Text -> f Text) -> GradientDef -> f GradientDef)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> GradientDef
-> f GradientDef
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
((GradientDef -> Text)
-> (GradientDef -> Text -> GradientDef)
-> Lens GradientDef GradientDef Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
GradientDef -> Text
_GradientDef'gradientFunc
(\ x__ :: GradientDef
x__ y__ :: Text
y__ -> GradientDef
x__ {_GradientDef'gradientFunc :: Text
_GradientDef'gradientFunc = Text
y__}))
(Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message GradientDef where
messageName :: Proxy GradientDef -> Text
messageName _ = String -> Text
Data.Text.pack "tensorflow.GradientDef"
packedMessageDescriptor :: Proxy GradientDef -> ByteString
packedMessageDescriptor _
= "\n\
\\vGradientDef\DC2#\n\
\\rfunction_name\CAN\SOH \SOH(\tR\ffunctionName\DC2#\n\
\\rgradient_func\CAN\STX \SOH(\tR\fgradientFunc"
packedFileDescriptor :: Proxy GradientDef -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
fieldsByTag :: Map Tag (FieldDescriptor GradientDef)
fieldsByTag
= let
functionName__field_descriptor :: FieldDescriptor GradientDef
functionName__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor GradientDef Text
-> FieldDescriptor GradientDef
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"function_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 GradientDef GradientDef Text Text
-> FieldAccessor GradientDef 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 "functionName" 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 @"functionName")) ::
Data.ProtoLens.FieldDescriptor GradientDef
gradientFunc__field_descriptor :: FieldDescriptor GradientDef
gradientFunc__field_descriptor
= String
-> FieldTypeDescriptor Text
-> FieldAccessor GradientDef Text
-> FieldDescriptor GradientDef
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
"gradient_func"
(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 GradientDef GradientDef Text Text
-> FieldAccessor GradientDef 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 "gradientFunc" 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 @"gradientFunc")) ::
Data.ProtoLens.FieldDescriptor GradientDef
in
[(Tag, FieldDescriptor GradientDef)]
-> Map Tag (FieldDescriptor GradientDef)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
[(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor GradientDef
functionName__field_descriptor),
(Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor GradientDef
gradientFunc__field_descriptor)]
unknownFields :: LensLike' f GradientDef FieldSet
unknownFields
= (GradientDef -> FieldSet)
-> (GradientDef -> FieldSet -> GradientDef)
-> Lens' GradientDef FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
GradientDef -> FieldSet
_GradientDef'_unknownFields
(\ x__ :: GradientDef
x__ y__ :: FieldSet
y__ -> GradientDef
x__ {_GradientDef'_unknownFields :: FieldSet
_GradientDef'_unknownFields = FieldSet
y__})
defMessage :: GradientDef
defMessage
= $WGradientDef'_constructor :: Text -> Text -> FieldSet -> GradientDef
GradientDef'_constructor
{_GradientDef'functionName :: Text
_GradientDef'functionName = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_GradientDef'gradientFunc :: Text
_GradientDef'gradientFunc = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
_GradientDef'_unknownFields :: FieldSet
_GradientDef'_unknownFields = []}
parseMessage :: Parser GradientDef
parseMessage
= let
loop ::
GradientDef -> Data.ProtoLens.Encoding.Bytes.Parser GradientDef
loop :: GradientDef -> Parser GradientDef
loop x :: GradientDef
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]))))
GradientDef -> Parser GradientDef
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
(Setter GradientDef GradientDef FieldSet FieldSet
-> (FieldSet -> FieldSet) -> GradientDef -> GradientDef
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 GradientDef GradientDef FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) GradientDef
x)
else
do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
case Word64
tag of
10
-> do Text
y <- Parser Text -> String -> Parser Text
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do ByteString
value <- do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
Int -> Parser ByteString
Data.ProtoLens.Encoding.Bytes.getBytes
(Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
Either String Text -> Parser Text
forall a. Either String a -> Parser a
Data.ProtoLens.Encoding.Bytes.runEither
(case ByteString -> Either UnicodeException Text
Data.Text.Encoding.decodeUtf8' ByteString
value of
(Prelude.Left err :: UnicodeException
err)
-> String -> Either String Text
forall a b. a -> Either a b
Prelude.Left (UnicodeException -> String
forall a. Show a => a -> String
Prelude.show UnicodeException
err)
(Prelude.Right r :: Text
r) -> Text -> Either String Text
forall a b. b -> Either a b
Prelude.Right Text
r))
"function_name"
GradientDef -> Parser GradientDef
loop
(Setter GradientDef GradientDef Text Text
-> Text -> GradientDef -> GradientDef
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "functionName" 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 @"functionName") Text
y GradientDef
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))
"gradient_func"
GradientDef -> Parser GradientDef
loop
(Setter GradientDef GradientDef Text Text
-> Text -> GradientDef -> GradientDef
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
(forall s a (f :: * -> *).
(HasField s "gradientFunc" 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 @"gradientFunc") Text
y GradientDef
x)
wire :: Word64
wire
-> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
Word64
wire
GradientDef -> Parser GradientDef
loop
(Setter GradientDef GradientDef FieldSet FieldSet
-> (FieldSet -> FieldSet) -> GradientDef -> GradientDef
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 GradientDef GradientDef FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) GradientDef
x)
in
Parser GradientDef -> String -> Parser GradientDef
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
(do GradientDef -> Parser GradientDef
loop GradientDef
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "GradientDef"
buildMessage :: GradientDef -> Builder
buildMessage
= \ _x :: GradientDef
_x
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Text
_v
= FoldLike Text GradientDef GradientDef Text Text
-> GradientDef -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "functionName" 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 @"functionName") GradientDef
_x
in
if Text -> Text -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Text
_v Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
Builder
forall a. Monoid a => a
Data.Monoid.mempty
else
Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
((ByteString -> Builder) -> (Text -> ByteString) -> Text -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
(\ bs :: ByteString
bs
-> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
(Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
(ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
Text -> ByteString
Data.Text.Encoding.encodeUtf8
Text
_v))
(Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
(let
_v :: Text
_v
= FoldLike Text GradientDef GradientDef Text Text
-> GradientDef -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "gradientFunc" 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 @"gradientFunc") GradientDef
_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))
(FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
(FoldLike FieldSet GradientDef GradientDef FieldSet FieldSet
-> GradientDef -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet GradientDef GradientDef FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields GradientDef
_x)))
instance Control.DeepSeq.NFData GradientDef where
rnf :: GradientDef -> ()
rnf
= \ x__ :: GradientDef
x__
-> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(GradientDef -> FieldSet
_GradientDef'_unknownFields GradientDef
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
(GradientDef -> Text
_GradientDef'functionName GradientDef
x__)
(Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (GradientDef -> Text
_GradientDef'gradientFunc GradientDef
x__) ()))
packedFileDescriptor :: Data.ByteString.ByteString
packedFileDescriptor :: ByteString
packedFileDescriptor
= "\n\
\(tensorflow/core/framework/function.proto\DC2\n\
\tensorflow\SUB*tensorflow/core/framework/attr_value.proto\SUB(tensorflow/core/framework/node_def.proto\SUB&tensorflow/core/framework/op_def.proto\"~\n\
\\DC2FunctionDefLibrary\DC23\n\
\\bfunction\CAN\SOH \ETX(\v2\ETB.tensorflow.FunctionDefR\bfunction\DC23\n\
\\bgradient\CAN\STX \ETX(\v2\ETB.tensorflow.GradientDefR\bgradient\"\219\a\n\
\\vFunctionDef\DC2/\n\
\\tsignature\CAN\SOH \SOH(\v2\DC1.tensorflow.OpDefR\tsignature\DC25\n\
\\EOTattr\CAN\ENQ \ETX(\v2!.tensorflow.FunctionDef.AttrEntryR\EOTattr\DC2?\n\
\\barg_attr\CAN\a \ETX(\v2$.tensorflow.FunctionDef.ArgAttrEntryR\aargAttr\DC2e\n\
\\SYNresource_arg_unique_id\CAN\b \ETX(\v20.tensorflow.FunctionDef.ResourceArgUniqueIdEntryR\DC3resourceArgUniqueId\DC2.\n\
\\bnode_def\CAN\ETX \ETX(\v2\DC3.tensorflow.NodeDefR\anodeDef\DC22\n\
\\ETXret\CAN\EOT \ETX(\v2 .tensorflow.FunctionDef.RetEntryR\ETXret\DC2H\n\
\\vcontrol_ret\CAN\ACK \ETX(\v2'.tensorflow.FunctionDef.ControlRetEntryR\n\
\controlRet\SUBN\n\
\\tAttrEntry\DC2\DLE\n\
\\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2+\n\
\\ENQvalue\CAN\STX \SOH(\v2\NAK.tensorflow.AttrValueR\ENQvalue:\STX8\SOH\SUB\154\SOH\n\
\\bArgAttrs\DC2>\n\
\\EOTattr\CAN\SOH \ETX(\v2*.tensorflow.FunctionDef.ArgAttrs.AttrEntryR\EOTattr\SUBN\n\
\\tAttrEntry\DC2\DLE\n\
\\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2+\n\
\\ENQvalue\CAN\STX \SOH(\v2\NAK.tensorflow.AttrValueR\ENQvalue:\STX8\SOH\SUB\\\n\
\\fArgAttrEntry\DC2\DLE\n\
\\ETXkey\CAN\SOH \SOH(\rR\ETXkey\DC26\n\
\\ENQvalue\CAN\STX \SOH(\v2 .tensorflow.FunctionDef.ArgAttrsR\ENQvalue:\STX8\SOH\SUBF\n\
\\CANResourceArgUniqueIdEntry\DC2\DLE\n\
\\ETXkey\CAN\SOH \SOH(\rR\ETXkey\DC2\DC4\n\
\\ENQvalue\CAN\STX \SOH(\rR\ENQvalue:\STX8\SOH\SUB6\n\
\\bRetEntry\DC2\DLE\n\
\\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
\\ENQvalue\CAN\STX \SOH(\tR\ENQvalue:\STX8\SOH\SUB=\n\
\\SIControlRetEntry\DC2\DLE\n\
\\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2\DC4\n\
\\ENQvalue\CAN\STX \SOH(\tR\ENQvalue:\STX8\SOHJ\EOT\b\STX\DLE\ETX\"W\n\
\\vGradientDef\DC2#\n\
\\rfunction_name\CAN\SOH \SOH(\tR\ffunctionName\DC2#\n\
\\rgradient_func\CAN\STX \SOH(\tR\fgradientFuncB\128\SOH\n\
\\CANorg.tensorflow.frameworkB\SOFunctionProtosP\SOHZOgithub.com/tensorflow/tensorflow/tensorflow/go/core/framework/function_go_proto\248\SOH\SOHJ\176'\n\
\\ACK\DC2\EOT\NUL\NUL}\SOH\n\
\\b\n\
\\SOH\f\DC2\ETX\NUL\NUL\DC2\n\
\\b\n\
\\SOH\STX\DC2\ETX\STX\NUL\DC3\n\
\\t\n\
\\STX\ETX\NUL\DC2\ETX\EOT\NUL4\n\
\\t\n\
\\STX\ETX\SOH\DC2\ETX\ENQ\NUL2\n\
\\t\n\
\\STX\ETX\STX\DC2\ETX\ACK\NUL0\n\
\\b\n\
\\SOH\b\DC2\ETX\b\NUL\US\n\
\\t\n\
\\STX\b\US\DC2\ETX\b\NUL\US\n\
\\b\n\
\\SOH\b\DC2\ETX\t\NUL/\n\
\\t\n\
\\STX\b\b\DC2\ETX\t\NUL/\n\
\\b\n\
\\SOH\b\DC2\ETX\n\
\\NUL\"\n\
\\t\n\
\\STX\b\n\
\\DC2\ETX\n\
\\NUL\"\n\
\\b\n\
\\SOH\b\DC2\ETX\v\NUL1\n\
\\t\n\
\\STX\b\SOH\DC2\ETX\v\NUL1\n\
\\b\n\
\\SOH\b\DC2\ETX\f\NULf\n\
\\t\n\
\\STX\b\v\DC2\ETX\f\NULf\n\
\4\n\
\\STX\EOT\NUL\DC2\EOT\SI\NUL\DC2\SOH\SUB( A library is a set of named functions.\n\
\\n\
\\n\
\\n\
\\ETX\EOT\NUL\SOH\DC2\ETX\SI\b\SUB\n\
\\v\n\
\\EOT\EOT\NUL\STX\NUL\DC2\ETX\DLE\STX$\n\
\\f\n\
\\ENQ\EOT\NUL\STX\NUL\EOT\DC2\ETX\DLE\STX\n\
\\n\
\\f\n\
\\ENQ\EOT\NUL\STX\NUL\ACK\DC2\ETX\DLE\v\SYN\n\
\\f\n\
\\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX\DLE\ETB\US\n\
\\f\n\
\\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX\DLE\"#\n\
\\v\n\
\\EOT\EOT\NUL\STX\SOH\DC2\ETX\DC1\STX$\n\
\\f\n\
\\ENQ\EOT\NUL\STX\SOH\EOT\DC2\ETX\DC1\STX\n\
\\n\
\\f\n\
\\ENQ\EOT\NUL\STX\SOH\ACK\DC2\ETX\DC1\v\SYN\n\
\\f\n\
\\ENQ\EOT\NUL\STX\SOH\SOH\DC2\ETX\DC1\ETB\US\n\
\\f\n\
\\ENQ\EOT\NUL\STX\SOH\ETX\DC2\ETX\DC1\"#\n\
\\243\SOH\n\
\\STX\EOT\SOH\DC2\EOT\SUB\NULf\SOH\SUB\230\SOH A function can be instantiated when the runtime can bind every attr\n\
\ with a value. When a GraphDef has a call to a function, it must\n\
\ have binding for every attr defined in the signature.\n\
\\n\
\ TODO(zhifengc):\n\
\ * device spec, etc.\n\
\\n\
\\n\
\\n\
\\ETX\EOT\SOH\SOH\DC2\ETX\SUB\b\DC3\n\
\[\n\
\\EOT\EOT\SOH\STX\NUL\DC2\ETX\GS\STX\SYN\SUBN The definition of the function's name, arguments, return values,\n\
\ attrs etc.\n\
\\n\
\\f\n\
\\ENQ\EOT\SOH\STX\NUL\ACK\DC2\ETX\GS\STX\a\n\
\\f\n\
\\ENQ\EOT\SOH\STX\NUL\SOH\DC2\ETX\GS\b\DC1\n\
\\f\n\
\\ENQ\EOT\SOH\STX\NUL\ETX\DC2\ETX\GS\DC4\NAK\n\
\?\n\
\\EOT\EOT\SOH\STX\SOH\DC2\ETX \STX\"\SUB2 Attributes specific to this function definition.\n\
\\n\
\\f\n\
\\ENQ\EOT\SOH\STX\SOH\ACK\DC2\ETX \STX\CAN\n\
\\f\n\
\\ENQ\EOT\SOH\STX\SOH\SOH\DC2\ETX \EM\GS\n\
\\f\n\
\\ENQ\EOT\SOH\STX\SOH\ETX\DC2\ETX !\n\
\{\n\
\\EOT\EOT\SOH\ETX\SOH\DC2\EOT$\STX&\ETX\SUBm Attributes for function arguments. These attributes are the same set of\n\
\ valid attributes as to _Arg nodes.\n\
\\n\
\\f\n\
\\ENQ\EOT\SOH\ETX\SOH\SOH\DC2\ETX$\n\
\\DC2\n\
\\r\n\
\\ACK\EOT\SOH\ETX\SOH\STX\NUL\DC2\ETX%\EOT$\n\
\\SO\n\
\\a\EOT\SOH\ETX\SOH\STX\NUL\ACK\DC2\ETX%\EOT\SUB\n\
\\SO\n\
\\a\EOT\SOH\ETX\SOH\STX\NUL\SOH\DC2\ETX%\ESC\US\n\
\\SO\n\
\\a\EOT\SOH\ETX\SOH\STX\NUL\ETX\DC2\ETX%\"#\n\
\\v\n\
\\EOT\EOT\SOH\STX\STX\DC2\ETX'\STX%\n\
\\f\n\
\\ENQ\EOT\SOH\STX\STX\ACK\DC2\ETX'\STX\ETB\n\
\\f\n\
\\ENQ\EOT\SOH\STX\STX\SOH\DC2\ETX'\CAN \n\
\\f\n\
\\ENQ\EOT\SOH\STX\STX\ETX\DC2\ETX'#$\n\
\\199\ETX\n\
\\EOT\EOT\SOH\STX\ETX\DC2\ETX2\STX1\SUB\185\ETX Unique IDs for each resource argument, used to track aliasing resources. If\n\
\ Argument A and Argument B alias each other, then\n\
\ resource_arg_unique_ids[A.index] == resource_arg_unique_ids[B.index].\n\
\\n\
\ If this field is empty, none of the arguments could alias; otherwise, every\n\
\ resource argument should have an entry in this field.\n\
\\n\
\ When instantiated, the unique IDs will be attached to the _Arg nodes'\n\
\ \"_resource_arg_unique_id\" attribute.\n\
\\n\
\\f\n\
\\ENQ\EOT\SOH\STX\ETX\ACK\DC2\ETX2\STX\NAK\n\
\\f\n\
\\ENQ\EOT\SOH\STX\ETX\SOH\DC2\ETX2\SYN,\n\
\\f\n\
\\ENQ\EOT\SOH\STX\ETX\ETX\DC2\ETX2/0\n\
\L\n\
\\ETX\EOT\SOH\t\DC2\ETX5\STX\r\SUB@ NOTE: field id 2 deleted on Jan 11, 2017, GraphDef version 21.\n\
\\n\
\\v\n\
\\EOT\EOT\SOH\t\NUL\DC2\ETX5\v\f\n\
\\f\n\
\\ENQ\EOT\SOH\t\NUL\SOH\DC2\ETX5\v\f\n\
\\f\n\
\\ENQ\EOT\SOH\t\NUL\STX\DC2\ETX5\v\f\n\
\\251\SO\n\
\\EOT\EOT\SOH\STX\EOT\DC2\ETX]\STX \SUB\151\SOH By convention, \"op\" in node_def is resolved by consulting with a\n\
\ user-defined library first. If not resolved, \"func\" is assumed to\n\
\ be a builtin op.\n\
\2\173\f In both of the following fields, there is the need to specify an\n\
\ output that is used as either the input to another node (in\n\
\ `node_def`) or as a return value of the function (in `ret`).\n\
\ Unlike the NodeDefs in GraphDef, we need to be able to specify a\n\
\ list in some cases (instead of just single outputs). Also, we\n\
\ need to be able to deal with lists of unknown length (so the\n\
\ output index may not be known at function definition time). So\n\
\ we use the following format instead:\n\
\ * \"fun_in\" where \"fun_in\" is the name of a function input arg in\n\
\ the `signature` field above. This represents that input, whether\n\
\ it is a single tensor or a list.\n\
\ * \"fun_in:0\" gives the first element of a function input arg (a\n\
\ non-list input is considered a list of length 1 for these\n\
\ purposes).\n\
\ * \"node:out\" where \"node\" is the name of a node in `node_def` and\n\
\ \"out\" is the name one of its op's output arguments (the name\n\
\ comes from the OpDef of the node's op). This represents that\n\
\ node's output, whether it is a single tensor or a list.\n\
\ Note: We enforce that an op's output arguments are never\n\
\ renamed in the backwards-compatibility test.\n\
\ * \"node:out:0\" gives the first element of a node output arg (a\n\
\ non-list output is considered a list of length 1 for these\n\
\ purposes).\n\
\\n\
\ NOT CURRENTLY SUPPORTED (but may be in the future):\n\
\ * \"node:out:-1\" gives last element in a node output list\n\
\ * \"node:out:1:\" gives a list with all but the first element in a\n\
\ node output list\n\
\ * \"node:out::-1\" gives a list with all but the last element in a\n\
\ node output list\n\
\2\163\SOH The body of the function. Unlike the NodeDefs in a GraphDef, attrs\n\
\ may have values of type `placeholder` and the `input` field uses\n\
\ the \"output\" format above.\n\
\\n\
\\f\n\
\\ENQ\EOT\SOH\STX\EOT\EOT\DC2\ETX]\STX\n\
\\n\
\\f\n\
\\ENQ\EOT\SOH\STX\EOT\ACK\DC2\ETX]\v\DC2\n\
\\f\n\
\\ENQ\EOT\SOH\STX\EOT\SOH\DC2\ETX]\DC3\ESC\n\
\\f\n\
\\ENQ\EOT\SOH\STX\EOT\ETX\DC2\ETX]\RS\US\n\
\\140\SOH\n\
\\EOT\EOT\SOH\STX\ENQ\DC2\ETXa\STX\RS\SUB\DEL A mapping from the output arg names from `signature` to the\n\
\ outputs from `node_def` that should be returned by the function.\n\
\\n\
\\f\n\
\\ENQ\EOT\SOH\STX\ENQ\ACK\DC2\ETXa\STX\NAK\n\
\\f\n\
\\ENQ\EOT\SOH\STX\ENQ\SOH\DC2\ETXa\SYN\EM\n\
\\f\n\
\\ENQ\EOT\SOH\STX\ENQ\ETX\DC2\ETXa\FS\GS\n\
\\147\SOH\n\
\\EOT\EOT\SOH\STX\ACK\DC2\ETXe\STX&\SUB\133\SOH A mapping from control output names from `signature` to node names in\n\
\ `node_def` which should be control outputs of this function.\n\
\\n\
\\f\n\
\\ENQ\EOT\SOH\STX\ACK\ACK\DC2\ETXe\STX\NAK\n\
\\f\n\
\\ENQ\EOT\SOH\STX\ACK\SOH\DC2\ETXe\SYN!\n\
\\f\n\
\\ENQ\EOT\SOH\STX\ACK\ETX\DC2\ETXe$%\n\
\\251\ENQ\n\
\\STX\EOT\STX\DC2\EOTz\NUL}\SOH\SUB\238\ENQ GradientDef defines the gradient function of a function defined in\n\
\ a function library.\n\
\\n\
\ A gradient function g (specified by gradient_func) for a function f\n\
\ (specified by function_name) must follow the following:\n\
\\n\
\ The function 'f' must be a numerical function which takes N inputs\n\
\ and produces M outputs. Its gradient function 'g', which is a\n\
\ function taking N + M inputs and produces N outputs.\n\
\\n\
\ I.e. if we have\n\
\ (y1, y2, ..., y_M) = f(x1, x2, ..., x_N),\n\
\ then, g is\n\
\ (dL/dx1, dL/dx2, ..., dL/dx_N) = g(x1, x2, ..., x_N,\n\
\ dL/dy1, dL/dy2, ..., dL/dy_M),\n\
\ where L is a scalar-value function of (x1, x2, ..., xN) (e.g., the\n\
\ loss function). dL/dx_i is the partial derivative of L with respect\n\
\ to x_i.\n\
\\n\
\\n\
\\n\
\\ETX\EOT\STX\SOH\DC2\ETXz\b\DC3\n\
\!\n\
\\EOT\EOT\STX\STX\NUL\DC2\ETX{\STX\ESC\"\DC4 The function name.\n\
\\n\
\\f\n\
\\ENQ\EOT\STX\STX\NUL\ENQ\DC2\ETX{\STX\b\n\
\\f\n\
\\ENQ\EOT\STX\STX\NUL\SOH\DC2\ETX{\t\SYN\n\
\\f\n\
\\ENQ\EOT\STX\STX\NUL\ETX\DC2\ETX{\EM\SUB\n\
\,\n\
\\EOT\EOT\STX\STX\SOH\DC2\ETX|\STX\ESC\"\US The gradient function's name.\n\
\\n\
\\f\n\
\\ENQ\EOT\STX\STX\SOH\ENQ\DC2\ETX|\STX\b\n\
\\f\n\
\\ENQ\EOT\STX\STX\SOH\SOH\DC2\ETX|\t\SYN\n\
\\f\n\
\\ENQ\EOT\STX\STX\SOH\ETX\DC2\ETX|\EM\SUBb\ACKproto3"