channel_parsing_options

Protocol buffer definition for channel_parsing_options

sift/protobuf_descriptors/v2/channel_parsing_options.proto

These are message and field options that can be used when ingesting protobuf messages. These can be applied to protobuf fields and messages before compiling and uploading the descriptor set.

TagSource

Message representing a tag source

Setting either of these values indicates that the field is a tag source and the value can be applied to allowed tag_targets. Tag sources apply only to the nearest ancestor (if any) and do not propagate to ancestors that are lists or maps or beyond. They can apply to both ancestor and sibling fields.

FieldTypeLabelDescription
allowed_tag_targetTagTargetTypeoptionalIndicates which tag_target relationships are allowed to have this tag. If set to ANCESTOR_TARGETS, sibling tag_targets will not have this value. If set to SIBLING_TARGETS, it will not apply to tag_targets that are ancestors.
tag_namestringoptionalThe name of the tag. It defaults to the field name but can be overridden here.

TagTarget

Message representing a tag target

FieldTypeLabelDescription
allowed_tag_sourceTagSourceTypeoptionalSetting this value indicates the allowed sources for tag values. If set to SIBLING_SOURCES, tag_sources from descendant proto fields will not be applied. If set to DESCENDANT_SOURCES, sibling tag_sources will not be applied.

ArrayIndexOverrideType

Enum for the source and destination of an array index override

NameNumberDescription
ARRAY_INDEX_OVERRIDE_UNSPECIFIED0Default value, will be ignored
ARRAY_INDEX_OVERRIDE_TARGET1Array Index will be replaced on fields with this type specified
ARRAY_INDEX_OVERRIDE_SOURCE2Array Index will be sourced from fields with this type specified
ARRAY_INDEX_OVERRIDE_REMOVE_INDEX3Array Index will be removed from fields with this type specified
ARRAY_INDEX_OVERRIDE_ENUM4Array Index will be replaced with the enum name specified by the display_override_enum value on the field

BytesDecodingType

Enum for how to decode bytes fields

NameNumberDescription
BYTES_DECODING_TYPE_UNSPECIFIED0Default value, will be ignored
BYTES_DECODING_TYPE_UTF81Decode bytes as UTF-8

MapKeyOverrideType

Enum for the source and destination of a map key override

NameNumberDescription
MAP_KEY_OVERRIDE_UNSPECIFIED0Default value, will be ignored
MAP_KEY_OVERRIDE_TARGET1Map key will be replaced on fields with this type specified
MAP_KEY_OVERRIDE_SOURCE2Map key will be sourced from fields with this type specified
MAP_KEY_OVERRIDE_REMOVE_KEY3Map key will be removed from fields with this type specified
MAP_KEY_OVERRIDE_ENUM4Map key will be replaced with the enum name specified by the display_override_enum value on the field

TagSourceType

Enum for different types of tag sources

NameNumberDescription
DESCENDANT_SOURCES0Tags can be sourced from descendant fields
SIBLING_SOURCES1Tags can be sourced from sibling fields
DESCENDANT_AND_SIBLING_SOURCES2Tags can be sourced from both descendant and sibling fields

TagTargetType

Enum for different types of tag targets

NameNumberDescription
ANCESTOR_TARGETS0Tags can be applied to ancestor fields
SIBLING_TARGETS1Tags can be applied to sibling fields
ANCESTOR_AND_SIBLING_TARGETS2Tags can be applied to both ancestor and sibling fields

File-level Extensions

ExtensionTypeBaseNumberDescription
array_index_override_typeArrayIndexOverrideType.google.protobuf.FieldOptions50009Adding the array_index_override_type FieldOption to a repeated type field with the ARRAY_INDEX_OVERRIDE_TARGET type indicates that this field can have the array index replaced in the display name by a descendant field. Adding this to a primitive type field with the ARRAY_INDEX_OVERRIDE_SOURCE type indicates that this field is the replacement value for an ancestor array's index display. Note that sources within nested arrays will not apply to ancestor arrays that contain those arrays. This tag will be ignored if the field is not an array or if there are no ARRAY_INDEX_OVERRIDE_SOURCE fields that apply. If multiple apply then the first override will be applied and an error will be logged.
bytes_decoding_typeBytesDecodingType.google.protobuf.FieldOptions50006Adding the bytes_decoding_type FieldOption to a bytes field indicates how the bytes should be decoded If not set, the bytes fields will be ignored and an error will be logged.
descriptionstring.google.protobuf.FieldOptions50002Adding the description FieldOption to a field sets the description for the channel in the chart
display_override_enumstring.google.protobuf.FieldOptions50008Adding the display_override_enum FieldOption to a field with that has map_key_override_type set to MAP_KEY_OVERRIDE_ENUM will look up the enum value in the enum referenced by this field and use that to look up the enum value by number and replace it with the enum value name.
ignore_fieldbool.google.protobuf.FieldOptions50007Adding the ignore_field FieldOption with a value of true will cause the field to be ignored when ingesting the proto
map_key_override_typeMapKeyOverrideType.google.protobuf.FieldOptions50005Adding the map_key_override_type FieldOption to a map type field with the MAP_KEY_OVERRIDE_TARGET type indicates that this field can have the map key replaced in the display name by a descendant field. Adding this to a primitive type field with the MAP_KEY_OVERRIDE_SOURCE indicates that this field is the replacement value for an ancestor map's key display. Note that sources within arrays will not apply to ancestor maps that contain those arrays. This tag will be ignored if the field is not a map or if there are no map_key_override_sources that apply. If multiple apply then the first override will be applied and an error will be logged.
tag_sourceTagSource.google.protobuf.FieldOptions50004Adding the tag_source FieldOption allows the value of the annotated field to be added to applicable fields that are annotated with tag_target. These fields can be either ancestor fields or sibling fields, depending on their respective fields' allowed_tag_source and allowed_tag_target values.
tag_targetTagTarget.google.protobuf.FieldOptions50003Adding the tag_target FieldOption indicates that this field can have tag values appended to the field name. The tag values will come from descendant or sibling fields in the proto path that have the tag_source FieldOption applied.
unitsstring.google.protobuf.FieldOptions50001Adding the units FieldOption to a field sets the units displayed on the channel when charted
message_is_tag_targetbool.google.protobuf.MessageOptions50001The message_is_tag_target option indicates that the message will allow its fields to have tags added to them. This option only accepts descendant sources. It can be helpful to annotate top-level messages with tags from deeper in the proto path.

On this page