{- This file was auto-generated from tensorflow/core/example/feature.proto by the proto-lens-protoc program. -}
{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies, UndecidableInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds, BangPatterns, TypeApplications, OverloadedStrings, DerivingStrategies#-}
{-# OPTIONS_GHC -Wno-unused-imports#-}
{-# OPTIONS_GHC -Wno-duplicate-exports#-}
{-# OPTIONS_GHC -Wno-dodgy-exports#-}
module Proto.Tensorflow.Core.Example.Feature (
        BytesList(), Feature(), Feature'Kind(..), _Feature'BytesList,
        _Feature'FloatList, _Feature'Int64List, FeatureList(),
        FeatureLists(), FeatureLists'FeatureListEntry(), Features(),
        Features'FeatureEntry(), FloatList(), Int64List()
    ) where
import qualified Data.ProtoLens.Runtime.Control.DeepSeq as Control.DeepSeq
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Prism as Data.ProtoLens.Prism
import qualified Data.ProtoLens.Runtime.Prelude as Prelude
import qualified Data.ProtoLens.Runtime.Data.Int as Data.Int
import qualified Data.ProtoLens.Runtime.Data.Monoid as Data.Monoid
import qualified Data.ProtoLens.Runtime.Data.Word as Data.Word
import qualified Data.ProtoLens.Runtime.Data.ProtoLens as Data.ProtoLens
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Bytes as Data.ProtoLens.Encoding.Bytes
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Growing as Data.ProtoLens.Encoding.Growing
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Parser.Unsafe as Data.ProtoLens.Encoding.Parser.Unsafe
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Wire as Data.ProtoLens.Encoding.Wire
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Field as Data.ProtoLens.Field
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Message.Enum as Data.ProtoLens.Message.Enum
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Service.Types as Data.ProtoLens.Service.Types
import qualified Data.ProtoLens.Runtime.Lens.Family2 as Lens.Family2
import qualified Data.ProtoLens.Runtime.Lens.Family2.Unchecked as Lens.Family2.Unchecked
import qualified Data.ProtoLens.Runtime.Data.Text as Data.Text
import qualified Data.ProtoLens.Runtime.Data.Map as Data.Map
import qualified Data.ProtoLens.Runtime.Data.ByteString as Data.ByteString
import qualified Data.ProtoLens.Runtime.Data.ByteString.Char8 as Data.ByteString.Char8
import qualified Data.ProtoLens.Runtime.Data.Text.Encoding as Data.Text.Encoding
import qualified Data.ProtoLens.Runtime.Data.Vector as Data.Vector
import qualified Data.ProtoLens.Runtime.Data.Vector.Generic as Data.Vector.Generic
import qualified Data.ProtoLens.Runtime.Data.Vector.Unboxed as Data.Vector.Unboxed
import qualified Data.ProtoLens.Runtime.Text.Read as Text.Read
{- | Fields :
     
         * 'Proto.Tensorflow.Core.Example.Feature_Fields.value' @:: Lens' BytesList [Data.ByteString.ByteString]@
         * 'Proto.Tensorflow.Core.Example.Feature_Fields.vec'value' @:: Lens' BytesList (Data.Vector.Vector Data.ByteString.ByteString)@ -}
data BytesList
  = BytesList'_constructor {BytesList -> Vector ByteString
_BytesList'value :: !(Data.Vector.Vector Data.ByteString.ByteString),
                            BytesList -> FieldSet
_BytesList'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (BytesList -> BytesList -> Bool
(BytesList -> BytesList -> Bool)
-> (BytesList -> BytesList -> Bool) -> Eq BytesList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BytesList -> BytesList -> Bool
$c/= :: BytesList -> BytesList -> Bool
== :: BytesList -> BytesList -> Bool
$c== :: BytesList -> BytesList -> Bool
Prelude.Eq, Eq BytesList
Eq BytesList =>
(BytesList -> BytesList -> Ordering)
-> (BytesList -> BytesList -> Bool)
-> (BytesList -> BytesList -> Bool)
-> (BytesList -> BytesList -> Bool)
-> (BytesList -> BytesList -> Bool)
-> (BytesList -> BytesList -> BytesList)
-> (BytesList -> BytesList -> BytesList)
-> Ord BytesList
BytesList -> BytesList -> Bool
BytesList -> BytesList -> Ordering
BytesList -> BytesList -> BytesList
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 :: BytesList -> BytesList -> BytesList
$cmin :: BytesList -> BytesList -> BytesList
max :: BytesList -> BytesList -> BytesList
$cmax :: BytesList -> BytesList -> BytesList
>= :: BytesList -> BytesList -> Bool
$c>= :: BytesList -> BytesList -> Bool
> :: BytesList -> BytesList -> Bool
$c> :: BytesList -> BytesList -> Bool
<= :: BytesList -> BytesList -> Bool
$c<= :: BytesList -> BytesList -> Bool
< :: BytesList -> BytesList -> Bool
$c< :: BytesList -> BytesList -> Bool
compare :: BytesList -> BytesList -> Ordering
$ccompare :: BytesList -> BytesList -> Ordering
$cp1Ord :: Eq BytesList
Prelude.Ord)
instance Prelude.Show BytesList where
  showsPrec :: Int -> BytesList -> ShowS
showsPrec _ __x :: BytesList
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (BytesList -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort BytesList
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField BytesList "value" [Data.ByteString.ByteString] where
  fieldOf :: Proxy# "value"
-> ([ByteString] -> f [ByteString]) -> BytesList -> f BytesList
fieldOf _
    = ((Vector ByteString -> f (Vector ByteString))
 -> BytesList -> f BytesList)
-> (([ByteString] -> f [ByteString])
    -> Vector ByteString -> f (Vector ByteString))
-> ([ByteString] -> f [ByteString])
-> BytesList
-> f BytesList
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((BytesList -> Vector ByteString)
-> (BytesList -> Vector ByteString -> BytesList)
-> Lens BytesList BytesList (Vector ByteString) (Vector ByteString)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           BytesList -> Vector ByteString
_BytesList'value (\ x__ :: BytesList
x__ y__ :: Vector ByteString
y__ -> BytesList
x__ {_BytesList'value :: Vector ByteString
_BytesList'value = Vector ByteString
y__}))
        ((Vector ByteString -> [ByteString])
-> (Vector ByteString -> [ByteString] -> Vector ByteString)
-> Lens
     (Vector ByteString) (Vector ByteString) [ByteString] [ByteString]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Vector ByteString -> [ByteString]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
           (\ _ y__ :: [ByteString]
y__ -> [ByteString] -> Vector ByteString
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [ByteString]
y__))
instance Data.ProtoLens.Field.HasField BytesList "vec'value" (Data.Vector.Vector Data.ByteString.ByteString) where
  fieldOf :: Proxy# "vec'value"
-> (Vector ByteString -> f (Vector ByteString))
-> BytesList
-> f BytesList
fieldOf _
    = ((Vector ByteString -> f (Vector ByteString))
 -> BytesList -> f BytesList)
-> ((Vector ByteString -> f (Vector ByteString))
    -> Vector ByteString -> f (Vector ByteString))
-> (Vector ByteString -> f (Vector ByteString))
-> BytesList
-> f BytesList
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((BytesList -> Vector ByteString)
-> (BytesList -> Vector ByteString -> BytesList)
-> Lens BytesList BytesList (Vector ByteString) (Vector ByteString)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           BytesList -> Vector ByteString
_BytesList'value (\ x__ :: BytesList
x__ y__ :: Vector ByteString
y__ -> BytesList
x__ {_BytesList'value :: Vector ByteString
_BytesList'value = Vector ByteString
y__}))
        (Vector ByteString -> f (Vector ByteString))
-> Vector ByteString -> f (Vector ByteString)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message BytesList where
  messageName :: Proxy BytesList -> Text
messageName _ = String -> Text
Data.Text.pack "tensorflow.BytesList"
  packedMessageDescriptor :: Proxy BytesList -> ByteString
packedMessageDescriptor _
    = "\n\
      \\tBytesList\DC2\DC4\n\
      \\ENQvalue\CAN\SOH \ETX(\fR\ENQvalue"
  packedFileDescriptor :: Proxy BytesList -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor BytesList)
fieldsByTag
    = let
        value__field_descriptor :: FieldDescriptor BytesList
value__field_descriptor
          = String
-> FieldTypeDescriptor ByteString
-> FieldAccessor BytesList ByteString
-> FieldDescriptor BytesList
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "value"
              (ScalarField ByteString -> FieldTypeDescriptor ByteString
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField ByteString
Data.ProtoLens.BytesField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
              (Packing
-> Lens' BytesList [ByteString]
-> FieldAccessor BytesList ByteString
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
                 Packing
Data.ProtoLens.Unpacked (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 BytesList
      in
        [(Tag, FieldDescriptor BytesList)]
-> Map Tag (FieldDescriptor BytesList)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor BytesList
value__field_descriptor)]
  unknownFields :: LensLike' f BytesList FieldSet
unknownFields
    = (BytesList -> FieldSet)
-> (BytesList -> FieldSet -> BytesList) -> Lens' BytesList FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        BytesList -> FieldSet
_BytesList'_unknownFields
        (\ x__ :: BytesList
x__ y__ :: FieldSet
y__ -> BytesList
x__ {_BytesList'_unknownFields :: FieldSet
_BytesList'_unknownFields = FieldSet
y__})
  defMessage :: BytesList
defMessage
    = $WBytesList'_constructor :: Vector ByteString -> FieldSet -> BytesList
BytesList'_constructor
        {_BytesList'value :: Vector ByteString
_BytesList'value = Vector ByteString
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
         _BytesList'_unknownFields :: FieldSet
_BytesList'_unknownFields = []}
  parseMessage :: Parser BytesList
parseMessage
    = let
        loop ::
          BytesList
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Data.ByteString.ByteString
             -> Data.ProtoLens.Encoding.Bytes.Parser BytesList
        loop :: BytesList
-> Growing Vector RealWorld ByteString -> Parser BytesList
loop x :: BytesList
x mutable'value :: Growing Vector RealWorld ByteString
mutable'value
          = do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
               if Bool
end then
                   do Vector ByteString
frozen'value <- IO (Vector ByteString) -> Parser (Vector ByteString)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                        (Growing Vector (PrimState IO) ByteString -> IO (Vector ByteString)
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 ByteString
Growing Vector (PrimState IO) ByteString
mutable'value)
                      (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]))))
                      BytesList -> Parser BytesList
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter BytesList BytesList FieldSet FieldSet
-> (FieldSet -> FieldSet) -> BytesList -> BytesList
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 BytesList BytesList FieldSet FieldSet
Data.ProtoLens.unknownFields
                           (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
                           (Setter BytesList BytesList (Vector ByteString) (Vector ByteString)
-> Vector ByteString -> BytesList -> BytesList
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
                              (forall s a (f :: * -> *).
(HasField s "vec'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 @"vec'value") Vector ByteString
frozen'value BytesList
x))
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        10
                          -> do !ByteString
y <- Parser ByteString -> String -> Parser ByteString
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                        (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))
                                        "value"
                                Growing Vector RealWorld ByteString
v <- IO (Growing Vector RealWorld ByteString)
-> Parser (Growing Vector RealWorld ByteString)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Growing Vector (PrimState IO) ByteString
-> ByteString -> IO (Growing Vector (PrimState IO) ByteString)
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 ByteString
Growing Vector (PrimState IO) ByteString
mutable'value ByteString
y)
                                BytesList
-> Growing Vector RealWorld ByteString -> Parser BytesList
loop BytesList
x Growing Vector RealWorld ByteString
v
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                BytesList
-> Growing Vector RealWorld ByteString -> Parser BytesList
loop
                                  (Setter BytesList BytesList FieldSet FieldSet
-> (FieldSet -> FieldSet) -> BytesList -> BytesList
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 BytesList BytesList FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) BytesList
x)
                                  Growing Vector RealWorld ByteString
mutable'value
      in
        Parser BytesList -> String -> Parser BytesList
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do Growing Vector RealWorld ByteString
mutable'value <- IO (Growing Vector RealWorld ByteString)
-> Parser (Growing Vector RealWorld ByteString)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                 IO (Growing Vector RealWorld ByteString)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
              BytesList
-> Growing Vector RealWorld ByteString -> Parser BytesList
loop BytesList
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld ByteString
mutable'value)
          "BytesList"
  buildMessage :: BytesList -> Builder
buildMessage
    = \ _x :: BytesList
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             ((ByteString -> Builder) -> Vector ByteString -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                (\ _v :: ByteString
_v
                   -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                        (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                        ((\ 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))
                           ByteString
_v))
                (FoldLike
  (Vector ByteString)
  BytesList
  BytesList
  (Vector ByteString)
  (Vector ByteString)
-> BytesList -> Vector ByteString
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "vec'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 @"vec'value") BytesList
_x))
             (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                (FoldLike FieldSet BytesList BytesList FieldSet FieldSet
-> BytesList -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet BytesList BytesList FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields BytesList
_x))
instance Control.DeepSeq.NFData BytesList where
  rnf :: BytesList -> ()
rnf
    = \ x__ :: BytesList
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (BytesList -> FieldSet
_BytesList'_unknownFields BytesList
x__)
             (Vector ByteString -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (BytesList -> Vector ByteString
_BytesList'value BytesList
x__) ())
{- | Fields :
     
         * 'Proto.Tensorflow.Core.Example.Feature_Fields.maybe'kind' @:: Lens' Feature (Prelude.Maybe Feature'Kind)@
         * 'Proto.Tensorflow.Core.Example.Feature_Fields.maybe'bytesList' @:: Lens' Feature (Prelude.Maybe BytesList)@
         * 'Proto.Tensorflow.Core.Example.Feature_Fields.bytesList' @:: Lens' Feature BytesList@
         * 'Proto.Tensorflow.Core.Example.Feature_Fields.maybe'floatList' @:: Lens' Feature (Prelude.Maybe FloatList)@
         * 'Proto.Tensorflow.Core.Example.Feature_Fields.floatList' @:: Lens' Feature FloatList@
         * 'Proto.Tensorflow.Core.Example.Feature_Fields.maybe'int64List' @:: Lens' Feature (Prelude.Maybe Int64List)@
         * 'Proto.Tensorflow.Core.Example.Feature_Fields.int64List' @:: Lens' Feature Int64List@ -}
data Feature
  = Feature'_constructor {Feature -> Maybe Feature'Kind
_Feature'kind :: !(Prelude.Maybe Feature'Kind),
                          Feature -> FieldSet
_Feature'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Feature -> Feature -> Bool
(Feature -> Feature -> Bool)
-> (Feature -> Feature -> Bool) -> Eq Feature
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Feature -> Feature -> Bool
$c/= :: Feature -> Feature -> Bool
== :: Feature -> Feature -> Bool
$c== :: Feature -> Feature -> Bool
Prelude.Eq, Eq Feature
Eq Feature =>
(Feature -> Feature -> Ordering)
-> (Feature -> Feature -> Bool)
-> (Feature -> Feature -> Bool)
-> (Feature -> Feature -> Bool)
-> (Feature -> Feature -> Bool)
-> (Feature -> Feature -> Feature)
-> (Feature -> Feature -> Feature)
-> Ord Feature
Feature -> Feature -> Bool
Feature -> Feature -> Ordering
Feature -> Feature -> Feature
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 :: Feature -> Feature -> Feature
$cmin :: Feature -> Feature -> Feature
max :: Feature -> Feature -> Feature
$cmax :: Feature -> Feature -> Feature
>= :: Feature -> Feature -> Bool
$c>= :: Feature -> Feature -> Bool
> :: Feature -> Feature -> Bool
$c> :: Feature -> Feature -> Bool
<= :: Feature -> Feature -> Bool
$c<= :: Feature -> Feature -> Bool
< :: Feature -> Feature -> Bool
$c< :: Feature -> Feature -> Bool
compare :: Feature -> Feature -> Ordering
$ccompare :: Feature -> Feature -> Ordering
$cp1Ord :: Eq Feature
Prelude.Ord)
instance Prelude.Show Feature where
  showsPrec :: Int -> Feature -> ShowS
