Bluemage/schemas/proto/device/v1/update.proto

30 lines
931 B
Protocol Buffer

syntax = "proto3";
package device.v1;
import "buf/validate/validate.proto";
option go_package = "github.com/tigorlazuardi/bluemage/go/gen/proto/device/v1";
message UpdateDeviceRequest {
string slug = 1;
DeviceSetter set = 2;
}
message DeviceSetter {
optional bool disabled = 1;
optional string name = 2 [(buf.validate.field).string.min_len = 1];
optional double resolution_x = 3 [(buf.validate.field).double.gt = 0];
optional double resolution_y = 4 [(buf.validate.field).double.gt = 0];
optional double aspect_ratio_tolerance = 5 [(buf.validate.field).double.gte = 0];
optional int32 min_x = 6 [(buf.validate.field).int32.gte = 0];
optional int32 min_y = 7 [(buf.validate.field).int32.gte = 0];
optional int32 max_x = 8 [(buf.validate.field).int32.gte = 0];
optional int32 max_y = 9 [(buf.validate.field).int32.gte = 0];
optional bool nsfw = 10;
}
message UpdateDeviceResponse {
string slug = 1;
}