content: {-# LANGUAGE BangPatterns, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-}
  module MachineLearning.Protobufs.StochasticityConfig (StochasticityConfig(..)) 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'
   
  data StochasticityConfig = StochasticityConfig{perRoundSamplingRate :: !(P'.Maybe P'.Double),
                                                 exampleBoostrapProportion :: !(P'.Maybe P'.Double),
                                                 featureSampleSize :: !(P'.Maybe P'.Int64)}
                           deriving (Prelude'.Show, Prelude'.Eq, Prelude'.Ord, Prelude'.Typeable, Prelude'.Data)
   
  instance P'.Mergeable StochasticityConfig where
    mergeAppend (StochasticityConfig x'1 x'2 x'3) (StochasticityConfig y'1 y'2 y'3)
     = StochasticityConfig (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2) (P'.mergeAppend x'3 y'3)
   
  instance P'.Default StochasticityConfig where
    defaultValue = StochasticityConfig P'.defaultValue P'.defaultValue P'.defaultValue
   
  instance P'.Wire StochasticityConfig where
    wireSize ft' self'@(StochasticityConfig x'1 x'2 x'3)
     = case ft' of
         10 -> calc'Size
         11 -> P'.prependMessageSize calc'Size
         _ -> P'.wireSizeErr ft' self'
      where
          calc'Size = (P'.wireSizeOpt 1 1 x'1 + P'.wireSizeOpt 1 1 x'2 + P'.wireSizeOpt 1 3 x'3)
    wirePut ft' self'@(StochasticityConfig x'1 x'2 x'3)
     = 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 9 1 x'1
               P'.wirePutOpt 17 1 x'2
               P'.wirePutOpt 24 3 x'3
    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
               9 -> Prelude'.fmap (\ !new'Field -> old'Self{perRoundSamplingRate = Prelude'.Just new'Field}) (P'.wireGet 1)
               17 -> Prelude'.fmap (\ !new'Field -> old'Self{exampleBoostrapProportion = Prelude'.Just new'Field}) (P'.wireGet 1)
               24 -> Prelude'.fmap (\ !new'Field -> old'Self{featureSampleSize = Prelude'.Just new'Field}) (P'.wireGet 3)
               _ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in P'.unknown field'Number wire'Type old'Self
   
  instance P'.MessageAPI msg' (msg' -> StochasticityConfig) StochasticityConfig where
    getVal m' f' = f' m'
   
  instance P'.GPB StochasticityConfig
   
  instance P'.ReflectDescriptor StochasticityConfig where
    getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList []) (P'.fromDistinctAscList [9, 17, 24])
    reflectDescriptorInfo _
     = Prelude'.read
        "DescriptorInfo {descName = ProtoName {protobufName = FIName \".protobufs.StochasticityConfig\", haskellPrefix = [MName \"MachineLearning\"], parentModule = [MName \"Protobufs\"], baseName = MName \"StochasticityConfig\"}, descFilePath = [\"MachineLearning\",\"Protobufs\",\"StochasticityConfig.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".protobufs.StochasticityConfig.perRoundSamplingRate\", haskellPrefix' = [MName \"MachineLearning\"], parentModule' = [MName \"Protobufs\",MName \"StochasticityConfig\"], baseName' = FName \"perRoundSamplingRate\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 9}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 1}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".protobufs.StochasticityConfig.exampleBoostrapProportion\", haskellPrefix' = [MName \"MachineLearning\"], parentModule' = [MName \"Protobufs\",MName \"StochasticityConfig\"], baseName' = FName \"exampleBoostrapProportion\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 17}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 1}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".protobufs.StochasticityConfig.featureSampleSize\", haskellPrefix' = [MName \"MachineLearning\"], parentModule' = [MName \"Protobufs\",MName \"StochasticityConfig\"], baseName' = FName \"featureSampleSize\"}, fieldNumber = FieldId {getFieldId = 3}, wireTag = WireTag {getWireTag = 24}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 3}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False, lazyFields = False}"