showsPrec _ __x :: Feature
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (Feature -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort Feature
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
data Feature'Kind
  = Feature'BytesList !BytesList |
    Feature'FloatList !FloatList |
    Feature'Int64List !Int64List
  deriving stock (Int -> Feature'Kind -> ShowS
[Feature'Kind] -> ShowS
Feature'Kind -> String
(Int -> Feature'Kind -> ShowS)
-> (Feature'Kind -> String)
-> ([Feature'Kind] -> ShowS)
-> Show Feature'Kind
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Feature'Kind] -> ShowS
$cshowList :: [Feature'Kind] -> ShowS
show :: Feature'Kind -> String
$cshow :: Feature'Kind -> String
showsPrec :: Int -> Feature'Kind -> ShowS
$cshowsPrec :: Int -> Feature'Kind -> ShowS
Prelude.Show, Feature'Kind -> Feature'Kind -> Bool
(Feature'Kind -> Feature'Kind -> Bool)
-> (Feature'Kind -> Feature'Kind -> Bool) -> Eq Feature'Kind
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Feature'Kind -> Feature'Kind -> Bool
$c/= :: Feature'Kind -> Feature'Kind -> Bool
== :: Feature'Kind -> Feature'Kind -> Bool
$c== :: Feature'Kind -> Feature'Kind -> Bool
Prelude.Eq, Eq Feature'Kind
Eq Feature'Kind =>
(Feature'Kind -> Feature'Kind -> Ordering)
-> (Feature'Kind -> Feature'Kind -> Bool)
-> (Feature'Kind -> Feature'Kind -> Bool)
-> (Feature'Kind -> Feature'Kind -> Bool)
-> (Feature'Kind -> Feature'Kind -> Bool)
-> (Feature'Kind -> Feature'Kind -> Feature'Kind)
-> (Feature'Kind -> Feature'Kind -> Feature'Kind)
-> Ord Feature'Kind
Feature'Kind -> Feature'Kind -> Bool
Feature'Kind -> Feature'Kind -> Ordering
Feature'Kind -> Feature'Kind -> Feature'Kind
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 :: Feature'Kind -> Feature'Kind -> Feature'Kind
$cmin :: Feature'Kind -> Feature'Kind -> Feature'Kind
max :: Feature'Kind -> Feature'Kind -> Feature'Kind
$cmax :: Feature'Kind -> Feature'Kind -> Feature'Kind
>= :: Feature'Kind -> Feature'Kind -> Bool
$c>= :: Feature'Kind -> Feature'Kind -> Bool
> :: Feature'Kind -> Feature'Kind -> Bool
$c> :: Feature'Kind -> Feature'Kind -> Bool
<= :: Feature'Kind -> Feature'Kind -> Bool
$c<= :: Feature'Kind -> Feature'Kind -> Bool
< :: Feature'Kind -> Feature'Kind -> Bool
$c< :: Feature'Kind -> Feature'Kind -> Bool
compare :: Feature'Kind -> Feature'Kind -> Ordering
$ccompare :: Feature'Kind -> Feature'Kind -> Ordering
$cp1Ord :: Eq Feature'Kind
Prelude.Ord)
instance Data.ProtoLens.Field.HasField Feature "maybe'kind" (Prelude.Maybe Feature'Kind) where
  fieldOf :: Proxy# "maybe'kind"
-> (Maybe Feature'Kind -> f (Maybe Feature'Kind))
-> Feature
-> f Feature
fieldOf _
    = ((Maybe Feature'Kind -> f (Maybe Feature'Kind))
 -> Feature -> f Feature)
-> ((Maybe Feature'Kind -> f (Maybe Feature'Kind))
    -> Maybe Feature'Kind -> f (Maybe Feature'Kind))
-> (Maybe Feature'Kind -> f (Maybe Feature'Kind))
-> Feature
-> f Feature
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Feature -> Maybe Feature'Kind)
-> (Feature -> Maybe Feature'Kind -> Feature)
-> Lens Feature Feature (Maybe Feature'Kind) (Maybe Feature'Kind)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Feature -> Maybe Feature'Kind
_Feature'kind (\ x__ :: Feature
x__ y__ :: Maybe Feature'Kind
y__ -> Feature
x__ {_Feature'kind :: Maybe Feature'Kind
_Feature'kind = Maybe Feature'Kind
y__}))
        (Maybe Feature'Kind -> f (Maybe Feature'Kind))
-> Maybe Feature'Kind -> f (Maybe Feature'Kind)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Feature "maybe'bytesList" (Prelude.Maybe BytesList) where
  fieldOf :: Proxy# "maybe'bytesList"
-> (Maybe BytesList -> f (Maybe BytesList)) -> Feature -> f Feature
fieldOf _
    = ((Maybe Feature'Kind -> f (Maybe Feature'Kind))
 -> Feature -> f Feature)
-> ((Maybe BytesList -> f (Maybe BytesList))
    -> Maybe Feature'Kind -> f (Maybe Feature'Kind))
