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.
Field | Type | Label | Description |
---|---|---|---|
allowed_tag_target | TagTargetType | optional | Indicates 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_name | string | optional | The name of the tag. It defaults to the field name but can be overridden here. |
TagTarget
Message representing a tag target
Field | Type | Label | Description |
---|---|---|---|
allowed_tag_source | TagSourceType | optional | Setting 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
Name | Number | Description |
---|---|---|
ARRAY_INDEX_OVERRIDE_UNSPECIFIED | 0 | Default value, will be ignored |
ARRAY_INDEX_OVERRIDE_TARGET | 1 | Array Index will be replaced on fields with this type specified |
ARRAY_INDEX_OVERRIDE_SOURCE | 2 | Array Index will be sourced from fields with this type specified |
ARRAY_INDEX_OVERRIDE_REMOVE_INDEX | 3 | Array Index will be removed from fields with this type specified |
ARRAY_INDEX_OVERRIDE_ENUM | 4 | Array 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
Name | Number | Description |
---|---|---|
BYTES_DECODING_TYPE_UNSPECIFIED | 0 | Default value, will be ignored |
BYTES_DECODING_TYPE_UTF8 | 1 | Decode bytes as UTF-8 |
MapKeyOverrideType
Enum for the source and destination of a map key override
Name | Number | Description |
---|---|---|
MAP_KEY_OVERRIDE_UNSPECIFIED | 0 | Default value, will be ignored |
MAP_KEY_OVERRIDE_TARGET | 1 | Map key will be replaced on fields with this type specified |
MAP_KEY_OVERRIDE_SOURCE | 2 | Map key will be sourced from fields with this type specified |
MAP_KEY_OVERRIDE_REMOVE_KEY | 3 | Map key will be removed from fields with this type specified |
MAP_KEY_OVERRIDE_ENUM | 4 | Map 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
Name | Number | Description |
---|---|---|
DESCENDANT_SOURCES | 0 | Tags can be sourced from descendant fields |
SIBLING_SOURCES | 1 | Tags can be sourced from sibling fields |
DESCENDANT_AND_SIBLING_SOURCES | 2 | Tags can be sourced from both descendant and sibling fields |
TagTargetType
Enum for different types of tag targets
Name | Number | Description |
---|---|---|
ANCESTOR_TARGETS | 0 | Tags can be applied to ancestor fields |
SIBLING_TARGETS | 1 | Tags can be applied to sibling fields |
ANCESTOR_AND_SIBLING_TARGETS | 2 | Tags can be applied to both ancestor and sibling fields |
File-level Extensions
Extension | Type | Base | Number | Description |
---|---|---|---|---|
array_index_override_type | ArrayIndexOverrideType | .google.protobuf.FieldOptions | 50009 | Adding 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_type | BytesDecodingType | .google.protobuf.FieldOptions | 50006 | Adding 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. |
description | string | .google.protobuf.FieldOptions | 50002 | Adding the description FieldOption to a field sets the description for the channel in the chart |
display_override_enum | string | .google.protobuf.FieldOptions | 50008 | Adding 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_field | bool | .google.protobuf.FieldOptions | 50007 | Adding the ignore_field FieldOption with a value of true will cause the field to be ignored when ingesting the proto |
map_key_override_type | MapKeyOverrideType | .google.protobuf.FieldOptions | 50005 | Adding 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_source | TagSource | .google.protobuf.FieldOptions | 50004 | Adding 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_target | TagTarget | .google.protobuf.FieldOptions | 50003 | Adding 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. |
units | string | .google.protobuf.FieldOptions | 50001 | Adding the units FieldOption to a field sets the units displayed on the channel when charted |
message_is_tag_target | bool | .google.protobuf.MessageOptions | 50001 | The 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. |