proto_docs/google/protobuf/any.rb in google-cloud-alloy_db-v1-0.1.0 vs proto_docs/google/protobuf/any.rb in google-cloud-alloy_db-v1-0.2.0

- old
+ new

@@ -41,22 +41,26 @@ # Any any = Any.pack(foo); # ... # if (any.is(Foo.class)) { # foo = any.unpack(Foo.class); # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } # - # Example 3: Pack and unpack a message in Python. + # Example 3: Pack and unpack a message in Python. # # foo = Foo(...) # any = Any() # any.Pack(foo) # ... # if any.Is(Foo.DESCRIPTOR): # any.Unpack(foo) # ... # - # Example 4: Pack and unpack a message in Go + # Example 4: Pack and unpack a message in Go # # foo := &pb.Foo{...} # any, err := anypb.New(foo) # if err != nil { # ... @@ -71,12 +75,11 @@ # 'type.googleapis.com/full.type.name' as the type URL and the unpack # methods only use the fully qualified type name after the last '/' # in the type URL, for example "foo.bar.com/x/y.z" will yield type # name "y.z". # - # # JSON - # + # ==== # The JSON representation of an `Any` value uses the regular # representation of the deserialized, embedded message, with an # additional field `@type` which contains the type URL. Example: # # package google.profile;