github.com/s7techlab/cckit@v0.10.5/examples/cpaper_extended/schema/state.validator.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: cpaper_extended/schema/state.proto
     3  
     4  package schema
     5  
     6  import (
     7  	fmt "fmt"
     8  	proto "github.com/golang/protobuf/proto"
     9  	github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
    10  	_ "google.golang.org/protobuf/types/known/timestamppb"
    11  	math "math"
    12  )
    13  
    14  // Reference imports to suppress errors if they are not otherwise used.
    15  var _ = proto.Marshal
    16  var _ = fmt.Errorf
    17  var _ = math.Inf
    18  
    19  func (this *CommercialPaper) Validate() error {
    20  	if this.IssueDate != nil {
    21  		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.IssueDate); err != nil {
    22  			return github_com_mwitkow_go_proto_validators.FieldError("IssueDate", err)
    23  		}
    24  	}
    25  	if this.MaturityDate != nil {
    26  		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.MaturityDate); err != nil {
    27  			return github_com_mwitkow_go_proto_validators.FieldError("MaturityDate", err)
    28  		}
    29  	}
    30  	return nil
    31  }
    32  func (this *CommercialPaperId) Validate() error {
    33  	return nil
    34  }
    35  func (this *CommercialPaperList) Validate() error {
    36  	for _, item := range this.Items {
    37  		if item != nil {
    38  			if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
    39  				return github_com_mwitkow_go_proto_validators.FieldError("Items", err)
    40  			}
    41  		}
    42  	}
    43  	return nil
    44  }