// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: v1/request/command.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 *AutoMigrateRequest) Validate() error { if this.DatabaseID == "" { return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID)) } if this.TablePrefixWithSchema == "" { return github_com_mwitkow_go_proto_validators.FieldError("TablePrefixWithSchema", fmt.Errorf(`value '%v' must not be an empty string`, this.TablePrefixWithSchema)) } if this.Version == "" { return github_com_mwitkow_go_proto_validators.FieldError("Version", fmt.Errorf(`value '%v' must not be an empty string`, this.Version)) } if !(len(this.TableModelDescribe) > 0) { return github_com_mwitkow_go_proto_validators.FieldError("TableModelDescribe", fmt.Errorf(`value '%v' must have a length greater than '0'`, this.TableModelDescribe)) } 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_InsertRequest); ok { if oneOfNester.InsertRequest != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(oneOfNester.InsertRequest); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("InsertRequest", err) } } } if oneOfNester, ok := this.GetRequest().(*TransactionOperation_InsertBatchRequest); ok { if oneOfNester.InsertBatchRequest != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(oneOfNester.InsertBatchRequest); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("InsertBatchRequest", err) } } } if oneOfNester, ok := this.GetRequest().(*TransactionOperation_DeleteRequest); ok { if oneOfNester.DeleteRequest != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(oneOfNester.DeleteRequest); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("DeleteRequest", err) } } } if oneOfNester, ok := this.GetRequest().(*TransactionOperation_DeleteBatchRequest); ok { if oneOfNester.DeleteBatchRequest != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(oneOfNester.DeleteBatchRequest); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("DeleteBatchRequest", err) } } } if oneOfNester, ok := this.GetRequest().(*TransactionOperation_UpdateRequest); ok { if oneOfNester.UpdateRequest != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(oneOfNester.UpdateRequest); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("UpdateRequest", 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 } func (this *InsertRequest) Validate() error { if this.DatabaseID == "" { return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID)) } if this.TablePrefixWithSchema == "" { return github_com_mwitkow_go_proto_validators.FieldError("TablePrefixWithSchema", fmt.Errorf(`value '%v' must not be an empty string`, this.TablePrefixWithSchema)) } if this.Version == "" { return github_com_mwitkow_go_proto_validators.FieldError("Version", fmt.Errorf(`value '%v' must not be an empty string`, this.Version)) } for _, item := range this.KeyColumns { if !(len(item) > 0) { return github_com_mwitkow_go_proto_validators.FieldError("KeyColumns", fmt.Errorf(`value '%v' must have a length greater than '0'`, item)) } } if this.TableRow != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.TableRow); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("TableRow", err) } } return nil } func (this *InsertBatchRequest) Validate() error { if this.DatabaseID == "" { return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID)) } if len(this.Items) < 1 { return github_com_mwitkow_go_proto_validators.FieldError("Items", fmt.Errorf(`value '%v' must contain at least 1 elements`, this.Items)) } for _, item := range this.Items { if item != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("Items", err) } } } return nil } func (this *InsertTableItem) Validate() error { if this.TablePrefixWithSchema == "" { return github_com_mwitkow_go_proto_validators.FieldError("TablePrefixWithSchema", fmt.Errorf(`value '%v' must not be an empty string`, this.TablePrefixWithSchema)) } if this.Version == "" { return github_com_mwitkow_go_proto_validators.FieldError("Version", fmt.Errorf(`value '%v' must not be an empty string`, this.Version)) } if len(this.Items) < 1 { return github_com_mwitkow_go_proto_validators.FieldError("Items", fmt.Errorf(`value '%v' must contain at least 1 elements`, this.Items)) } for _, item := range this.Items { if item != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("Items", err) } } } return nil } func (this *InsertItem) Validate() error { for _, item := range this.KeyColumns { if !(len(item) > 0) { return github_com_mwitkow_go_proto_validators.FieldError("KeyColumns", fmt.Errorf(`value '%v' must have a length greater than '0'`, item)) } } if this.TableRow != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.TableRow); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("TableRow", err) } } return nil } func (this *DeleteRequest) Validate() error { if this.DatabaseID == "" { return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID)) } if this.TablePrefixWithSchema == "" { return github_com_mwitkow_go_proto_validators.FieldError("TablePrefixWithSchema", fmt.Errorf(`value '%v' must not be an empty string`, this.TablePrefixWithSchema)) } if this.Version == "" { return github_com_mwitkow_go_proto_validators.FieldError("Version", fmt.Errorf(`value '%v' must not be an empty string`, this.Version)) } // Validation of proto3 map<> fields is unsupported. return nil } func (this *DeleteBatchRequest) Validate() error { if this.DatabaseID == "" { return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID)) } if len(this.Items) < 1 { return github_com_mwitkow_go_proto_validators.FieldError("Items", fmt.Errorf(`value '%v' must contain at least 1 elements`, this.Items)) } for _, item := range this.Items { if item != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("Items", err) } } } return nil } func (this *DeleteTableItem) Validate() error { if this.TablePrefixWithSchema == "" { return github_com_mwitkow_go_proto_validators.FieldError("TablePrefixWithSchema", fmt.Errorf(`value '%v' must not be an empty string`, this.TablePrefixWithSchema)) } if this.Version == "" { return github_com_mwitkow_go_proto_validators.FieldError("Version", fmt.Errorf(`value '%v' must not be an empty string`, this.Version)) } if len(this.Items) < 1 { return github_com_mwitkow_go_proto_validators.FieldError("Items", fmt.Errorf(`value '%v' must contain at least 1 elements`, this.Items)) } for _, item := range this.Items { if item != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("Items", err) } } } return nil } func (this *DeleteItem) Validate() error { // Validation of proto3 map<> fields is unsupported. return nil } func (this *UpdateRequest) Validate() error { if this.DatabaseID == "" { return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID)) } if this.TablePrefixWithSchema == "" { return github_com_mwitkow_go_proto_validators.FieldError("TablePrefixWithSchema", fmt.Errorf(`value '%v' must not be an empty string`, this.TablePrefixWithSchema)) } if this.Version == "" { return github_com_mwitkow_go_proto_validators.FieldError("Version", fmt.Errorf(`value '%v' must not be an empty string`, this.Version)) } // Validation of proto3 map<> fields is unsupported. if this.NewTableRow != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.NewTableRow); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("NewTableRow", err) } } return nil } func (this *ReplayRequest) Validate() error { if this.DatabaseID == "" { return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID)) } if this.TablePrefixWithSchema == "" { return github_com_mwitkow_go_proto_validators.FieldError("TablePrefixWithSchema", fmt.Errorf(`value '%v' must not be an empty string`, this.TablePrefixWithSchema)) } if this.Version == "" { return github_com_mwitkow_go_proto_validators.FieldError("Version", fmt.Errorf(`value '%v' must not be an empty string`, this.Version)) } // Validation of proto3 map<> fields is unsupported. return nil } func (this *TransactionBeginRequest) Validate() error { if this.DatabaseID == "" { return github_com_mwitkow_go_proto_validators.FieldError("DatabaseID", fmt.Errorf(`value '%v' must not be an empty string`, this.DatabaseID)) } return nil } func (this *TransactionEndRequest) Validate() error { return nil } func (this *TableRow) Validate() error { for _, item := range this.Columns { if item != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("Columns", err) } } } return nil } func (this *Column) Validate() error { if this.Value != nil { if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Value); err != nil { return github_com_mwitkow_go_proto_validators.FieldError("Value", err) } } return nil } func (this *ColumnValue) Validate() error { return nil }