Top
centralconfig/v1/types.proto
AuditEntry represents a write event recorded in the audit log.
Every config mutation (SetField, SetFields, RollbackToVersion) creates
one or more audit entries atomically with the config change.
Field
Type
Label
Description
id
string
Server-assigned unique identifier (UUID).
tenant_id
string
The tenant affected (UUID).
actor
string
The actor who performed the action (from JWT subject).
action
string
The action type (e.g. "set_field", "rollback").
field_path
string
optional
The field that was changed. Present for set_field actions.
old_value
string
optional
The previous value. Present for set_field actions.
new_value
string
optional
The new value. Present for set_field actions. For rollback actions, contains the target version (e.g. "v2").
config_version
int32
optional
The config version number created by this action.
created_at
google.protobuf.Timestamp
When the audit entry was created.
Config represents the full resolved configuration for a tenant at a specific version.
Field
Type
Label
Description
tenant_id
string
The tenant this config belongs to (UUID).
version
int32
The version number this config was resolved at.
values
ConfigValue
repeated
All configuration values at this version.
ConfigChange represents a real-time change event pushed to subscribers
via the Subscribe streaming RPC.
Field
Type
Label
Description
tenant_id
string
The tenant whose config changed (UUID).
version
int32
The new config version number created by this change.
field_path
string
The field that was changed.
old_value
TypedValue
The previous value. Absent if field was newly created or was null.
new_value
TypedValue
The new value. Absent if field was set to null.
changed_by
string
The actor who made the change.
changed_at
google.protobuf.Timestamp
When the change occurred.
ConfigValue represents a single configuration value at a point in time.
Field
Type
Label
Description
field_path
string
Dot-separated field path (e.g. "payments.fee").
value
TypedValue
The typed value. Absent when the field value is null.
checksum
string
Checksum of the value (xxHash). Used for optimistic concurrency control in SetField/SetFields via expected_checksum.
description
string
optional
Human-readable description explaining this specific value. Only populated when include_description(s) is true in the request.
ConfigVersion represents a point-in-time snapshot of configuration changes.
Each write operation (SetField, SetFields, RollbackToVersion) creates a new
config version. Versions store only the changed fields (delta storage) — the
full config at any version is the union of all deltas up to that version.
Field
Type
Label
Description
id
string
Server-assigned unique identifier (UUID).
tenant_id
string
The tenant this version belongs to (UUID).
version
int32
Version number (monotonically increasing, starting at 1).
description
string
Description of what changed in this version.
created_by
string
The actor who created this version (from JWT subject, or "unknown" if auth is disabled).
created_at
google.protobuf.Timestamp
When this version was created.
DependentRequiredEntry encodes one cross-field requirement: when the
trigger field has a non-null value, every dependent field path must also
have a non-null value. This is the proto wire form of JSON Schema 2020-12
dependentRequired, which uses a map<path, list<path>> shape — proto
maps cannot hold repeated values directly, so we use a repeated list of
entries.
Field
Type
Label
Description
trigger_field
string
Field path whose presence triggers the requirement.
dependent_fields
string
repeated
Field paths that must be present when the trigger has a non-null value.
ExternalDocs links to external documentation.
OAS: External Documentation Object
Field
Type
Label
Description
description
string
Human-readable description of the external documentation.
url
string
URL to the external documentation.
FieldConstraints defines validation rules for a schema field.
Which constraints apply depends on the field's type — see FieldType docs.
Field
Type
Label
Description
min
double
optional
For integer/number/duration: minimum allowed value (inclusive, >=).
max
double
optional
For integer/number/duration: maximum allowed value (inclusive, <=).
regex
string
optional
Regular expression pattern the value must match. Applies to string-typed fields. Uses RE2 syntax.
enum_values
string
repeated
Allowed values. If non-empty, the value must be one of these. Applies to any field type.
json_schema
string
optional
JSON Schema document for structural validation of json-typed fields. Encoded as a JSON string.
exclusive_min
double
optional
For integer/number/duration: exclusive minimum (strict, >).
exclusive_max
double
optional
For integer/number/duration: exclusive maximum (strict, <).
min_length
int32
optional
For string: minimum allowed length.
max_length
int32
optional
For string: maximum allowed length.
FieldExample represents a named example value for a schema field.
Field
Type
Label
Description
value
string
The example value, encoded as a string matching the field type.
summary
string
Short description of what this example demonstrates.
FieldLock prevents a configuration field from being modified by non-superadmin users.
Superadmins bypass all field locks.
Field
Type
Label
Description
tenant_id
string
The tenant this lock applies to (UUID).
field_path
string
The dot-separated field path that is locked.
locked_values
string
repeated
For enum fields: the specific subset of values that are locked (not editable by admin). If empty, the entire field is locked.
Schema represents a configuration schema template.
Schemas define the allowed fields and their types for tenant configurations.
Each schema is versioned — updates create new immutable versions.
Field
Type
Label
Description
id
string
Server-assigned unique identifier (UUID).
name
string
Machine identifier for this schema, used in API calls, URLs, and code. Must be a unique slug: lowercase alphanumeric and hyphens, 1-63 characters, matching a-z0-9 ?. See info.title for a display name.
description
string
Human-readable description of the schema's purpose.
version
int32
Schema version number (monotonically increasing, starting at 1).
parent_version
int32
optional
The version this was derived from. Absent for the initial version (v1).
version_description
string
Description of what changed in this version.
checksum
string
Deterministic checksum of the field definitions (type, constraints, path). Used for change detection on import.
published
bool
Whether this version is published. Only published versions can be assigned to tenants. Published versions are immutable.
fields
SchemaField
repeated
The fields defined in this schema version.
created_at
google.protobuf.Timestamp
When this version was created.
info
SchemaInfo
Optional schema metadata: ownership, contact, labels.
dependent_required
DependentRequiredEntry
repeated
Cross-field "B required when A present" rules. Each entry declares one trigger field whose presence (non-null value) makes a list of dependent field paths required (also non-null). Equivalent to JSON Schema 2020-12 dependentRequired, scoped to schema-level cross-field requirement. Lint-checked at ImportSchema time (every path must reference a real field; trigger may not appear in its own dependents). Enforced at every config write against the post-merge snapshot.
SchemaContact contains contact information for a schema owner.
OAS: Contact Object
Field
Type
Label
Description
name
string
Contact name (person or team).
email
string
Contact email address.
url
string
Contact URL (e.g. team wiki page).
SchemaField defines a single field within a configuration schema.
Field
Type
Label
Description
path
string
Dot-separated hierarchical path (e.g. "payments.settlement.window"). Must be unique within a schema version.
type
FieldType
The value type for this field. Controls validation behavior.
constraints
FieldConstraints
Validation constraints. Optional — when absent, any value of the correct type is accepted.
nullable
bool
Whether this field accepts empty/null values.
deprecated
bool
Whether this field is deprecated. Deprecated fields are still readable but clients should migrate to redirect_to if set.
redirect_to
string
optional
When deprecated, reads of this field can be redirected to this path.
default_value
string
optional
Default value for this field, encoded as a string matching the field type.
description
string
optional
Human-readable description of the field's purpose.
title
string
optional
Human-friendly display name (e.g. "Fee Rate" for path "payments.fee_rate"). OAS: title
example
string
optional
Single example value, encoded as a string matching the field type. OAS: example
examples
SchemaField.ExamplesEntry
repeated
Named examples with optional summary. Key is example name. OAS: examples
external_docs
ExternalDocs
Link to external documentation for this field. OAS: externalDocs
tags
string
repeated
Tags for grouping and categorization beyond the dot-prefix hierarchy. OAS: x-tags
format
string
optional
Semantic format hint within the base type (e.g. "email", "semver", "percentage"). Informational — not enforced by validation. OAS: format
read_only
bool
Whether this field is system-managed and not user-editable. OAS: readOnly
write_once
bool
Whether this field can only be set once and becomes immutable after.
sensitive
bool
Whether this field's value should be masked in logs and UI.
SchemaField.ExamplesEntry
SchemaInfo contains optional metadata about a schema's ownership and context.
Optional organizational metadata for a schema.
Schema.description lives on Schema itself (not here) because it's a
first-class field used in every listing, while these are optional extras.
OAS: Info Object
Field
Type
Label
Description
title
string
Human-friendly display name (e.g. "Payment Configuration"). Unlike Schema.name (a machine slug), this is for UI and documentation. OAS: info.title
author
string
Schema owner identifier (person, team, or service).
contact
SchemaContact
Contact information for the schema owner. OAS: info.contact
labels
SchemaInfo.LabelsEntry
repeated
Key-value labels for filtering and categorization.
Tenant represents an organization or entity that has its own configuration
based on an assigned schema version.
Field
Type
Label
Description
id
string
Server-assigned unique identifier (UUID).
name
string
Unique name for this tenant. Must be a valid slug: lowercase alphanumeric characters and hyphens, 1-63 characters, matching a-z0-9 ?.
schema_id
string
The schema this tenant's configuration is based on (UUID).
schema_version
int32
The specific schema version assigned to this tenant. Must reference a published schema version.
created_at
google.protobuf.Timestamp
When the tenant was created.
updated_at
google.protobuf.Timestamp
When the tenant was last updated (name or schema version change).
TypedValue holds a configuration value with its native type.
An unset oneof (no field present) represents a null value.
UsageStats represents aggregated read usage statistics for a config field.
Field
Type
Label
Description
tenant_id
string
The tenant (UUID).
field_path
string
The field path.
read_count
int64
Total number of reads across the queried time range.
last_read_by
string
optional
The last actor who read this field (if tracked).
last_read_at
google.protobuf.Timestamp
optional
When this field was last read (if tracked).
FieldType enumerates the supported configuration value types.
Each type maps to a specific field in the TypedValue oneof.
Name
Number
Description
FIELD_TYPE_UNSPECIFIED
0
FIELD_TYPE_INT
1
Integer value. Encoded as a decimal string (e.g. "42", "-1"). Supports minimum/maximum constraints on the numeric value.
FIELD_TYPE_STRING
2
Free-form string value. Supports minimum/maximum constraints on string length, pattern (regex), and enum constraints.
FIELD_TYPE_TIME
3
Timestamp value. Encoded as an RFC 3339 string (e.g. "2025-01-15T09:30:00Z").
FIELD_TYPE_DURATION
4
Duration value. Encoded as a Go-style duration string (e.g. "24h", "30m", "500ms"). Supports minimum/maximum constraints on the duration in seconds.
FIELD_TYPE_URL
5
URL value. Must be a valid absolute URL.
FIELD_TYPE_JSON
6
JSON value. Stored as a JSON-encoded string. Supports json_schema constraint for structural validation.
FIELD_TYPE_NUMBER
7
Floating-point number value. Encoded as a decimal string (e.g. "3.14", "0.025"). Supports minimum/maximum constraints on the numeric value.
FIELD_TYPE_BOOL
8
Boolean value. Encoded as "true" or "false".
Top
centralconfig/v1/audit_service.proto
Field
Type
Label
Description
tenant_id
string
Tenant ID (UUID).
field_path
string
Dot-separated field path to query.
start_time
google.protobuf.Timestamp
optional
Start of the time range. If omitted, includes all historical data.
end_time
google.protobuf.Timestamp
optional
End of the time range. If omitted, includes up to the current time.
Field
Type
Label
Description
stats
UsageStats
Aggregated usage statistics across the queried time range.
Field
Type
Label
Description
tenant_id
string
Tenant ID (UUID).
start_time
google.protobuf.Timestamp
optional
Start of the time range. If omitted, includes all historical data.
end_time
google.protobuf.Timestamp
optional
End of the time range. If omitted, includes up to the current time.
Field
Type
Label
Description
field_stats
UsageStats
repeated
Per-field usage statistics, ordered by field path.
Field
Type
Label
Description
tenant_id
string
Tenant ID (UUID).
since
google.protobuf.Timestamp
Fields not read since this time are considered unused. Required — there is no "all time" default to avoid expensive full scans.
Field
Type
Label
Description
field_paths
string
repeated
Dot-separated paths of fields with no reads since the specified time.
Field
Type
Label
Description
tenant_id
string
optional
Filter by tenant ID (UUID). If omitted, returns entries across all tenants.
actor
string
optional
Filter by actor (JWT subject). If omitted, matches all actors.
field_path
string
optional
Filter by field path. If omitted, matches all fields.
start_time
google.protobuf.Timestamp
optional
Filter entries created at or after this time. If omitted, no lower bound.
end_time
google.protobuf.Timestamp
optional
Filter entries created at or before this time. If omitted, no upper bound.
page_size
int32
Maximum number of results to return. Defaults to 50, max 100.
page_token
string
Pagination token from a previous QueryWriteLogResponse.
Field
Type
Label
Description
entries
AuditEntry
repeated
Audit entries matching the filters, ordered by created_at descending.
next_page_token
string
Token for the next page. Empty if no more results.
AuditService provides read-only access to the change history and usage
statistics for tenant configurations.
Write events are recorded automatically by the ConfigService whenever
configuration values are modified (atomically with the config change).
Usage statistics are tracked asynchronously via batched read counters.
Top
centralconfig/v1/config_service.proto
Field
Type
Label
Description
tenant_id
string
Tenant ID (UUID).
version
int32
optional
Config version to export. If omitted, exports the latest version.
Field
Type
Label
Description
yaml_content
bytes
YAML-encoded configuration values.
FieldUpdate represents a single field change within a SetFields batch.
Field
Type
Label
Description
field_path
string
Dot-separated field path.
value
TypedValue
The typed value. Omit to set the field to null.
expected_checksum
string
optional
Optimistic concurrency control checksum for this specific field. See SetFieldRequest.expected_checksum for details.
value_description
string
optional
Value-level description for this specific field.
Field
Type
Label
Description
tenant_id
string
Tenant ID (UUID).
version
int32
optional
Config version to retrieve. If omitted, returns the latest version.
include_descriptions
bool
When true, includes value-level descriptions in the response. This bypasses the Redis cache and reads directly from the database.
Field
Type
Label
Description
config
Config
The full resolved configuration at the requested version.
Field
Type
Label
Description
tenant_id
string
Tenant ID (UUID).
field_path
string
Dot-separated field path (e.g. "payments.fee").
version
int32
optional
Config version to read from. If omitted, reads from the latest version.
include_description
bool
When true, includes the value-level description. This bypasses the Redis cache and reads directly from the database.
Field
Type
Label
Description
value
ConfigValue
The configuration value. Returns NOT_FOUND if the field has no value set.
Field
Type
Label
Description
tenant_id
string
Tenant ID (UUID).
field_paths
string
repeated
Dot-separated field paths to retrieve.
version
int32
optional
Config version to read from. If omitted, reads from the latest version.
include_descriptions
bool
When true, includes value-level descriptions. This bypasses the Redis cache and reads directly from the database.
Field
Type
Label
Description
values
ConfigValue
repeated
The requested values. Fields that don't exist are omitted (not an error).
Field
Type
Label
Description
tenant_id
string
Tenant ID (UUID).
version
int32
The version number to retrieve.
Field
Type
Label
Description
tenant_id
string
Tenant ID (UUID).
yaml_content
bytes
YAML-encoded configuration values to import.
description
string
optional
Description for the new config version created by the import.
mode
ImportMode
Import mode. Defaults to IMPORT_MODE_MERGE.
Field
Type
Label
Description
config_version
ConfigVersion
The config version created by the import.
Field
Type
Label
Description
tenant_id
string
Tenant ID (UUID).
page_size
int32
Maximum number of results to return. Defaults to 50, max 100.
page_token
string
Pagination token from a previous ListVersionsResponse.
Field
Type
Label
Description
versions
ConfigVersion
repeated
Config versions, ordered by version number descending (newest first).
next_page_token
string
Token for the next page. Empty if no more results.
Field
Type
Label
Description
tenant_id
string
Tenant ID (UUID).
version
int32
The target version to rollback to. The full config at this version is copied into a new version (the current version number + 1). The target version itself is not modified.
description
string
optional
Description for the new rollback version. Defaults to "Rollback to version N" if omitted.
RollbackToVersionResponse
Field
Type
Label
Description
config_version
ConfigVersion
The newly created config version containing the rolled-back values.
Field
Type
Label
Description
tenant_id
string
Tenant ID (UUID).
field_path
string
Dot-separated field path (e.g. "payments.fee").
value
TypedValue
The typed value. Omit to set the field to null.
expected_checksum
string
optional
Optimistic concurrency control: the checksum from a previous GetField/GetConfig response. If provided and the field's current checksum doesn't match, the request fails with ABORTED. This prevents lost updates when multiple actors modify the same field concurrently.
description
string
optional
Version-level description explaining why this change was made.
value_description
string
optional
Value-level description explaining what this specific value means. Retrievable via include_description in read requests.
Field
Type
Label
Description
config_version
ConfigVersion
The newly created config version.
Field
Type
Label
Description
tenant_id
string
Tenant ID (UUID).
updates
FieldUpdate
repeated
Field updates to apply. All updates are applied atomically in a single config version. If any update fails validation (checksum, field lock), no changes are committed.
description
string
optional
Version-level description explaining why these changes were made.
Field
Type
Label
Description
config_version
ConfigVersion
The newly created config version.
Field
Type
Label
Description
tenant_id
string
Tenant ID (UUID) to subscribe to.
field_paths
string
repeated
Field paths to filter on. If empty, receives changes for all fields. Changes to fields not in this list are silently dropped.
Field
Type
Label
Description
change
ConfigChange
A configuration change event. Delivered via Redis Pub/Sub internally.
ImportMode controls how imported values interact with existing config.
Name
Number
Description
IMPORT_MODE_UNSPECIFIED
0
Unspecified defaults to merge behavior.
IMPORT_MODE_MERGE
1
Merge: update fields from YAML that differ, keep runtime overrides for fields not in the YAML.
IMPORT_MODE_REPLACE
2
Replace: full replace — all fields from YAML are set, fields not in YAML are not carried forward. Runtime overrides are wiped.
IMPORT_MODE_DEFAULTS
3
Defaults: only set fields that have no value yet. Fields that already have a value are skipped regardless of the YAML content.
ConfigService manages configuration values, versions, and real-time subscriptions.
Configuration is stored per-tenant using delta versioning: each write creates a
new version containing only the changed fields. The full config at any version is
the union of all deltas up to that version (latest value per field wins).
Read operations are cached in Redis. Write operations are atomic: the config
version, values, and audit log entry are committed in a single database transaction.
Read operations.
Reads are served from Redis cache when possible. Setting include_descriptions
bypasses the cache and reads directly from the database.
Top
centralconfig/v1/schema_service.proto
Field
Type
Label
Description
name
string
Unique name for the schema. Must be a valid slug: lowercase alphanumeric and hyphens, 1-63 characters (e.g. "payment-config", "settlement-rules").
description
string
optional
Human-readable description of the schema's purpose.
fields
SchemaField
repeated
Initial field definitions for version 1. At least one field is required.
Field
Type
Label
Description
schema
Schema
The created schema with version 1 (draft, unpublished).
Field
Type
Label
Description
name
string
Unique name for the tenant. Must be a valid slug: lowercase alphanumeric and hyphens, 1-63 characters (e.g. "acme-corp", "tenant-42").
schema_id
string
The schema to assign to this tenant (UUID).
schema_version
int32
The schema version to use. Must be a published version.
Field
Type
Label
Description
tenant
Tenant
Field
Type
Label
Description
id
string
Schema ID (UUID). Cascades to all versions, fields, and associated tenants.
Field
Type
Label
Description
id
string
Tenant ID (UUID). Cascades to all config versions, values, and field locks.
Field
Type
Label
Description
id
string
Schema ID (UUID).
version
int32
optional
Schema version to export. If omitted, exports the latest version.
Field
Type
Label
Description
yaml_content
bytes
YAML-encoded schema (spec_version v1). Includes schema name, description, version, and all field definitions with OAS-style constraint naming. Server-generated fields (id, checksum, published, created_at) are excluded.
Field
Type
Label
Description
id
string
Schema ID (UUID).
version
int32
optional
Schema version to retrieve. If omitted, returns the latest version.
Field
Type
Label
Description
schema
Schema
Field
Type
Label
Description
id
string
Tenant ID (UUID).
Field
Type
Label
Description
tenant
Tenant
Field
Type
Label
Description
yaml_content
bytes
YAML-encoded schema (spec_version v1). Must include spec_version, name, and fields.
Import uses full-replace semantics: - If no schema with this name exists: creates a new schema with version 1. - If a schema exists and fields differ from latest: creates the next version. - If a schema exists and fields are identical: returns AlreadyExists error.
Imported versions are created as drafts (unpublished) unless auto_publish is true. The version field in the YAML is informational — the server assigns the next version number automatically. |
| auto_publish | bool | | When true, the imported version is automatically published after creation. If the schema already exists and fields are identical (AlreadyExists), this has no effect. |
Field
Type
Label
Description
schema
Schema
The created (or existing, on AlreadyExists) schema version.
Field
Type
Label
Description
tenant_id
string
Tenant ID (UUID).
Field
Type
Label
Description
locks
FieldLock
repeated
All active field locks for the tenant.
Field
Type
Label
Description
name_filter
string
optional
Filter schemas by name prefix. Currently reserved for future use.
page_size
int32
Maximum number of results to return. Defaults to 50, max 100.
page_token
string
Pagination token from a previous ListSchemasResponse.
Field
Type
Label
Description
schemas
Schema
repeated
Schemas with their latest version.
next_page_token
string
Token for the next page. Empty if no more results.
Field
Type
Label
Description
schema_id
string
optional
Filter by schema ID (UUID). If omitted, returns tenants across all schemas.
page_size
int32
Maximum number of results to return. Defaults to 50, max 100.
page_token
string
Pagination token from a previous ListTenantsResponse.
Field
Type
Label
Description
tenants
Tenant
repeated
next_page_token
string
Token for the next page. Empty if no more results.
Field
Type
Label
Description
tenant_id
string
Tenant ID (UUID).
field_path
string
Dot-separated field path to lock (e.g. "payments.currency").
locked_values
string
repeated
For enum fields: lock only these specific values. If empty, the entire field is locked regardless of value.
Field
Type
Label
Description
id
string
Schema ID (UUID).
version
int32
The version number to publish. Must be an existing draft version. Once published, the version is immutable.
Field
Type
Label
Description
schema
Schema
The published schema version.
Field
Type
Label
Description
tenant_id
string
Tenant ID (UUID).
field_path
string
Dot-separated field path to unlock.
Field
Type
Label
Description
id
string
Schema ID (UUID).
version_description
string
optional
Description of what changed in this version.
fields
SchemaField
repeated
Fields to add or modify. Existing fields not listed here are carried forward unchanged from the latest version.
remove_fields
string
repeated
Dot-separated paths of fields to remove from the new version.
Field
Type
Label
Description
schema
Schema
The new schema version (draft, unpublished).
Field
Type
Label
Description
id
string
Tenant ID (UUID).
name
string
optional
New name for the tenant. Must be a valid slug if provided.
schema_version
int32
optional
Upgrade to a new schema version. The new version must belong to the same schema and must be published.
Field
Type
Label
Description
tenant
Tenant
SchemaService manages configuration schemas, tenants, and field-level locking.
Schemas define the allowed fields and their types for tenant configurations.
Each schema is versioned — updates create new immutable versions that must be
published before tenants can use them.
Schema lifecycle.
Top
centralconfig/v1/server_service.proto
Field
Type
Label
Description
version
string
Semantic version string (e.g. "1.2.3" or "dev").
commit
string
Git commit hash.
features
GetServerInfoResponse.FeaturesEntry
repeated
Enabled server features. Keys are feature names, values indicate enabled state. Known features: schema, config, audit, usage_tracking, jwt_auth, http_gateway.
GetServerInfoResponse.FeaturesEntry
Field
Type
Label
Description
key
string
value
bool
ServerService provides server metadata and capability discovery.
Always registered, no authentication required.
.proto Type
Notes
C++
Java
Python
Go
C#
PHP
Ruby
double
double
double
float
float64
double
float
Float
float
float
float
float
float32
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
int32
int
integer
Bignum or Fixnum (as required)
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
int64
long
integer/string
Bignum
uint32
Uses variable-length encoding.
uint32
int
int/long
uint32
uint
integer
Bignum or Fixnum (as required)
uint64
Uses variable-length encoding.
uint64
long
int/long
uint64
ulong
integer/string
Bignum or Fixnum (as required)
sint32
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.
int32
int
int
int32
int
integer
Bignum or Fixnum (as required)
sint64
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.
int64
long
int/long
int64
long
integer/string
Bignum
fixed32
Always four bytes. More efficient than uint32 if values are often greater than 2^28.
uint32
int
int
uint32
uint
integer
Bignum or Fixnum (as required)
fixed64
Always eight bytes. More efficient than uint64 if values are often greater than 2^56.
uint64
long
int/long
uint64
ulong
integer/string
Bignum
sfixed32
Always four bytes.
int32
int
int
int32
int
integer
Bignum or Fixnum (as required)
sfixed64
Always eight bytes.
int64
long
int/long
int64
long
integer/string
Bignum
bool
bool
boolean
boolean
bool
bool
boolean
TrueClass/FalseClass
string
A string must always contain UTF-8 encoded or 7-bit ASCII text.
string
String
str/unicode
string
string
string
String (UTF-8)
bytes
May contain any arbitrary sequence of bytes.
string
ByteString
str
[]byte
ByteString
string
String (ASCII-8BIT)