Class: CodeGeneratorRequest::FieldDescriptorProto

  • Object
show all
Defined in:

Defined Under Namespace

Modules: Label, Type

Instance Method Summary collapse

Methods included from Beefcake::Message

#==, #[], #[]=, #__beefcake_fields__, #assign, included, #initialize, #inspect, #to_hash

Instance Method Details


For numeric types, contains the original text representation of the value. For booleans, “true” or “false”. For strings, contains the default text contents (not escaped in any way). For bytes, contains the C escaped value. All bytes >= 128 are escaped.

# File 'lib/beefcake/generator.rb', line 74

optional :default_value, :string, 7


For extensions, this is the name of the type being extended. It is resolved in the same manner as type_name.

# File 'lib/beefcake/generator.rb', line 68

optional :extended, :string, 2


If type_name is set, this need not be set. If both this and type_name are set, this must be either TYPE_ENUM or TYPE_MESSAGE.

# File 'lib/beefcake/generator.rb', line 57

optional :type, Type, 5


For message and enum types, this is the name of the type. If the name starts with a '.', it is fully-qualified. Otherwise, C++-like scoping rules are used to find the type (i.e. first the nested types within this message are searched, then within the parent, on up to the root namespace).

# File 'lib/beefcake/generator.rb', line 64

optional :type_name, :string, 6