-> (Maybe BytesList -> f (Maybe BytesList))
-> Feature
-> f Feature
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Feature -> Maybe Feature'Kind)
-> (Feature -> Maybe Feature'Kind -> Feature)
-> Lens Feature Feature (Maybe Feature'Kind) (Maybe Feature'Kind)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Feature -> Maybe Feature'Kind
_Feature'kind (\ x__ :: Feature
x__ y__ :: Maybe Feature'Kind
y__ -> Feature
x__ {_Feature'kind :: Maybe Feature'Kind
_Feature'kind = Maybe Feature'Kind
y__}))
        ((Maybe Feature'Kind -> Maybe BytesList)
-> (Maybe Feature'Kind -> Maybe BytesList -> Maybe Feature'Kind)
-> Lens
     (Maybe Feature'Kind)
     (Maybe Feature'Kind)
     (Maybe BytesList)
     (Maybe BytesList)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           (\ x__ :: Maybe Feature'Kind
x__
              -> case Maybe Feature'Kind
x__ of
                   (Prelude.Just (Feature'BytesList x__val :: BytesList
x__val)) -> BytesList -> Maybe BytesList
forall a. a -> Maybe a
Prelude.Just BytesList
x__val
                   _otherwise :: Maybe Feature'Kind
_otherwise -> Maybe BytesList
forall a. Maybe a
Prelude.Nothing)
           (\ _ y__ :: Maybe BytesList
y__ -> (BytesList -> Feature'Kind)
-> Maybe BytesList -> Maybe Feature'Kind
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap BytesList -> Feature'Kind
Feature'BytesList Maybe BytesList
y__))
instance Data.ProtoLens.Field.HasField Feature "bytesList" BytesList where
  fieldOf :: Proxy# "bytesList"
-> (BytesList -> f BytesList) -> Feature -> f Feature
fieldOf _
    = ((Maybe Feature'Kind -> f (Maybe Feature'Kind))
 -> Feature -> f Feature)
-> ((BytesList -> f BytesList)
    -> Maybe Feature'Kind -> f (Maybe Feature'Kind))
-> (BytesList -> f BytesList)
-> Feature
-> f Feature
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Feature -> Maybe Feature'Kind)
-> (Feature -> Maybe Feature'Kind -> Feature)
-> Lens Feature Feature (Maybe Feature'Kind) (Maybe Feature'Kind)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Feature -> Maybe Feature'Kind
_Feature'kind (\ x__ :: Feature
x__ y__ :: Maybe Feature'Kind
y__ -> Feature
x__ {_Feature'kind :: Maybe Feature'Kind
_Feature'kind = Maybe Feature'Kind
y__}))
        (((Maybe BytesList -> f (Maybe BytesList))
 -> Maybe Feature'Kind -> f (Maybe Feature'Kind))
-> ((BytesList -> f BytesList)
    -> Maybe BytesList -> f (Maybe BytesList))
-> (BytesList -> f BytesList)
-> Maybe Feature'Kind
-> f (Maybe Feature'Kind)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
           ((Maybe Feature'Kind -> Maybe BytesList)
-> (Maybe Feature'Kind -> Maybe BytesList -> Maybe Feature'Kind)
-> Lens
     (Maybe Feature'Kind)
     (Maybe Feature'Kind)
     (Maybe BytesList)
     (Maybe BytesList)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
              (\ x__ :: Maybe Feature'Kind
x__
                 -> case Maybe Feature'Kind
x__ of
                      (Prelude.Just (Feature'BytesList x__val :: BytesList
x__val)) -> BytesList -> Maybe BytesList
forall a. a -> Maybe a
Prelude.Just BytesList
x__val
                      _otherwise :: Maybe Feature'Kind
_otherwise -> Maybe BytesList
forall a. Maybe a
Prelude.Nothing)
              (\ _ y__ :: Maybe BytesList
y__ -> (BytesList -> Feature'Kind)
-> Maybe BytesList -> Maybe Feature'Kind
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap BytesList -> Feature'Kind
Feature'BytesList Maybe BytesList
y__))
           (BytesList -> Lens' (Maybe BytesList) BytesList
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens BytesList
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Field.HasField Feature "maybe'floatList" (Prelude.Maybe FloatList) where
  fieldOf :: Proxy# "maybe'floatList"
-> (Maybe FloatList -> f (Maybe FloatList)) -> Feature -> f Feature
fieldOf _
    = ((Maybe Feature'Kind -> f (Maybe Feature'Kind))
 -> Feature -> f Feature)
-> ((Maybe FloatList -> f (Maybe FloatList))
    -> Maybe Feature'Kind -> f (Maybe Feature'Kind))
-> (Maybe FloatList -> f (Maybe FloatList))
-> Feature
-> f Feature
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Feature -> Maybe Feature'Kind)
-> (Feature -> Maybe Feature'Kind -> Feature)
-> Lens Feature Feature (Maybe Feature'Kind) (Maybe Feature'Kind)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Feature -> Maybe Feature'Kind
_Feature'kind (\ x__ :: Feature
x__ y__ :: Maybe Feature'Kind
y__ -> Feature
x__ {_Feature'kind :: Maybe Feature'Kind
_Feature'kind = Maybe Feature'Kind
y__}))
        ((Maybe Feature'Kind -> Maybe FloatList)
-> (Maybe Feature'Kind -> Maybe FloatList -> Maybe Feature'Kind)
-> Lens
     (Maybe Feature'Kind)
     (Maybe Feature'Kind)
     (Maybe FloatList)
     (Maybe FloatList)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           (\ x__ :: Maybe Feature'Kind
x__
              -> case Maybe Feature'Kind
x__ of
                   (Prelude.Just (Feature'FloatList x__val :: FloatList
x__val)) -> FloatList -> Maybe FloatList
forall a. a -> Maybe a
Prelude.Just FloatList
x__val
                   _otherwise :: Maybe Feature'Kind
_otherwise -> Maybe FloatList
forall a. Maybe a
Prelude.Nothing)
           (\ _ y__ :: Maybe FloatList
y__ -> (FloatList -> Feature'Kind)
-> Maybe FloatList -> Maybe Feature'Kind
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap FloatList -> Feature'Kind
Feature'FloatList Maybe FloatList
y__))
instance Data.ProtoLens.Field.HasField Feature "floatList" FloatList where
  fieldOf :: Proxy# "floatList"
-> (FloatList -> f FloatList) -> Feature -> f Feature
fieldOf _
    = ((Maybe Feature'Kind -> f (Maybe Feature'Kind))
 -> Feature -> f Feature)
-> ((FloatList -> f FloatList)
    -> Maybe Feature'Kind -> f (Maybe Feature'Kind))
-> (FloatList -> f FloatList)
-> Feature
-> f Feature
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Feature -> Maybe Feature'Kind)
-> (Feature -> Maybe Feature'Kind -> Feature)
-> Lens Feature Feature (Maybe Feature'Kind) (Maybe Feature'Kind)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Feature -> Maybe Feature'Kind
_Feature'kind (\ x__ :: Feature
x__ y__ :: Maybe Feature'Kind
y__ -> Feature
x__ {_Feature'kind :: Maybe Feature'Kind
_Feature'kind = Maybe Feature'Kind
y__}))
        (((Maybe FloatList -> f (Maybe FloatList))
 -> Maybe Feature'Kind -> f (Maybe Feature'Kind))
-> ((FloatList -> f FloatList)
    -> Maybe FloatList -> f (Maybe FloatList))
-> (FloatList -> f FloatList)
-> Maybe Feature'Kind
-> f (Maybe Feature'Kind)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
           ((Maybe Feature'Kind -> Maybe FloatList)
-> (Maybe Feature'Kind -> Maybe FloatList -> Maybe Feature'Kind)
-> Lens
     (Maybe Feature'Kind)
     (Maybe Feature'Kind)
     (Maybe FloatList)
     (Maybe FloatList)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
              (\ x__ :: Maybe Feature'Kind
x__
                 -> case Maybe Feature'Kind
x__ of
                      (Prelude.Just (Feature'FloatList x__val :: FloatList
x__val)) -> FloatList -> Maybe FloatList
forall a. a -> Maybe a
Prelude.Just FloatList
x__val
                      _otherwise :: Maybe Feature'Kind
_otherwise -> Maybe FloatList
forall a. Maybe a
Prelude.Nothing)
              (\ _ y__ :: Maybe FloatList
y__ -> (FloatList -> Feature'Kind)
-> Maybe FloatList -> Maybe Feature'Kind
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap FloatList -> Feature'Kind
Feature'FloatList Maybe FloatList
y__))
           (FloatList -> Lens' (Maybe FloatList) FloatList
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens FloatList
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Field.HasField Feature "maybe'int64List" (Prelude.Maybe Int64List) where
  fieldOf :: Proxy# "maybe'int64List"
-> (Maybe Int64List -> f (Maybe Int64List)) -> Feature -> f Feature
fieldOf _
    = ((Maybe Feature'Kind -> f (Maybe Feature'Kind))
 -> Feature -> f Feature)
-> ((Maybe Int64List -> f (Maybe Int64List))
    -> Maybe Feature'Kind -> f (Maybe Feature'Kind))
-> (Maybe Int64List -> f (Maybe Int64List))
-> Feature
-> f Feature
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Feature -> Maybe Feature'Kind)
-> (Feature -> Maybe Feature'Kind -> Feature)
-> Lens Feature Feature (Maybe Feature'Kind) (Maybe Feature'Kind)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Feature -> Maybe Feature'Kind
_Feature'kind (\ x__ :: Feature
x__ y__ :: Maybe Feature'Kind
y__ -> Feature
x__ {_Feature'kind :: Maybe Feature'Kind
_Feature'kind = Maybe Feature'Kind
y__}))
        ((Maybe Feature'Kind -> Maybe Int64List)
-> (Maybe Feature'Kind -> Maybe Int64List -> Maybe Feature'Kind)
-> Lens
     (Maybe Feature'Kind)
     (Maybe Feature'Kind)
     (Maybe Int64List)
     (Maybe Int64List)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           (\ x__ :: Maybe Feature'Kind
x__
              -> case Maybe Feature'Kind
x__ of
                   (Prelude.Just (Feature'Int64List x__val :: Int64List
x__val)) -> Int64List -> Maybe Int64List
forall a. a -> Maybe a
Prelude.Just Int64List
x__val
                   _otherwise :: Maybe Feature'Kind
_otherwise -> Maybe Int64List
forall a. Maybe a
Prelude.Nothing)
           (\ _ y__ :: Maybe Int64List
y__ -> (Int64List -> Feature'Kind)
-> Maybe Int64List -> Maybe Feature'Kind
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap Int64List -> Feature'Kind
Feature'Int64List Maybe Int64List
y__))
instance Data.ProtoLens.Field.HasField Feature "int64List" Int64List where
  fieldOf :: Proxy# "int64List"
-> (Int64List -> f Int64List) -> Feature -> f Feature
fieldOf _
    = ((Maybe Feature'Kind -> f (Maybe Feature'Kind))
 -> Feature -> f Feature)
-> ((Int64List -> f Int64List)
    -> Maybe Feature'Kind -> f (Maybe Feature'Kind))
-> (Int64List -> f Int64List)
-> Feature
-> f Feature
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Feature -> Maybe Feature'Kind)
-> (Feature -> Maybe Feature'Kind -> Feature)
-> Lens Feature Feature (Maybe Feature'Kind) (Maybe Feature'Kind)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Feature -> Maybe Feature'Kind
_Feature'kind (\ x__ :: Feature
x__ y__ :: Maybe Feature'Kind
y__ -> Feature
x__ {_Feature'kind :: Maybe Feature'Kind
_Feature'kind = Maybe Feature'Kind
y__}))
        (((Maybe Int64List -> f (Maybe Int64List))
 -> Maybe Feature'Kind -> f (Maybe Feature'Kind))
-> ((Int64List -> f Int64List)
    -> Maybe Int64List -> f (Maybe Int64List))
-> (Int64List -> f Int64List)
-> Maybe Feature'Kind
-> f (Maybe Feature'Kind)
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
           ((Maybe Feature'Kind -> Maybe Int64List)
-> (Maybe Feature'Kind -> Maybe Int64List -> Maybe Feature'Kind)
-> Lens
     (Maybe Feature'Kind)
     (Maybe Feature'Kind)
     (Maybe Int64List)
     (Maybe Int64List)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
              (\ x__ :: Maybe Feature'Kind
x__
                 -> case Maybe Feature'Kind
x__ of
                      (Prelude.Just (Feature'Int64List x__val :: Int64List
x__val)) -> Int64List -> Maybe Int64List
forall a. a -> Maybe a
Prelude.Just Int64List
x__val
                      _otherwise :: Maybe Feature'Kind
_otherwise -> Maybe Int64List
forall a. Maybe a
Prelude.Nothing)
              (\ _ y__ :: Maybe Int64List
y__ -> (Int64List -> Feature'Kind)
-> Maybe Int64List -> Maybe Feature'Kind
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap Int64List -> Feature'Kind
Feature'Int64List Maybe Int64List
y__))
           (Int64List -> Lens' (Maybe Int64List) Int64List
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens Int64List
forall msg. Message msg => msg
Data.ProtoLens.defMessage))
instance Data.ProtoLens.Message Feature where
  messageName :: Proxy Feature -> Text
messageName _ = String -> Text
Data.Text.pack "tensorflow.Feature"
  packedMessageDescriptor :: Proxy Feature -> ByteString
packedMessageDescriptor _
    = "\n\
      \\aFeature\DC26\n\
      \\n\
      \bytes_list\CAN\SOH \SOH(\v2\NAK.tensorflow.BytesListH\NULR\tbytesList\DC26\n\
      \\n\
      \float_list\CAN\STX \SOH(\v2\NAK.tensorflow.FloatListH\NULR\tfloatList\DC26\n\
      \\n\
      \int64_list\CAN\ETX \SOH(\v2\NAK.tensorflow.Int64ListH\NULR\tint64ListB\ACK\n\
      \\EOTkind"
  packedFileDescriptor :: Proxy Feature -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor Feature)
fieldsByTag
    = let
        bytesList__field_descriptor :: FieldDescriptor Feature
bytesList__field_descriptor
          = String
-> FieldTypeDescriptor BytesList
-> FieldAccessor Feature BytesList
-> FieldDescriptor Feature
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "bytes_list"
              (MessageOrGroup -> FieldTypeDescriptor BytesList
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor BytesList)
              (Lens' Feature (Maybe BytesList) -> FieldAccessor Feature BytesList
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
                 (forall s a (f :: * -> *).
(HasField s "maybe'bytesList" 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'bytesList")) ::
              Data.ProtoLens.FieldDescriptor Feature
        floatList__field_descriptor :: FieldDescriptor Feature
floatList__field_descriptor
          = String
-> FieldTypeDescriptor FloatList
-> FieldAccessor Feature FloatList
-> FieldDescriptor Feature
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "float_list"
              (MessageOrGroup -> FieldTypeDescriptor FloatList
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor FloatList)
              (Lens' Feature (Maybe FloatList) -> FieldAccessor Feature FloatList
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
                 (forall s a (f :: * -> *).
(HasField s "maybe'floatList" 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'floatList")) ::
              Data.ProtoLens.FieldDescriptor Feature
        int64List__field_descriptor :: FieldDescriptor Feature
int64List__field_descriptor
          = String
-> FieldTypeDescriptor Int64List
-> FieldAccessor Feature Int64List
-> FieldDescriptor Feature
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "int64_list"
              (MessageOrGroup -> FieldTypeDescriptor Int64List
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Int64List)
              (Lens' Feature (Maybe Int64List) -> FieldAccessor Feature Int64List
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
                 (forall s a (f :: * -> *).
(HasField s "maybe'int64List" 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'int64List")) ::
              Data.ProtoLens.FieldDescriptor Feature
      in
        [(Tag, FieldDescriptor Feature)]
-> Map Tag (FieldDescriptor Feature)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor Feature
bytesList__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor Feature
floatList__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 3, FieldDescriptor Feature
int64List__field_descriptor)]
  unknownFields :: LensLike' f Feature FieldSet
unknownFields
    = (Feature -> FieldSet)
-> (Feature -> FieldSet -> Feature) -> Lens' Feature FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        Feature -> FieldSet
_Feature'_unknownFields
        (\ x__ :: Feature
x__ y__ :: FieldSet
y__ -> Feature
x__ {_Feature'_unknownFields :: FieldSet
_Feature'_unknownFields = FieldSet
y__})
  defMessage :: Feature
defMessage
    = $WFeature'_constructor :: Maybe Feature'Kind -> FieldSet -> Feature
Feature'_constructor
        {_Feature'kind :: Maybe Feature'Kind
_Feature'kind = Maybe Feature'Kind
forall a. Maybe a
Prelude.Nothing, _Feature'_unknownFields :: FieldSet
_Feature'_unknownFields = []}
  parseMessage :: Parser Feature
parseMessage
    = let
        loop :: Feature -> Data.ProtoLens.Encoding.Bytes.Parser Feature
        loop :: Feature -> Parser Feature
loop x :: Feature
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]))))
                      Feature -> Parser Feature
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter Feature Feature FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Feature -> Feature
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 Feature Feature FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) Feature
x)
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        10
                          -> do BytesList
y <- Parser BytesList -> String -> Parser BytesList
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser BytesList -> Parser BytesList
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 BytesList
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                       "bytes_list"
                                Feature -> Parser Feature
loop
                                  (Setter Feature Feature BytesList BytesList
-> BytesList -> Feature -> Feature
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "bytesList" 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 @"bytesList") BytesList
y Feature
x)
                        18
                          -> do FloatList
y <- Parser FloatList -> String -> Parser FloatList
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser FloatList -> Parser FloatList
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 FloatList
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                       "float_list"
                                Feature -> Parser Feature
loop
                                  (Setter Feature Feature FloatList FloatList
-> FloatList -> Feature -> Feature
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "floatList" 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 @"floatList") FloatList
y Feature
x)
                        26
                          -> do Int64List
y <- Parser Int64List -> String -> Parser Int64List
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser Int64List -> Parser Int64List
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 Int64List
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                       "int64_list"
                                Feature -> Parser Feature
loop
                                  (Setter Feature Feature Int64List Int64List
-> Int64List -> Feature -> Feature
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "int64List" 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 @"int64List") Int64List
y Feature
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                Feature -> Parser Feature
loop
                                  (Setter Feature Feature FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Feature -> Feature
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 Feature Feature FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) Feature
x)
      in
        Parser Feature -> String -> Parser Feature
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do Feature -> Parser Feature
loop Feature
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "Feature"
  buildMessage :: Feature -> Builder
buildMessage
    = \ _x :: Feature
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (case
                  FoldLike
  (Maybe Feature'Kind)
  Feature
  Feature
  (Maybe Feature'Kind)
  (Maybe Feature'Kind)
-> Feature -> Maybe Feature'Kind
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maybe'kind" 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'kind") Feature
_x
              of
                Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
                (Prelude.Just (Feature'BytesList v :: BytesList
v))
                  -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                       (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                       ((ByteString -> Builder)
-> (BytesList -> ByteString) -> BytesList -> 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))
                          BytesList -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
                          BytesList
v)
                (Prelude.Just (Feature'FloatList v :: FloatList
v))
                  -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                       (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                       ((ByteString -> Builder)
-> (FloatList -> ByteString) -> FloatList -> 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))
                          FloatList -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
                          FloatList
v)
                (Prelude.Just (Feature'Int64List v :: Int64List
v))
                  -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                       (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 26)
                       ((ByteString -> Builder)
-> (Int64List -> ByteString) -> Int64List -> 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))
                          Int64List -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
                          Int64List
v))
             (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                (FoldLike FieldSet Feature Feature FieldSet FieldSet
-> Feature -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet Feature Feature FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields Feature
_x))
instance Control.DeepSeq.NFData Feature where
  rnf :: Feature -> ()
rnf
    = \ x__ :: Feature
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (Feature -> FieldSet
_Feature'_unknownFields Feature
x__)
             (Maybe Feature'Kind -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (Feature -> Maybe Feature'Kind
_Feature'kind Feature
x__) ())
instance Control.DeepSeq.NFData Feature'Kind where
  rnf :: Feature'Kind -> ()
rnf (Feature'BytesList x__ :: BytesList
x__) = BytesList -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf BytesList
x__
  rnf (Feature'FloatList x__ :: FloatList
x__) = FloatList -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf FloatList
x__
  rnf (Feature'Int64List x__ :: Int64List
x__) = Int64List -> ()
forall a. NFData a => a -> ()
Control.DeepSeq.rnf Int64List
x__
_Feature'BytesList ::
  Data.ProtoLens.Prism.Prism' Feature'Kind BytesList
_Feature'BytesList :: p BytesList (f BytesList) -> p Feature'Kind (f Feature'Kind)
_Feature'BytesList
  = (BytesList -> Feature'Kind)
-> (Feature'Kind -> Maybe BytesList)
-> Prism Feature'Kind Feature'Kind BytesList BytesList
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
      BytesList -> Feature'Kind
Feature'BytesList
      (\ p__ :: Feature'Kind
p__
         -> case Feature'Kind
p__ of
              (Feature'BytesList p__val :: BytesList
p__val) -> BytesList -> Maybe BytesList
forall a. a -> Maybe a
Prelude.Just BytesList
p__val
              _otherwise :: Feature'Kind
_otherwise -> Maybe BytesList
forall a. Maybe a
Prelude.Nothing)
_Feature'FloatList ::
  Data.ProtoLens.Prism.Prism' Feature'Kind FloatList
_Feature'FloatList :: p FloatList (f FloatList) -> p Feature'Kind (f Feature'Kind)
_Feature'FloatList
  = (FloatList -> Feature'Kind)
-> (Feature'Kind -> Maybe FloatList)
-> Prism Feature'Kind Feature'Kind FloatList FloatList
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
      FloatList -> Feature'Kind
Feature'FloatList
      (\ p__ :: Feature'Kind
p__
         -> case Feature'Kind
p__ of
              (Feature'FloatList p__val :: FloatList
p__val) -> FloatList -> Maybe FloatList
forall a. a -> Maybe a
Prelude.Just FloatList
p__val
              _otherwise :: Feature'Kind
_otherwise -> Maybe FloatList
forall a. Maybe a
Prelude.Nothing)
_Feature'Int64List ::
  Data.ProtoLens.Prism.Prism' Feature'Kind Int64List
_Feature'Int64List :: p Int64List (f Int64List) -> p Feature'Kind (f Feature'Kind)
_Feature'Int64List
  = (Int64List -> Feature'Kind)
-> (Feature'Kind -> Maybe Int64List)
-> Prism Feature'Kind Feature'Kind Int64List Int64List
forall b s a. (b -> s) -> (s -> Maybe a) -> Prism s s a b
Data.ProtoLens.Prism.prism'
      Int64List -> Feature'Kind
Feature'Int64List
      (\ p__ :: Feature'Kind
p__
         -> case Feature'Kind
p__ of
              (Feature'Int64List p__val :: Int64List
p__val) -> Int64List -> Maybe Int64List
forall a. a -> Maybe a
Prelude.Just Int64List
p__val
              _otherwise :: Feature'Kind
_otherwise -> Maybe Int64List
forall a. Maybe a
Prelude.Nothing)
{- | Fields :
     
         * 'Proto.Tensorflow.Core.Example.Feature_Fields.feature' @:: Lens' FeatureList [Feature]@
         * 'Proto.Tensorflow.Core.Example.Feature_Fields.vec'feature' @:: Lens' FeatureList (Data.Vector.Vector Feature)@ -}
data FeatureList
  = FeatureList'_constructor {FeatureList -> Vector Feature
_FeatureList'feature :: !(Data.Vector.Vector Feature),
                              FeatureList -> FieldSet
_FeatureList'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (FeatureList -> FeatureList -> Bool
(FeatureList -> FeatureList -> Bool)
-> (FeatureList -> FeatureList -> Bool) -> Eq FeatureList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FeatureList -> FeatureList -> Bool
$c/= :: FeatureList -> FeatureList -> Bool
== :: FeatureList -> FeatureList -> Bool
$c== :: FeatureList -> FeatureList -> Bool
Prelude.Eq, Eq FeatureList
Eq FeatureList =>
(FeatureList -> FeatureList -> Ordering)
-> (FeatureList -> FeatureList -> Bool)
-> (FeatureList -> FeatureList -> Bool)
-> (FeatureList -> FeatureList -> Bool)
-> (FeatureList -> FeatureList -> Bool)
-> (FeatureList -> FeatureList -> FeatureList)
-> (FeatureList -> FeatureList -> FeatureList)
-> Ord FeatureList
FeatureList -> FeatureList -> Bool
FeatureList -> FeatureList -> Ordering
FeatureList -> FeatureList -> FeatureList
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 :: FeatureList -> FeatureList -> FeatureList
$cmin :: FeatureList -> FeatureList -> FeatureList
max :: FeatureList -> FeatureList -> FeatureList
$cmax :: FeatureList -> FeatureList -> FeatureList
>= :: FeatureList -> FeatureList -> Bool
$c>= :: FeatureList -> FeatureList -> Bool
> :: FeatureList -> FeatureList -> Bool
$c> :: FeatureList -> FeatureList -> Bool
<= :: FeatureList -> FeatureList -> Bool
$c<= :: FeatureList -> FeatureList -> Bool
< :: FeatureList -> FeatureList -> Bool
$c< :: FeatureList -> FeatureList -> Bool
compare :: FeatureList -> FeatureList -> Ordering
$ccompare :: FeatureList -> FeatureList -> Ordering
$cp1Ord :: Eq FeatureList
Prelude.Ord)
instance Prelude.Show FeatureList where
  showsPrec :: Int -> FeatureList -> ShowS
showsPrec _ __x :: FeatureList
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (FeatureList -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort FeatureList
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField FeatureList "feature" [Feature] where
  fieldOf :: Proxy# "feature"
-> ([Feature] -> f [Feature]) -> FeatureList -> f FeatureList
fieldOf _
    = ((Vector Feature -> f (Vector Feature))
 -> FeatureList -> f FeatureList)
-> (([Feature] -> f [Feature])
    -> Vector Feature -> f (Vector Feature))
-> ([Feature] -> f [Feature])
-> FeatureList
-> f FeatureList
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((FeatureList -> Vector Feature)
-> (FeatureList -> Vector Feature -> FeatureList)
-> Lens FeatureList FeatureList (Vector Feature) (Vector Feature)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           FeatureList -> Vector Feature
_FeatureList'feature
           (\ x__ :: FeatureList
x__ y__ :: Vector Feature
y__ -> FeatureList
x__ {_FeatureList'feature :: Vector Feature
_FeatureList'feature = Vector Feature
y__}))
        ((Vector Feature -> [Feature])
-> (Vector Feature -> [Feature] -> Vector Feature)
-> Lens (Vector Feature) (Vector Feature) [Feature] [Feature]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Vector Feature -> [Feature]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
           (\ _ y__ :: [Feature]
y__ -> [Feature] -> Vector Feature
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [Feature]
y__))
instance Data.ProtoLens.Field.HasField FeatureList "vec'feature" (Data.Vector.Vector Feature) where
  fieldOf :: Proxy# "vec'feature"
-> (Vector Feature -> f (Vector Feature))
-> FeatureList
-> f FeatureList
fieldOf _
    = ((Vector Feature -> f (Vector Feature))
 -> FeatureList -> f FeatureList)
-> ((Vector Feature -> f (Vector Feature))
    -> Vector Feature -> f (Vector Feature))
-> (Vector Feature -> f (Vector Feature))
-> FeatureList
-> f FeatureList
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((FeatureList -> Vector Feature)
-> (FeatureList -> Vector Feature -> FeatureList)
-> Lens FeatureList FeatureList (Vector Feature) (Vector Feature)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           FeatureList -> Vector Feature
_FeatureList'feature
           (\ x__ :: FeatureList
x__ y__ :: Vector Feature
y__ -> FeatureList
x__ {_FeatureList'feature :: Vector Feature
_FeatureList'feature = Vector Feature
y__}))
        (Vector Feature -> f (Vector Feature))
-> Vector Feature -> f (Vector Feature)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message FeatureList where
  messageName :: Proxy FeatureList -> Text
messageName _ = String -> Text
Data.Text.pack "tensorflow.FeatureList"
  packedMessageDescriptor :: Proxy FeatureList -> ByteString
packedMessageDescriptor _
    = "\n\
      \\vFeatureList\DC2-\n\
      \\afeature\CAN\SOH \ETX(\v2\DC3.tensorflow.FeatureR\afeature"
  packedFileDescriptor :: Proxy FeatureList -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor FeatureList)
fieldsByTag
    = let
        feature__field_descriptor :: FieldDescriptor FeatureList
feature__field_descriptor
          = String
-> FieldTypeDescriptor Feature
-> FieldAccessor FeatureList Feature
-> FieldDescriptor FeatureList
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "feature"
              (MessageOrGroup -> FieldTypeDescriptor Feature
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Feature)
              (Packing
-> Lens' FeatureList [Feature] -> FieldAccessor FeatureList Feature
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
                 Packing
Data.ProtoLens.Unpacked (forall s a (f :: * -> *).
(HasField s "feature" 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 @"feature")) ::
              Data.ProtoLens.FieldDescriptor FeatureList
      in
        [(Tag, FieldDescriptor FeatureList)]
-> Map Tag (FieldDescriptor FeatureList)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor FeatureList
feature__field_descriptor)]
  unknownFields :: LensLike' f FeatureList FieldSet
unknownFields
    = (FeatureList -> FieldSet)
-> (FeatureList -> FieldSet -> FeatureList)
-> Lens' FeatureList FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        FeatureList -> FieldSet
_FeatureList'_unknownFields
        (\ x__ :: FeatureList
x__ y__ :: FieldSet
y__ -> FeatureList
x__ {_FeatureList'_unknownFields :: FieldSet
_FeatureList'_unknownFields = FieldSet
y__})
  defMessage :: FeatureList
defMessage
    = $WFeatureList'_constructor :: Vector Feature -> FieldSet -> FeatureList
FeatureList'_constructor
        {_FeatureList'feature :: Vector Feature
_FeatureList'feature = Vector Feature
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
         _FeatureList'_unknownFields :: FieldSet
_FeatureList'_unknownFields = []}
  parseMessage :: Parser FeatureList
parseMessage
    = let
        loop ::
          FeatureList
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld Feature
             -> Data.ProtoLens.Encoding.Bytes.Parser FeatureList
        loop :: FeatureList
-> Growing Vector RealWorld Feature -> Parser FeatureList
loop x :: FeatureList
x mutable'feature :: Growing Vector RealWorld Feature
mutable'feature
          = do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
               if Bool
end then
                   do Vector Feature
frozen'feature <- IO (Vector Feature) -> Parser (Vector Feature)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                          (Growing Vector (PrimState IO) Feature -> IO (Vector Feature)
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 Feature
Growing Vector (PrimState IO) Feature
mutable'feature)
                      (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]))))
                      FeatureList -> Parser FeatureList
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter FeatureList FeatureList FieldSet FieldSet
-> (FieldSet -> FieldSet) -> FeatureList -> FeatureList
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 FeatureList FeatureList FieldSet FieldSet
Data.ProtoLens.unknownFields
                           (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
                           (Setter FeatureList FeatureList (Vector Feature) (Vector Feature)
-> Vector Feature -> FeatureList -> FeatureList
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
                              (forall s a (f :: * -> *).
(HasField s "vec'feature" 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'feature") Vector Feature
frozen'feature FeatureList
x))
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        10
                          -> do !Feature
y <- Parser Feature -> String -> Parser Feature
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Int -> Parser Feature -> Parser Feature
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 Feature
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                        "feature"
                                Growing Vector RealWorld Feature
v <- IO (Growing Vector RealWorld Feature)
-> Parser (Growing Vector RealWorld Feature)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Growing Vector (PrimState IO) Feature
-> Feature -> IO (Growing Vector (PrimState IO) Feature)
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 Feature
Growing Vector (PrimState IO) Feature
mutable'feature Feature
y)
                                FeatureList
-> Growing Vector RealWorld Feature -> Parser FeatureList
loop FeatureList
x Growing Vector RealWorld Feature
v
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                FeatureList
-> Growing Vector RealWorld Feature -> Parser FeatureList
loop
                                  (Setter FeatureList FeatureList FieldSet FieldSet
-> (FieldSet -> FieldSet) -> FeatureList -> FeatureList
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 FeatureList FeatureList FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) FeatureList
x)
                                  Growing Vector RealWorld Feature
mutable'feature
      in
        Parser FeatureList -> String -> Parser FeatureList
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do Growing Vector RealWorld Feature
mutable'feature <- IO (Growing Vector RealWorld Feature)
-> Parser (Growing Vector RealWorld Feature)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                   IO (Growing Vector RealWorld Feature)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
              FeatureList
-> Growing Vector RealWorld Feature -> Parser FeatureList
loop FeatureList
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld Feature
mutable'feature)
          "FeatureList"
  buildMessage :: FeatureList -> Builder
buildMessage
    = \ _x :: FeatureList
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             ((Feature -> Builder) -> Vector Feature -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                (\ _v :: Feature
_v
                   -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                        (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                        ((ByteString -> Builder)
-> (Feature -> ByteString) -> Feature -> 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))
                           Feature -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
                           Feature
_v))
                (FoldLike
  (Vector Feature)
  FeatureList
  FeatureList
  (Vector Feature)
  (Vector Feature)
-> FeatureList -> Vector Feature
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "vec'feature" 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'feature") FeatureList
_x))
             (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                (FoldLike FieldSet FeatureList FeatureList FieldSet FieldSet
-> FeatureList -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet FeatureList FeatureList FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields FeatureList
_x))
instance Control.DeepSeq.NFData FeatureList where
  rnf :: FeatureList -> ()
rnf
    = \ x__ :: FeatureList
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (FeatureList -> FieldSet
_FeatureList'_unknownFields FeatureList
x__)
             (Vector Feature -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (FeatureList -> Vector Feature
_FeatureList'feature FeatureList
x__) ())
{- | Fields :
     
         * 'Proto.Tensorflow.Core.Example.Feature_Fields.featureList' @:: Lens' FeatureLists (Data.Map.Map Data.Text.Text FeatureList)@ -}
data FeatureLists
  = FeatureLists'_constructor {FeatureLists -> Map Text FeatureList
_FeatureLists'featureList :: !(Data.Map.Map Data.Text.Text FeatureList),
                               FeatureLists -> FieldSet
_FeatureLists'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (FeatureLists -> FeatureLists -> Bool
(FeatureLists -> FeatureLists -> Bool)
-> (FeatureLists -> FeatureLists -> Bool) -> Eq FeatureLists
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FeatureLists -> FeatureLists -> Bool
$c/= :: FeatureLists -> FeatureLists -> Bool
== :: FeatureLists -> FeatureLists -> Bool
$c== :: FeatureLists -> FeatureLists -> Bool
Prelude.Eq, Eq FeatureLists
Eq FeatureLists =>
(FeatureLists -> FeatureLists -> Ordering)
-> (FeatureLists -> FeatureLists -> Bool)
-> (FeatureLists -> FeatureLists -> Bool)
-> (FeatureLists -> FeatureLists -> Bool)
-> (FeatureLists -> FeatureLists -> Bool)
-> (FeatureLists -> FeatureLists -> FeatureLists)
-> (FeatureLists -> FeatureLists -> FeatureLists)
-> Ord FeatureLists
FeatureLists -> FeatureLists -> Bool
FeatureLists -> FeatureLists -> Ordering
FeatureLists -> FeatureLists -> FeatureLists
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 :: FeatureLists -> FeatureLists -> FeatureLists
$cmin :: FeatureLists -> FeatureLists -> FeatureLists
max :: FeatureLists -> FeatureLists -> FeatureLists
$cmax :: FeatureLists -> FeatureLists -> FeatureLists
>= :: FeatureLists -> FeatureLists -> Bool
$c>= :: FeatureLists -> FeatureLists -> Bool
> :: FeatureLists -> FeatureLists -> Bool
$c> :: FeatureLists -> FeatureLists -> Bool
<= :: FeatureLists -> FeatureLists -> Bool
$c<= :: FeatureLists -> FeatureLists -> Bool
< :: FeatureLists -> FeatureLists -> Bool
$c< :: FeatureLists -> FeatureLists -> Bool
compare :: FeatureLists -> FeatureLists -> Ordering
$ccompare :: FeatureLists -> FeatureLists -> Ordering
$cp1Ord :: Eq FeatureLists
Prelude.Ord)
instance Prelude.Show FeatureLists where
  showsPrec :: Int -> FeatureLists -> ShowS
showsPrec _ __x :: FeatureLists
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (FeatureLists -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort FeatureLists
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField FeatureLists "featureList" (Data.Map.Map Data.Text.Text FeatureList) where
  fieldOf :: Proxy# "featureList"
-> (Map Text FeatureList -> f (Map Text FeatureList))
-> FeatureLists
-> f FeatureLists
fieldOf _
    = ((Map Text FeatureList -> f (Map Text FeatureList))
 -> FeatureLists -> f FeatureLists)
-> ((Map Text FeatureList -> f (Map Text FeatureList))
    -> Map Text FeatureList -> f (Map Text FeatureList))
-> (Map Text FeatureList -> f (Map Text FeatureList))
-> FeatureLists
-> f FeatureLists
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((FeatureLists -> Map Text FeatureList)
-> (FeatureLists -> Map Text FeatureList -> FeatureLists)
-> Lens
     FeatureLists
     FeatureLists
     (Map Text FeatureList)
     (Map Text FeatureList)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           FeatureLists -> Map Text FeatureList
_FeatureLists'featureList
           (\ x__ :: FeatureLists
x__ y__ :: Map Text FeatureList
y__ -> FeatureLists
x__ {_FeatureLists'featureList :: Map Text FeatureList
_FeatureLists'featureList = Map Text FeatureList
y__}))
        (Map Text FeatureList -> f (Map Text FeatureList))
-> Map Text FeatureList -> f (Map Text FeatureList)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message FeatureLists where
  messageName :: Proxy FeatureLists -> Text
messageName _ = String -> Text
Data.Text.pack "tensorflow.FeatureLists"
  packedMessageDescriptor :: Proxy FeatureLists -> ByteString
packedMessageDescriptor _
    = "\n\
      \\fFeatureLists\DC2L\n\
      \\ffeature_list\CAN\SOH \ETX(\v2).tensorflow.FeatureLists.FeatureListEntryR\vfeatureList\SUBW\n\
      \\DLEFeatureListEntry\DC2\DLE\n\
      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2-\n\
      \\ENQvalue\CAN\STX \SOH(\v2\ETB.tensorflow.FeatureListR\ENQvalue:\STX8\SOH"
  packedFileDescriptor :: Proxy FeatureLists -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor FeatureLists)
fieldsByTag
    = let
        featureList__field_descriptor :: FieldDescriptor FeatureLists
featureList__field_descriptor
          = String
-> FieldTypeDescriptor FeatureLists'FeatureListEntry
-> FieldAccessor FeatureLists FeatureLists'FeatureListEntry
-> FieldDescriptor FeatureLists
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "feature_list"
              (MessageOrGroup -> FieldTypeDescriptor FeatureLists'FeatureListEntry
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor FeatureLists'FeatureListEntry)
              (Lens' FeatureLists'FeatureListEntry Text
-> Lens' FeatureLists'FeatureListEntry FeatureList
-> Lens
     FeatureLists
     FeatureLists
     (Map Text FeatureList)
     (Map Text FeatureList)
-> FieldAccessor FeatureLists FeatureLists'FeatureListEntry
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 "featureList" 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 @"featureList")) ::
              Data.ProtoLens.FieldDescriptor FeatureLists
      in
        [(Tag, FieldDescriptor FeatureLists)]
-> Map Tag (FieldDescriptor FeatureLists)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor FeatureLists
featureList__field_descriptor)]
  unknownFields :: LensLike' f FeatureLists FieldSet
unknownFields
    = (FeatureLists -> FieldSet)
-> (FeatureLists -> FieldSet -> FeatureLists)
-> Lens' FeatureLists FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        FeatureLists -> FieldSet
_FeatureLists'_unknownFields
        (\ x__ :: FeatureLists
x__ y__ :: FieldSet
y__ -> FeatureLists
x__ {_FeatureLists'_unknownFields :: FieldSet
_FeatureLists'_unknownFields = FieldSet
y__})
  defMessage :: FeatureLists
defMessage
    = $WFeatureLists'_constructor :: Map Text FeatureList -> FieldSet -> FeatureLists
FeatureLists'_constructor
        {_FeatureLists'featureList :: Map Text FeatureList
_FeatureLists'featureList = Map Text FeatureList
forall k a. Map k a
Data.Map.empty,
         _FeatureLists'_unknownFields :: FieldSet
_FeatureLists'_unknownFields = []}
  parseMessage :: Parser FeatureLists
parseMessage
    = let
        loop ::
          FeatureLists -> Data.ProtoLens.Encoding.Bytes.Parser FeatureLists
        loop :: FeatureLists -> Parser FeatureLists
loop x :: FeatureLists
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]))))
                      FeatureLists -> Parser FeatureLists
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter FeatureLists FeatureLists FieldSet FieldSet
-> (FieldSet -> FieldSet) -> FeatureLists -> FeatureLists
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 FeatureLists FeatureLists FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) FeatureLists
x)
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        10
                          -> do !(FeatureLists'FeatureListEntry
entry :: FeatureLists'FeatureListEntry) <- Parser FeatureLists'FeatureListEntry
-> String -> Parser FeatureLists'FeatureListEntry
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                                                               (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                                                                   Int
-> Parser FeatureLists'FeatureListEntry
-> Parser FeatureLists'FeatureListEntry
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 FeatureLists'FeatureListEntry
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                                                               "feature_list"
                                (let
                                   key :: Text
key = FoldLike
  Text
  FeatureLists'FeatureListEntry
  FeatureLists'FeatureListEntry
  Text
  Text
-> FeatureLists'FeatureListEntry -> 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") FeatureLists'FeatureListEntry
entry
                                   value :: FeatureList
value
                                     = FoldLike
  FeatureList
  FeatureLists'FeatureListEntry
  FeatureLists'FeatureListEntry
  FeatureList
  FeatureList
-> FeatureLists'FeatureListEntry -> FeatureList
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") FeatureLists'FeatureListEntry
entry
                                 in
                                   FeatureLists -> Parser FeatureLists
loop
                                     (Setter
  FeatureLists
  FeatureLists
  (Map Text FeatureList)
  (Map Text FeatureList)
-> (Map Text FeatureList -> Map Text FeatureList)
-> FeatureLists
-> FeatureLists
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                                        (forall s a (f :: * -> *).
(HasField s "featureList" 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 @"featureList")
                                        (\ !Map Text FeatureList
t -> Text -> FeatureList -> Map Text FeatureList -> Map Text FeatureList
forall k a. Ord k => k -> a -> Map k a -> Map k a
Data.Map.insert Text
key FeatureList
value Map Text FeatureList
t)
                                        FeatureLists
x))
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                FeatureLists -> Parser FeatureLists
loop
                                  (Setter FeatureLists FeatureLists FieldSet FieldSet
-> (FieldSet -> FieldSet) -> FeatureLists -> FeatureLists
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 FeatureLists FeatureLists FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) FeatureLists
x)
      in
        Parser FeatureLists -> String -> Parser FeatureLists
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do FeatureLists -> Parser FeatureLists
loop FeatureLists
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "FeatureLists"
  buildMessage :: FeatureLists -> Builder
buildMessage
    = \ _x :: FeatureLists
_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, FeatureList) -> Builder)
-> [(Text, FeatureList)] -> [Builder]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map
                   (\ _v :: (Text, FeatureList)
_v
                      -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                           (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                           ((ByteString -> Builder)
-> (FeatureLists'FeatureListEntry -> ByteString)
-> FeatureLists'FeatureListEntry
-> 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))
                              FeatureLists'FeatureListEntry -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
                              (Setter
  FeatureLists'FeatureListEntry
  FeatureLists'FeatureListEntry
  Text
  Text
-> Text
-> FeatureLists'FeatureListEntry
-> FeatureLists'FeatureListEntry
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, FeatureList) -> Text
forall a b. (a, b) -> a
Prelude.fst (Text, FeatureList)
_v)
                                 (Setter
  FeatureLists'FeatureListEntry
  FeatureLists'FeatureListEntry
  FeatureList
  FeatureList
-> FeatureList
-> FeatureLists'FeatureListEntry
-> FeatureLists'FeatureListEntry
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, FeatureList) -> FeatureList
forall a b. (a, b) -> b
Prelude.snd (Text, FeatureList)
_v)
                                    (FeatureLists'FeatureListEntry
forall msg. Message msg => msg
Data.ProtoLens.defMessage :: FeatureLists'FeatureListEntry)))))
                   (Map Text FeatureList -> [(Text, FeatureList)]
forall k a. Map k a -> [(k, a)]
Data.Map.toList
                      (FoldLike
  (Map Text FeatureList)
  FeatureLists
  FeatureLists
  (Map Text FeatureList)
  (Map Text FeatureList)
-> FeatureLists -> Map Text FeatureList
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
                         (forall s a (f :: * -> *).
(HasField s "featureList" 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 @"featureList") FeatureLists
_x))))
             (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                (FoldLike FieldSet FeatureLists FeatureLists FieldSet FieldSet
-> FeatureLists -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet FeatureLists FeatureLists FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields FeatureLists
_x))
instance Control.DeepSeq.NFData FeatureLists where
  rnf :: FeatureLists -> ()
rnf
    = \ x__ :: FeatureLists
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (FeatureLists -> FieldSet
_FeatureLists'_unknownFields FeatureLists
x__)
             (Map Text FeatureList -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (FeatureLists -> Map Text FeatureList
_FeatureLists'featureList FeatureLists
x__) ())
{- | Fields :
     
         * 'Proto.Tensorflow.Core.Example.Feature_Fields.key' @:: Lens' FeatureLists'FeatureListEntry Data.Text.Text@
         * 'Proto.Tensorflow.Core.Example.Feature_Fields.value' @:: Lens' FeatureLists'FeatureListEntry FeatureList@
         * 'Proto.Tensorflow.Core.Example.Feature_Fields.maybe'value' @:: Lens' FeatureLists'FeatureListEntry (Prelude.Maybe FeatureList)@ -}
data FeatureLists'FeatureListEntry
  = FeatureLists'FeatureListEntry'_constructor {FeatureLists'FeatureListEntry -> Text
_FeatureLists'FeatureListEntry'key :: !Data.Text.Text,
                                                FeatureLists'FeatureListEntry -> Maybe FeatureList
_FeatureLists'FeatureListEntry'value :: !(Prelude.Maybe FeatureList),
                                                FeatureLists'FeatureListEntry -> FieldSet
_FeatureLists'FeatureListEntry'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (FeatureLists'FeatureListEntry
-> FeatureLists'FeatureListEntry -> Bool
(FeatureLists'FeatureListEntry
 -> FeatureLists'FeatureListEntry -> Bool)
-> (FeatureLists'FeatureListEntry
    -> FeatureLists'FeatureListEntry -> Bool)
-> Eq FeatureLists'FeatureListEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FeatureLists'FeatureListEntry
-> FeatureLists'FeatureListEntry -> Bool
$c/= :: FeatureLists'FeatureListEntry
-> FeatureLists'FeatureListEntry -> Bool
== :: FeatureLists'FeatureListEntry
-> FeatureLists'FeatureListEntry -> Bool
$c== :: FeatureLists'FeatureListEntry
-> FeatureLists'FeatureListEntry -> Bool
Prelude.Eq, Eq FeatureLists'FeatureListEntry
Eq FeatureLists'FeatureListEntry =>
(FeatureLists'FeatureListEntry
 -> FeatureLists'FeatureListEntry -> Ordering)
-> (FeatureLists'FeatureListEntry
    -> FeatureLists'FeatureListEntry -> Bool)
-> (FeatureLists'FeatureListEntry
    -> FeatureLists'FeatureListEntry -> Bool)
-> (FeatureLists'FeatureListEntry
    -> FeatureLists'FeatureListEntry -> Bool)
-> (FeatureLists'FeatureListEntry
    -> FeatureLists'FeatureListEntry -> Bool)
-> (FeatureLists'FeatureListEntry
    -> FeatureLists'FeatureListEntry -> FeatureLists'FeatureListEntry)
-> (FeatureLists'FeatureListEntry
    -> FeatureLists'FeatureListEntry -> FeatureLists'FeatureListEntry)
-> Ord FeatureLists'FeatureListEntry
FeatureLists'FeatureListEntry
-> FeatureLists'FeatureListEntry -> Bool
FeatureLists'FeatureListEntry
-> FeatureLists'FeatureListEntry -> Ordering
FeatureLists'FeatureListEntry
-> FeatureLists'FeatureListEntry -> FeatureLists'FeatureListEntry
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 :: FeatureLists'FeatureListEntry
-> FeatureLists'FeatureListEntry -> FeatureLists'FeatureListEntry
$cmin :: FeatureLists'FeatureListEntry
-> FeatureLists'FeatureListEntry -> FeatureLists'FeatureListEntry
max :: FeatureLists'FeatureListEntry
-> FeatureLists'FeatureListEntry -> FeatureLists'FeatureListEntry
$cmax :: FeatureLists'FeatureListEntry
-> FeatureLists'FeatureListEntry -> FeatureLists'FeatureListEntry
>= :: FeatureLists'FeatureListEntry
-> FeatureLists'FeatureListEntry -> Bool
$c>= :: FeatureLists'FeatureListEntry
-> FeatureLists'FeatureListEntry -> Bool
> :: FeatureLists'FeatureListEntry
-> FeatureLists'FeatureListEntry -> Bool
$c> :: FeatureLists'FeatureListEntry
-> FeatureLists'FeatureListEntry -> Bool
<= :: FeatureLists'FeatureListEntry
-> FeatureLists'FeatureListEntry -> Bool
$c<= :: FeatureLists'FeatureListEntry
-> FeatureLists'FeatureListEntry -> Bool
< :: FeatureLists'FeatureListEntry
-> FeatureLists'FeatureListEntry -> Bool
$c< :: FeatureLists'FeatureListEntry
-> FeatureLists'FeatureListEntry -> Bool
compare :: FeatureLists'FeatureListEntry
-> FeatureLists'FeatureListEntry -> Ordering
$ccompare :: FeatureLists'FeatureListEntry
-> FeatureLists'FeatureListEntry -> Ordering
$cp1Ord :: Eq FeatureLists'FeatureListEntry
Prelude.Ord)
instance Prelude.Show FeatureLists'FeatureListEntry where
  showsPrec :: Int -> FeatureLists'FeatureListEntry -> ShowS
showsPrec _ __x :: FeatureLists'FeatureListEntry
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (FeatureLists'FeatureListEntry -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort FeatureLists'FeatureListEntry
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField FeatureLists'FeatureListEntry "key" Data.Text.Text where
  fieldOf :: Proxy# "key"
-> (Text -> f Text)
-> FeatureLists'FeatureListEntry
-> f FeatureLists'FeatureListEntry
fieldOf _
    = ((Text -> f Text)
 -> FeatureLists'FeatureListEntry
 -> f FeatureLists'FeatureListEntry)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> FeatureLists'FeatureListEntry
-> f FeatureLists'FeatureListEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((FeatureLists'FeatureListEntry -> Text)
-> (FeatureLists'FeatureListEntry
    -> Text -> FeatureLists'FeatureListEntry)
-> Lens' FeatureLists'FeatureListEntry Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           FeatureLists'FeatureListEntry -> Text
_FeatureLists'FeatureListEntry'key
           (\ x__ :: FeatureLists'FeatureListEntry
x__ y__ :: Text
y__ -> FeatureLists'FeatureListEntry
x__ {_FeatureLists'FeatureListEntry'key :: Text
_FeatureLists'FeatureListEntry'key = Text
y__}))
        (Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField FeatureLists'FeatureListEntry "value" FeatureList where
  fieldOf :: Proxy# "value"
-> (FeatureList -> f FeatureList)
-> FeatureLists'FeatureListEntry
-> f FeatureLists'FeatureListEntry
fieldOf _
    = ((Maybe FeatureList -> f (Maybe FeatureList))
 -> FeatureLists'FeatureListEntry
 -> f FeatureLists'FeatureListEntry)
-> ((FeatureList -> f FeatureList)
    -> Maybe FeatureList -> f (Maybe FeatureList))
-> (FeatureList -> f FeatureList)
-> FeatureLists'FeatureListEntry
-> f FeatureLists'FeatureListEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((FeatureLists'FeatureListEntry -> Maybe FeatureList)
-> (FeatureLists'FeatureListEntry
    -> Maybe FeatureList -> FeatureLists'FeatureListEntry)
-> Lens
     FeatureLists'FeatureListEntry
     FeatureLists'FeatureListEntry
     (Maybe FeatureList)
     (Maybe FeatureList)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           FeatureLists'FeatureListEntry -> Maybe FeatureList
_FeatureLists'FeatureListEntry'value
           (\ x__ :: FeatureLists'FeatureListEntry
x__ y__ :: Maybe FeatureList
y__ -> FeatureLists'FeatureListEntry
x__ {_FeatureLists'FeatureListEntry'value :: Maybe FeatureList
_FeatureLists'FeatureListEntry'value = Maybe FeatureList
y__}))
        (FeatureList -> Lens' (Maybe FeatureList) FeatureList
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens FeatureList
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField FeatureLists'FeatureListEntry "maybe'value" (Prelude.Maybe FeatureList) where
  fieldOf :: Proxy# "maybe'value"
-> (Maybe FeatureList -> f (Maybe FeatureList))
-> FeatureLists'FeatureListEntry
-> f FeatureLists'FeatureListEntry
fieldOf _
    = ((Maybe FeatureList -> f (Maybe FeatureList))
 -> FeatureLists'FeatureListEntry
 -> f FeatureLists'FeatureListEntry)
-> ((Maybe FeatureList -> f (Maybe FeatureList))
    -> Maybe FeatureList -> f (Maybe FeatureList))
-> (Maybe FeatureList -> f (Maybe FeatureList))
-> FeatureLists'FeatureListEntry
-> f FeatureLists'FeatureListEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((FeatureLists'FeatureListEntry -> Maybe FeatureList)
-> (FeatureLists'FeatureListEntry
    -> Maybe FeatureList -> FeatureLists'FeatureListEntry)
-> Lens
     FeatureLists'FeatureListEntry
     FeatureLists'FeatureListEntry
     (Maybe FeatureList)
     (Maybe FeatureList)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           FeatureLists'FeatureListEntry -> Maybe FeatureList
_FeatureLists'FeatureListEntry'value
           (\ x__ :: FeatureLists'FeatureListEntry
x__ y__ :: Maybe FeatureList
y__ -> FeatureLists'FeatureListEntry
x__ {_FeatureLists'FeatureListEntry'value :: Maybe FeatureList
_FeatureLists'FeatureListEntry'value = Maybe FeatureList
y__}))
        (Maybe FeatureList -> f (Maybe FeatureList))
-> Maybe FeatureList -> f (Maybe FeatureList)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message FeatureLists'FeatureListEntry where
  messageName :: Proxy FeatureLists'FeatureListEntry -> Text
messageName _
    = String -> Text
Data.Text.pack "tensorflow.FeatureLists.FeatureListEntry"
  packedMessageDescriptor :: Proxy FeatureLists'FeatureListEntry -> ByteString
packedMessageDescriptor _
    = "\n\
      \\DLEFeatureListEntry\DC2\DLE\n\
      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2-\n\
      \\ENQvalue\CAN\STX \SOH(\v2\ETB.tensorflow.FeatureListR\ENQvalue:\STX8\SOH"
  packedFileDescriptor :: Proxy FeatureLists'FeatureListEntry -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor FeatureLists'FeatureListEntry)
fieldsByTag
    = let
        key__field_descriptor :: FieldDescriptor FeatureLists'FeatureListEntry
key__field_descriptor
          = String
-> FieldTypeDescriptor Text
-> FieldAccessor FeatureLists'FeatureListEntry Text
-> FieldDescriptor FeatureLists'FeatureListEntry
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' FeatureLists'FeatureListEntry Text
-> FieldAccessor FeatureLists'FeatureListEntry 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 FeatureLists'FeatureListEntry
        value__field_descriptor :: FieldDescriptor FeatureLists'FeatureListEntry
value__field_descriptor
          = String
-> FieldTypeDescriptor FeatureList
-> FieldAccessor FeatureLists'FeatureListEntry FeatureList
-> FieldDescriptor FeatureLists'FeatureListEntry
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "value"
              (MessageOrGroup -> FieldTypeDescriptor FeatureList
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor FeatureList)
              (Lens
  FeatureLists'FeatureListEntry
  FeatureLists'FeatureListEntry
  (Maybe FeatureList)
  (Maybe FeatureList)
-> FieldAccessor FeatureLists'FeatureListEntry FeatureList
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 FeatureLists'FeatureListEntry
      in
        [(Tag, FieldDescriptor FeatureLists'FeatureListEntry)]
-> Map Tag (FieldDescriptor FeatureLists'FeatureListEntry)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor FeatureLists'FeatureListEntry
key__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor FeatureLists'FeatureListEntry
value__field_descriptor)]
  unknownFields :: LensLike' f FeatureLists'FeatureListEntry FieldSet
unknownFields
    = (FeatureLists'FeatureListEntry -> FieldSet)
-> (FeatureLists'FeatureListEntry
    -> FieldSet -> FeatureLists'FeatureListEntry)
-> Lens' FeatureLists'FeatureListEntry FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        FeatureLists'FeatureListEntry -> FieldSet
_FeatureLists'FeatureListEntry'_unknownFields
        (\ x__ :: FeatureLists'FeatureListEntry
x__ y__ :: FieldSet
y__
           -> FeatureLists'FeatureListEntry
x__ {_FeatureLists'FeatureListEntry'_unknownFields :: FieldSet
_FeatureLists'FeatureListEntry'_unknownFields = FieldSet
y__})
  defMessage :: FeatureLists'FeatureListEntry
defMessage
    = $WFeatureLists'FeatureListEntry'_constructor :: Text
-> Maybe FeatureList -> FieldSet -> FeatureLists'FeatureListEntry
FeatureLists'FeatureListEntry'_constructor
        {_FeatureLists'FeatureListEntry'key :: Text
_FeatureLists'FeatureListEntry'key = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _FeatureLists'FeatureListEntry'value :: Maybe FeatureList
_FeatureLists'FeatureListEntry'value = Maybe FeatureList
forall a. Maybe a
Prelude.Nothing,
         _FeatureLists'FeatureListEntry'_unknownFields :: FieldSet
_FeatureLists'FeatureListEntry'_unknownFields = []}
  parseMessage :: Parser FeatureLists'FeatureListEntry
parseMessage
    = let
        loop ::
          FeatureLists'FeatureListEntry
          -> Data.ProtoLens.Encoding.Bytes.Parser FeatureLists'FeatureListEntry
        loop :: FeatureLists'FeatureListEntry
-> Parser FeatureLists'FeatureListEntry
loop x :: FeatureLists'FeatureListEntry
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]))))
                      FeatureLists'FeatureListEntry
-> Parser FeatureLists'FeatureListEntry
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter
  FeatureLists'FeatureListEntry
  FeatureLists'FeatureListEntry
  FieldSet
  FieldSet
-> (FieldSet -> FieldSet)
-> FeatureLists'FeatureListEntry
-> FeatureLists'FeatureListEntry
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
  FeatureLists'FeatureListEntry
  FeatureLists'FeatureListEntry
  FieldSet
  FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) FeatureLists'FeatureListEntry
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"
                                FeatureLists'FeatureListEntry
-> Parser FeatureLists'FeatureListEntry
loop (Setter
  FeatureLists'FeatureListEntry
  FeatureLists'FeatureListEntry
  Text
  Text
-> Text
-> FeatureLists'FeatureListEntry
-> FeatureLists'FeatureListEntry
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 FeatureLists'FeatureListEntry
x)
                        18
                          -> do FeatureList
y <- Parser FeatureList -> String -> Parser FeatureList
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser FeatureList -> Parser FeatureList
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 FeatureList
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                       "value"
                                FeatureLists'FeatureListEntry
-> Parser FeatureLists'FeatureListEntry
loop (Setter
  FeatureLists'FeatureListEntry
  FeatureLists'FeatureListEntry
  FeatureList
  FeatureList
-> FeatureList
-> FeatureLists'FeatureListEntry
-> FeatureLists'FeatureListEntry
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") FeatureList
y FeatureLists'FeatureListEntry
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                FeatureLists'FeatureListEntry
-> Parser FeatureLists'FeatureListEntry
loop
                                  (Setter
  FeatureLists'FeatureListEntry
  FeatureLists'FeatureListEntry
  FieldSet
  FieldSet
-> (FieldSet -> FieldSet)
-> FeatureLists'FeatureListEntry
-> FeatureLists'FeatureListEntry
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
  FeatureLists'FeatureListEntry
  FeatureLists'FeatureListEntry
  FieldSet
  FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) FeatureLists'FeatureListEntry
x)
      in
        Parser FeatureLists'FeatureListEntry
-> String -> Parser FeatureLists'FeatureListEntry
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do FeatureLists'FeatureListEntry
-> Parser FeatureLists'FeatureListEntry
loop FeatureLists'FeatureListEntry
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "FeatureListEntry"
  buildMessage :: FeatureLists'FeatureListEntry -> Builder
buildMessage
    = \ _x :: FeatureLists'FeatureListEntry
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let _v :: Text
_v = FoldLike
  Text
  FeatureLists'FeatureListEntry
  FeatureLists'FeatureListEntry
  Text
  Text
-> FeatureLists'FeatureListEntry -> 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") FeatureLists'FeatureListEntry
_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 FeatureList)
  FeatureLists'FeatureListEntry
  FeatureLists'FeatureListEntry
  (Maybe FeatureList)
  (Maybe FeatureList)
-> FeatureLists'FeatureListEntry -> Maybe FeatureList
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") FeatureLists'FeatureListEntry
_x
                 of
                   Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
                   (Prelude.Just _v :: FeatureList
_v)
                     -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                          (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                          ((ByteString -> Builder)
-> (FeatureList -> ByteString) -> FeatureList -> 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))
                             FeatureList -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
                             FeatureList
_v))
                (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (FoldLike
  FieldSet
  FeatureLists'FeatureListEntry
  FeatureLists'FeatureListEntry
  FieldSet
  FieldSet
-> FeatureLists'FeatureListEntry -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
  FieldSet
  FeatureLists'FeatureListEntry
  FeatureLists'FeatureListEntry
  FieldSet
  FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields FeatureLists'FeatureListEntry
_x)))
instance Control.DeepSeq.NFData FeatureLists'FeatureListEntry where
  rnf :: FeatureLists'FeatureListEntry -> ()
rnf
    = \ x__ :: FeatureLists'FeatureListEntry
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (FeatureLists'FeatureListEntry -> FieldSet
_FeatureLists'FeatureListEntry'_unknownFields FeatureLists'FeatureListEntry
x__)
             (Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (FeatureLists'FeatureListEntry -> Text
_FeatureLists'FeatureListEntry'key FeatureLists'FeatureListEntry
x__)
                (Maybe FeatureList -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                   (FeatureLists'FeatureListEntry -> Maybe FeatureList
_FeatureLists'FeatureListEntry'value FeatureLists'FeatureListEntry
x__) ()))
{- | Fields :
     
         * 'Proto.Tensorflow.Core.Example.Feature_Fields.feature' @:: Lens' Features (Data.Map.Map Data.Text.Text Feature)@ -}
data Features
  = Features'_constructor {Features -> Map Text Feature
_Features'feature :: !(Data.Map.Map Data.Text.Text Feature),
                           Features -> FieldSet
_Features'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Features -> Features -> Bool
(Features -> Features -> Bool)
-> (Features -> Features -> Bool) -> Eq Features
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Features -> Features -> Bool
$c/= :: Features -> Features -> Bool
== :: Features -> Features -> Bool
$c== :: Features -> Features -> Bool
Prelude.Eq, Eq Features
Eq Features =>
(Features -> Features -> Ordering)
-> (Features -> Features -> Bool)
-> (Features -> Features -> Bool)
-> (Features -> Features -> Bool)
-> (Features -> Features -> Bool)
-> (Features -> Features -> Features)
-> (Features -> Features -> Features)
-> Ord Features
Features -> Features -> Bool
Features -> Features -> Ordering
Features -> Features -> Features
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 :: Features -> Features -> Features
$cmin :: Features -> Features -> Features
max :: Features -> Features -> Features
$cmax :: Features -> Features -> Features
>= :: Features -> Features -> Bool
$c>= :: Features -> Features -> Bool
> :: Features -> Features -> Bool
$c> :: Features -> Features -> Bool
<= :: Features -> Features -> Bool
$c<= :: Features -> Features -> Bool
< :: Features -> Features -> Bool
$c< :: Features -> Features -> Bool
compare :: Features -> Features -> Ordering
$ccompare :: Features -> Features -> Ordering
$cp1Ord :: Eq Features
Prelude.Ord)
instance Prelude.Show Features where
  showsPrec :: Int -> Features -> ShowS
showsPrec _ __x :: Features
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (Features -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort Features
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField Features "feature" (Data.Map.Map Data.Text.Text Feature) where
  fieldOf :: Proxy# "feature"
-> (Map Text Feature -> f (Map Text Feature))
-> Features
-> f Features
fieldOf _
    = ((Map Text Feature -> f (Map Text Feature))
 -> Features -> f Features)
-> ((Map Text Feature -> f (Map Text Feature))
    -> Map Text Feature -> f (Map Text Feature))
-> (Map Text Feature -> f (Map Text Feature))
-> Features
-> f Features
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Features -> Map Text Feature)
-> (Features -> Map Text Feature -> Features)
-> Lens Features Features (Map Text Feature) (Map Text Feature)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Features -> Map Text Feature
_Features'feature (\ x__ :: Features
x__ y__ :: Map Text Feature
y__ -> Features
x__ {_Features'feature :: Map Text Feature
_Features'feature = Map Text Feature
y__}))
        (Map Text Feature -> f (Map Text Feature))
-> Map Text Feature -> f (Map Text Feature)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message Features where
  messageName :: Proxy Features -> Text
messageName _ = String -> Text
Data.Text.pack "tensorflow.Features"
  packedMessageDescriptor :: Proxy Features -> ByteString
packedMessageDescriptor _
    = "\n\
      \\bFeatures\DC2;\n\
      \\afeature\CAN\SOH \ETX(\v2!.tensorflow.Features.FeatureEntryR\afeature\SUBO\n\
      \\fFeatureEntry\DC2\DLE\n\
      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2)\n\
      \\ENQvalue\CAN\STX \SOH(\v2\DC3.tensorflow.FeatureR\ENQvalue:\STX8\SOH"
  packedFileDescriptor :: Proxy Features -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor Features)
fieldsByTag
    = let
        feature__field_descriptor :: FieldDescriptor Features
feature__field_descriptor
          = String
-> FieldTypeDescriptor Features'FeatureEntry
-> FieldAccessor Features Features'FeatureEntry
-> FieldDescriptor Features
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "feature"
              (MessageOrGroup -> FieldTypeDescriptor Features'FeatureEntry
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Features'FeatureEntry)
              (Lens' Features'FeatureEntry Text
-> Lens' Features'FeatureEntry Feature
-> Lens Features Features (Map Text Feature) (Map Text Feature)
-> FieldAccessor Features Features'FeatureEntry
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 "feature" 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 @"feature")) ::
              Data.ProtoLens.FieldDescriptor Features
      in
        [(Tag, FieldDescriptor Features)]
-> Map Tag (FieldDescriptor Features)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor Features
feature__field_descriptor)]
  unknownFields :: LensLike' f Features FieldSet
unknownFields
    = (Features -> FieldSet)
-> (Features -> FieldSet -> Features) -> Lens' Features FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        Features -> FieldSet
_Features'_unknownFields
        (\ x__ :: Features
x__ y__ :: FieldSet
y__ -> Features
x__ {_Features'_unknownFields :: FieldSet
_Features'_unknownFields = FieldSet
y__})
  defMessage :: Features
defMessage
    = $WFeatures'_constructor :: Map Text Feature -> FieldSet -> Features
Features'_constructor
        {_Features'feature :: Map Text Feature
_Features'feature = Map Text Feature
forall k a. Map k a
Data.Map.empty, _Features'_unknownFields :: FieldSet
_Features'_unknownFields = []}
  parseMessage :: Parser Features
parseMessage
    = let
        loop :: Features -> Data.ProtoLens.Encoding.Bytes.Parser Features
        loop :: Features -> Parser Features
loop x :: Features
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]))))
                      Features -> Parser Features
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter Features Features FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Features -> Features
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 Features Features FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) Features
x)
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        10
                          -> do !(Features'FeatureEntry
entry :: Features'FeatureEntry) <- Parser Features'FeatureEntry
-> String -> Parser Features'FeatureEntry
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                                                           Int -> Parser Features'FeatureEntry -> Parser Features'FeatureEntry
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 Features'FeatureEntry
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                                                       "feature"
                                (let
                                   key :: Text
key = FoldLike Text Features'FeatureEntry Features'FeatureEntry Text Text
-> Features'FeatureEntry -> 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") Features'FeatureEntry
entry
                                   value :: Feature
value
                                     = FoldLike
  Feature Features'FeatureEntry Features'FeatureEntry Feature Feature
-> Features'FeatureEntry -> Feature
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") Features'FeatureEntry
entry
                                 in
                                   Features -> Parser Features
loop
                                     (Setter Features Features (Map Text Feature) (Map Text Feature)
-> (Map Text Feature -> Map Text Feature) -> Features -> Features
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                                        (forall s a (f :: * -> *).
(HasField s "feature" 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 @"feature")
                                        (\ !Map Text Feature
t -> Text -> Feature -> Map Text Feature -> Map Text Feature
forall k a. Ord k => k -> a -> Map k a -> Map k a
Data.Map.insert Text
key Feature
value Map Text Feature
t)
                                        Features
x))
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                Features -> Parser Features
loop
                                  (Setter Features Features FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Features -> Features
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 Features Features FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) Features
x)
      in
        Parser Features -> String -> Parser Features
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do Features -> Parser Features
loop Features
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "Features"
  buildMessage :: Features -> Builder
buildMessage
    = \ _x :: Features
_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, Feature) -> Builder) -> [(Text, Feature)] -> [Builder]
forall a b. (a -> b) -> [a] -> [b]
Prelude.map
                   (\ _v :: (Text, Feature)
_v
                      -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                           (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                           ((ByteString -> Builder)
-> (Features'FeatureEntry -> ByteString)
-> Features'FeatureEntry
-> 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))
                              Features'FeatureEntry -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
                              (Setter Features'FeatureEntry Features'FeatureEntry Text Text
-> Text -> Features'FeatureEntry -> Features'FeatureEntry
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, Feature) -> Text
forall a b. (a, b) -> a
Prelude.fst (Text, Feature)
_v)
                                 (Setter Features'FeatureEntry Features'FeatureEntry Feature Feature
-> Feature -> Features'FeatureEntry -> Features'FeatureEntry
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, Feature) -> Feature
forall a b. (a, b) -> b
Prelude.snd (Text, Feature)
_v)
                                    (Features'FeatureEntry
forall msg. Message msg => msg
Data.ProtoLens.defMessage :: Features'FeatureEntry)))))
                   (Map Text Feature -> [(Text, Feature)]
forall k a. Map k a -> [(k, a)]
Data.Map.toList
                      (FoldLike
  (Map Text Feature)
  Features
  Features
  (Map Text Feature)
  (Map Text Feature)
-> Features -> Map Text Feature
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "feature" 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 @"feature") Features
_x))))
             (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                (FoldLike FieldSet Features Features FieldSet FieldSet
-> Features -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet Features Features FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields Features
_x))
instance Control.DeepSeq.NFData Features where
  rnf :: Features -> ()
