Class: CodeGeneratorRequest::FieldDescriptorProto

Inherits:
Object
  • Object
show all
Includes:
Beefcake::Message
Defined in:
lib/beefcake/generator.rb

Defined Under Namespace

Modules: Label, Type

Instance Method Summary collapse

Methods included from Beefcake::Message

#==, #[], #[]=, #fields, included, #initialize, #inspect, #to_hash

Instance Method Details

#default_valueObject

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.



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

optional :default_value, :string, 7

#extendedObject

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



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

optional :extended, :string, 2

#typeObject

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.



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

optional :type, Type, 5

#type_nameObject

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).



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

optional :type_name, :string, 6