github.com/s7techlab/cckit@v0.10.5/state/mapping/testdata/schema/with_composite_id.validator.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: mapping/testdata/schema/with_composite_id.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 *EntityWithCompositeId) Validate() error {
    20  	if this.IdThirdPart != nil {
    21  		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.IdThirdPart); err != nil {
    22  			return github_com_mwitkow_go_proto_validators.FieldError("IdThirdPart", err)
    23  		}
    24  	}
    25  	return nil
    26  }
    27  func (this *EntityCompositeId) Validate() error {
    28  	if this.IdThirdPart != nil {
    29  		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.IdThirdPart); err != nil {
    30  			return github_com_mwitkow_go_proto_validators.FieldError("IdThirdPart", err)
    31  		}
    32  	}
    33  	return nil
    34  }
    35  func (this *EntityWithCompositeIdList) 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  }
    45  func (this *CreateEntityWithCompositeId) Validate() error {
    46  	if this.IdThirdPart != nil {
    47  		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.IdThirdPart); err != nil {
    48  			return github_com_mwitkow_go_proto_validators.FieldError("IdThirdPart", err)
    49  		}
    50  	}
    51  	return nil
    52  }
    53  func (this *UpdateEntityWithCompositeId) Validate() error {
    54  	if this.IdThirdPart != nil {
    55  		if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.IdThirdPart); err != nil {
    56  			return github_com_mwitkow_go_proto_validators.FieldError("IdThirdPart", err)
    57  		}
    58  	}
    59  	return nil
    60  }