rnf
    = \ x__ :: Features
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (Features -> FieldSet
_Features'_unknownFields Features
x__)
             (Map Text Feature -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (Features -> Map Text Feature
_Features'feature Features
x__) ())
{- | Fields :
     
         * 'Proto.Tensorflow.Core.Example.Feature_Fields.key' @:: Lens' Features'FeatureEntry Data.Text.Text@
         * 'Proto.Tensorflow.Core.Example.Feature_Fields.value' @:: Lens' Features'FeatureEntry Feature@
         * 'Proto.Tensorflow.Core.Example.Feature_Fields.maybe'value' @:: Lens' Features'FeatureEntry (Prelude.Maybe Feature)@ -}
data Features'FeatureEntry
  = Features'FeatureEntry'_constructor {Features'FeatureEntry -> Text
_Features'FeatureEntry'key :: !Data.Text.Text,
                                        Features'FeatureEntry -> Maybe Feature
_Features'FeatureEntry'value :: !(Prelude.Maybe Feature),
                                        Features'FeatureEntry -> FieldSet
_Features'FeatureEntry'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Features'FeatureEntry -> Features'FeatureEntry -> Bool
(Features'FeatureEntry -> Features'FeatureEntry -> Bool)
-> (Features'FeatureEntry -> Features'FeatureEntry -> Bool)
-> Eq Features'FeatureEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Features'FeatureEntry -> Features'FeatureEntry -> Bool
$c/= :: Features'FeatureEntry -> Features'FeatureEntry -> Bool
== :: Features'FeatureEntry -> Features'FeatureEntry -> Bool
$c== :: Features'FeatureEntry -> Features'FeatureEntry -> Bool
Prelude.Eq, Eq Features'FeatureEntry
Eq Features'FeatureEntry =>
(Features'FeatureEntry -> Features'FeatureEntry -> Ordering)
-> (Features'FeatureEntry -> Features'FeatureEntry -> Bool)
-> (Features'FeatureEntry -> Features'FeatureEntry -> Bool)
-> (Features'FeatureEntry -> Features'FeatureEntry -> Bool)
-> (Features'FeatureEntry -> Features'FeatureEntry -> Bool)
-> (Features'FeatureEntry
    -> Features'FeatureEntry -> Features'FeatureEntry)
-> (Features'FeatureEntry
    -> Features'FeatureEntry -> Features'FeatureEntry)
-> Ord Features'FeatureEntry
Features'FeatureEntry -> Features'FeatureEntry -> Bool
Features'FeatureEntry -> Features'FeatureEntry -> Ordering
Features'FeatureEntry
-> Features'FeatureEntry -> Features'FeatureEntry
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 :: Features'FeatureEntry
-> Features'FeatureEntry -> Features'FeatureEntry
$cmin :: Features'FeatureEntry
-> Features'FeatureEntry -> Features'FeatureEntry
max :: Features'FeatureEntry
-> Features'FeatureEntry -> Features'FeatureEntry
$cmax :: Features'FeatureEntry
-> Features'FeatureEntry -> Features'FeatureEntry
>= :: Features'FeatureEntry -> Features'FeatureEntry -> Bool
$c>= :: Features'FeatureEntry -> Features'FeatureEntry -> Bool
> :: Features'FeatureEntry -> Features'FeatureEntry -> Bool
$c> :: Features'FeatureEntry -> Features'FeatureEntry -> Bool
<= :: Features'FeatureEntry -> Features'FeatureEntry -> Bool
$c<= :: Features'FeatureEntry -> Features'FeatureEntry -> Bool
< :: Features'FeatureEntry -> Features'FeatureEntry -> Bool
$c< :: Features'FeatureEntry -> Features'FeatureEntry -> Bool
compare :: Features'FeatureEntry -> Features'FeatureEntry -> Ordering
$ccompare :: Features'FeatureEntry -> Features'FeatureEntry -> Ordering
$cp1Ord :: Eq Features'FeatureEntry
Prelude.Ord)
instance Prelude.Show Features'FeatureEntry where
  showsPrec :: Int -> Features'FeatureEntry -> ShowS
showsPrec _ __x :: Features'FeatureEntry
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (Features'FeatureEntry -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort Features'FeatureEntry
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField Features'FeatureEntry "key" Data.Text.Text where
  fieldOf :: Proxy# "key"
-> (Text -> f Text)
-> Features'FeatureEntry
-> f Features'FeatureEntry
fieldOf _
    = ((Text -> f Text)
 -> Features'FeatureEntry -> f Features'FeatureEntry)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> Features'FeatureEntry
-> f Features'FeatureEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Features'FeatureEntry -> Text)
-> (Features'FeatureEntry -> Text -> Features'FeatureEntry)
-> Lens' Features'FeatureEntry Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Features'FeatureEntry -> Text
_Features'FeatureEntry'key
           (\ x__ :: Features'FeatureEntry
x__ y__ :: Text
y__ -> Features'FeatureEntry
x__ {_Features'FeatureEntry'key :: Text
_Features'FeatureEntry'key = Text
y__}))
        (Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField Features'FeatureEntry "value" Feature where
  fieldOf :: Proxy# "value"
-> (Feature -> f Feature)
-> Features'FeatureEntry
-> f Features'FeatureEntry
fieldOf _
    = ((Maybe Feature -> f (Maybe Feature))
 -> Features'FeatureEntry -> f Features'FeatureEntry)
-> ((Feature -> f Feature) -> Maybe Feature -> f (Maybe Feature))
-> (Feature -> f Feature)
-> Features'FeatureEntry
-> f Features'FeatureEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Features'FeatureEntry -> Maybe Feature)
-> (Features'FeatureEntry
    -> Maybe Feature -> Features'FeatureEntry)
-> Lens
     Features'FeatureEntry
     Features'FeatureEntry
     (Maybe Feature)
     (Maybe Feature)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Features'FeatureEntry -> Maybe Feature
_Features'FeatureEntry'value
           (\ x__ :: Features'FeatureEntry
x__ y__ :: Maybe Feature
y__ -> Features'FeatureEntry
x__ {_Features'FeatureEntry'value :: Maybe Feature
_Features'FeatureEntry'value = Maybe Feature
y__}))
        (Feature -> Lens' (Maybe Feature) Feature
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens Feature
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField Features'FeatureEntry "maybe'value" (Prelude.Maybe Feature) where
  fieldOf :: Proxy# "maybe'value"
-> (Maybe Feature -> f (Maybe Feature))
-> Features'FeatureEntry
-> f Features'FeatureEntry
fieldOf _
    = ((Maybe Feature -> f (Maybe Feature))
 -> Features'FeatureEntry -> f Features'FeatureEntry)
-> ((Maybe Feature -> f (Maybe Feature))
    -> Maybe Feature -> f (Maybe Feature))
-> (Maybe Feature -> f (Maybe Feature))
-> Features'FeatureEntry
-> f Features'FeatureEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Features'FeatureEntry -> Maybe Feature)
-> (Features'FeatureEntry
    -> Maybe Feature -> Features'FeatureEntry)
-> Lens
     Features'FeatureEntry
     Features'FeatureEntry
     (Maybe Feature)
     (Maybe Feature)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Features'FeatureEntry -> Maybe Feature
_Features'FeatureEntry'value
           (\ x__ :: Features'FeatureEntry
x__ y__ :: Maybe Feature
y__ -> Features'FeatureEntry
x__ {_Features'FeatureEntry'value :: Maybe Feature
_Features'FeatureEntry'value = Maybe Feature
y__}))
        (Maybe Feature -> f (Maybe Feature))
