Class: Google::Protobuf::Option

Inherits:
Object
  • Object
show all
Extended by:
MessageExts::ClassMethods
Includes:
MessageExts
Defined in:
proto_docs/google/protobuf/type.rb

Overview

A protocol buffer option, which can be attached to a message, field, enumeration, etc.

Instance Attribute Summary collapse

Instance Attribute Details

#name::String

Returns The option's name. For protobuf built-in options (options defined in descriptor.proto), this is the short name. For example, "map_entry". For custom options, it should be the fully-qualified name. For example, "google.api.http".

Returns:

  • (::String)

    The option's name. For protobuf built-in options (options defined in descriptor.proto), this is the short name. For example, "map_entry". For custom options, it should be the fully-qualified name. For example, "google.api.http".



215
216
217
218
# File 'proto_docs/google/protobuf/type.rb', line 215

class Option
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#value::Google::Protobuf::Any

Returns The option's value packed in an Any message. If the value is a primitive, the corresponding wrapper type defined in google/protobuf/wrappers.proto should be used. If the value is an enum, it should be stored as an int32 value using the google.protobuf.Int32Value type.

Returns:

  • (::Google::Protobuf::Any)

    The option's value packed in an Any message. If the value is a primitive, the corresponding wrapper type defined in google/protobuf/wrappers.proto should be used. If the value is an enum, it should be stored as an int32 value using the google.protobuf.Int32Value type.



215
216
217
218
# File 'proto_docs/google/protobuf/type.rb', line 215

class Option
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end