diff --git a/java-common-protos/grpc-google-common-protos/src/main/java/com/google/cloud/location/LocationsGrpc.java b/java-common-protos/grpc-google-common-protos/src/main/java/com/google/cloud/location/LocationsGrpc.java index bce34c309a..fe6b6d8ee4 100644 --- a/java-common-protos/grpc-google-common-protos/src/main/java/com/google/cloud/location/LocationsGrpc.java +++ b/java-common-protos/grpc-google-common-protos/src/main/java/com/google/cloud/location/LocationsGrpc.java @@ -171,7 +171,7 @@ public LocationsFutureStub newStub( * [Location.metadata][google.cloud.location.Location.metadata] field. * */ - public abstract static class LocationsImplBase implements io.grpc.BindableService { + public interface AsyncService { /** * @@ -180,7 +180,7 @@ public abstract static class LocationsImplBase implements io.grpc.BindableServic * Lists information about the supported locations for this service. * */ - public void listLocations( + default void listLocations( com.google.cloud.location.ListLocationsRequest request, io.grpc.stub.StreamObserver responseObserver) { @@ -195,35 +195,33 @@ public void listLocations( * Gets information about a location. * */ - public void getLocation( + default void getLocation( com.google.cloud.location.GetLocationRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getGetLocationMethod(), responseObserver); } + } + + /** + * Base class for the server implementation of the service Locations. + * + *
+   * An abstract interface that provides location-related information for
+   * a service. Service-specific metadata is provided through the
+   * [Location.metadata][google.cloud.location.Location.metadata] field.
+   * 
+ */ + public abstract static class LocationsImplBase implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getListLocationsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.location.ListLocationsRequest, - com.google.cloud.location.ListLocationsResponse>( - this, METHODID_LIST_LOCATIONS))) - .addMethod( - getGetLocationMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.location.GetLocationRequest, - com.google.cloud.location.Location>(this, METHODID_GET_LOCATION))) - .build(); + return LocationsGrpc.bindService(this); } } /** - * + * A stub to allow clients to do asynchronous rpc calls to service Locations. * *
    * An abstract interface that provides location-related information for
@@ -276,7 +274,7 @@ public void getLocation(
   }
 
   /**
-   *
+   * A stub to allow clients to do synchronous rpc calls to service Locations.
    *
    * 
    * An abstract interface that provides location-related information for
@@ -324,7 +322,7 @@ public com.google.cloud.location.Location getLocation(
   }
 
   /**
-   *
+   * A stub to allow clients to do ListenableFuture-style rpc calls to service Locations.
    *
    * 
    * An abstract interface that provides location-related information for
@@ -379,10 +377,10 @@ private static final class MethodHandlers
           io.grpc.stub.ServerCalls.ServerStreamingMethod,
           io.grpc.stub.ServerCalls.ClientStreamingMethod,
           io.grpc.stub.ServerCalls.BidiStreamingMethod {
-    private final LocationsImplBase serviceImpl;
+    private final AsyncService serviceImpl;
     private final int methodId;
 
-    MethodHandlers(LocationsImplBase serviceImpl, int methodId) {
+    MethodHandlers(AsyncService serviceImpl, int methodId) {
       this.serviceImpl = serviceImpl;
       this.methodId = methodId;
     }
@@ -418,6 +416,24 @@ public io.grpc.stub.StreamObserver invoke(
     }
   }
 
+  public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
+    return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
+        .addMethod(
+            getListLocationsMethod(),
+            io.grpc.stub.ServerCalls.asyncUnaryCall(
+                new MethodHandlers<
+                    com.google.cloud.location.ListLocationsRequest,
+                    com.google.cloud.location.ListLocationsResponse>(
+                    service, METHODID_LIST_LOCATIONS)))
+        .addMethod(
+            getGetLocationMethod(),
+            io.grpc.stub.ServerCalls.asyncUnaryCall(
+                new MethodHandlers<
+                    com.google.cloud.location.GetLocationRequest,
+                    com.google.cloud.location.Location>(service, METHODID_GET_LOCATION)))
+        .build();
+  }
+
   private abstract static class LocationsBaseDescriptorSupplier
       implements io.grpc.protobuf.ProtoFileDescriptorSupplier,
           io.grpc.protobuf.ProtoServiceDescriptorSupplier {
diff --git a/java-common-protos/grpc-google-common-protos/src/main/java/com/google/longrunning/OperationsGrpc.java b/java-common-protos/grpc-google-common-protos/src/main/java/com/google/longrunning/OperationsGrpc.java
index 551a18438c..f90982b30f 100644
--- a/java-common-protos/grpc-google-common-protos/src/main/java/com/google/longrunning/OperationsGrpc.java
+++ b/java-common-protos/grpc-google-common-protos/src/main/java/com/google/longrunning/OperationsGrpc.java
@@ -304,7 +304,7 @@ public OperationsFutureStub newStub(
    * so developers can have a consistent client experience.
    * 
*/ - public abstract static class OperationsImplBase implements io.grpc.BindableService { + public interface AsyncService { /** * @@ -321,7 +321,7 @@ public abstract static class OperationsImplBase implements io.grpc.BindableServi * is the parent resource, without the operations collection id. *
*/ - public void listOperations( + default void listOperations( com.google.longrunning.ListOperationsRequest request, io.grpc.stub.StreamObserver responseObserver) { @@ -338,7 +338,7 @@ public void listOperations( * service. *
*/ - public void getOperation( + default void getOperation( com.google.longrunning.GetOperationRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( @@ -355,7 +355,7 @@ public void getOperation( * `google.rpc.Code.UNIMPLEMENTED`. * */ - public void deleteOperation( + default void deleteOperation( com.google.longrunning.DeleteOperationRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( @@ -378,7 +378,7 @@ public void deleteOperation( * corresponding to `Code.CANCELLED`. * */ - public void cancelOperation( + default void cancelOperation( com.google.longrunning.CancelOperationRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( @@ -400,53 +400,38 @@ public void cancelOperation( * immediate response is no guarantee that the operation is done. * */ - public void waitOperation( + default void waitOperation( com.google.longrunning.WaitOperationRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getWaitOperationMethod(), responseObserver); } + } + + /** + * Base class for the server implementation of the service Operations. + * + *
+   * Manages long-running operations with an API service.
+   * When an API method normally takes long time to complete, it can be designed
+   * to return [Operation][google.longrunning.Operation] to the client, and the client can use this
+   * interface to receive the real response asynchronously by polling the
+   * operation resource, or pass the operation resource to another API (such as
+   * Google Cloud Pub/Sub API) to receive the response.  Any API service that
+   * returns long-running operations should implement the `Operations` interface
+   * so developers can have a consistent client experience.
+   * 
+ */ + public abstract static class OperationsImplBase implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getListOperationsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.longrunning.ListOperationsRequest, - com.google.longrunning.ListOperationsResponse>( - this, METHODID_LIST_OPERATIONS))) - .addMethod( - getGetOperationMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.longrunning.GetOperationRequest, com.google.longrunning.Operation>( - this, METHODID_GET_OPERATION))) - .addMethod( - getDeleteOperationMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.longrunning.DeleteOperationRequest, com.google.protobuf.Empty>( - this, METHODID_DELETE_OPERATION))) - .addMethod( - getCancelOperationMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.longrunning.CancelOperationRequest, com.google.protobuf.Empty>( - this, METHODID_CANCEL_OPERATION))) - .addMethod( - getWaitOperationMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.longrunning.WaitOperationRequest, - com.google.longrunning.Operation>(this, METHODID_WAIT_OPERATION))) - .build(); + return OperationsGrpc.bindService(this); } } /** - * + * A stub to allow clients to do asynchronous rpc calls to service Operations. * *
    * Manages long-running operations with an API service.
@@ -582,7 +567,7 @@ public void waitOperation(
   }
 
   /**
-   *
+   * A stub to allow clients to do synchronous rpc calls to service Operations.
    *
    * 
    * Manages long-running operations with an API service.
@@ -704,7 +689,7 @@ public com.google.longrunning.Operation waitOperation(
   }
 
   /**
-   *
+   * A stub to allow clients to do ListenableFuture-style rpc calls to service Operations.
    *
    * 
    * Manages long-running operations with an API service.
@@ -836,10 +821,10 @@ private static final class MethodHandlers
           io.grpc.stub.ServerCalls.ServerStreamingMethod,
           io.grpc.stub.ServerCalls.ClientStreamingMethod,
           io.grpc.stub.ServerCalls.BidiStreamingMethod {
-    private final OperationsImplBase serviceImpl;
+    private final AsyncService serviceImpl;
     private final int methodId;
 
-    MethodHandlers(OperationsImplBase serviceImpl, int methodId) {
+    MethodHandlers(AsyncService serviceImpl, int methodId) {
       this.serviceImpl = serviceImpl;
       this.methodId = methodId;
     }
@@ -890,6 +875,42 @@ public io.grpc.stub.StreamObserver invoke(
     }
   }
 
+  public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
+    return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
+        .addMethod(
+            getListOperationsMethod(),
+            io.grpc.stub.ServerCalls.asyncUnaryCall(
+                new MethodHandlers<
+                    com.google.longrunning.ListOperationsRequest,
+                    com.google.longrunning.ListOperationsResponse>(
+                    service, METHODID_LIST_OPERATIONS)))
+        .addMethod(
+            getGetOperationMethod(),
+            io.grpc.stub.ServerCalls.asyncUnaryCall(
+                new MethodHandlers<
+                    com.google.longrunning.GetOperationRequest, com.google.longrunning.Operation>(
+                    service, METHODID_GET_OPERATION)))
+        .addMethod(
+            getDeleteOperationMethod(),
+            io.grpc.stub.ServerCalls.asyncUnaryCall(
+                new MethodHandlers<
+                    com.google.longrunning.DeleteOperationRequest, com.google.protobuf.Empty>(
+                    service, METHODID_DELETE_OPERATION)))
+        .addMethod(
+            getCancelOperationMethod(),
+            io.grpc.stub.ServerCalls.asyncUnaryCall(
+                new MethodHandlers<
+                    com.google.longrunning.CancelOperationRequest, com.google.protobuf.Empty>(
+                    service, METHODID_CANCEL_OPERATION)))
+        .addMethod(
+            getWaitOperationMethod(),
+            io.grpc.stub.ServerCalls.asyncUnaryCall(
+                new MethodHandlers<
+                    com.google.longrunning.WaitOperationRequest, com.google.longrunning.Operation>(
+                    service, METHODID_WAIT_OPERATION)))
+        .build();
+  }
+
   private abstract static class OperationsBaseDescriptorSupplier
       implements io.grpc.protobuf.ProtoFileDescriptorSupplier,
           io.grpc.protobuf.ProtoServiceDescriptorSupplier {
diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/ClientLibraryOrganization.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/ClientLibraryOrganization.java
index 57545e2131..0294768338 100644
--- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/ClientLibraryOrganization.java
+++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/ClientLibraryOrganization.java
@@ -79,6 +79,36 @@ public enum ClientLibraryOrganization implements com.google.protobuf.ProtocolMes
    * STREET_VIEW = 4;
    */
   STREET_VIEW(4),
+  /**
+   *
+   *
+   * 
+   * Shopping Org.
+   * 
+ * + * SHOPPING = 5; + */ + SHOPPING(5), + /** + * + * + *
+   * Geo Org.
+   * 
+ * + * GEO = 6; + */ + GEO(6), + /** + * + * + *
+   * Generative AI - https://developers.generativeai.google
+   * 
+ * + * GENERATIVE_AI = 7; + */ + GENERATIVE_AI(7), UNRECOGNIZED(-1), ; @@ -132,6 +162,36 @@ public enum ClientLibraryOrganization implements com.google.protobuf.ProtocolMes * STREET_VIEW = 4; */ public static final int STREET_VIEW_VALUE = 4; + /** + * + * + *
+   * Shopping Org.
+   * 
+ * + * SHOPPING = 5; + */ + public static final int SHOPPING_VALUE = 5; + /** + * + * + *
+   * Geo Org.
+   * 
+ * + * GEO = 6; + */ + public static final int GEO_VALUE = 6; + /** + * + * + *
+   * Generative AI - https://developers.generativeai.google
+   * 
+ * + * GENERATIVE_AI = 7; + */ + public static final int GENERATIVE_AI_VALUE = 7; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -167,6 +227,12 @@ public static ClientLibraryOrganization forNumber(int value) { return PHOTOS; case 4: return STREET_VIEW; + case 5: + return SHOPPING; + case 6: + return GEO; + case 7: + return GENERATIVE_AI; default: return null; } diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/ClientProto.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/ClientProto.java index 2b57d89a3d..1a5e87bc39 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/ClientProto.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/ClientProto.java @@ -165,6 +165,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_api_DotnetSettings_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_api_DotnetSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_DotnetSettings_RenamedServicesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_DotnetSettings_RenamedServicesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_DotnetSettings_RenamedResourcesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_DotnetSettings_RenamedResourcesEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_api_RubySettings_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -231,32 +239,42 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "nSettings\0222\n\006common\030\001 \001(\0132\".google.api.C" + "ommonLanguageSettings\"B\n\014NodeSettings\0222\n" + "\006common\030\001 \001(\0132\".google.api.CommonLanguag" - + "eSettings\"D\n\016DotnetSettings\0222\n\006common\030\001 " - + "\001(\0132\".google.api.CommonLanguageSettings\"" - + "B\n\014RubySettings\0222\n\006common\030\001 \001(\0132\".google" - + ".api.CommonLanguageSettings\"@\n\nGoSetting" - + "s\0222\n\006common\030\001 \001(\0132\".google.api.CommonLan" - + "guageSettings\"\260\002\n\016MethodSettings\022\020\n\010sele" - + "ctor\030\001 \001(\t\022<\n\014long_running\030\002 \001(\0132&.googl" - + "e.api.MethodSettings.LongRunning\032\315\001\n\013Lon" - + "gRunning\0225\n\022initial_poll_delay\030\001 \001(\0132\031.g" - + "oogle.protobuf.Duration\022\035\n\025poll_delay_mu" - + "ltiplier\030\002 \001(\002\0221\n\016max_poll_delay\030\003 \001(\0132\031" - + ".google.protobuf.Duration\0225\n\022total_poll_" - + "timeout\030\004 \001(\0132\031.google.protobuf.Duration" - + "*y\n\031ClientLibraryOrganization\022+\n\'CLIENT_" + + "eSettings\"\252\003\n\016DotnetSettings\0222\n\006common\030\001" + + " \001(\0132\".google.api.CommonLanguageSettings" + + "\022I\n\020renamed_services\030\002 \003(\0132/.google.api." + + "DotnetSettings.RenamedServicesEntry\022K\n\021r" + + "enamed_resources\030\003 \003(\01320.google.api.Dotn" + + "etSettings.RenamedResourcesEntry\022\031\n\021igno" + + "red_resources\030\004 \003(\t\022 \n\030forced_namespace_" + + "aliases\030\005 \003(\t\022\036\n\026handwritten_signatures\030" + + "\006 \003(\t\0326\n\024RenamedServicesEntry\022\013\n\003key\030\001 \001" + + "(\t\022\r\n\005value\030\002 \001(\t:\0028\001\0327\n\025RenamedResource" + + "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"B" + + "\n\014RubySettings\0222\n\006common\030\001 \001(\0132\".google." + + "api.CommonLanguageSettings\"@\n\nGoSettings" + + "\0222\n\006common\030\001 \001(\0132\".google.api.CommonLang" + + "uageSettings\"\260\002\n\016MethodSettings\022\020\n\010selec" + + "tor\030\001 \001(\t\022<\n\014long_running\030\002 \001(\0132&.google" + + ".api.MethodSettings.LongRunning\032\315\001\n\013Long" + + "Running\0225\n\022initial_poll_delay\030\001 \001(\0132\031.go" + + "ogle.protobuf.Duration\022\035\n\025poll_delay_mul" + + "tiplier\030\002 \001(\002\0221\n\016max_poll_delay\030\003 \001(\0132\031." + + "google.protobuf.Duration\0225\n\022total_poll_t" + + "imeout\030\004 \001(\0132\031.google.protobuf.Duration*" + + "\243\001\n\031ClientLibraryOrganization\022+\n\'CLIENT_" + "LIBRARY_ORGANIZATION_UNSPECIFIED\020\000\022\t\n\005CL" + "OUD\020\001\022\007\n\003ADS\020\002\022\n\n\006PHOTOS\020\003\022\017\n\013STREET_VIE" - + "W\020\004*g\n\030ClientLibraryDestination\022*\n&CLIEN" - + "T_LIBRARY_DESTINATION_UNSPECIFIED\020\000\022\n\n\006G" - + "ITHUB\020\n\022\023\n\017PACKAGE_MANAGER\020\024:9\n\020method_s" - + "ignature\022\036.google.protobuf.MethodOptions" - + "\030\233\010 \003(\t:6\n\014default_host\022\037.google.protobu" - + "f.ServiceOptions\030\231\010 \001(\t:6\n\014oauth_scopes\022" - + "\037.google.protobuf.ServiceOptions\030\232\010 \001(\tB" - + "i\n\016com.google.apiB\013ClientProtoP\001ZAgoogle" - + ".golang.org/genproto/googleapis/api/anno" - + "tations;annotations\242\002\004GAPIb\006proto3" + + "W\020\004\022\014\n\010SHOPPING\020\005\022\007\n\003GEO\020\006\022\021\n\rGENERATIVE" + + "_AI\020\007*g\n\030ClientLibraryDestination\022*\n&CLI" + + "ENT_LIBRARY_DESTINATION_UNSPECIFIED\020\000\022\n\n" + + "\006GITHUB\020\n\022\023\n\017PACKAGE_MANAGER\020\024:9\n\020method" + + "_signature\022\036.google.protobuf.MethodOptio" + + "ns\030\233\010 \003(\t:6\n\014default_host\022\037.google.proto" + + "buf.ServiceOptions\030\231\010 \001(\t:6\n\014oauth_scope" + + "s\022\037.google.protobuf.ServiceOptions\030\232\010 \001(" + + "\tBi\n\016com.google.apiB\013ClientProtoP\001ZAgoog" + + "le.golang.org/genproto/googleapis/api/an" + + "notations;annotations\242\002\004GAPIb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -357,6 +375,27 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { internal_static_google_api_DotnetSettings_descriptor, new java.lang.String[] { "Common", + "RenamedServices", + "RenamedResources", + "IgnoredResources", + "ForcedNamespaceAliases", + "HandwrittenSignatures", + }); + internal_static_google_api_DotnetSettings_RenamedServicesEntry_descriptor = + internal_static_google_api_DotnetSettings_descriptor.getNestedTypes().get(0); + internal_static_google_api_DotnetSettings_RenamedServicesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_DotnetSettings_RenamedServicesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_api_DotnetSettings_RenamedResourcesEntry_descriptor = + internal_static_google_api_DotnetSettings_descriptor.getNestedTypes().get(1); + internal_static_google_api_DotnetSettings_RenamedResourcesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_DotnetSettings_RenamedResourcesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", }); internal_static_google_api_RubySettings_descriptor = getDescriptor().getMessageTypes().get(9); internal_static_google_api_RubySettings_fieldAccessorTable = diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/DotnetSettings.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/DotnetSettings.java index ceddb79b57..5ef78bea9c 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/DotnetSettings.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/DotnetSettings.java @@ -37,7 +37,11 @@ private DotnetSettings(com.google.protobuf.GeneratedMessageV3.Builder builder super(builder); } - private DotnetSettings() {} + private DotnetSettings() { + ignoredResources_ = com.google.protobuf.LazyStringArrayList.EMPTY; + forcedNamespaceAliases_ = com.google.protobuf.LazyStringArrayList.EMPTY; + handwrittenSignatures_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } @java.lang.Override @SuppressWarnings({"unused"}) @@ -54,6 +58,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.api.ClientProto.internal_static_google_api_DotnetSettings_descriptor; } + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetRenamedServices(); + case 3: + return internalGetRenamedResources(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -108,6 +125,463 @@ public com.google.api.CommonLanguageSettingsOrBuilder getCommonOrBuilder() { return common_ == null ? com.google.api.CommonLanguageSettings.getDefaultInstance() : common_; } + public static final int RENAMED_SERVICES_FIELD_NUMBER = 2; + + private static final class RenamedServicesDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.api.ClientProto + .internal_static_google_api_DotnetSettings_RenamedServicesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField renamedServices_; + + private com.google.protobuf.MapField + internalGetRenamedServices() { + if (renamedServices_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RenamedServicesDefaultEntryHolder.defaultEntry); + } + return renamedServices_; + } + + public int getRenamedServicesCount() { + return internalGetRenamedServices().getMap().size(); + } + /** + * + * + *
+   * Map from original service names to renamed versions.
+   * This is used when the default generated types
+   * would cause a naming conflict. (Neither name is
+   * fully-qualified.)
+   * Example: Subscriber to SubscriberServiceApi.
+   * 
+ * + * map<string, string> renamed_services = 2; + */ + @java.lang.Override + public boolean containsRenamedServices(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetRenamedServices().getMap().containsKey(key); + } + /** Use {@link #getRenamedServicesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getRenamedServices() { + return getRenamedServicesMap(); + } + /** + * + * + *
+   * Map from original service names to renamed versions.
+   * This is used when the default generated types
+   * would cause a naming conflict. (Neither name is
+   * fully-qualified.)
+   * Example: Subscriber to SubscriberServiceApi.
+   * 
+ * + * map<string, string> renamed_services = 2; + */ + @java.lang.Override + public java.util.Map getRenamedServicesMap() { + return internalGetRenamedServices().getMap(); + } + /** + * + * + *
+   * Map from original service names to renamed versions.
+   * This is used when the default generated types
+   * would cause a naming conflict. (Neither name is
+   * fully-qualified.)
+   * Example: Subscriber to SubscriberServiceApi.
+   * 
+ * + * map<string, string> renamed_services = 2; + */ + @java.lang.Override + public /* nullable */ java.lang.String getRenamedServicesOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetRenamedServices().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Map from original service names to renamed versions.
+   * This is used when the default generated types
+   * would cause a naming conflict. (Neither name is
+   * fully-qualified.)
+   * Example: Subscriber to SubscriberServiceApi.
+   * 
+ * + * map<string, string> renamed_services = 2; + */ + @java.lang.Override + public java.lang.String getRenamedServicesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetRenamedServices().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int RENAMED_RESOURCES_FIELD_NUMBER = 3; + + private static final class RenamedResourcesDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.api.ClientProto + .internal_static_google_api_DotnetSettings_RenamedResourcesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField renamedResources_; + + private com.google.protobuf.MapField + internalGetRenamedResources() { + if (renamedResources_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RenamedResourcesDefaultEntryHolder.defaultEntry); + } + return renamedResources_; + } + + public int getRenamedResourcesCount() { + return internalGetRenamedResources().getMap().size(); + } + /** + * + * + *
+   * Map from full resource types to the effective short name
+   * for the resource. This is used when otherwise resource
+   * named from different services would cause naming collisions.
+   * Example entry:
+   * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+   * 
+ * + * map<string, string> renamed_resources = 3; + */ + @java.lang.Override + public boolean containsRenamedResources(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetRenamedResources().getMap().containsKey(key); + } + /** Use {@link #getRenamedResourcesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getRenamedResources() { + return getRenamedResourcesMap(); + } + /** + * + * + *
+   * Map from full resource types to the effective short name
+   * for the resource. This is used when otherwise resource
+   * named from different services would cause naming collisions.
+   * Example entry:
+   * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+   * 
+ * + * map<string, string> renamed_resources = 3; + */ + @java.lang.Override + public java.util.Map getRenamedResourcesMap() { + return internalGetRenamedResources().getMap(); + } + /** + * + * + *
+   * Map from full resource types to the effective short name
+   * for the resource. This is used when otherwise resource
+   * named from different services would cause naming collisions.
+   * Example entry:
+   * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+   * 
+ * + * map<string, string> renamed_resources = 3; + */ + @java.lang.Override + public /* nullable */ java.lang.String getRenamedResourcesOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetRenamedResources().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Map from full resource types to the effective short name
+   * for the resource. This is used when otherwise resource
+   * named from different services would cause naming collisions.
+   * Example entry:
+   * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+   * 
+ * + * map<string, string> renamed_resources = 3; + */ + @java.lang.Override + public java.lang.String getRenamedResourcesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetRenamedResources().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int IGNORED_RESOURCES_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList ignoredResources_; + /** + * + * + *
+   * List of full resource types to ignore during generation.
+   * This is typically used for API-specific Location resources,
+   * which should be handled by the generator as if they were actually
+   * the common Location resources.
+   * Example entry: "documentai.googleapis.com/Location"
+   * 
+ * + * repeated string ignored_resources = 4; + * + * @return A list containing the ignoredResources. + */ + public com.google.protobuf.ProtocolStringList getIgnoredResourcesList() { + return ignoredResources_; + } + /** + * + * + *
+   * List of full resource types to ignore during generation.
+   * This is typically used for API-specific Location resources,
+   * which should be handled by the generator as if they were actually
+   * the common Location resources.
+   * Example entry: "documentai.googleapis.com/Location"
+   * 
+ * + * repeated string ignored_resources = 4; + * + * @return The count of ignoredResources. + */ + public int getIgnoredResourcesCount() { + return ignoredResources_.size(); + } + /** + * + * + *
+   * List of full resource types to ignore during generation.
+   * This is typically used for API-specific Location resources,
+   * which should be handled by the generator as if they were actually
+   * the common Location resources.
+   * Example entry: "documentai.googleapis.com/Location"
+   * 
+ * + * repeated string ignored_resources = 4; + * + * @param index The index of the element to return. + * @return The ignoredResources at the given index. + */ + public java.lang.String getIgnoredResources(int index) { + return ignoredResources_.get(index); + } + /** + * + * + *
+   * List of full resource types to ignore during generation.
+   * This is typically used for API-specific Location resources,
+   * which should be handled by the generator as if they were actually
+   * the common Location resources.
+   * Example entry: "documentai.googleapis.com/Location"
+   * 
+ * + * repeated string ignored_resources = 4; + * + * @param index The index of the value to return. + * @return The bytes of the ignoredResources at the given index. + */ + public com.google.protobuf.ByteString getIgnoredResourcesBytes(int index) { + return ignoredResources_.getByteString(index); + } + + public static final int FORCED_NAMESPACE_ALIASES_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList forcedNamespaceAliases_; + /** + * + * + *
+   * Namespaces which must be aliased in snippets due to
+   * a known (but non-generator-predictable) naming collision
+   * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @return A list containing the forcedNamespaceAliases. + */ + public com.google.protobuf.ProtocolStringList getForcedNamespaceAliasesList() { + return forcedNamespaceAliases_; + } + /** + * + * + *
+   * Namespaces which must be aliased in snippets due to
+   * a known (but non-generator-predictable) naming collision
+   * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @return The count of forcedNamespaceAliases. + */ + public int getForcedNamespaceAliasesCount() { + return forcedNamespaceAliases_.size(); + } + /** + * + * + *
+   * Namespaces which must be aliased in snippets due to
+   * a known (but non-generator-predictable) naming collision
+   * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @param index The index of the element to return. + * @return The forcedNamespaceAliases at the given index. + */ + public java.lang.String getForcedNamespaceAliases(int index) { + return forcedNamespaceAliases_.get(index); + } + /** + * + * + *
+   * Namespaces which must be aliased in snippets due to
+   * a known (but non-generator-predictable) naming collision
+   * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @param index The index of the value to return. + * @return The bytes of the forcedNamespaceAliases at the given index. + */ + public com.google.protobuf.ByteString getForcedNamespaceAliasesBytes(int index) { + return forcedNamespaceAliases_.getByteString(index); + } + + public static final int HANDWRITTEN_SIGNATURES_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringList handwrittenSignatures_; + /** + * + * + *
+   * Method signatures (in the form "service.method(signature)")
+   * which are provided separately, so shouldn't be generated.
+   * Snippets *calling* these methods are still generated, however.
+   * 
+ * + * repeated string handwritten_signatures = 6; + * + * @return A list containing the handwrittenSignatures. + */ + public com.google.protobuf.ProtocolStringList getHandwrittenSignaturesList() { + return handwrittenSignatures_; + } + /** + * + * + *
+   * Method signatures (in the form "service.method(signature)")
+   * which are provided separately, so shouldn't be generated.
+   * Snippets *calling* these methods are still generated, however.
+   * 
+ * + * repeated string handwritten_signatures = 6; + * + * @return The count of handwrittenSignatures. + */ + public int getHandwrittenSignaturesCount() { + return handwrittenSignatures_.size(); + } + /** + * + * + *
+   * Method signatures (in the form "service.method(signature)")
+   * which are provided separately, so shouldn't be generated.
+   * Snippets *calling* these methods are still generated, however.
+   * 
+ * + * repeated string handwritten_signatures = 6; + * + * @param index The index of the element to return. + * @return The handwrittenSignatures at the given index. + */ + public java.lang.String getHandwrittenSignatures(int index) { + return handwrittenSignatures_.get(index); + } + /** + * + * + *
+   * Method signatures (in the form "service.method(signature)")
+   * which are provided separately, so shouldn't be generated.
+   * Snippets *calling* these methods are still generated, however.
+   * 
+ * + * repeated string handwritten_signatures = 6; + * + * @param index The index of the value to return. + * @return The bytes of the handwrittenSignatures at the given index. + */ + public com.google.protobuf.ByteString getHandwrittenSignaturesBytes(int index) { + return handwrittenSignatures_.getByteString(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -125,6 +599,21 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (common_ != null) { output.writeMessage(1, getCommon()); } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetRenamedServices(), RenamedServicesDefaultEntryHolder.defaultEntry, 2); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetRenamedResources(), RenamedResourcesDefaultEntryHolder.defaultEntry, 3); + for (int i = 0; i < ignoredResources_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, ignoredResources_.getRaw(i)); + } + for (int i = 0; i < forcedNamespaceAliases_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 5, forcedNamespaceAliases_.getRaw(i)); + } + for (int i = 0; i < handwrittenSignatures_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 6, handwrittenSignatures_.getRaw(i)); + } getUnknownFields().writeTo(output); } @@ -137,6 +626,50 @@ public int getSerializedSize() { if (common_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCommon()); } + for (java.util.Map.Entry entry : + internalGetRenamedServices().getMap().entrySet()) { + com.google.protobuf.MapEntry renamedServices__ = + RenamedServicesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, renamedServices__); + } + for (java.util.Map.Entry entry : + internalGetRenamedResources().getMap().entrySet()) { + com.google.protobuf.MapEntry renamedResources__ = + RenamedResourcesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, renamedResources__); + } + { + int dataSize = 0; + for (int i = 0; i < ignoredResources_.size(); i++) { + dataSize += computeStringSizeNoTag(ignoredResources_.getRaw(i)); + } + size += dataSize; + size += 1 * getIgnoredResourcesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < forcedNamespaceAliases_.size(); i++) { + dataSize += computeStringSizeNoTag(forcedNamespaceAliases_.getRaw(i)); + } + size += dataSize; + size += 1 * getForcedNamespaceAliasesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < handwrittenSignatures_.size(); i++) { + dataSize += computeStringSizeNoTag(handwrittenSignatures_.getRaw(i)); + } + size += dataSize; + size += 1 * getHandwrittenSignaturesList().size(); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -156,6 +689,12 @@ public boolean equals(final java.lang.Object obj) { if (hasCommon()) { if (!getCommon().equals(other.getCommon())) return false; } + if (!internalGetRenamedServices().equals(other.internalGetRenamedServices())) return false; + if (!internalGetRenamedResources().equals(other.internalGetRenamedResources())) return false; + if (!getIgnoredResourcesList().equals(other.getIgnoredResourcesList())) return false; + if (!getForcedNamespaceAliasesList().equals(other.getForcedNamespaceAliasesList())) + return false; + if (!getHandwrittenSignaturesList().equals(other.getHandwrittenSignaturesList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -171,6 +710,26 @@ public int hashCode() { hash = (37 * hash) + COMMON_FIELD_NUMBER; hash = (53 * hash) + getCommon().hashCode(); } + if (!internalGetRenamedServices().getMap().isEmpty()) { + hash = (37 * hash) + RENAMED_SERVICES_FIELD_NUMBER; + hash = (53 * hash) + internalGetRenamedServices().hashCode(); + } + if (!internalGetRenamedResources().getMap().isEmpty()) { + hash = (37 * hash) + RENAMED_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + internalGetRenamedResources().hashCode(); + } + if (getIgnoredResourcesCount() > 0) { + hash = (37 * hash) + IGNORED_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getIgnoredResourcesList().hashCode(); + } + if (getForcedNamespaceAliasesCount() > 0) { + hash = (37 * hash) + FORCED_NAMESPACE_ALIASES_FIELD_NUMBER; + hash = (53 * hash) + getForcedNamespaceAliasesList().hashCode(); + } + if (getHandwrittenSignaturesCount() > 0) { + hash = (37 * hash) + HANDWRITTEN_SIGNATURES_FIELD_NUMBER; + hash = (53 * hash) + getHandwrittenSignaturesList().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -287,6 +846,30 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.api.ClientProto.internal_static_google_api_DotnetSettings_descriptor; } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 2: + return internalGetRenamedServices(); + case 3: + return internalGetRenamedResources(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 2: + return internalGetMutableRenamedServices(); + case 3: + return internalGetMutableRenamedResources(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -311,6 +894,14 @@ public Builder clear() { commonBuilder_.dispose(); commonBuilder_ = null; } + internalGetMutableRenamedServices().clear(); + internalGetMutableRenamedResources().clear(); + ignoredResources_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + forcedNamespaceAliases_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000010); + handwrittenSignatures_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); return this; } @@ -336,6 +927,7 @@ public com.google.api.DotnetSettings build() { @java.lang.Override public com.google.api.DotnetSettings buildPartial() { com.google.api.DotnetSettings result = new com.google.api.DotnetSettings(this); + buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } @@ -343,11 +935,37 @@ public com.google.api.DotnetSettings buildPartial() { return result; } + private void buildPartialRepeatedFields(com.google.api.DotnetSettings result) { + if (((bitField0_ & 0x00000008) != 0)) { + ignoredResources_ = ignoredResources_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.ignoredResources_ = ignoredResources_; + if (((bitField0_ & 0x00000010) != 0)) { + forcedNamespaceAliases_ = forcedNamespaceAliases_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.forcedNamespaceAliases_ = forcedNamespaceAliases_; + if (((bitField0_ & 0x00000020) != 0)) { + handwrittenSignatures_ = handwrittenSignatures_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.handwrittenSignatures_ = handwrittenSignatures_; + } + private void buildPartial0(com.google.api.DotnetSettings result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.common_ = commonBuilder_ == null ? common_ : commonBuilder_.build(); } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.renamedServices_ = internalGetRenamedServices(); + result.renamedServices_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.renamedResources_ = internalGetRenamedResources(); + result.renamedResources_.makeImmutable(); + } } @java.lang.Override @@ -398,14 +1016,48 @@ public Builder mergeFrom(com.google.api.DotnetSettings other) { if (other.hasCommon()) { mergeCommon(other.getCommon()); } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; + internalGetMutableRenamedServices().mergeFrom(other.internalGetRenamedServices()); + bitField0_ |= 0x00000002; + internalGetMutableRenamedResources().mergeFrom(other.internalGetRenamedResources()); + bitField0_ |= 0x00000004; + if (!other.ignoredResources_.isEmpty()) { + if (ignoredResources_.isEmpty()) { + ignoredResources_ = other.ignoredResources_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureIgnoredResourcesIsMutable(); + ignoredResources_.addAll(other.ignoredResources_); + } + onChanged(); + } + if (!other.forcedNamespaceAliases_.isEmpty()) { + if (forcedNamespaceAliases_.isEmpty()) { + forcedNamespaceAliases_ = other.forcedNamespaceAliases_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureForcedNamespaceAliasesIsMutable(); + forcedNamespaceAliases_.addAll(other.forcedNamespaceAliases_); + } + onChanged(); + } + if (!other.handwrittenSignatures_.isEmpty()) { + if (handwrittenSignatures_.isEmpty()) { + handwrittenSignatures_ = other.handwrittenSignatures_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureHandwrittenSignaturesIsMutable(); + handwrittenSignatures_.addAll(other.handwrittenSignatures_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; } @java.lang.Override @@ -430,6 +1082,52 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 10 + case 18: + { + com.google.protobuf.MapEntry renamedServices__ = + input.readMessage( + RenamedServicesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableRenamedServices() + .getMutableMap() + .put(renamedServices__.getKey(), renamedServices__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.protobuf.MapEntry + renamedResources__ = + input.readMessage( + RenamedResourcesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableRenamedResources() + .getMutableMap() + .put(renamedResources__.getKey(), renamedResources__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureIgnoredResourcesIsMutable(); + ignoredResources_.add(s); + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureForcedNamespaceAliasesIsMutable(); + forcedNamespaceAliases_.add(s); + break; + } // case 42 + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureHandwrittenSignaturesIsMutable(); + handwrittenSignatures_.add(s); + break; + } // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -632,6 +1330,968 @@ public com.google.api.CommonLanguageSettingsOrBuilder getCommonOrBuilder() { return commonBuilder_; } + private com.google.protobuf.MapField renamedServices_; + + private com.google.protobuf.MapField + internalGetRenamedServices() { + if (renamedServices_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RenamedServicesDefaultEntryHolder.defaultEntry); + } + return renamedServices_; + } + + private com.google.protobuf.MapField + internalGetMutableRenamedServices() { + if (renamedServices_ == null) { + renamedServices_ = + com.google.protobuf.MapField.newMapField( + RenamedServicesDefaultEntryHolder.defaultEntry); + } + if (!renamedServices_.isMutable()) { + renamedServices_ = renamedServices_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return renamedServices_; + } + + public int getRenamedServicesCount() { + return internalGetRenamedServices().getMap().size(); + } + /** + * + * + *
+     * Map from original service names to renamed versions.
+     * This is used when the default generated types
+     * would cause a naming conflict. (Neither name is
+     * fully-qualified.)
+     * Example: Subscriber to SubscriberServiceApi.
+     * 
+ * + * map<string, string> renamed_services = 2; + */ + @java.lang.Override + public boolean containsRenamedServices(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetRenamedServices().getMap().containsKey(key); + } + /** Use {@link #getRenamedServicesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getRenamedServices() { + return getRenamedServicesMap(); + } + /** + * + * + *
+     * Map from original service names to renamed versions.
+     * This is used when the default generated types
+     * would cause a naming conflict. (Neither name is
+     * fully-qualified.)
+     * Example: Subscriber to SubscriberServiceApi.
+     * 
+ * + * map<string, string> renamed_services = 2; + */ + @java.lang.Override + public java.util.Map getRenamedServicesMap() { + return internalGetRenamedServices().getMap(); + } + /** + * + * + *
+     * Map from original service names to renamed versions.
+     * This is used when the default generated types
+     * would cause a naming conflict. (Neither name is
+     * fully-qualified.)
+     * Example: Subscriber to SubscriberServiceApi.
+     * 
+ * + * map<string, string> renamed_services = 2; + */ + @java.lang.Override + public /* nullable */ java.lang.String getRenamedServicesOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetRenamedServices().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Map from original service names to renamed versions.
+     * This is used when the default generated types
+     * would cause a naming conflict. (Neither name is
+     * fully-qualified.)
+     * Example: Subscriber to SubscriberServiceApi.
+     * 
+ * + * map<string, string> renamed_services = 2; + */ + @java.lang.Override + public java.lang.String getRenamedServicesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetRenamedServices().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearRenamedServices() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableRenamedServices().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Map from original service names to renamed versions.
+     * This is used when the default generated types
+     * would cause a naming conflict. (Neither name is
+     * fully-qualified.)
+     * Example: Subscriber to SubscriberServiceApi.
+     * 
+ * + * map<string, string> renamed_services = 2; + */ + public Builder removeRenamedServices(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableRenamedServices().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableRenamedServices() { + bitField0_ |= 0x00000002; + return internalGetMutableRenamedServices().getMutableMap(); + } + /** + * + * + *
+     * Map from original service names to renamed versions.
+     * This is used when the default generated types
+     * would cause a naming conflict. (Neither name is
+     * fully-qualified.)
+     * Example: Subscriber to SubscriberServiceApi.
+     * 
+ * + * map<string, string> renamed_services = 2; + */ + public Builder putRenamedServices(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableRenamedServices().getMutableMap().put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + * + * + *
+     * Map from original service names to renamed versions.
+     * This is used when the default generated types
+     * would cause a naming conflict. (Neither name is
+     * fully-qualified.)
+     * Example: Subscriber to SubscriberServiceApi.
+     * 
+ * + * map<string, string> renamed_services = 2; + */ + public Builder putAllRenamedServices(java.util.Map values) { + internalGetMutableRenamedServices().getMutableMap().putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + private com.google.protobuf.MapField renamedResources_; + + private com.google.protobuf.MapField + internalGetRenamedResources() { + if (renamedResources_ == null) { + return com.google.protobuf.MapField.emptyMapField( + RenamedResourcesDefaultEntryHolder.defaultEntry); + } + return renamedResources_; + } + + private com.google.protobuf.MapField + internalGetMutableRenamedResources() { + if (renamedResources_ == null) { + renamedResources_ = + com.google.protobuf.MapField.newMapField( + RenamedResourcesDefaultEntryHolder.defaultEntry); + } + if (!renamedResources_.isMutable()) { + renamedResources_ = renamedResources_.copy(); + } + bitField0_ |= 0x00000004; + onChanged(); + return renamedResources_; + } + + public int getRenamedResourcesCount() { + return internalGetRenamedResources().getMap().size(); + } + /** + * + * + *
+     * Map from full resource types to the effective short name
+     * for the resource. This is used when otherwise resource
+     * named from different services would cause naming collisions.
+     * Example entry:
+     * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+     * 
+ * + * map<string, string> renamed_resources = 3; + */ + @java.lang.Override + public boolean containsRenamedResources(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetRenamedResources().getMap().containsKey(key); + } + /** Use {@link #getRenamedResourcesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getRenamedResources() { + return getRenamedResourcesMap(); + } + /** + * + * + *
+     * Map from full resource types to the effective short name
+     * for the resource. This is used when otherwise resource
+     * named from different services would cause naming collisions.
+     * Example entry:
+     * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+     * 
+ * + * map<string, string> renamed_resources = 3; + */ + @java.lang.Override + public java.util.Map getRenamedResourcesMap() { + return internalGetRenamedResources().getMap(); + } + /** + * + * + *
+     * Map from full resource types to the effective short name
+     * for the resource. This is used when otherwise resource
+     * named from different services would cause naming collisions.
+     * Example entry:
+     * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+     * 
+ * + * map<string, string> renamed_resources = 3; + */ + @java.lang.Override + public /* nullable */ java.lang.String getRenamedResourcesOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetRenamedResources().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Map from full resource types to the effective short name
+     * for the resource. This is used when otherwise resource
+     * named from different services would cause naming collisions.
+     * Example entry:
+     * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+     * 
+ * + * map<string, string> renamed_resources = 3; + */ + @java.lang.Override + public java.lang.String getRenamedResourcesOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetRenamedResources().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearRenamedResources() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableRenamedResources().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Map from full resource types to the effective short name
+     * for the resource. This is used when otherwise resource
+     * named from different services would cause naming collisions.
+     * Example entry:
+     * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+     * 
+ * + * map<string, string> renamed_resources = 3; + */ + public Builder removeRenamedResources(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableRenamedResources().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableRenamedResources() { + bitField0_ |= 0x00000004; + return internalGetMutableRenamedResources().getMutableMap(); + } + /** + * + * + *
+     * Map from full resource types to the effective short name
+     * for the resource. This is used when otherwise resource
+     * named from different services would cause naming collisions.
+     * Example entry:
+     * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+     * 
+ * + * map<string, string> renamed_resources = 3; + */ + public Builder putRenamedResources(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableRenamedResources().getMutableMap().put(key, value); + bitField0_ |= 0x00000004; + return this; + } + /** + * + * + *
+     * Map from full resource types to the effective short name
+     * for the resource. This is used when otherwise resource
+     * named from different services would cause naming collisions.
+     * Example entry:
+     * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+     * 
+ * + * map<string, string> renamed_resources = 3; + */ + public Builder putAllRenamedResources( + java.util.Map values) { + internalGetMutableRenamedResources().getMutableMap().putAll(values); + bitField0_ |= 0x00000004; + return this; + } + + private com.google.protobuf.LazyStringList ignoredResources_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureIgnoredResourcesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + ignoredResources_ = new com.google.protobuf.LazyStringArrayList(ignoredResources_); + bitField0_ |= 0x00000008; + } + } + /** + * + * + *
+     * List of full resource types to ignore during generation.
+     * This is typically used for API-specific Location resources,
+     * which should be handled by the generator as if they were actually
+     * the common Location resources.
+     * Example entry: "documentai.googleapis.com/Location"
+     * 
+ * + * repeated string ignored_resources = 4; + * + * @return A list containing the ignoredResources. + */ + public com.google.protobuf.ProtocolStringList getIgnoredResourcesList() { + return ignoredResources_.getUnmodifiableView(); + } + /** + * + * + *
+     * List of full resource types to ignore during generation.
+     * This is typically used for API-specific Location resources,
+     * which should be handled by the generator as if they were actually
+     * the common Location resources.
+     * Example entry: "documentai.googleapis.com/Location"
+     * 
+ * + * repeated string ignored_resources = 4; + * + * @return The count of ignoredResources. + */ + public int getIgnoredResourcesCount() { + return ignoredResources_.size(); + } + /** + * + * + *
+     * List of full resource types to ignore during generation.
+     * This is typically used for API-specific Location resources,
+     * which should be handled by the generator as if they were actually
+     * the common Location resources.
+     * Example entry: "documentai.googleapis.com/Location"
+     * 
+ * + * repeated string ignored_resources = 4; + * + * @param index The index of the element to return. + * @return The ignoredResources at the given index. + */ + public java.lang.String getIgnoredResources(int index) { + return ignoredResources_.get(index); + } + /** + * + * + *
+     * List of full resource types to ignore during generation.
+     * This is typically used for API-specific Location resources,
+     * which should be handled by the generator as if they were actually
+     * the common Location resources.
+     * Example entry: "documentai.googleapis.com/Location"
+     * 
+ * + * repeated string ignored_resources = 4; + * + * @param index The index of the value to return. + * @return The bytes of the ignoredResources at the given index. + */ + public com.google.protobuf.ByteString getIgnoredResourcesBytes(int index) { + return ignoredResources_.getByteString(index); + } + /** + * + * + *
+     * List of full resource types to ignore during generation.
+     * This is typically used for API-specific Location resources,
+     * which should be handled by the generator as if they were actually
+     * the common Location resources.
+     * Example entry: "documentai.googleapis.com/Location"
+     * 
+ * + * repeated string ignored_resources = 4; + * + * @param index The index to set the value at. + * @param value The ignoredResources to set. + * @return This builder for chaining. + */ + public Builder setIgnoredResources(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIgnoredResourcesIsMutable(); + ignoredResources_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * List of full resource types to ignore during generation.
+     * This is typically used for API-specific Location resources,
+     * which should be handled by the generator as if they were actually
+     * the common Location resources.
+     * Example entry: "documentai.googleapis.com/Location"
+     * 
+ * + * repeated string ignored_resources = 4; + * + * @param value The ignoredResources to add. + * @return This builder for chaining. + */ + public Builder addIgnoredResources(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureIgnoredResourcesIsMutable(); + ignoredResources_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * List of full resource types to ignore during generation.
+     * This is typically used for API-specific Location resources,
+     * which should be handled by the generator as if they were actually
+     * the common Location resources.
+     * Example entry: "documentai.googleapis.com/Location"
+     * 
+ * + * repeated string ignored_resources = 4; + * + * @param values The ignoredResources to add. + * @return This builder for chaining. + */ + public Builder addAllIgnoredResources(java.lang.Iterable values) { + ensureIgnoredResourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ignoredResources_); + onChanged(); + return this; + } + /** + * + * + *
+     * List of full resource types to ignore during generation.
+     * This is typically used for API-specific Location resources,
+     * which should be handled by the generator as if they were actually
+     * the common Location resources.
+     * Example entry: "documentai.googleapis.com/Location"
+     * 
+ * + * repeated string ignored_resources = 4; + * + * @return This builder for chaining. + */ + public Builder clearIgnoredResources() { + ignoredResources_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * List of full resource types to ignore during generation.
+     * This is typically used for API-specific Location resources,
+     * which should be handled by the generator as if they were actually
+     * the common Location resources.
+     * Example entry: "documentai.googleapis.com/Location"
+     * 
+ * + * repeated string ignored_resources = 4; + * + * @param value The bytes of the ignoredResources to add. + * @return This builder for chaining. + */ + public Builder addIgnoredResourcesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureIgnoredResourcesIsMutable(); + ignoredResources_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList forcedNamespaceAliases_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureForcedNamespaceAliasesIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + forcedNamespaceAliases_ = + new com.google.protobuf.LazyStringArrayList(forcedNamespaceAliases_); + bitField0_ |= 0x00000010; + } + } + /** + * + * + *
+     * Namespaces which must be aliased in snippets due to
+     * a known (but non-generator-predictable) naming collision
+     * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @return A list containing the forcedNamespaceAliases. + */ + public com.google.protobuf.ProtocolStringList getForcedNamespaceAliasesList() { + return forcedNamespaceAliases_.getUnmodifiableView(); + } + /** + * + * + *
+     * Namespaces which must be aliased in snippets due to
+     * a known (but non-generator-predictable) naming collision
+     * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @return The count of forcedNamespaceAliases. + */ + public int getForcedNamespaceAliasesCount() { + return forcedNamespaceAliases_.size(); + } + /** + * + * + *
+     * Namespaces which must be aliased in snippets due to
+     * a known (but non-generator-predictable) naming collision
+     * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @param index The index of the element to return. + * @return The forcedNamespaceAliases at the given index. + */ + public java.lang.String getForcedNamespaceAliases(int index) { + return forcedNamespaceAliases_.get(index); + } + /** + * + * + *
+     * Namespaces which must be aliased in snippets due to
+     * a known (but non-generator-predictable) naming collision
+     * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @param index The index of the value to return. + * @return The bytes of the forcedNamespaceAliases at the given index. + */ + public com.google.protobuf.ByteString getForcedNamespaceAliasesBytes(int index) { + return forcedNamespaceAliases_.getByteString(index); + } + /** + * + * + *
+     * Namespaces which must be aliased in snippets due to
+     * a known (but non-generator-predictable) naming collision
+     * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @param index The index to set the value at. + * @param value The forcedNamespaceAliases to set. + * @return This builder for chaining. + */ + public Builder setForcedNamespaceAliases(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureForcedNamespaceAliasesIsMutable(); + forcedNamespaceAliases_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Namespaces which must be aliased in snippets due to
+     * a known (but non-generator-predictable) naming collision
+     * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @param value The forcedNamespaceAliases to add. + * @return This builder for chaining. + */ + public Builder addForcedNamespaceAliases(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureForcedNamespaceAliasesIsMutable(); + forcedNamespaceAliases_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Namespaces which must be aliased in snippets due to
+     * a known (but non-generator-predictable) naming collision
+     * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @param values The forcedNamespaceAliases to add. + * @return This builder for chaining. + */ + public Builder addAllForcedNamespaceAliases(java.lang.Iterable values) { + ensureForcedNamespaceAliasesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, forcedNamespaceAliases_); + onChanged(); + return this; + } + /** + * + * + *
+     * Namespaces which must be aliased in snippets due to
+     * a known (but non-generator-predictable) naming collision
+     * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @return This builder for chaining. + */ + public Builder clearForcedNamespaceAliases() { + forcedNamespaceAliases_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Namespaces which must be aliased in snippets due to
+     * a known (but non-generator-predictable) naming collision
+     * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @param value The bytes of the forcedNamespaceAliases to add. + * @return This builder for chaining. + */ + public Builder addForcedNamespaceAliasesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureForcedNamespaceAliasesIsMutable(); + forcedNamespaceAliases_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList handwrittenSignatures_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureHandwrittenSignaturesIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + handwrittenSignatures_ = + new com.google.protobuf.LazyStringArrayList(handwrittenSignatures_); + bitField0_ |= 0x00000020; + } + } + /** + * + * + *
+     * Method signatures (in the form "service.method(signature)")
+     * which are provided separately, so shouldn't be generated.
+     * Snippets *calling* these methods are still generated, however.
+     * 
+ * + * repeated string handwritten_signatures = 6; + * + * @return A list containing the handwrittenSignatures. + */ + public com.google.protobuf.ProtocolStringList getHandwrittenSignaturesList() { + return handwrittenSignatures_.getUnmodifiableView(); + } + /** + * + * + *
+     * Method signatures (in the form "service.method(signature)")
+     * which are provided separately, so shouldn't be generated.
+     * Snippets *calling* these methods are still generated, however.
+     * 
+ * + * repeated string handwritten_signatures = 6; + * + * @return The count of handwrittenSignatures. + */ + public int getHandwrittenSignaturesCount() { + return handwrittenSignatures_.size(); + } + /** + * + * + *
+     * Method signatures (in the form "service.method(signature)")
+     * which are provided separately, so shouldn't be generated.
+     * Snippets *calling* these methods are still generated, however.
+     * 
+ * + * repeated string handwritten_signatures = 6; + * + * @param index The index of the element to return. + * @return The handwrittenSignatures at the given index. + */ + public java.lang.String getHandwrittenSignatures(int index) { + return handwrittenSignatures_.get(index); + } + /** + * + * + *
+     * Method signatures (in the form "service.method(signature)")
+     * which are provided separately, so shouldn't be generated.
+     * Snippets *calling* these methods are still generated, however.
+     * 
+ * + * repeated string handwritten_signatures = 6; + * + * @param index The index of the value to return. + * @return The bytes of the handwrittenSignatures at the given index. + */ + public com.google.protobuf.ByteString getHandwrittenSignaturesBytes(int index) { + return handwrittenSignatures_.getByteString(index); + } + /** + * + * + *
+     * Method signatures (in the form "service.method(signature)")
+     * which are provided separately, so shouldn't be generated.
+     * Snippets *calling* these methods are still generated, however.
+     * 
+ * + * repeated string handwritten_signatures = 6; + * + * @param index The index to set the value at. + * @param value The handwrittenSignatures to set. + * @return This builder for chaining. + */ + public Builder setHandwrittenSignatures(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureHandwrittenSignaturesIsMutable(); + handwrittenSignatures_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Method signatures (in the form "service.method(signature)")
+     * which are provided separately, so shouldn't be generated.
+     * Snippets *calling* these methods are still generated, however.
+     * 
+ * + * repeated string handwritten_signatures = 6; + * + * @param value The handwrittenSignatures to add. + * @return This builder for chaining. + */ + public Builder addHandwrittenSignatures(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureHandwrittenSignaturesIsMutable(); + handwrittenSignatures_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Method signatures (in the form "service.method(signature)")
+     * which are provided separately, so shouldn't be generated.
+     * Snippets *calling* these methods are still generated, however.
+     * 
+ * + * repeated string handwritten_signatures = 6; + * + * @param values The handwrittenSignatures to add. + * @return This builder for chaining. + */ + public Builder addAllHandwrittenSignatures(java.lang.Iterable values) { + ensureHandwrittenSignaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, handwrittenSignatures_); + onChanged(); + return this; + } + /** + * + * + *
+     * Method signatures (in the form "service.method(signature)")
+     * which are provided separately, so shouldn't be generated.
+     * Snippets *calling* these methods are still generated, however.
+     * 
+ * + * repeated string handwritten_signatures = 6; + * + * @return This builder for chaining. + */ + public Builder clearHandwrittenSignatures() { + handwrittenSignatures_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Method signatures (in the form "service.method(signature)")
+     * which are provided separately, so shouldn't be generated.
+     * Snippets *calling* these methods are still generated, however.
+     * 
+ * + * repeated string handwritten_signatures = 6; + * + * @param value The bytes of the handwrittenSignatures to add. + * @return This builder for chaining. + */ + public Builder addHandwrittenSignaturesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureHandwrittenSignaturesIsMutable(); + handwrittenSignatures_.add(value); + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/DotnetSettingsOrBuilder.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/DotnetSettingsOrBuilder.java index 4e643721bb..39f1b7133d 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/DotnetSettingsOrBuilder.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/DotnetSettingsOrBuilder.java @@ -57,4 +57,341 @@ public interface DotnetSettingsOrBuilder * .google.api.CommonLanguageSettings common = 1; */ com.google.api.CommonLanguageSettingsOrBuilder getCommonOrBuilder(); + + /** + * + * + *
+   * Map from original service names to renamed versions.
+   * This is used when the default generated types
+   * would cause a naming conflict. (Neither name is
+   * fully-qualified.)
+   * Example: Subscriber to SubscriberServiceApi.
+   * 
+ * + * map<string, string> renamed_services = 2; + */ + int getRenamedServicesCount(); + /** + * + * + *
+   * Map from original service names to renamed versions.
+   * This is used when the default generated types
+   * would cause a naming conflict. (Neither name is
+   * fully-qualified.)
+   * Example: Subscriber to SubscriberServiceApi.
+   * 
+ * + * map<string, string> renamed_services = 2; + */ + boolean containsRenamedServices(java.lang.String key); + /** Use {@link #getRenamedServicesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getRenamedServices(); + /** + * + * + *
+   * Map from original service names to renamed versions.
+   * This is used when the default generated types
+   * would cause a naming conflict. (Neither name is
+   * fully-qualified.)
+   * Example: Subscriber to SubscriberServiceApi.
+   * 
+ * + * map<string, string> renamed_services = 2; + */ + java.util.Map getRenamedServicesMap(); + /** + * + * + *
+   * Map from original service names to renamed versions.
+   * This is used when the default generated types
+   * would cause a naming conflict. (Neither name is
+   * fully-qualified.)
+   * Example: Subscriber to SubscriberServiceApi.
+   * 
+ * + * map<string, string> renamed_services = 2; + */ + /* nullable */ + java.lang.String getRenamedServicesOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Map from original service names to renamed versions.
+   * This is used when the default generated types
+   * would cause a naming conflict. (Neither name is
+   * fully-qualified.)
+   * Example: Subscriber to SubscriberServiceApi.
+   * 
+ * + * map<string, string> renamed_services = 2; + */ + java.lang.String getRenamedServicesOrThrow(java.lang.String key); + + /** + * + * + *
+   * Map from full resource types to the effective short name
+   * for the resource. This is used when otherwise resource
+   * named from different services would cause naming collisions.
+   * Example entry:
+   * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+   * 
+ * + * map<string, string> renamed_resources = 3; + */ + int getRenamedResourcesCount(); + /** + * + * + *
+   * Map from full resource types to the effective short name
+   * for the resource. This is used when otherwise resource
+   * named from different services would cause naming collisions.
+   * Example entry:
+   * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+   * 
+ * + * map<string, string> renamed_resources = 3; + */ + boolean containsRenamedResources(java.lang.String key); + /** Use {@link #getRenamedResourcesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getRenamedResources(); + /** + * + * + *
+   * Map from full resource types to the effective short name
+   * for the resource. This is used when otherwise resource
+   * named from different services would cause naming collisions.
+   * Example entry:
+   * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+   * 
+ * + * map<string, string> renamed_resources = 3; + */ + java.util.Map getRenamedResourcesMap(); + /** + * + * + *
+   * Map from full resource types to the effective short name
+   * for the resource. This is used when otherwise resource
+   * named from different services would cause naming collisions.
+   * Example entry:
+   * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+   * 
+ * + * map<string, string> renamed_resources = 3; + */ + /* nullable */ + java.lang.String getRenamedResourcesOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Map from full resource types to the effective short name
+   * for the resource. This is used when otherwise resource
+   * named from different services would cause naming collisions.
+   * Example entry:
+   * "datalabeling.googleapis.com/Dataset": "DataLabelingDataset"
+   * 
+ * + * map<string, string> renamed_resources = 3; + */ + java.lang.String getRenamedResourcesOrThrow(java.lang.String key); + + /** + * + * + *
+   * List of full resource types to ignore during generation.
+   * This is typically used for API-specific Location resources,
+   * which should be handled by the generator as if they were actually
+   * the common Location resources.
+   * Example entry: "documentai.googleapis.com/Location"
+   * 
+ * + * repeated string ignored_resources = 4; + * + * @return A list containing the ignoredResources. + */ + java.util.List getIgnoredResourcesList(); + /** + * + * + *
+   * List of full resource types to ignore during generation.
+   * This is typically used for API-specific Location resources,
+   * which should be handled by the generator as if they were actually
+   * the common Location resources.
+   * Example entry: "documentai.googleapis.com/Location"
+   * 
+ * + * repeated string ignored_resources = 4; + * + * @return The count of ignoredResources. + */ + int getIgnoredResourcesCount(); + /** + * + * + *
+   * List of full resource types to ignore during generation.
+   * This is typically used for API-specific Location resources,
+   * which should be handled by the generator as if they were actually
+   * the common Location resources.
+   * Example entry: "documentai.googleapis.com/Location"
+   * 
+ * + * repeated string ignored_resources = 4; + * + * @param index The index of the element to return. + * @return The ignoredResources at the given index. + */ + java.lang.String getIgnoredResources(int index); + /** + * + * + *
+   * List of full resource types to ignore during generation.
+   * This is typically used for API-specific Location resources,
+   * which should be handled by the generator as if they were actually
+   * the common Location resources.
+   * Example entry: "documentai.googleapis.com/Location"
+   * 
+ * + * repeated string ignored_resources = 4; + * + * @param index The index of the value to return. + * @return The bytes of the ignoredResources at the given index. + */ + com.google.protobuf.ByteString getIgnoredResourcesBytes(int index); + + /** + * + * + *
+   * Namespaces which must be aliased in snippets due to
+   * a known (but non-generator-predictable) naming collision
+   * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @return A list containing the forcedNamespaceAliases. + */ + java.util.List getForcedNamespaceAliasesList(); + /** + * + * + *
+   * Namespaces which must be aliased in snippets due to
+   * a known (but non-generator-predictable) naming collision
+   * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @return The count of forcedNamespaceAliases. + */ + int getForcedNamespaceAliasesCount(); + /** + * + * + *
+   * Namespaces which must be aliased in snippets due to
+   * a known (but non-generator-predictable) naming collision
+   * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @param index The index of the element to return. + * @return The forcedNamespaceAliases at the given index. + */ + java.lang.String getForcedNamespaceAliases(int index); + /** + * + * + *
+   * Namespaces which must be aliased in snippets due to
+   * a known (but non-generator-predictable) naming collision
+   * 
+ * + * repeated string forced_namespace_aliases = 5; + * + * @param index The index of the value to return. + * @return The bytes of the forcedNamespaceAliases at the given index. + */ + com.google.protobuf.ByteString getForcedNamespaceAliasesBytes(int index); + + /** + * + * + *
+   * Method signatures (in the form "service.method(signature)")
+   * which are provided separately, so shouldn't be generated.
+   * Snippets *calling* these methods are still generated, however.
+   * 
+ * + * repeated string handwritten_signatures = 6; + * + * @return A list containing the handwrittenSignatures. + */ + java.util.List getHandwrittenSignaturesList(); + /** + * + * + *
+   * Method signatures (in the form "service.method(signature)")
+   * which are provided separately, so shouldn't be generated.
+   * Snippets *calling* these methods are still generated, however.
+   * 
+ * + * repeated string handwritten_signatures = 6; + * + * @return The count of handwrittenSignatures. + */ + int getHandwrittenSignaturesCount(); + /** + * + * + *
+   * Method signatures (in the form "service.method(signature)")
+   * which are provided separately, so shouldn't be generated.
+   * Snippets *calling* these methods are still generated, however.
+   * 
+ * + * repeated string handwritten_signatures = 6; + * + * @param index The index of the element to return. + * @return The handwrittenSignatures at the given index. + */ + java.lang.String getHandwrittenSignatures(int index); + /** + * + * + *
+   * Method signatures (in the form "service.method(signature)")
+   * which are provided separately, so shouldn't be generated.
+   * Snippets *calling* these methods are still generated, however.
+   * 
+ * + * repeated string handwritten_signatures = 6; + * + * @param index The index of the value to return. + * @return The bytes of the handwrittenSignatures at the given index. + */ + com.google.protobuf.ByteString getHandwrittenSignaturesBytes(int index); } diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/Publishing.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/Publishing.java index 799889161e..93bc20d91e 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/Publishing.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/Publishing.java @@ -159,7 +159,7 @@ public com.google.api.MethodSettingsOrBuilder getMethodSettingsOrBuilder(int ind * * *
-   * Link to a place that API users can report issues.  Example:
+   * Link to a *public* URI where users can report issues.  Example:
    * https://issuetracker.google.com/issues/new?component=190865&template=1161103
    * 
* @@ -183,7 +183,7 @@ public java.lang.String getNewIssueUri() { * * *
-   * Link to a place that API users can report issues.  Example:
+   * Link to a *public* URI where users can report issues.  Example:
    * https://issuetracker.google.com/issues/new?component=190865&template=1161103
    * 
* @@ -1691,7 +1691,7 @@ public java.util.List getMethodSettingsBu * * *
-     * Link to a place that API users can report issues.  Example:
+     * Link to a *public* URI where users can report issues.  Example:
      * https://issuetracker.google.com/issues/new?component=190865&template=1161103
      * 
* @@ -1714,7 +1714,7 @@ public java.lang.String getNewIssueUri() { * * *
-     * Link to a place that API users can report issues.  Example:
+     * Link to a *public* URI where users can report issues.  Example:
      * https://issuetracker.google.com/issues/new?component=190865&template=1161103
      * 
* @@ -1737,7 +1737,7 @@ public com.google.protobuf.ByteString getNewIssueUriBytes() { * * *
-     * Link to a place that API users can report issues.  Example:
+     * Link to a *public* URI where users can report issues.  Example:
      * https://issuetracker.google.com/issues/new?component=190865&template=1161103
      * 
* @@ -1759,7 +1759,7 @@ public Builder setNewIssueUri(java.lang.String value) { * * *
-     * Link to a place that API users can report issues.  Example:
+     * Link to a *public* URI where users can report issues.  Example:
      * https://issuetracker.google.com/issues/new?component=190865&template=1161103
      * 
* @@ -1777,7 +1777,7 @@ public Builder clearNewIssueUri() { * * *
-     * Link to a place that API users can report issues.  Example:
+     * Link to a *public* URI where users can report issues.  Example:
      * https://issuetracker.google.com/issues/new?component=190865&template=1161103
      * 
* diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/PublishingOrBuilder.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/PublishingOrBuilder.java index 1021409581..5e78d789d7 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/PublishingOrBuilder.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/api/PublishingOrBuilder.java @@ -83,7 +83,7 @@ public interface PublishingOrBuilder * * *
-   * Link to a place that API users can report issues.  Example:
+   * Link to a *public* URI where users can report issues.  Example:
    * https://issuetracker.google.com/issues/new?component=190865&template=1161103
    * 
* @@ -96,7 +96,7 @@ public interface PublishingOrBuilder * * *
-   * Link to a place that API users can report issues.  Example:
+   * Link to a *public* URI where users can report issues.  Example:
    * https://issuetracker.google.com/issues/new?component=190865&template=1161103
    * 
* diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/logging/type/HttpRequest.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/logging/type/HttpRequest.java index ec6b3577e8..37a52d34c9 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/logging/type/HttpRequest.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/logging/type/HttpRequest.java @@ -413,7 +413,7 @@ public com.google.protobuf.ByteString getServerIpBytes() { *
    * The referer URL of the request, as defined in
    * [HTTP/1.1 Header Field
-   * Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
+   * Definitions](https://datatracker.ietf.org/doc/html/rfc2616#section-14.36).
    * 
* * string referer = 8; @@ -438,7 +438,7 @@ public java.lang.String getReferer() { *
    * The referer URL of the request, as defined in
    * [HTTP/1.1 Header Field
-   * Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
+   * Definitions](https://datatracker.ietf.org/doc/html/rfc2616#section-14.36).
    * 
* * string referer = 8; @@ -2052,7 +2052,7 @@ public Builder setServerIpBytes(com.google.protobuf.ByteString value) { *
      * The referer URL of the request, as defined in
      * [HTTP/1.1 Header Field
-     * Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
+     * Definitions](https://datatracker.ietf.org/doc/html/rfc2616#section-14.36).
      * 
* * string referer = 8; @@ -2076,7 +2076,7 @@ public java.lang.String getReferer() { *
      * The referer URL of the request, as defined in
      * [HTTP/1.1 Header Field
-     * Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
+     * Definitions](https://datatracker.ietf.org/doc/html/rfc2616#section-14.36).
      * 
* * string referer = 8; @@ -2100,7 +2100,7 @@ public com.google.protobuf.ByteString getRefererBytes() { *
      * The referer URL of the request, as defined in
      * [HTTP/1.1 Header Field
-     * Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
+     * Definitions](https://datatracker.ietf.org/doc/html/rfc2616#section-14.36).
      * 
* * string referer = 8; @@ -2123,7 +2123,7 @@ public Builder setReferer(java.lang.String value) { *
      * The referer URL of the request, as defined in
      * [HTTP/1.1 Header Field
-     * Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
+     * Definitions](https://datatracker.ietf.org/doc/html/rfc2616#section-14.36).
      * 
* * string referer = 8; @@ -2142,7 +2142,7 @@ public Builder clearReferer() { *
      * The referer URL of the request, as defined in
      * [HTTP/1.1 Header Field
-     * Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
+     * Definitions](https://datatracker.ietf.org/doc/html/rfc2616#section-14.36).
      * 
* * string referer = 8; diff --git a/java-common-protos/proto-google-common-protos/src/main/java/com/google/logging/type/HttpRequestOrBuilder.java b/java-common-protos/proto-google-common-protos/src/main/java/com/google/logging/type/HttpRequestOrBuilder.java index 3cce91ad99..2e57de87e6 100644 --- a/java-common-protos/proto-google-common-protos/src/main/java/com/google/logging/type/HttpRequestOrBuilder.java +++ b/java-common-protos/proto-google-common-protos/src/main/java/com/google/logging/type/HttpRequestOrBuilder.java @@ -212,7 +212,7 @@ public interface HttpRequestOrBuilder *
    * The referer URL of the request, as defined in
    * [HTTP/1.1 Header Field
-   * Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
+   * Definitions](https://datatracker.ietf.org/doc/html/rfc2616#section-14.36).
    * 
* * string referer = 8; @@ -226,7 +226,7 @@ public interface HttpRequestOrBuilder *
    * The referer URL of the request, as defined in
    * [HTTP/1.1 Header Field
-   * Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
+   * Definitions](https://datatracker.ietf.org/doc/html/rfc2616#section-14.36).
    * 
* * string referer = 8; diff --git a/java-common-protos/proto-google-common-protos/src/main/proto/google/api/client.proto b/java-common-protos/proto-google-common-protos/src/main/proto/google/api/client.proto index ca25db4e40..6d01954eee 100644 --- a/java-common-protos/proto-google-common-protos/src/main/proto/google/api/client.proto +++ b/java-common-protos/proto-google-common-protos/src/main/proto/google/api/client.proto @@ -157,7 +157,7 @@ message Publishing { // long-running operation pattern. repeated MethodSettings method_settings = 2; - // Link to a place that API users can report issues. Example: + // Link to a *public* URI where users can report issues. Example: // https://issuetracker.google.com/issues/new?component=190865&template=1161103 string new_issue_uri = 101; @@ -257,6 +257,36 @@ message NodeSettings { message DotnetSettings { // Some settings. CommonLanguageSettings common = 1; + + // Map from original service names to renamed versions. + // This is used when the default generated types + // would cause a naming conflict. (Neither name is + // fully-qualified.) + // Example: Subscriber to SubscriberServiceApi. + map renamed_services = 2; + + // Map from full resource types to the effective short name + // for the resource. This is used when otherwise resource + // named from different services would cause naming collisions. + // Example entry: + // "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + map renamed_resources = 3; + + // List of full resource types to ignore during generation. + // This is typically used for API-specific Location resources, + // which should be handled by the generator as if they were actually + // the common Location resources. + // Example entry: "documentai.googleapis.com/Location" + repeated string ignored_resources = 4; + + // Namespaces which must be aliased in snippets due to + // a known (but non-generator-predictable) naming collision + repeated string forced_namespace_aliases = 5; + + // Method signatures (in the form "service.method(signature)") + // which are provided separately, so shouldn't be generated. + // Snippets *calling* these methods are still generated, however. + repeated string handwritten_signatures = 6; } // Settings for Ruby client libraries. @@ -338,6 +368,15 @@ enum ClientLibraryOrganization { // Street View Org. STREET_VIEW = 4; + + // Shopping Org. + SHOPPING = 5; + + // Geo Org. + GEO = 6; + + // Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7; } // To where should client libraries be published? diff --git a/java-common-protos/proto-google-common-protos/src/main/proto/google/api/distribution.proto b/java-common-protos/proto-google-common-protos/src/main/proto/google/api/distribution.proto index 0baf6afd1c..b0bc4930f7 100644 --- a/java-common-protos/proto-google-common-protos/src/main/proto/google/api/distribution.proto +++ b/java-common-protos/proto-google-common-protos/src/main/proto/google/api/distribution.proto @@ -73,6 +73,7 @@ message Distribution { // following boundaries: // // Upper bound (0 <= i < N-1): offset + (width * i). + // // Lower bound (1 <= i < N): offset + (width * (i - 1)). message Linear { // Must be greater than 0. @@ -93,6 +94,7 @@ message Distribution { // following boundaries: // // Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). + // // Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)). message Exponential { // Must be greater than 0. diff --git a/java-common-protos/proto-google-common-protos/src/main/proto/google/logging/type/http_request.proto b/java-common-protos/proto-google-common-protos/src/main/proto/google/logging/type/http_request.proto index b878d60dce..425a09d6e9 100644 --- a/java-common-protos/proto-google-common-protos/src/main/proto/google/logging/type/http_request.proto +++ b/java-common-protos/proto-google-common-protos/src/main/proto/google/logging/type/http_request.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -67,7 +67,7 @@ message HttpRequest { // The referer URL of the request, as defined in // [HTTP/1.1 Header Field - // Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). + // Definitions](https://datatracker.ietf.org/doc/html/rfc2616#section-14.36). string referer = 8; // The request processing latency on the server, from the time the request was diff --git a/java-common-protos/proto-google-common-protos/src/main/proto/google/logging/type/log_severity.proto b/java-common-protos/proto-google-common-protos/src/main/proto/google/logging/type/log_severity.proto index bed71935f9..6740125811 100644 --- a/java-common-protos/proto-google-common-protos/src/main/proto/google/logging/type/log_severity.proto +++ b/java-common-protos/proto-google-common-protos/src/main/proto/google/logging/type/log_severity.proto @@ -1,4 +1,4 @@ -// Copyright 2022 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License.