File tree Expand file tree Collapse file tree
protos/google/cloud/compute/v1/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -547,6 +547,13 @@ StatusOr<int> DiscoveryTypeVertex::GetFieldNumber(
547547 }
548548
549549 if (field_descriptor->name () == field_name && type_name != field_type) {
550+ // Allow migration of google.protobuf.Any to google.protobuf.Struct or
551+ // google.protobuf.Value.
552+ if (absl::StrContains (type_name, " google.protobuf.Any" ) &&
553+ (absl::StrContains (field_type, " google.protobuf.Struct" ) ||
554+ absl::StrContains (field_type, " google.protobuf.Value" ))) {
555+ return field_descriptor->number ();
556+ }
550557 // Existing field type has changed. This is a breaking change.
551558 return internal::InvalidArgumentError (absl::StrFormat (
552559 " Message: %s has field: %s whose type has changed "
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ syntax = "proto3";
2121
2222package google.cloud.cpp.compute.v1 ;
2323
24- import "google/protobuf/any .proto" ;
24+ import "google/protobuf/struct .proto" ;
2525
2626message BulkInsertOperationStatus {
2727 // [Output Only] Count of VMs successfully created so far.
@@ -524,7 +524,7 @@ message Status {
524524
525525 // A list of messages that carry the error details. There is a common set of
526526 // message types for APIs to use.
527- repeated google.protobuf.Any details = 2 [json_name = "details" ];
527+ repeated google.protobuf.Struct details = 2 [json_name = "details" ];
528528
529529 // A developer-facing error message, which should be in English. Any
530530 // user-facing error message should be localized and sent in the
You can’t perform that action at this time.
0 commit comments