-> Maybe Feature -> f (Maybe Feature)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message Features'FeatureEntry where
  messageName :: Proxy Features'FeatureEntry -> Text
messageName _ = String -> Text
Data.Text.pack "tensorflow.Features.FeatureEntry"
  packedMessageDescriptor :: Proxy Features'FeatureEntry -> ByteString
packedMessageDescriptor _
    = "\n\
      \\fFeatureEntry\DC2\DLE\n\
      \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2)\n\
      \\ENQvalue\CAN\STX \SOH(\v2\DC3.tensorflow.FeatureR\ENQvalue:\STX8\SOH"
  packedFileDescriptor :: Proxy Features'FeatureEntry -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor Features'FeatureEntry)
fieldsByTag
    = let
        key__field_descriptor :: FieldDescriptor Features'FeatureEntry
key__field_descriptor
          = String
-> FieldTypeDescriptor Text
-> FieldAccessor Features'FeatureEntry Text
-> FieldDescriptor Features'FeatureEntry
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' Features'FeatureEntry Text
-> FieldAccessor Features'FeatureEntry 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 Features'FeatureEntry
        value__field_descriptor :: FieldDescriptor Features'FeatureEntry
value__field_descriptor
          = String
-> FieldTypeDescriptor Feature
-> FieldAccessor Features'FeatureEntry Feature
-> FieldDescriptor Features'FeatureEntry
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "value"
              (MessageOrGroup -> FieldTypeDescriptor Feature
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Feature)
              (Lens
  Features'FeatureEntry
  Features'FeatureEntry
  (Maybe Feature)
  (Maybe Feature)
-> FieldAccessor Features'FeatureEntry Feature
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 Features'FeatureEntry
      in
        [(Tag, FieldDescriptor Features'FeatureEntry)]
-> Map Tag (FieldDescriptor Features'FeatureEntry)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor Features'FeatureEntry
key__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor Features'FeatureEntry
value__field_descriptor)]
  unknownFields :: LensLike' f Features'FeatureEntry FieldSet
unknownFields
    = (Features'FeatureEntry -> FieldSet)
-> (Features'FeatureEntry -> FieldSet -> Features'FeatureEntry)
-> Lens' Features'FeatureEntry FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        Features'FeatureEntry -> FieldSet
_Features'FeatureEntry'_unknownFields
        (\ x__ :: Features'FeatureEntry
x__ y__ :: FieldSet
y__ -> Features'FeatureEntry
x__ {_Features'FeatureEntry'_unknownFields :: FieldSet
_Features'FeatureEntry'_unknownFields = FieldSet
y__})
  defMessage :: Features'FeatureEntry
defMessage
    = $WFeatures'FeatureEntry'_constructor :: Text -> Maybe Feature -> FieldSet -> Features'FeatureEntry
Features'FeatureEntry'_constructor
        {_Features'FeatureEntry'key :: Text
_Features'FeatureEntry'key = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _Features'FeatureEntry'value :: Maybe Feature
_Features'FeatureEntry'value = Maybe Feature
forall a. Maybe a
Prelude.Nothing,
         _Features'FeatureEntry'_unknownFields :: FieldSet
_Features'FeatureEntry'_unknownFields = []}
  parseMessage :: Parser Features'FeatureEntry
parseMessage
    = let
        loop ::
          Features'FeatureEntry
          -> Data.ProtoLens.Encoding.Bytes.Parser Features'FeatureEntry
        loop :: Features'FeatureEntry -> Parser Features'FeatureEntry
loop x :: Features'FeatureEntry
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]))))
                      Features'FeatureEntry -> Parser Features'FeatureEntry
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter
  Features'FeatureEntry Features'FeatureEntry FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> Features'FeatureEntry
