Module: Google::Protobuf
- Defined in:
- lib/google/protobuf.rb,
lib/google/protobuf.rb,
lib/google/protobuf/any_pb.rb,
lib/google/protobuf/api_pb.rb,
lib/google/protobuf/type_pb.rb,
lib/google/protobuf/empty_pb.rb,
lib/google/protobuf/struct_pb.rb,
lib/google/protobuf/duration_pb.rb,
lib/google/protobuf/wrappers_pb.rb,
lib/google/protobuf/message_exts.rb,
lib/google/protobuf/timestamp_pb.rb,
lib/google/protobuf/field_mask_pb.rb,
lib/google/protobuf/repeated_field.rb,
lib/google/protobuf/well_known_types.rb,
lib/google/protobuf/source_context_pb.rb,
ext/google/protobuf_c/protobuf.c
Defined Under Namespace
Modules: Internal, MessageExts
Classes: Error, ParseError, RepeatedField, TypeError, UnexpectedStructType
Constant Summary
collapse
- Any =
Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Any").msgclass
- Api =
Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Api").msgclass
- Method =
Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Method").msgclass
- Mixin =
Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Mixin").msgclass
- Type =
Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Type").msgclass
- Field =
Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Field").msgclass
- Enum =
Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Enum").msgclass
- EnumValue =
Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.EnumValue").msgclass
- Option =
Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Option").msgclass
- Syntax =
Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Syntax").enummodule
- Empty =
Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Empty").msgclass
- Struct =
Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Struct").msgclass
- Value =
Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Value").msgclass
- ListValue =
Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.ListValue").msgclass
- NullValue =
Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.NullValue").enummodule
- Duration =
Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Duration").msgclass
- DoubleValue =
Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.DoubleValue").msgclass
- FloatValue =
Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FloatValue").msgclass
- Int64Value =
Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Int64Value").msgclass
- UInt64Value =
Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.UInt64Value").msgclass
- Int32Value =
Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Int32Value").msgclass
- UInt32Value =
Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.UInt32Value").msgclass
- BoolValue =
Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.BoolValue").msgclass
- StringValue =
Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.StringValue").msgclass
- BytesValue =
Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.BytesValue").msgclass
- Timestamp =
Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Timestamp").msgclass
- FieldMask =
Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FieldMask").msgclass
- SourceContext =
Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.SourceContext").msgclass
Class Method Summary
collapse
Class Method Details
.decode(klass, proto) ⇒ Object
68
69
70
|
# File 'lib/google/protobuf.rb', line 68
def self.decode(klass, proto)
klass.decode(proto)
end
|
.decode_json(klass, json, options = {}) ⇒ Object
72
73
74
|
# File 'lib/google/protobuf.rb', line 72
def self.decode_json(klass, json, options = {})
klass.decode_json(json, options)
end
|
.Google::Protobuf.deep_copy(obj) ⇒ Object
Performs a deep copy of a RepeatedField instance, a Map instance, or a message object, recursively copying its members.
724
725
726
727
728
729
730
731
732
733
|
# File 'ext/google/protobuf_c/message.c', line 724
VALUE Google_Protobuf_deep_copy(VALUE self, VALUE obj) {
VALUE klass = CLASS_OF(obj);
if (klass == cRepeatedField) {
return RepeatedField_deep_copy(obj);
} else if (klass == cMap) {
return Map_deep_copy(obj);
} else {
return Message_deep_copy(obj);
}
}
|
.discard_unknown ⇒ Object
.encode(msg) ⇒ Object
60
61
62
|
# File 'lib/google/protobuf.rb', line 60
def self.encode(msg)
msg.to_proto
end
|
.encode_json(msg, options = {}) ⇒ Object
64
65
66
|
# File 'lib/google/protobuf.rb', line 64
def self.encode_json(msg, options = {})
msg.to_json(options)
end
|