RProtoBuf (version 0.4.13)

label-methods: Gets the label of a field

Description

Gets the label of a field (optional, required, or repeated).

Arguments

object

A '>FieldDescriptor object.

as.string

If true, print a string representation of the type.

See Also

The method is implemented for the '>FieldDescriptor class

Examples

Run this code
# NOT RUN {
proto.file <- system.file( "proto", "addressbook.proto", package = "RProtoBuf" )
Person <- P( "tutorial.Person", file = proto.file )
# }
# NOT RUN {
label(Person$id)
label(Person$email)
label(Person$phone)
label(Person$id, TRUE)
label(Person$email, TRUE)
label(Person$phone, TRUE)
LABEL_OPTIONAL
LABEL_REQUIRED
LABEL_REPEATED
# }

Run the code above in your browser using DataCamp Workspace