-> Features'FeatureEntry
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
  Features'FeatureEntry Features'FeatureEntry FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) Features'FeatureEntry
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"
                                Features'FeatureEntry -> Parser Features'FeatureEntry
loop (Setter Features'FeatureEntry Features'FeatureEntry Text Text
-> Text -> Features'FeatureEntry -> Features'FeatureEntry
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 Features'FeatureEntry
x)
                        18
                          -> do Feature
y <- Parser Feature -> String -> Parser Feature
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser Feature -> Parser Feature
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 Feature
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                       "value"
                                Features'FeatureEntry -> Parser Features'FeatureEntry
loop (Setter Features'FeatureEntry Features'FeatureEntry Feature Feature
-> Feature -> Features'FeatureEntry -> Features'FeatureEntry
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") Feature
y Features'FeatureEntry
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                Features'FeatureEntry -> Parser Features'FeatureEntry
loop
                                  (Setter
  Features'FeatureEntry Features'FeatureEntry FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> Features'FeatureEntry
-> Features'FeatureEntry
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
  Features'FeatureEntry Features'FeatureEntry FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) Features'FeatureEntry
x)
      in
        Parser Features'FeatureEntry
-> String -> Parser Features'FeatureEntry
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do Features'FeatureEntry -> Parser Features'FeatureEntry
loop Features'FeatureEntry
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "FeatureEntry"
  buildMessage :: Features'FeatureEntry -> Builder
buildMessage
    = \ _x :: Features'FeatureEntry
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let _v :: Text
_v = FoldLike Text Features'FeatureEntry Features'FeatureEntry Text Text
-> Features'FeatureEntry -> 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") Features'FeatureEntry
_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 Feature)
  Features'FeatureEntry
  Features'FeatureEntry
  (Maybe Feature)
  (Maybe Feature)
-> Features'FeatureEntry -> Maybe Feature
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") Features'FeatureEntry
_x
                 of
                   Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
                   (Prelude.Just _v :: Feature
_v)
                     -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                          (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                          ((ByteString -> Builder)
-> (Feature -> ByteString) -> Feature -> 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))
                             Feature -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
                             Feature
_v))
                (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (FoldLike
  FieldSet
  Features'FeatureEntry
  Features'FeatureEntry
  FieldSet
  FieldSet
-> Features'FeatureEntry -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
  FieldSet
  Features'FeatureEntry
  Features'FeatureEntry
  FieldSet
  FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields Features'FeatureEntry
_x)))
instance Control.DeepSeq.NFData Features'FeatureEntry where
  rnf :: Features'FeatureEntry -> ()
rnf
    = \ x__ :: Features'FeatureEntry
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (Features'FeatureEntry -> FieldSet
_Features'FeatureEntry'_unknownFields Features'FeatureEntry
x__)
             (Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (Features'FeatureEntry -> Text
_Features'FeatureEntry'key Features'FeatureEntry
x__)
                (Maybe Feature -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (Features'FeatureEntry -> Maybe Feature
_Features'FeatureEntry'value Features'FeatureEntry
x__) ()))
{- | Fields :
     
         * 'Proto.Tensorflow.Core.Example.Feature_Fields.value' @:: Lens' FloatList [Prelude.Float]@
         * 'Proto.Tensorflow.Core.Example.Feature_Fields.vec'value' @:: Lens' FloatList (Data.Vector.Unboxed.Vector Prelude.Float)@ -}
data FloatList
  = FloatList'_constructor {FloatList -> Vector Float
_FloatList'value :: !(Data.Vector.Unboxed.Vector Prelude.Float),
                            FloatList -> FieldSet
