All Downloads are FREE. Search and download functionalities are using the official Maven repository.

xyz.stratalab.sdk.models.DatumValidator.scala Maven / Gradle / Ivy

The newest version!
package xyz.stratalab.sdk.models

object DatumValidator extends scalapb.validate.Validator[xyz.stratalab.sdk.models.Datum] {
  def validate(input: xyz.stratalab.sdk.models.Datum): scalapb.validate.Result =
    scalapb.validate.Result.optional(input.value.eon) { _value =>
      xyz.stratalab.sdk.models.DatumValidator.EonValidator.validate(_value)
    } &&
    scalapb.validate.Result.optional(input.value.era) { _value =>
      xyz.stratalab.sdk.models.DatumValidator.EraValidator.validate(_value)
    } &&
    scalapb.validate.Result.optional(input.value.epoch) { _value =>
      xyz.stratalab.sdk.models.DatumValidator.EpochValidator.validate(_value)
    } &&
    scalapb.validate.Result.optional(input.value.header) { _value =>
      xyz.stratalab.sdk.models.DatumValidator.HeaderValidator.validate(_value)
    } &&
    scalapb.validate.Result.optional(input.value.ioTransaction) { _value =>
      xyz.stratalab.sdk.models.DatumValidator.IoTransactionValidator.validate(_value)
    } &&
    scalapb.validate.Result.optional(input.value.groupPolicy) { _value =>
      xyz.stratalab.sdk.models.DatumValidator.GroupPolicyValidator.validate(_value)
    } &&
    scalapb.validate.Result.optional(input.value.seriesPolicy) { _value =>
      xyz.stratalab.sdk.models.DatumValidator.SeriesPolicyValidator.validate(_value)
    }
  
  object EonValidator extends scalapb.validate.Validator[xyz.stratalab.sdk.models.Datum.Eon] {
    def validate(input: xyz.stratalab.sdk.models.Datum.Eon): scalapb.validate.Result =
      xyz.stratalab.sdk.models.EventValidator.EonValidator.validate(input.event)
    
  }
  object EraValidator extends scalapb.validate.Validator[xyz.stratalab.sdk.models.Datum.Era] {
    def validate(input: xyz.stratalab.sdk.models.Datum.Era): scalapb.validate.Result =
      xyz.stratalab.sdk.models.EventValidator.EraValidator.validate(input.event)
    
  }
  object EpochValidator extends scalapb.validate.Validator[xyz.stratalab.sdk.models.Datum.Epoch] {
    def validate(input: xyz.stratalab.sdk.models.Datum.Epoch): scalapb.validate.Result =
      xyz.stratalab.sdk.models.EventValidator.EpochValidator.validate(input.event)
    
  }
  object HeaderValidator extends scalapb.validate.Validator[xyz.stratalab.sdk.models.Datum.Header] {
    def validate(input: xyz.stratalab.sdk.models.Datum.Header): scalapb.validate.Result =
      xyz.stratalab.sdk.models.EventValidator.HeaderValidator.validate(input.event)
    
  }
  object IoTransactionValidator extends scalapb.validate.Validator[xyz.stratalab.sdk.models.Datum.IoTransaction] {
    def validate(input: xyz.stratalab.sdk.models.Datum.IoTransaction): scalapb.validate.Result =
      xyz.stratalab.sdk.models.EventValidator.IoTransactionValidator.validate(input.event)
    
  }
  object GroupPolicyValidator extends scalapb.validate.Validator[xyz.stratalab.sdk.models.Datum.GroupPolicy] {
    def validate(input: xyz.stratalab.sdk.models.Datum.GroupPolicy): scalapb.validate.Result =
      xyz.stratalab.sdk.models.EventValidator.GroupPolicyValidator.validate(input.event)
    
  }
  object SeriesPolicyValidator extends scalapb.validate.Validator[xyz.stratalab.sdk.models.Datum.SeriesPolicy] {
    def validate(input: xyz.stratalab.sdk.models.Datum.SeriesPolicy): scalapb.validate.Result =
      xyz.stratalab.sdk.models.EventValidator.SeriesPolicyValidator.validate(input.event)
    
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy