Skip to content

Latest commit

 

History

History
1736 lines (874 loc) · 57.7 KB

README.md

File metadata and controls

1736 lines (874 loc) · 57.7 KB

Protocol Documentation

Top

is/msgs/camera.proto

Models the calibration parameters of a camera.

Field Type Label Description
id int64 Camera id.
calibrated_at google.protobuf.Timestamp When the calibration was performed.
error double Average reprojection error.
resolution Resolution Resolution used during calibration.
intrinsic is.common.Tensor Intrinsic matrix with shape=[3,3].
distortion is.common.Tensor Distortion coefficients with shape=[1,5].
extrinsic FrameTransformation repeated Extrinsic tranformations. Used to transform from the camera frame to a world frame and vice versa.

Camera parameters.

Field Type Label Description
sampling is.common.SamplingSettings Sampling parameters.
image ImageSettings Image parameters.
camera CameraSettings Internal camera parameters.
stream_channel_id google.protobuf.Int32Value Stream Channel parameter
channel_id google.protobuf.Int32Value Channel Parameter
ptzcontrol PTZControl Camera PTZ control parameters.
Field Type Label Description
automatic bool True if the camera should automatically assign this parameter.
ratio float Ratio assigned to the parameter where 0.0 is the lowest value and 1.0 the highest.
option string For use when the camera requires a string type parameter.
Field Type Label Description
brightness CameraSetting
exposure CameraSetting
focus CameraSetting
gain CameraSetting
gamma CameraSetting
hue CameraSetting
iris CameraSetting
saturation CameraSetting
sharpness CameraSetting
shutter CameraSetting
white_balance_bu CameraSetting
white_balance_rv CameraSetting
zoom CameraSetting
contrast CameraSetting

Represent the tranformation between two coordinate systems.

Field Type Label Description
from int64 Id of the "from" frame.
to int64 Id of the "to" frame.
tf is.common.Tensor Transformation matrix [R T; 0 1] with shape = [4,4].
expiration google.protobuf.Timestamp Timepoint where this transformation is still valid. If not present the transformation will be considered to be valid forever.
Field Type Label Description
tfs FrameTransformation repeated List of transformations.
Field Type Label Description
calibrations CameraCalibration repeated Sequence of calibrations relative to the requested IDs.
Field Type Label Description
ids int64 repeated IDs of the cameras to return the calibration from.
Field Type Label Description
transformations FrameTransformation repeated Sequence of transformations relative to the requested ids.
Field Type Label Description
ids IdPair repeated Sequence of pairs (from -> to) describing the desired transformations
Field Type Label Description
from int64
to int64
Field Type Label Description
absolute is.common.Position Absolute position
step is.common.Position Relative position using steps

Request selector/filter for CameraSettings. Used to select what fields should be present in an CameraConfig GET request. See FieldSelector for more information.

Name Number Description
ALL 0 Fill everything.
SAMPLING_SETTINGS 1 Fill sampling settings.
IMAGE_SETTINGS 2 Fill image settings.
CAMERA_SETTINGS 3 Fill camera settings.
STREAM_CHANNEL_ID 4 Fill stream channel settings
CHANNEL_ID 5 Fill camera channel settings
PTZCONTROL_SETTINGS 6 Fill camera control settings

Top

is/msgs/common.proto

Field Type Label Description
consumers string repeated List of consumers.
Field Type Label Description
info ConsumerList.InfoEntry repeated Consumer Information for each topic.
Field Type Label Description
key string
value ConsumerInfo

Used to select the desired fields of a message on a "Get" RPC.

Field Type Label Description
fields uint32 repeated List of fields that should be filled.
Field Type Label Description
yaw float Rotation around x.
pitch float Rotation around y.
roll float Rotation around z.
Field Type Label Description
content string repeated List of words.
confidence float Confidence of recognized phrase.
language string Identifies language using Locale Name pattern.
Field Type Label Description
position Position
orientation Orientation
Field Type Label Description
x float Position in the x axis.
y float Position in the y axis.
z float Position in the z axis.
Field Type Label Description
frequency google.protobuf.FloatValue Sampling frequency in hertz.
delay google.protobuf.FloatValue Delay to be applied in the in the sampling proccess, normally used to synchronize different sources.
Field Type Label Description
dims Shape.Dimension repeated
Field Type Label Description
size int32 Number of elements in this dimension.
name string Dimension identifier. This can be used to indicate the order that the dimensions are placed in a tensor. For instance, in a tensor with two dimensions (matrix) the name can be something like "row" or "collumn" indicating if the memory layout is row or collumn major.
Field Type Label Description
linear float
angular float
Field Type Label Description
entities string repeated
sampling SamplingSettings
Field Type Label Description
shape Shape Shape of the tensor. Define how the tensor is represented in one of the value fields (floats, doubles, ints32, ints64).
type DataType Type of the tensor values.
floats float repeated
doubles double repeated
ints32 int32 repeated
ints64 int64 repeated
Name Number Description
UNKNOWN_TYPE 0
FLOAT_TYPE 1
DOUBLE_TYPE 2
INT32_TYPE 3
INT64_TYPE 4

Top

is/msgs/image.proto

Sequence of vertices modelling a polygon.

Field Type Label Description
vertices Vertex repeated The polygon vertices.
Field Type Label Description
value ColorSpaces Color space value.

Message representing an Image. The image content can be either sent embedded on this message or referenced as an external resource.

Field Type Label Description
data bytes Image content, represented as a stream of bytes in well known image formats.
uri string URI to external image source.
Field Type Label Description
format ImageFormats Image compression algorithm.
compression google.protobuf.FloatValue Image compression level.
Field Type Label Description
resolution Resolution Image resolution (height, width).
format ImageFormat Image compression details. e.g: PNG.
color_space ColorSpace Color space.
region BoundingPoly Bounding poly defining the region of interest in the image. This region is usually represented as a rectangle modelled by the TopLeft and BottomRight vertices.

Models an annotation on an object (in an image or in space).

Field Type Label Description
label string Label that identifies in human language the object in the annotated region. e.g: human, dog, computer, etc.
id int64 Number that identifies the object in the annotated region, usually comes from an enumeration.
score float Represents how sure the annotator thinks that an object of the specified type exists on the region.
region BoundingPoly Identifies the region in the image/space where the object is contained NOTE: When defined on an image the vertex coordinates are in the same scale (resolution) as the original image.
keypoints PointAnnotation repeated Annotations of interesting points in the image. e.g: Hip, Nose, Eye. NOTE: When defined on an image the vertex coordinates are in the same scale (resolution) as the original image.

Models many annotated objects. (List of objects and their respective annotations). If resolution is present the annotations are assumed to be on an Image, otherwise they are assumed to be in Space and a proper frame_id must be set.

Field Type Label Description
objects ObjectAnnotation repeated List of objects and their respective annotations.
resolution Resolution Original resolution of the image when annotation an image.
frame_id int64 Id of the frame of reference used to localize the vertices when annotating objects in space.

Models an annotation on a point (in an image or in space).

Field Type Label Description
id int64 Id of the keypoint being annotated, usually comes from an enumeration, e.g: HumanKeypoints.
score float Represents how sure the annotator thinks that a keypoint of the specified type exists on the given position.
position Vertex Position of the keypoint. Represented by (x,y) on images and (x,y,z) on spaces.

Models the resolution of an image, that is the number of pixels in an image.

Field Type Label Description
height uint32 Number of vertical pixels.
width uint32 Number of horizontal pixels.

A vertex represents a point in the image (2D: x,y) or in space (3D: x,y,z).

Field Type Label Description
x float X coordinate.
y float Y coordinate.
z float Z coordinate.

List of color spaces

Name Number Description
RGB 0 Red, Green, Blue.
GRAY 1 Grayscale.
YCbCr 2 Luma, Blue-Difference, Red-Difference.
HSV 3 Hue, Saturation, Value.

Models keypoints present in the human body.

Name Number Description
UNKNOWN_HUMAN_KEYPOINT 0
HEAD 1
NOSE 2
NECK 3
RIGHT_SHOULDER 4
RIGHT_ELBOW 5
RIGHT_WRIST 6
LEFT_SHOULDER 7
LEFT_ELBOW 8
LEFT_WRIST 9
RIGHT_HIP 10
RIGHT_KNEE 11
RIGHT_ANKLE 12
LEFT_HIP 13
LEFT_KNEE 14
LEFT_ANKLE 15
RIGHT_EYE 16
LEFT_EYE 17
RIGHT_EAR 18
LEFT_EAR 19
CHEST 20

List of image formats.

Name Number Description
PNG 0
JPEG 1
WebP 2
Name Number Description
UNKNOWN_OBJECT 0
HUMAN_SKELETON 1

Top

is/msgs/power.proto

Field Type Label Description
voltage float Battery voltage in volts
terminal_voltage float Lower voltage limit
cell_voltage float repeated When battery contain cells, voltage of each one
charge float Charge percentage on 0 to 1 range
capacity float Capacity in Ah
type PowerInfo.BatteryType Battery type
status PowerInfo.BatteryStatus Battery status
uptime google.protobuf.Duration
autonomy google.protobuf.Duration How long the battery will last at the current discharge rate
Name Number Description
UNKNOWN 0
CHARGING 1
DISCHARGING 2
CHARGED 3
NOT_CONNECTED 4
Name Number Description
PB 0
NICD 1
NIMH 2
LIPO 3

Top

is/msgs/robot.proto

Field Type Label Description
positions is.common.Position repeated (Optional) List of positions indicating the desired path.
speeds is.common.Speed repeated (Optional) List of speeds to be executed at each respective position of a trajectory. If present, should have the same size as the positions field.
final_orientation is.common.Orientation (Optional) Desired orientation of the robot after finishing the task.
allowed_error float (Required) Error value where the controller can consider that the point was reached successfully.
rate float (Required) Controller loop frequency in hertz.
Field Type Label Description
id uint64 Unique identifier of the request.
destination_pose is.common.Pose Destination pose.
robot_gateway_id uint64 Robot Gateway ID.
rate float Robot Task Rate.
allowed_error float Robot Task Allowed Error.
Field Type Label Description
angles float repeated
ranges float repeated
Field Type Label Description
speed is.common.Speed
Field Type Label Description
id uint64 Unique identifier of the task.
current_speed is.common.Speed Speed command sent to the robot in order to make the current pose equals to the desired one.
current_pose is.common.Pose Pose where the robot actually is.
desired_pose is.common.Pose Pose where the robot should be now.
error float Robot positioning error for the current task.
completion float Percentage indicating how much of the task has been completed yet.
sources string repeated Sources used to locate the robot.
begin google.protobuf.Timestamp Timestamp of when the task started.
end google.protobuf.Timestamp Timestamp of when the task finished.
Field Type Label Description
id uint64 Unique identifier of the task.
Field Type Label Description
id uint64 (Optional) Task id, if none is provided one will be generated.
basic_move_task BasicMoveTask

Top

is/msgs/tests.proto

Field Type Label Description
myfoo Foo
myfloat float
Field Type Label Description
myint int32
myfloat float
mydouble double
Field Type Label Description
foos Foo repeated
foo2 Foo
int32s int32 repeated
uint32s uint32 repeated
floats float repeated
doubles double repeated
int64s int64 repeated
uint64s uint64 repeated

Top

is/msgs/validate.proto

AnyRules describe constraints applied exclusively to the google.protobuf.Any well-known type

Field Type Label Description
required bool optional Required specifies that this field must be set
in string repeated In specifies that this field's type_url must be equal to one of the specified values.
not_in string repeated NotIn specifies that this field's type_url must not be equal to any of the specified values.

BoolRules describes the constraints applied to bool values

Field Type Label Description
const bool optional Const specifies that this field must be exactly the specified value

BytesRules describe the constraints applied to bytes values

Field Type Label Description
const bytes optional Const specifies that this field must be exactly the specified value
min_len uint64 optional MinLen specifies that this field must be the specified number of bytes at a minimum
max_len uint64 optional MaxLen specifies that this field must be the specified number of bytes at a maximum
pattern string optional Pattern specifes that this field must match against the specified regular expression (RE2 syntax). The included expression should elide any delimiters.
prefix bytes optional Prefix specifies that this field must have the specified bytes at the beginning of the string.
suffix bytes optional Suffix specifies that this field must have the specified bytes at the end of the string.
contains bytes optional Contains specifies that this field must have the specified bytes anywhere in the string.
in bytes repeated In specifies that this field must be equal to one of the specified values
not_in bytes repeated NotIn specifies that this field cannot be equal to one of the specified values
ip bool optional Ip specifies that the field must be a valid IP (v4 or v6) address in byte format
ipv4 bool optional Ipv4 specifies that the field must be a valid IPv4 address in byte format
ipv6 bool optional Ipv6 specifies that the field must be a valid IPv6 address in byte format

DoubleRules describes the constraints applied to double values

Field Type Label Description
const double optional Const specifies that this field must be exactly the specified value
lt double optional Lt specifies that this field must be less than the specified value, exclusive
lte double optional Lte specifies that this field must be less than or equal to the specified value, inclusive
gt double optional Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed.
gte double optional Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed.
in double repeated In specifies that this field must be equal to one of the specified values
not_in double repeated NotIn specifies that this field cannot be equal to one of the specified values