_FloatList'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (FloatList -> FloatList -> Bool
(FloatList -> FloatList -> Bool)
-> (FloatList -> FloatList -> Bool) -> Eq FloatList
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FloatList -> FloatList -> Bool
$c/= :: FloatList -> FloatList -> Bool
== :: FloatList -> FloatList -> Bool
$c== :: FloatList -> FloatList -> Bool
Prelude.Eq, Eq FloatList
Eq FloatList =>
(FloatList -> FloatList -> Ordering)
-> (FloatList -> FloatList -> Bool)
-> (FloatList -> FloatList -> Bool)
-> (FloatList -> FloatList -> Bool)
-> (FloatList -> FloatList -> Bool)
-> (FloatList -> FloatList -> FloatList)
-> (FloatList -> FloatList -> FloatList)
-> Ord FloatList
FloatList -> FloatList -> Bool
FloatList -> FloatList -> Ordering
FloatList -> FloatList -> FloatList
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 :: FloatList -> FloatList -> FloatList
$cmin :: FloatList -> FloatList -> FloatList
max :: FloatList -> FloatList -> FloatList
$cmax :: FloatList -> FloatList -> FloatList
>= :: FloatList -> FloatList -> Bool
$c>= :: FloatList -> FloatList -> Bool
> :: FloatList -> FloatList -> Bool
$c> :: FloatList -> FloatList -> Bool
<= :: FloatList -> FloatList -> Bool
$c<= :: FloatList -> FloatList -> Bool
< :: FloatList -> FloatList -> Bool
$c< :: FloatList -> FloatList -> Bool
compare :: FloatList -> FloatList -> Ordering
$ccompare :: FloatList -> FloatList -> Ordering
$cp1Ord :: Eq FloatList
Prelude.Ord)
instance Prelude.Show FloatList where
  showsPrec :: Int -> FloatList -> ShowS
showsPrec _ __x :: FloatList
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (FloatList -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort FloatList
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField FloatList "value" [Prelude.Float] where
  fieldOf :: Proxy# "value"
-> ([Float] -> f [Float]) -> FloatList -> f FloatList
fieldOf _
    = ((Vector Float -> f (Vector Float)) -> FloatList -> f FloatList)
-> (([Float] -> f [Float]) -> Vector Float -> f (Vector Float))
-> ([Float] -> f [Float])
-> FloatList
-> f FloatList
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((FloatList -> Vector Float)
-> (FloatList -> Vector Float -> FloatList)
-> Lens FloatList FloatList (Vector Float) (Vector Float)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           FloatList -> Vector Float
_FloatList'value (\ x__ :: FloatList
x__ y__ :: Vector Float
y__ -> FloatList
x__ {_FloatList'value :: Vector Float
_FloatList'value = Vector Float
y__}))
        ((Vector Float -> [Float])
-> (Vector Float -> [Float] -> Vector Float)
-> Lens (Vector Float) (Vector Float) [Float] [Float]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Vector Float -> [Float]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
           (\ _ y__ :: [Float]
y__ -> [Float] -> Vector Float
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [Float]
y__))
instance Data.ProtoLens.Field.HasField FloatList "vec'value" (Data.Vector.Unboxed.Vector Prelude.Float) where
  fieldOf :: Proxy# "vec'value"
-> (Vector Float -> f (Vector Float)) -> FloatList -> f FloatList
fieldOf _
    = ((Vector Float -> f (Vector Float)) -> FloatList -> f FloatList)
-> ((Vector Float -> f (Vector Float))
    -> Vector Float -> f (Vector Float))
-> (Vector Float -> f (Vector Float))
-> FloatList
-> f FloatList
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((FloatList -> Vector Float)
-> (FloatList -> Vector Float -> FloatList)
-> Lens FloatList FloatList (Vector Float) (Vector Float)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           FloatList -> Vector Float
_FloatList'value (\ x__ :: FloatList
x__ y__ :: Vector Float
y__ -> FloatList
x__ {_FloatList'value :: Vector Float
_FloatList'value = Vector Float
y__}))
        (Vector Float -> f (Vector Float))
-> Vector Float -> f (Vector Float)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message FloatList where
  messageName :: Proxy FloatList -> Text
messageName _ = String -> Text
Data.Text.pack "tensorflow.FloatList"
  packedMessageDescriptor :: Proxy FloatList -> ByteString
packedMessageDescriptor _
    = "\n\
      \\tFloatList\DC2\CAN\n\
      \\ENQvalue\CAN\SOH \ETX(\STXR\ENQvalueB\STX\DLE\SOH"
  packedFileDescriptor :: Proxy FloatList -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor FloatList)
fieldsByTag
    = let
        value__field_descriptor :: FieldDescriptor FloatList
value__field_descriptor
          = String
-> FieldTypeDescriptor Float
-> FieldAccessor FloatList Float
-> FieldDescriptor FloatList
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "value"
              (ScalarField Float -> FieldTypeDescriptor Float
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Float
Data.ProtoLens.FloatField ::
                 Data.ProtoLens.FieldTypeDescriptor Prelude.Float)
              (Packing -> Lens' FloatList [Float] -> FieldAccessor FloatList Float
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
                 Packing
Data.ProtoLens.Packed (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 FloatList
      in
        [(Tag, FieldDescriptor FloatList)]
-> Map Tag (FieldDescriptor FloatList)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor FloatList
value__field_descriptor)]
  unknownFields :: LensLike' f FloatList FieldSet
unknownFields
    = (FloatList -> FieldSet)
-> (FloatList -> FieldSet -> FloatList) -> Lens' FloatList FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        FloatList -> FieldSet
_FloatList'_unknownFields
        (\ x__ :: FloatList
x__ y__ :: FieldSet
y__ -> FloatList
x__ {_FloatList'_unknownFields :: FieldSet
_FloatList'_unknownFields = FieldSet
y__})
  defMessage :: FloatList
defMessage
    = $WFloatList'_constructor :: Vector Float -> FieldSet -> FloatList
