content: {-# LANGUAGE BangPatterns, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-}
  module MachineLearning.Protobufs.TrainingRow (TrainingRow(..)) where
  import Prelude ((+), (/))
  import qualified Prelude as Prelude'
  import qualified Data.Typeable as Prelude'
  import qualified Data.Data as Prelude'
  import qualified Text.ProtocolBuffers.Header as P'
  import qualified MachineLearning.Protobufs.DataSourceConfig as Protobufs (DataSourceConfig)
  import qualified MachineLearning.Protobufs.Forest as Protobufs (Forest)
  import qualified MachineLearning.Protobufs.ForestConfig as Protobufs (ForestConfig)
  import qualified MachineLearning.Protobufs.TrainingResults as Protobufs (TrainingResults)
  import qualified MachineLearning.Protobufs.TrainingStatus as Protobufs (TrainingStatus)
   
  data TrainingRow = TrainingRow{forestConfig :: !(P'.Maybe Protobufs.ForestConfig), forest :: !(P'.Maybe Protobufs.Forest),
                                 dataSourceConfig :: !(P'.Maybe Protobufs.DataSourceConfig),
                                 trainingStatus :: !(P'.Maybe Protobufs.TrainingStatus),
                                 trainingResults :: !(P'.Maybe Protobufs.TrainingResults)}
                   deriving (Prelude'.Show, Prelude'.Eq, Prelude'.Ord, Prelude'.Typeable, Prelude'.Data)
   
  instance P'.Mergeable TrainingRow where
    mergeAppend (TrainingRow x'1 x'2 x'3 x'4 x'5) (TrainingRow y'1 y'2 y'3 y'4 y'5)
     = TrainingRow (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3) (P'.mergeAppend x'4 y'4)
        (P'.mergeAppend x'5 y'5)
   
  instance P'.Default TrainingRow where
    defaultValue = TrainingRow P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue P'.defaultValue
   
  instance P'.Wire TrainingRow where
    wireSize ft' self'@(TrainingRow x'1 x'2 x'3 x'4 x'5)
     = case ft' of
         10 -> calc'Size
         11 -> P'.prependMessageSize calc'Size
         _ -> P'.wireSizeErr ft' self'
      where
          calc'Size
           = (P'.wireSizeOpt 1 11 x'1 + P'.wireSizeOpt 1 11 x'2 + P'.wireSizeOpt 1 11 x'3 + P'.wireSizeOpt 1 14 x'4 +
               P'.wireSizeOpt 1 11 x'5)
    wirePut ft' self'@(TrainingRow x'1 x'2 x'3 x'4 x'5)
     = case ft' of
         10 -> put'Fields
         11 -> do
                 P'.putSize (P'.wireSize 10 self')
                 put'Fields
         _ -> P'.wirePutErr ft' self'
      where
          put'Fields
           = do
               P'.wirePutOpt 10 11 x'1
               P'.wirePutOpt 18 11 x'2
               P'.wirePutOpt 26 11 x'3
               P'.wirePutOpt 32 14 x'4
               P'.wirePutOpt 42 11 x'5
    wireGet ft'
     = case ft' of
         10 -> P'.getBareMessageWith update'Self
         11 -> P'.getMessageWith update'Self
         _ -> P'.wireGetErr ft'
      where
          update'Self wire'Tag old'Self
           = case wire'Tag of
               10 -> Prelude'.fmap
                      (\ !new'Field -> old'Self{forestConfig = P'.mergeAppend (forestConfig old'Self) (Prelude'.Just new'Field)})
                      (P'.wireGet 11)
               18 -> Prelude'.fmap (\ !new'Field -> old'Self{forest = P'.mergeAppend (forest old'Self) (Prelude'.Just new'Field)})
                      (P'.wireGet 11)
               26 -> Prelude'.fmap
                      (\ !new'Field ->
                        old'Self{dataSourceConfig = P'.mergeAppend (dataSourceConfig old'Self) (Prelude'.Just new'Field)})
                      (P'.wireGet 11)
               32 -> Prelude'.fmap (\ !new'Field -> old'Self{trainingStatus = Prelude'.Just new'Field}) (P'.wireGet 14)
               42 -> Prelude'.fmap
                      (\ !new'Field ->
                        old'Self{trainingResults = P'.mergeAppend (trainingResults old'Self) (Prelude'.Just new'Field)})
                      (P'.wireGet 11)
               _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in P'.unknown field'Number wire'Type old'Self
   
  instance P'.MessageAPI msg' (msg' -> TrainingRow) TrainingRow where
    getVal m' f' = f' m'
   
  instance P'.GPB TrainingRow
   
  instance P'.ReflectDescriptor TrainingRow where
    getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList []) (P'.fromDistinctAscList [10, 18, 26, 32, 42])
    reflectDescriptorInfo _
     = Prelude'.read
        "DescriptorInfo {descName = ProtoName {protobufName = FIName \".protobufs.TrainingRow\", haskellPrefix = [MName \"MachineLearning\"], parentModule = [MName \"Protobufs\"], baseName = MName \"TrainingRow\"}, descFilePath = [\"MachineLearning\",\"Protobufs\",\"TrainingRow.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".protobufs.TrainingRow.forestConfig\", haskellPrefix' = [MName \"MachineLearning\"], parentModule' = [MName \"Protobufs\",MName \"TrainingRow\"], baseName' = FName \"forestConfig\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 10}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".protobufs.ForestConfig\", haskellPrefix = [MName \"MachineLearning\"], parentModule = [MName \"Protobufs\"], baseName = MName \"ForestConfig\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".protobufs.TrainingRow.forest\", haskellPrefix' = [MName \"MachineLearning\"], parentModule' = [MName \"Protobufs\",MName \"TrainingRow\"], baseName' = FName \"forest\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 18}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".protobufs.Forest\", haskellPrefix = [MName \"MachineLearning\"], parentModule = [MName \"Protobufs\"], baseName = MName \"Forest\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".protobufs.TrainingRow.dataSourceConfig\", haskellPrefix' = [MName \"MachineLearning\"], parentModule' = [MName \"Protobufs\",MName \"TrainingRow\"], baseName' = FName \"dataSourceConfig\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 26}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".protobufs.DataSourceConfig\", haskellPrefix = [MName \"MachineLearning\"], parentModule = [MName \"Protobufs\"], baseName = MName \"DataSourceConfig\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".protobufs.TrainingRow.trainingStatus\", haskellPrefix' = [MName \"MachineLearning\"], parentModule' = [MName \"Protobufs\",MName \"TrainingRow\"], baseName' = FName \"trainingStatus\"}, fieldNumber = FieldId {getFieldId = 4}, wireTag = WireTag {getWireTag = 32}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 14}, typeName = Just (ProtoName {protobufName = FIName \".protobufs.TrainingStatus\", haskellPrefix = [MName \"MachineLearning\"], parentModule = [MName \"Protobufs\"], baseName = MName \"TrainingStatus\"}), hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".protobufs.TrainingRow.trainingResults\", haskellPrefix' = [MName \"MachineLearning\"], parentModule' = [MName \"Protobufs\",MName \"TrainingRow\"], baseName' = FName \"trainingResults\"}, fieldNumber = FieldId {getFieldId = 5}, wireTag = WireTag {getWireTag = 42}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 11}, typeName = Just (ProtoName {protobufName = FIName \".protobufs.TrainingResults\", haskellPrefix = [MName \"MachineLearning\"], parentModule = [MName \"Protobufs\"], baseName = MName \"TrainingResults\"}), hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False, lazyFields = False}"