// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: v1/request/sql.proto package request import ( fmt "fmt" math "math" proto "github.com/golang/protobuf/proto" _ "github.com/mwitkow/go-proto-validators" github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf func (this *TransactionBeginRequest) Validate() error { if this.Token == "" { return github_com_mwitkow_go_proto_validators.FieldError("Token", fmt.Errorf(`value '%v' must not be an empty string`, this.Token)) } if this.Namespace == "" { return github_com_mwitkow_go_proto_validators.FieldError("Namespace", fmt.Errorf(`value '%v' must not be an empty string`, this.Namespace)) } if this.DataSource == "" { return github_com_mwitkow_go_proto_validators.FieldError("DataSource", fmt.Errorf(`value '%v' must not be an empty string`, this.DataSource)) } return nil } func (this *TransactionEndRequest) Validate() error { return nil } func (this *TransactionOperation) Validate() error { if oneOfNester, ok := this.GetRequest().(*TransactionOperation_TransactionBeginRequest); ok { if oneOfNester.TransactionBeginRequest != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(oneOfNester.TransactionBeginRequest); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("TransactionBeginRequest", err) } } } if oneOfNester, ok := this.GetRequest().(*TransactionOperation_TransactionEndRequest); ok { if oneOfNester.TransactionEndRequest != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(oneOfNester.TransactionEndRequest); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("TransactionEndRequest", err) } } } return nil }