FloatList'_constructor
        {_FloatList'value :: Vector Float
_FloatList'value = Vector Float
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
         _FloatList'_unknownFields :: FieldSet
_FloatList'_unknownFields = []}
  parseMessage :: Parser FloatList
parseMessage
    = let
        loop ::
          FloatList
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Unboxed.Vector Data.ProtoLens.Encoding.Growing.RealWorld Prelude.Float
             -> Data.ProtoLens.Encoding.Bytes.Parser FloatList
        loop :: FloatList -> Growing Vector RealWorld Float -> Parser FloatList
loop x :: FloatList
x mutable'value :: Growing Vector RealWorld Float
mutable'value
          = do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
               if Bool
end then
                   do Vector Float
frozen'value <- IO (Vector Float) -> Parser (Vector Float)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                        (Growing Vector (PrimState IO) Float -> IO (Vector Float)
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 Float
Growing Vector (PrimState IO) Float
mutable'value)
                      (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]))))
                      FloatList -> Parser FloatList
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter FloatList FloatList FieldSet FieldSet
-> (FieldSet -> FieldSet) -> FloatList -> FloatList
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 FloatList FloatList FieldSet FieldSet
Data.ProtoLens.unknownFields
                           (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
                           (Setter FloatList FloatList (Vector Float) (Vector Float)
-> Vector Float -> FloatList -> FloatList
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
                              (forall s a (f :: * -> *).
(HasField s "vec'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 @"vec'value") Vector Float
frozen'value FloatList
x))
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        13
                          -> do !Float
y <- Parser Float -> String -> Parser Float
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                        ((Word32 -> Float) -> Parser Word32 -> Parser Float
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
                                           Word32 -> Float
Data.ProtoLens.Encoding.Bytes.wordToFloat
                                           Parser Word32
Data.ProtoLens.Encoding.Bytes.getFixed32)
                                        "value"
                                Growing Vector RealWorld Float
v <- IO (Growing Vector RealWorld Float)
-> Parser (Growing Vector RealWorld Float)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Growing Vector (PrimState IO) Float
-> Float -> IO (Growing Vector (PrimState IO) Float)
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 Float
Growing Vector (PrimState IO) Float
mutable'value Float
y)
                                FloatList -> Growing Vector RealWorld Float -> Parser FloatList
loop FloatList
x Growing Vector RealWorld Float
v
                        10
                          -> do Growing Vector RealWorld Float
y <- do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                        Int
-> Parser (Growing Vector RealWorld Float)
-> Parser (Growing Vector RealWorld Float)
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
                                          (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
                                          ((let
                                              ploop :: Growing v RealWorld Float -> Parser (Growing v RealWorld Float)
ploop qs :: Growing v RealWorld Float
qs
                                                = do Bool
packedEnd <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
                                                     if Bool
packedEnd then
                                                         Growing v RealWorld Float -> Parser (Growing v RealWorld Float)
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return Growing v RealWorld Float
qs
                                                     else
                                                         do !Float
q <- Parser Float -> String -> Parser Float
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                                                    ((Word32 -> Float) -> Parser Word32 -> Parser Float
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
                                                                       Word32 -> Float
Data.ProtoLens.Encoding.Bytes.wordToFloat
                                                                       Parser Word32
Data.ProtoLens.Encoding.Bytes.getFixed32)
                                                                    "value"
                                                            Growing v RealWorld Float
qs' <- IO (Growing v RealWorld Float)
-> Parser (Growing v RealWorld Float)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                                                     (Growing v (PrimState IO) Float
-> Float -> IO (Growing v (PrimState IO) Float)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
Growing v (PrimState m) a -> a -> m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.append
                                                                        Growing v RealWorld Float
Growing v (PrimState IO) Float
qs Float
q)
                                                            Growing v RealWorld Float -> Parser (Growing v RealWorld Float)
ploop Growing v RealWorld Float
qs'
                                            in forall (v :: * -> *).
Vector v Float =>
Growing v RealWorld Float -> Parser (Growing v RealWorld Float)
ploop)
                                             Growing Vector RealWorld Float
mutable'value)
                                FloatList -> Growing Vector RealWorld Float -> Parser FloatList
loop FloatList
x Growing Vector RealWorld Float
y
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                FloatList -> Growing Vector RealWorld Float -> Parser FloatList
loop
                                  (Setter FloatList FloatList FieldSet FieldSet
-> (FieldSet -> FieldSet) -> FloatList -> FloatList
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 FloatList FloatList FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) FloatList
x)
                                  Growing Vector RealWorld Float
mutable'value
      in
        Parser FloatList -> String -> Parser FloatList
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do Growing Vector RealWorld Float
mutable'value <- IO (Growing Vector RealWorld Float)
-> Parser (Growing Vector RealWorld Float)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                 IO (Growing Vector RealWorld Float)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
              FloatList -> Growing Vector RealWorld Float -> Parser FloatList
loop FloatList
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld Float
mutable'value)
          "FloatList"
  buildMessage :: FloatList -> Builder
buildMessage
    = \ _x :: FloatList
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let
                p :: Vector Float
p = FoldLike
  (Vector Float) FloatList FloatList (Vector Float) (Vector Float)
-> FloatList -> Vector Float
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "vec'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 @"vec'value") FloatList
_x
              in
                if Vector Float -> Bool
forall (v :: * -> *) a. Vector v a => v a -> Bool
Data.Vector.Generic.null Vector Float
p then
                    Builder
forall a. Monoid a => a
Data.Monoid.mempty
                else
                    Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                      (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((\ bs :: ByteString
bs
                          -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                               (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                  (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
                               (ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
                         (Builder -> ByteString
Data.ProtoLens.Encoding.Bytes.runBuilder
                            ((Float -> Builder) -> Vector Float -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                               ((Word32 -> Builder) -> (Float -> Word32) -> Float -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                                  Word32 -> Builder
Data.ProtoLens.Encoding.Bytes.putFixed32
                                  Float -> Word32
Data.ProtoLens.Encoding.Bytes.floatToWord)
                               Vector Float
p))))
             (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                (FoldLike FieldSet FloatList FloatList FieldSet FieldSet
-> FloatList -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet FloatList FloatList FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields FloatList
_x))
instance Control.DeepSeq.NFData FloatList where
  rnf :: FloatList -> ()
rnf
    = \ x__ :: FloatList
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (FloatList -> FieldSet
_FloatList'_unknownFields FloatList
x__)
             (Vector Float -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (FloatList -> Vector Float
_FloatList'value FloatList
x__) ())
{- | Fields :
     
         * 'Proto.Tensorflow.Core.Example.Feature_Fields.value' @:: Lens' Int64List [Data.Int.Int64]@
         * 'Proto.Tensorflow.Core.Example.Feature_Fields.vec'value' @:: Lens' Int64List (Data.Vector.Unboxed.Vector Data.Int.Int64)@ -}
data Int64List
  = Int64List'_constructor {Int64List -> Vector Int64
_Int64List'value :: !(Data.Vector.Unboxed.Vector Data.Int.Int64),
                            Int64List -> FieldSet
_Int64List'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (Int64List -> Int64List -> Bool
(Int64List -> Int64List -> Bool)
-> (Int64List -> Int64List -> Bool) -> Eq Int64List
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Int64List -> Int64List -> Bool
$c/= :: Int64List -> Int64List -> Bool
== :: Int64List -> Int64List -> Bool
$c== :: Int64List -> Int64List -> Bool
Prelude.Eq, Eq Int64List
Eq Int64List =>
(Int64List -> Int64List -> Ordering)
-> (Int64List -> Int64List -> Bool)
-> (Int64List -> Int64List -> Bool)
-> (Int64List -> Int64List -> Bool)
-> (Int64List -> Int64List -> Bool)
-> (Int64List -> Int64List -> Int64List)
-> (Int64List -> Int64List -> Int64List)
-> Ord Int64List
Int64List -> Int64List -> Bool
Int64List -> Int64List -> Ordering
Int64List -> Int64List -> Int64List
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 :: Int64List -> Int64List -> Int64List
$cmin :: Int64List -> Int64List -> Int64List
max :: Int64List -> Int64List -> Int64List
$cmax :: Int64List -> Int64List -> Int64List
>= :: Int64List -> Int64List -> Bool
$c>= :: Int64List -> Int64List -> Bool
> :: Int64List -> Int64List -> Bool
$c> :: Int64List -> Int64List -> Bool
<= :: Int64List -> Int64List -> Bool
$c<= :: Int64List -> Int64List -> Bool
< :: Int64List -> Int64List -> Bool
$c< :: Int64List -> Int64List -> Bool
compare :: Int64List -> Int64List -> Ordering
$ccompare :: Int64List -> Int64List -> Ordering
$cp1Ord :: Eq Int64List
Prelude.Ord)
instance Prelude.Show Int64List where
  showsPrec :: Int -> Int64List -> ShowS
showsPrec _ __x :: Int64List
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (Int64List -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort Int64List
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField Int64List "value" [Data.Int.Int64] where
  fieldOf :: Proxy# "value"
-> ([Int64] -> f [Int64]) -> Int64List -> f Int64List
fieldOf _
    = ((Vector Int64 -> f (Vector Int64)) -> Int64List -> f Int64List)
-> (([Int64] -> f [Int64]) -> Vector Int64 -> f (Vector Int64))
-> ([Int64] -> f [Int64])
-> Int64List
-> f Int64List
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Int64List -> Vector Int64)
-> (Int64List -> Vector Int64 -> Int64List)
-> Lens Int64List Int64List (Vector Int64) (Vector Int64)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Int64List -> Vector Int64
_Int64List'value (\ x__ :: Int64List
x__ y__ :: Vector Int64
y__ -> Int64List
x__ {_Int64List'value :: Vector Int64
_Int64List'value = Vector Int64
y__}))
        ((Vector Int64 -> [Int64])
-> (Vector Int64 -> [Int64] -> Vector Int64)
-> Lens (Vector Int64) (Vector Int64) [Int64] [Int64]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Vector Int64 -> [Int64]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
           (\ _ y__ :: [Int64]
y__ -> [Int64] -> Vector Int64
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [Int64]
y__))
instance Data.ProtoLens.Field.HasField Int64List "vec'value" (Data.Vector.Unboxed.Vector Data.Int.Int64) where
  fieldOf :: Proxy# "vec'value"
-> (Vector Int64 -> f (Vector Int64)) -> Int64List -> f Int64List
fieldOf _
    = ((Vector Int64 -> f (Vector Int64)) -> Int64List -> f Int64List)
-> ((Vector Int64 -> f (Vector Int64))
    -> Vector Int64 -> f (Vector Int64))
-> (Vector Int64 -> f (Vector Int64))
-> Int64List
-> f Int64List
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((Int64List -> Vector Int64)
-> (Int64List -> Vector Int64 -> Int64List)
-> Lens Int64List Int64List (Vector Int64) (Vector Int64)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Int64List -> Vector Int64
_Int64List'value (\ x__ :: Int64List
x__ y__ :: Vector Int64
y__ -> Int64List
x__ {_Int64List'value :: Vector Int64
_Int64List'value = Vector Int64
y__}))
        (Vector Int64 -> f (Vector Int64))
-> Vector Int64 -> f (Vector Int64)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message Int64List where
  messageName :: Proxy Int64List -> Text
messageName _ = String -> Text
Data.Text.pack "tensorflow.Int64List"
  packedMessageDescriptor :: Proxy Int64List -> ByteString
packedMessageDescriptor _
    = "\n\
      \\tInt64List\DC2\CAN\n\
      \\ENQvalue\CAN\SOH \ETX(\ETXR\ENQvalueB\STX\DLE\SOH"
  packedFileDescriptor :: Proxy Int64List -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor Int64List)
fieldsByTag
    = let
        value__field_descriptor :: FieldDescriptor Int64List
value__field_descriptor
          = String
-> FieldTypeDescriptor Int64
-> FieldAccessor Int64List Int64
-> FieldDescriptor Int64List
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "value"
              (ScalarField Int64 -> FieldTypeDescriptor Int64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Int64
Data.ProtoLens.Int64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
              (Packing -> Lens' Int64List [Int64] -> FieldAccessor Int64List Int64
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
                 Packing
Data.ProtoLens.Packed (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 Int64List
      in
        [(Tag, FieldDescriptor Int64List)]
-> Map Tag (FieldDescriptor Int64List)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor Int64List
value__field_descriptor)]
  unknownFields :: LensLike' f Int64List FieldSet
unknownFields
    = (Int64List -> FieldSet)
-> (Int64List -> FieldSet -> Int64List) -> Lens' Int64List FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        Int64List -> FieldSet
_Int64List'_unknownFields
        (\ x__ :: Int64List
x__ y__ :: FieldSet
y__ -> Int64List
x__ {_Int64List'_unknownFields :: FieldSet
_Int64List'_unknownFields = FieldSet
y__})
  defMessage :: Int64List
defMessage
    = $WInt64List'_constructor :: Vector Int64 -> FieldSet -> Int64List
Int64List'_constructor
        {_Int64List'value :: Vector Int64
_Int64List'value = Vector Int64
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
         _Int64List'_unknownFields :: FieldSet
_Int64List'_unknownFields = []}
  parseMessage :: Parser Int64List
parseMessage
    = let
        loop ::
          Int64List
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Unboxed.Vector Data.ProtoLens.Encoding.Growing.RealWorld Data.Int.Int64
             -> Data.ProtoLens.Encoding.Bytes.Parser Int64List
        loop :: Int64List -> Growing Vector RealWorld Int64 -> Parser Int64List
loop x :: Int64List
x mutable'value :: Growing Vector RealWorld Int64
mutable'value
          = do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
               if Bool
end then
                   do Vector Int64
frozen'value <- IO (Vector Int64) -> Parser (Vector Int64)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                        (Growing Vector (PrimState IO) Int64 -> IO (Vector Int64)
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 Int64
Growing Vector (PrimState IO) Int64
mutable'value)
                      (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]))))
                      Int64List -> Parser Int64List
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter Int64List Int64List FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Int64List -> Int64List
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 Int64List Int64List FieldSet FieldSet
Data.ProtoLens.unknownFields
                           (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
                           (Setter Int64List Int64List (Vector Int64) (Vector Int64)
-> Vector Int64 -> Int64List -> Int64List
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
                              (forall s a (f :: * -> *).
(HasField s "vec'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 @"vec'value") Vector Int64
frozen'value Int64List
x))
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        8 -> do !Int64
y <- Parser Int64 -> String -> Parser Int64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                        ((Word64 -> Int64) -> Parser Word64 -> Parser Int64
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
                                           Word64 -> Int64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
                                           Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
                                        "value"
                                Growing Vector RealWorld Int64
v <- IO (Growing Vector RealWorld Int64)
-> Parser (Growing Vector RealWorld Int64)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Growing Vector (PrimState IO) Int64
-> Int64 -> IO (Growing Vector (PrimState IO) Int64)
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 Int64
Growing Vector (PrimState IO) Int64
mutable'value Int64
y)
                                Int64List -> Growing Vector RealWorld Int64 -> Parser Int64List
loop Int64List
x Growing Vector RealWorld Int64
v
                        10
                          -> do Growing Vector RealWorld Int64
y <- do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                        Int
-> Parser (Growing Vector RealWorld Int64)
-> Parser (Growing Vector RealWorld Int64)
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
                                          (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
                                          ((let
                                              ploop :: Growing v RealWorld a -> Parser (Growing v RealWorld a)
ploop qs :: Growing v RealWorld a
qs
                                                = do Bool
packedEnd <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
                                                     if Bool
packedEnd then
                                                         Growing v RealWorld a -> Parser (Growing v RealWorld a)
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return Growing v RealWorld a
qs
                                                     else
                                                         do !a
q <- Parser a -> String -> Parser a
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                                                    ((Word64 -> a) -> Parser Word64 -> Parser a
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
                                                                       Word64 -> a
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
                                                                       Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt)
                                                                    "value"
                                                            Growing v RealWorld a
qs' <- IO (Growing v RealWorld a) -> Parser (Growing v RealWorld a)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                                                     (Growing v (PrimState IO) a -> a -> IO (Growing v (PrimState IO) a)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
Growing v (PrimState m) a -> a -> m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.append
                                                                        Growing v RealWorld a
Growing v (PrimState IO) a
qs a
q)
                                                            Growing v RealWorld a -> Parser (Growing v RealWorld a)
ploop Growing v RealWorld a
qs'
                                            in forall a (v :: * -> *).
(Num a, Vector v a) =>
Growing v RealWorld a -> Parser (Growing v RealWorld a)
ploop)
                                             Growing Vector RealWorld Int64
mutable'value)
                                Int64List -> Growing Vector RealWorld Int64 -> Parser Int64List
loop Int64List
x Growing Vector RealWorld Int64
y
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                Int64List -> Growing Vector RealWorld Int64 -> Parser Int64List
loop
                                  (Setter Int64List Int64List FieldSet FieldSet
-> (FieldSet -> FieldSet) -> Int64List -> Int64List
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 Int64List Int64List FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) Int64List
x)
                                  Growing Vector RealWorld Int64
mutable'value
      in
        Parser Int64List -> String -> Parser Int64List
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do Growing Vector RealWorld Int64
mutable'value <- IO (Growing Vector RealWorld Int64)
-> Parser (Growing Vector RealWorld Int64)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                 IO (Growing Vector RealWorld Int64)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
              Int64List -> Growing Vector RealWorld Int64 -> Parser Int64List
loop Int64List
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld Int64
mutable'value)
          "Int64List"
  buildMessage :: Int64List -> Builder
buildMessage
    = \ _x :: Int64List
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let
                p :: Vector Int64
p = FoldLike
  (Vector Int64) Int64List Int64List (Vector Int64) (Vector Int64)
-> Int64List -> Vector Int64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "vec'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 @"vec'value") Int64List
_x
              in
                if Vector Int64 -> Bool
forall (v :: * -> *) a. Vector v a => v a -> Bool
Data.Vector.Generic.null Vector Int64
p then
                    Builder
forall a. Monoid a => a
Data.Monoid.mempty
                else
                    Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                      (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((\ bs :: ByteString
bs
                          -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                               (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                  (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
                               (ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
                         (Builder -> ByteString
Data.ProtoLens.Encoding.Bytes.runBuilder
                            ((Int64 -> Builder) -> Vector Int64 -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                               ((Word64 -> Builder) -> (Int64 -> Word64) -> Int64 -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                                  Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Int64 -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral)
                               Vector Int64
p))))
             (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                (FoldLike FieldSet Int64List Int64List FieldSet FieldSet
-> Int64List -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike FieldSet Int64List Int64List FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields Int64List
_x))
instance Control.DeepSeq.NFData Int64List where
  rnf :: Int64List -> ()
rnf
    = \ x__ :: Int64List
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (Int64List -> FieldSet
_Int64List'_unknownFields Int64List
x__)
             (Vector Int64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq (Int64List -> Vector Int64
_Int64List'value Int64List
x__) ())
packedFileDescriptor :: Data.ByteString.ByteString
packedFileDescriptor :: ByteString
packedFileDescriptor
  = "\n\
    \%tensorflow/core/example/feature.proto\DC2\n\
    \tensorflow\"!\n\
    \\tBytesList\DC2\DC4\n\
    \\ENQvalue\CAN\SOH \ETX(\fR\ENQvalue\"%\n\
    \\tFloatList\DC2\CAN\n\
    \\ENQvalue\CAN\SOH \ETX(\STXR\ENQvalueB\STX\DLE\SOH\"%\n\
    \\tInt64List\DC2\CAN\n\
    \\ENQvalue\CAN\SOH \ETX(\ETXR\ENQvalueB\STX\DLE\SOH\"\185\SOH\n\
    \\aFeature\DC26\n\
    \\n\
    \bytes_list\CAN\SOH \SOH(\v2\NAK.tensorflow.BytesListH\NULR\tbytesList\DC26\n\
    \\n\
    \float_list\CAN\STX \SOH(\v2\NAK.tensorflow.FloatListH\NULR\tfloatList\DC26\n\
    \\n\
    \int64_list\CAN\ETX \SOH(\v2\NAK.tensorflow.Int64ListH\NULR\tint64ListB\ACK\n\
    \\EOTkind\"\152\SOH\n\
    \\bFeatures\DC2;\n\
    \\afeature\CAN\SOH \ETX(\v2!.tensorflow.Features.FeatureEntryR\afeature\SUBO\n\
    \\fFeatureEntry\DC2\DLE\n\
    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2)\n\
    \\ENQvalue\CAN\STX \SOH(\v2\DC3.tensorflow.FeatureR\ENQvalue:\STX8\SOH\"<\n\
    \\vFeatureList\DC2-\n\
    \\afeature\CAN\SOH \ETX(\v2\DC3.tensorflow.FeatureR\afeature\"\181\SOH\n\
    \\fFeatureLists\DC2L\n\
    \\ffeature_list\CAN\SOH \ETX(\v2).tensorflow.FeatureLists.FeatureListEntryR\vfeatureList\SUBW\n\
    \\DLEFeatureListEntry\DC2\DLE\n\
    \\ETXkey\CAN\SOH \SOH(\tR\ETXkey\DC2-\n\
    \\ENQvalue\CAN\STX \SOH(\v2\ETB.tensorflow.FeatureListR\ENQvalue:\STX8\SOHB\129\SOH\n\
    \\SYNorg.tensorflow.exampleB\rFeatureProtosP\SOHZSgithub.com/tensorflow/tensorflow/tensorflow/go/core/example/example_protos_go_proto\248\SOH\SOHJ\214\DC3\n\
    \\ACK\DC2\EOT7\NULj\SOH\n\
    \\225\b\n\
    \\SOH\f\DC2\ETX7\NUL\DC22\214\b Protocol messages for describing features for machine learning model\n\
    \ training or inference.\n\
    \\n\
    \ There are three base Feature types:\n\
    \   - bytes\n\
    \   - float\n\
    \   - int64\n\
    \\n\
    \ A Feature contains Lists which may hold zero or more values.  These\n\
    \ lists are the base values BytesList, FloatList, Int64List.\n\
    \\n\
    \ Features are organized into categories by name.  The Features message\n\
    \ contains the mapping from name to Feature.\n\
    \\n\
    \ Example Features for a movie recommendation application:\n\
    \   feature {\n\
    \     key: \"age\"\n\
    \     value { float_list {\n\
    \       value: 29.0\n\
    \     }}\n\
    \   }\n\
    \   feature {\n\
    \     key: \"movie\"\n\
    \     value { bytes_list {\n\
    \       value: \"The Shawshank Redemption\"\n\
    \       value: \"Fight Club\"\n\
    \     }}\n\
    \   }\n\
    \   feature {\n\
    \     key: \"movie_ratings\"\n\
    \     value { float_list {\n\
    \       value: 9.0\n\
    \       value: 9.7\n\
    \     }}\n\
    \   }\n\
    \   feature {\n\
    \     key: \"suggestion\"\n\
    \     value { bytes_list {\n\
    \       value: \"Inception\"\n\
    \     }}\n\
    \   }\n\
    \   feature {\n\
    \     key: \"suggestion_purchased\"\n\
    \     value { int64_list {\n\
    \       value: 1\n\
    \     }}\n\
    \   }\n\
    \   feature {\n\
    \     key: \"purchase_price\"\n\
    \     value { float_list {\n\
    \       value: 9.99\n\
    \     }}\n\
    \   }\n\
    \\n\
    \\n\
    \\b\n\
    \\SOH\STX\DC2\ETX9\NUL\DC3\n\
    \\b\n\
    \\SOH\b\DC2\ETX;\NUL\US\n\
    \\t\n\
    \\STX\b\US\DC2\ETX;\NUL\US\n\
    \\b\n\
    \\SOH\b\DC2\ETX<\NUL.\n\
    \\t\n\
    \\STX\b\b\DC2\ETX<\NUL.\n\
    \\b\n\
    \\SOH\b\DC2\ETX=\NUL\"\n\
    \\t\n\
    \\STX\b\n\
    \\DC2\ETX=\NUL\"\n\
    \\b\n\
    \\SOH\b\DC2\ETX>\NUL/\n\
    \\t\n\
    \\STX\b\SOH\DC2\ETX>\NUL/\n\
    \\b\n\
    \\SOH\b\DC2\ETX?\NULj\n\
    \\t\n\
    \\STX\b\v\DC2\ETX?\NULj\n\
    \=\n\
    \\STX\EOT\NUL\DC2\EOTB\NULD\SOH\SUB1 Containers to hold repeated fundamental values.\n\
    \\n\
    \\n\
    \\n\
    \\ETX\EOT\NUL\SOH\DC2\ETXB\b\DC1\n\
    \\v\n\
    \\EOT\EOT\NUL\STX\NUL\DC2\ETXC\STX\ESC\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\EOT\DC2\ETXC\STX\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\ENQ\DC2\ETXC\v\DLE\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETXC\DC1\SYN\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETXC\EM\SUB\n\
    \\n\
    \\n\
    \\STX\EOT\SOH\DC2\EOTE\NULG\SOH\n\
    \\n\
    \\n\
    \\ETX\EOT\SOH\SOH\DC2\ETXE\b\DC1\n\
    \\v\n\
    \\EOT\EOT\SOH\STX\NUL\DC2\ETXF\STX+\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\NUL\EOT\DC2\ETXF\STX\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\NUL\ENQ\DC2\ETXF\v\DLE\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\NUL\SOH\DC2\ETXF\DC1\SYN\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\NUL\ETX\DC2\ETXF\EM\SUB\n\
    \\f\n\
    \\ENQ\EOT\SOH\STX\NUL\b\DC2\ETXF\ESC*\n\
    \\r\n\
    \\ACK\EOT\SOH\STX\NUL\b\STX\DC2\ETXF\FS)\n\
    \\n\
    \\n\
    \\STX\EOT\STX\DC2\EOTH\NULJ\SOH\n\
    \\n\
    \\n\
    \\ETX\EOT\STX\SOH\DC2\ETXH\b\DC1\n\
    \\v\n\
    \\EOT\EOT\STX\STX\NUL\DC2\ETXI\STX+\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\NUL\EOT\DC2\ETXI\STX\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\NUL\ENQ\DC2\ETXI\v\DLE\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\NUL\SOH\DC2\ETXI\DC1\SYN\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\NUL\ETX\DC2\ETXI\EM\SUB\n\
    \\f\n\
    \\ENQ\EOT\STX\STX\NUL\b\DC2\ETXI\ESC*\n\
    \\r\n\
    \\ACK\EOT\STX\STX\NUL\b\STX\DC2\ETXI\FS)\n\
    \1\n\
    \\STX\EOT\ETX\DC2\EOTM\NULT\SOH\SUB% Containers for non-sequential data.\n\
    \\n\
    \\n\
    \\n\
    \\ETX\EOT\ETX\SOH\DC2\ETXM\b\SI\n\
    \5\n\
    \\EOT\EOT\ETX\b\NUL\DC2\EOTO\STXS\ETX\SUB' Each feature can be exactly one kind.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\ETX\b\NUL\SOH\DC2\ETXO\b\f\n\
    \\v\n\
    \\EOT\EOT\ETX\STX\NUL\DC2\ETXP\EOT\GS\n\
    \\f\n\
    \\ENQ\EOT\ETX\STX\NUL\ACK\DC2\ETXP\EOT\r\n\
    \\f\n\
    \\ENQ\EOT\ETX\STX\NUL\SOH\DC2\ETXP\SO\CAN\n\
    \\f\n\
    \\ENQ\EOT\ETX\STX\NUL\ETX\DC2\ETXP\ESC\FS\n\
    \\v\n\
    \\EOT\EOT\ETX\STX\SOH\DC2\ETXQ\EOT\GS\n\
    \\f\n\
    \\ENQ\EOT\ETX\STX\SOH\ACK\DC2\ETXQ\EOT\r\n\
    \\f\n\
    \\ENQ\EOT\ETX\STX\SOH\SOH\DC2\ETXQ\SO\CAN\n\
    \\f\n\
    \\ENQ\EOT\ETX\STX\SOH\ETX\DC2\ETXQ\ESC\FS\n\
    \\v\n\
    \\EOT\EOT\ETX\STX\STX\DC2\ETXR\EOT\GS\n\
    \\f\n\
    \\ENQ\EOT\ETX\STX\STX\ACK\DC2\ETXR\EOT\r\n\
    \\f\n\
    \\ENQ\EOT\ETX\STX\STX\SOH\DC2\ETXR\SO\CAN\n\
    \\f\n\
    \\ENQ\EOT\ETX\STX\STX\ETX\DC2\ETXR\ESC\FS\n\
    \\n\
    \\n\
    \\STX\EOT\EOT\DC2\EOTV\NULY\SOH\n\
    \\n\
    \\n\
    \\ETX\EOT\EOT\SOH\DC2\ETXV\b\DLE\n\
    \0\n\
    \\EOT\EOT\EOT\STX\NUL\DC2\ETXX\STX#\SUB# Map from feature name to feature.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\EOT\STX\NUL\ACK\DC2\ETXX\STX\SYN\n\
    \\f\n\
    \\ENQ\EOT\EOT\STX\NUL\SOH\DC2\ETXX\ETB\RS\n\
    \\f\n\
    \\ENQ\EOT\EOT\STX\NUL\ETX\DC2\ETXX!\"\n\
    \\137\STX\n\
    \\STX\EOT\ENQ\DC2\EOTc\NULe\SOH\SUB\252\SOH Containers for sequential data.\n\
    \\n\
    \ A FeatureList contains lists of Features.  These may hold zero or more\n\
    \ Feature values.\n\
    \\n\
    \ FeatureLists are organized into categories by name.  The FeatureLists message\n\
    \ contains the mapping from name to FeatureList.\n\
    \\n\
    \\n\
    \\n\
    \\n\
    \\ETX\EOT\ENQ\SOH\DC2\ETXc\b\DC3\n\
    \\v\n\
    \\EOT\EOT\ENQ\STX\NUL\DC2\ETXd\STX\US\n\
    \\f\n\
    \\ENQ\EOT\ENQ\STX\NUL\EOT\DC2\ETXd\STX\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\ENQ\STX\NUL\ACK\DC2\ETXd\v\DC2\n\
    \\f\n\
    \\ENQ\EOT\ENQ\STX\NUL\SOH\DC2\ETXd\DC3\SUB\n\
    \\f\n\
    \\ENQ\EOT\ENQ\STX\NUL\ETX\DC2\ETXd\GS\RS\n\
    \\n\
    \\n\
    \\STX\EOT\ACK\DC2\EOTg\NULj\SOH\n\
    \\n\
    \\n\
    \\ETX\EOT\ACK\SOH\DC2\ETXg\b\DC4\n\
    \5\n\
    \\EOT\EOT\ACK\STX\NUL\DC2\ETXi\STX,\SUB( Map from feature name to feature list.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\ACK\STX\NUL\ACK\DC2\ETXi\STX\SUB\n\
    \\f\n\
    \\ENQ\EOT\ACK\STX\NUL\SOH\DC2\ETXi\ESC'\n\
    \\f\n\
    \\ENQ\EOT\ACK\STX\NUL\ETX\DC2\ETXi*+b\ACKproto3"