DurationRules describe the constraints applied exclusively to the google.protobuf.Duration well-known type

Field Type Label Description
required bool optional Required specifies that this field must be set
const google.protobuf.Duration optional Const specifies that this field must be exactly the specified value
lt google.protobuf.Duration optional Lt specifies that this field must be less than the specified value, exclusive
lte google.protobuf.Duration optional Lt specifies that this field must be less than the specified value, inclusive
gt google.protobuf.Duration optional Gt specifies that this field must be greater than the specified value, exclusive
gte google.protobuf.Duration optional Gte specifies that this field must be greater than the specified value, inclusive
in google.protobuf.Duration repeated In specifies that this field must be equal to one of the specified values
not_in google.protobuf.Duration repeated NotIn specifies that this field cannot be equal to one of the specified values

EnumRules describe the constraints applied to enum values

Field Type Label Description
const int32 optional Const specifies that this field must be exactly the specified value
defined_only bool optional DefinedOnly specifies that this field must be only one of the defined values for this enum, failing on any undefined value.
in int32 repeated In specifies that this field must be equal to one of the specified values
not_in int32 repeated NotIn specifies that this field cannot be equal to one of the specified values

FieldRules encapsulates the rules for each type of field. Depending on the field, the correct set should be used to ensure proper validations.

Field Type Label Description
float FloatRules optional Scalar Field Types
double DoubleRules optional
int32 Int32Rules optional
int64 Int64Rules optional
uint32 UInt32Rules optional
uint64 UInt64Rules optional
sint32 SInt32Rules optional
sint64 SInt64Rules optional
fixed32 Fixed32Rules optional
fixed64 Fixed64Rules optional
sfixed32 SFixed32Rules optional
sfixed64 SFixed64Rules optional
bool BoolRules optional
string StringRules optional
bytes BytesRules optional
enum EnumRules optional Complex Field Types
message MessageRules optional
repeated RepeatedRules optional
map MapRules optional
any AnyRules optional Well-Known Field Types
duration DurationRules optional
timestamp TimestampRules optional

Fixed32Rules describes the constraints applied to fixed32 values

Field Type Label Description
const fixed32 optional Const specifies that this field must be exactly the specified value
lt fixed32 optional Lt specifies that this field must be less than the specified value, exclusive
lte fixed32 optional Lte specifies that this field must be less than or equal to the specified value, inclusive
gt fixed32 optional Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed.
gte fixed32 optional Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed.
in fixed32 repeated In specifies that this field must be equal to one of the specified values
not_in fixed32 repeated NotIn specifies that this field cannot be equal to one of the specified values

Fixed64Rules describes the constraints applied to fixed64 values

Field Type Label Description
const fixed64 optional Const specifies that this field must be exactly the specified value
lt fixed64 optional Lt specifies that this field must be less than the specified value, exclusive
lte fixed64 optional Lte specifies that this field must be less than or equal to the specified value, inclusive
gt fixed64 optional Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed.
gte fixed64 optional Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed.
in fixed64 repeated In specifies that this field must be equal to one of the specified values
not_in fixed64 repeated NotIn specifies that this field cannot be equal to one of the specified values

FloatRules describes the constraints applied to float values

Field Type Label Description
const float optional Const specifies that this field must be exactly the specified value
lt float optional Lt specifies that this field must be less than the specified value, exclusive
lte float optional Lte specifies that this field must be less than or equal to the specified value, inclusive
gt float optional Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed.
gte float optional Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed.
in float repeated In specifies that this field must be equal to one of the specified values
not_in float repeated NotIn specifies that this field cannot be equal to one of the specified values

Int32Rules describes the constraints applied to int32 values

Field Type Label Description
const int32 optional Const specifies that this field must be exactly the specified value
lt int32 optional Lt specifies that this field must be less than the specified value, exclusive
lte int32 optional Lte specifies that this field must be less than or equal to the specified value, inclusive
gt int32 optional Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed.
gte int32 optional Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed.
in int32 repeated In specifies that this field must be equal to one of the specified values
not_in int32 repeated NotIn specifies that this field cannot be equal to one of the specified values

Int64Rules describes the constraints applied to int64 values

Field Type Label Description
const int64 optional Const specifies that this field must be exactly the specified value
lt int64 optional Lt specifies that this field must be less than the specified value, exclusive
lte int64 optional Lte specifies that this field must be less than or equal to the specified value, inclusive
gt int64 optional Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed.
gte int64 optional Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed.
in int64 repeated In specifies that this field must be equal to one of the specified values
not_in int64 repeated NotIn specifies that this field cannot be equal to one of the specified values

MapRules describe the constraints applied to map values

Field Type Label Description
min_pairs uint64 optional MinPairs specifies that this field must have the specified number of KVs at a minimum
max_pairs uint64 optional MaxPairs specifies that this field must have the specified number of KVs at a maximum
no_sparse bool optional NoSparse specifies values in this field cannot be unset. This only applies to map's with message value types.
keys FieldRules optional Keys specifies the constraints to be applied to each key in the field.
values FieldRules optional Values specifies the constraints to be applied to the value of each key in the field. Message values will still have their validations evaluated unless skip is specified here.

MessageRules describe the constraints applied to embedded message values. For message-type fields, validation is performed recursively.

Field Type Label Description
skip bool optional Skip specifies that the validation rules of this field should not be evaluated
required bool optional Required specifies that this field must be set

RepeatedRules describe the constraints applied to repeated values

Field Type Label Description
min_items uint64 optional MinItems specifies that this field must have the specified number of items at a minimum
max_items uint64 optional MaxItems specifies that this field must have the specified number of items at a maximum
unique bool optional Unique specifies that all elements in this field must be unique. This contraint is only applicable to scalar and enum types (messages are not supported).
items FieldRules optional Items specifies the contraints to be applied to each item in the field. Repeated message fields will still execute validation against each item unless skip is specified here.

SFixed32Rules describes the constraints applied to sfixed32 values

Field Type Label Description
const sfixed32 optional Const specifies that this field must be exactly the specified value
lt sfixed32 optional Lt specifies that this field must be less than the specified value, exclusive
lte sfixed32 optional Lte specifies that this field must be less than or equal to the specified value, inclusive
gt sfixed32 optional Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed.
gte sfixed32 optional Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed.
in sfixed32 repeated In specifies that this field must be equal to one of the specified values
not_in sfixed32 repeated NotIn specifies that this field cannot be equal to one of the specified values

SFixed64Rules describes the constraints applied to sfixed64 values

Field Type Label Description
const sfixed64 optional Const specifies that this field must be exactly the specified value
lt sfixed64 optional Lt specifies that this field must be less than the specified value, exclusive
lte sfixed64 optional Lte specifies that this field must be less than or equal to the specified value, inclusive
gt sfixed64 optional Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed.
gte sfixed64 optional Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed.
in sfixed64 repeated In specifies that this field must be equal to one of the specified values
not_in sfixed64 repeated NotIn specifies that this field cannot be equal to one of the specified values

SInt32Rules describes the constraints applied to sint32 values

Field Type Label Description
const sint32 optional Const specifies that this field must be exactly the specified value
lt sint32 optional Lt specifies that this field must be less than the specified value, exclusive
lte sint32 optional Lte specifies that this field must be less than or equal to the specified value, inclusive
gt sint32 optional Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed.
gte sint32 optional Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed.
in sint32 repeated In specifies that this field must be equal to one of the specified values
not_in sint32 repeated NotIn specifies that this field cannot be equal to one of the specified values

SInt64Rules describes the constraints applied to sint64 values

Field Type Label Description
const sint64 optional Const specifies that this field must be exactly the specified value
lt sint64 optional Lt specifies that this field must be less than the specified value, exclusive
lte sint64 optional Lte specifies that this field must be less than or equal to the specified value, inclusive
gt sint64 optional Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed.
gte sint64 optional Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed.
in sint64 repeated In specifies that this field must be equal to one of the specified values
not_in sint64 repeated NotIn specifies that this field cannot be equal to one of the specified values

StringRules describe the constraints applied to string values

Field Type Label Description
const string optional Const specifies that this field must be exactly the specified value
min_len uint64 optional MinLen specifies that this field must be the specified number of characters (Unicode code points) at a minimum. Note that the number of characters may differ from the number of bytes in the string.
max_len uint64 optional MaxLen specifies that this field must be the specified number of characters (Unicode code points) at a maximum. Note that the number of characters may differ from the number of bytes in the string.
min_bytes uint64 optional MinBytes specifies that this field must be the specified number of bytes at a minimum
max_bytes uint64 optional MaxBytes specifies that this field must be the specified number of bytes at a maximum
pattern string optional Pattern specifes that this field must match against the specified regular expression (RE2 syntax). The included expression should elide any delimiters.
prefix string optional Prefix specifies that this field must have the specified substring at the beginning of the string.
suffix string optional Suffix specifies that this field must have the specified substring at the end of the string.
contains string optional Contains specifies that this field must have the specified substring anywhere in the string.
in string repeated In specifies that this field must be equal to one of the specified values
not_in string repeated NotIn specifies that this field cannot be equal to one of the specified values
email bool optional Email specifies that the field must be a valid email address as defined by RFC 5322
hostname bool optional Hostname specifies that the field must be a valid hostname as defined by RFC 1034. This constraint does not support internationalized domain names (IDNs).
ip bool optional Ip specifies that the field must be a valid IP (v4 or v6) address. Valid IPv6 addresses should not include surrounding square brackets.
ipv4 bool optional Ipv4 specifies that the field must be a valid IPv4 address.
ipv6 bool optional Ipv6 specifies that the field must be a valid IPv6 address. Valid IPv6 addresses should not include surrounding square brackets.
uri bool optional Uri specifies that the field must be a valid, absolute URI as defined by RFC 3986
uri_ref bool optional UriRef specifies that the field must be a valid URI as defined by RFC 3986 and may be relative or absolute.

TimestampRules describe the constraints applied exclusively to the google.protobuf.Timestamp well-known type

Field Type Label Description
required bool optional Required specifies that this field must be set
const google.protobuf.Timestamp optional Const specifies that this field must be exactly the specified value
lt google.protobuf.Timestamp optional Lt specifies that this field must be less than the specified value, exclusive
lte google.protobuf.Timestamp optional Lte specifies that this field must be less than the specified value, inclusive
gt google.protobuf.Timestamp optional Gt specifies that this field must be greater than the specified value, exclusive
gte google.protobuf.Timestamp optional Gte specifies that this field must be greater than the specified value, inclusive
lt_now bool optional LtNow specifies that this must be less than the current time. LtNow can only be used with the Within rule.
gt_now bool optional GtNow specifies that this must be greater than the current time. GtNow can only be used with the Within rule.
within google.protobuf.Duration optional Within specifies that this field must be within this duration of the current time. This constraint can be used alone or with the LtNow and GtNow rules.

UInt32Rules describes the constraints applied to uint32 values

Field Type Label Description
const uint32 optional Const specifies that this field must be exactly the specified value
lt uint32 optional Lt specifies that this field must be less than the specified value, exclusive
lte uint32 optional Lte specifies that this field must be less than or equal to the specified value, inclusive
gt uint32 optional Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed.
gte uint32 optional Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed.
in uint32 repeated In specifies that this field must be equal to one of the specified values
not_in uint32 repeated NotIn specifies that this field cannot be equal to one of the specified values

UInt64Rules describes the constraints applied to uint64 values

Field Type Label Description
const uint64 optional Const specifies that this field must be exactly the specified value
lt uint64 optional Lt specifies that this field must be less than the specified value, exclusive
lte uint64 optional Lte specifies that this field must be less than or equal to the specified value, inclusive
gt uint64 optional Gt specifies that this field must be greater than the specified value, exclusive. If the value of Gt is larger than a specified Lt or Lte, the range is reversed.
gte uint64 optional Gte specifies that this field must be greater than or equal to the specified value, inclusive. If the value of Gte is larger than a specified Lt or Lte, the range is reversed.
in uint64 repeated In specifies that this field must be equal to one of the specified values
not_in uint64 repeated NotIn specifies that this field cannot be equal to one of the specified values
Extension Type Base Number Description
rules FieldRules .google.protobuf.FieldOptions 919191 Rules specify the validations to be performed on this field. By default, no validation is performed against a field.
disabled bool .google.protobuf.MessageOptions 919191 Disabled nullifies any validation rules for this message, including any message fields associated with it that do support validation.
required bool .google.protobuf.OneofOptions 919191 Required ensures that exactly one the field options in a oneof is set; validation fails if no fields in the oneof are set.

Scalar Value Types

.proto Type Notes C++ Type Java Type Python Type
double double double float
float float float float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long
uint32 Uses variable-length encoding. uint32 int int/long
uint64 Uses variable-length encoding. uint64 long int/long
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long
sfixed32 Always four bytes. int32 int int
sfixed64 Always eight bytes. int64 long int/long
bool bool boolean boolean
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode
bytes May contain any arbitrary sequence of bytes. string ByteString str