From 877f9c9bc1f8f04713396b8585cef3f3751a0439 Mon Sep 17 00:00:00 2001 From: Solomon Duskis Date: Fri, 22 Mar 2019 15:39:54 -0400 Subject: [PATCH] Manually regenerate Redis (#4723) * Manually regenerate Redis * Fixing a formatting issue --- .../google/cloud/redis/v1/CloudRedisGrpc.java | 284 +----- .../redis/v1/CloudRedisServiceV1Proto.java | 268 ++---- .../cloud/redis/v1/CreateInstanceRequest.java | 6 +- .../cloud/redis/v1/DeleteInstanceRequest.java | 6 +- .../cloud/redis/v1/ExportInstanceRequest.java | 878 ------------------ .../v1/ExportInstanceRequestOrBuilder.java | 66 -- .../google/cloud/redis/v1/GcsDestination.java | 603 ------------ .../redis/v1/GcsDestinationOrBuilder.java | 33 - .../com/google/cloud/redis/v1/GcsSource.java | 594 ------------ .../cloud/redis/v1/GcsSourceOrBuilder.java | 31 - .../cloud/redis/v1/ImportInstanceRequest.java | 878 ------------------ .../v1/ImportInstanceRequestOrBuilder.java | 66 -- .../google/cloud/redis/v1/InputConfig.java | 789 ---------------- .../cloud/redis/v1/InputConfigOrBuilder.java | 43 - .../com/google/cloud/redis/v1/Instance.java | 338 +------ .../cloud/redis/v1/InstanceOrBuilder.java | 82 +- .../google/cloud/redis/v1/OutputConfig.java | 793 ---------------- .../cloud/redis/v1/OutputConfigOrBuilder.java | 43 - .../cloud/redis/v1/UpdateInstanceRequest.java | 6 +- .../google/cloud/redis/v1/cloud_redis.proto | 138 +-- .../cloud/redis/v1/CloudRedisClient.java | 262 +----- .../cloud/redis/v1/CloudRedisSettings.java | 52 -- .../google/cloud/redis/v1/package-info.java | 2 +- .../cloud/redis/v1/stub/CloudRedisStub.java | 22 - .../redis/v1/stub/CloudRedisStubSettings.java | 142 --- .../redis/v1/stub/GrpcCloudRedisStub.java | 72 -- .../cloud/redis/v1/CloudRedisClientTest.java | 162 ---- .../cloud/redis/v1/MockCloudRedisImpl.java | 30 - 28 files changed, 162 insertions(+), 6527 deletions(-) delete mode 100644 google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ExportInstanceRequest.java delete mode 100644 google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ExportInstanceRequestOrBuilder.java delete mode 100644 google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/GcsDestination.java delete mode 100644 google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/GcsDestinationOrBuilder.java delete mode 100644 google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/GcsSource.java delete mode 100644 google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/GcsSourceOrBuilder.java delete mode 100644 google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ImportInstanceRequest.java delete mode 100644 google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ImportInstanceRequestOrBuilder.java delete mode 100644 google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/InputConfig.java delete mode 100644 google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/InputConfigOrBuilder.java delete mode 100644 google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/OutputConfig.java delete mode 100644 google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/OutputConfigOrBuilder.java diff --git a/google-api-grpc/grpc-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/CloudRedisGrpc.java b/google-api-grpc/grpc-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/CloudRedisGrpc.java index 555d1381a4c4..59cfe9f93433 100644 --- a/google-api-grpc/grpc-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/CloudRedisGrpc.java +++ b/google-api-grpc/grpc-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/CloudRedisGrpc.java @@ -21,7 +21,7 @@ * * Each location has a collection of Redis instances, named: `/instances/*` * * As such, Redis instances are resources of the form: * `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` - * Note that location_id must be refering to a GCP `region`; for example: + * Note that location_id must be referring to a GCP `region`; for example: * * `projects/redpepper-1290/locations/us-central1/instances/my-redis` * */ @@ -243,108 +243,6 @@ private CloudRedisGrpc() {} return getUpdateInstanceMethod; } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getImportInstanceMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.redis.v1.ImportInstanceRequest, com.google.longrunning.Operation> - METHOD_IMPORT_INSTANCE = getImportInstanceMethodHelper(); - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.redis.v1.ImportInstanceRequest, com.google.longrunning.Operation> - getImportInstanceMethod; - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor< - com.google.cloud.redis.v1.ImportInstanceRequest, com.google.longrunning.Operation> - getImportInstanceMethod() { - return getImportInstanceMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.redis.v1.ImportInstanceRequest, com.google.longrunning.Operation> - getImportInstanceMethodHelper() { - io.grpc.MethodDescriptor< - com.google.cloud.redis.v1.ImportInstanceRequest, com.google.longrunning.Operation> - getImportInstanceMethod; - if ((getImportInstanceMethod = CloudRedisGrpc.getImportInstanceMethod) == null) { - synchronized (CloudRedisGrpc.class) { - if ((getImportInstanceMethod = CloudRedisGrpc.getImportInstanceMethod) == null) { - CloudRedisGrpc.getImportInstanceMethod = - getImportInstanceMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.redis.v1.CloudRedis", "ImportInstance")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.redis.v1.ImportInstanceRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new CloudRedisMethodDescriptorSupplier("ImportInstance")) - .build(); - } - } - } - return getImportInstanceMethod; - } - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - @java.lang.Deprecated // Use {@link #getExportInstanceMethod()} instead. - public static final io.grpc.MethodDescriptor< - com.google.cloud.redis.v1.ExportInstanceRequest, com.google.longrunning.Operation> - METHOD_EXPORT_INSTANCE = getExportInstanceMethodHelper(); - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.redis.v1.ExportInstanceRequest, com.google.longrunning.Operation> - getExportInstanceMethod; - - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") - public static io.grpc.MethodDescriptor< - com.google.cloud.redis.v1.ExportInstanceRequest, com.google.longrunning.Operation> - getExportInstanceMethod() { - return getExportInstanceMethodHelper(); - } - - private static io.grpc.MethodDescriptor< - com.google.cloud.redis.v1.ExportInstanceRequest, com.google.longrunning.Operation> - getExportInstanceMethodHelper() { - io.grpc.MethodDescriptor< - com.google.cloud.redis.v1.ExportInstanceRequest, com.google.longrunning.Operation> - getExportInstanceMethod; - if ((getExportInstanceMethod = CloudRedisGrpc.getExportInstanceMethod) == null) { - synchronized (CloudRedisGrpc.class) { - if ((getExportInstanceMethod = CloudRedisGrpc.getExportInstanceMethod) == null) { - CloudRedisGrpc.getExportInstanceMethod = - getExportInstanceMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName( - "google.cloud.redis.v1.CloudRedis", "ExportInstance")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.redis.v1.ExportInstanceRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.longrunning.Operation.getDefaultInstance())) - .setSchemaDescriptor(new CloudRedisMethodDescriptorSupplier("ExportInstance")) - .build(); - } - } - } - return getExportInstanceMethod; - } - @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") @java.lang.Deprecated // Use {@link #getFailoverInstanceMethod()} instead. public static final io.grpc.MethodDescriptor< @@ -480,7 +378,7 @@ public static CloudRedisFutureStub newFutureStub(io.grpc.Channel channel) { * * Each location has a collection of Redis instances, named: `/instances/*` * * As such, Redis instances are resources of the form: * `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` - * Note that location_id must be refering to a GCP `region`; for example: + * Note that location_id must be referring to a GCP `region`; for example: * * `projects/redpepper-1290/locations/us-central1/instances/my-redis` * */ @@ -555,40 +453,6 @@ public void updateInstance( asyncUnimplementedUnaryCall(getUpdateInstanceMethodHelper(), responseObserver); } - /** - * - * - *
-     * Import a Redis RDB snapshot file from GCS into a Redis instance.
-     * Redis may stop serving during this operation. Instance state will be
-     * IMPORTING for entire operation. When complete, the instance will contain
-     * only data from the imported file.
-     * The returned operation is automatically deleted after a few hours, so
-     * there is no need to call DeleteOperation.
-     * 
- */ - public void importInstance( - com.google.cloud.redis.v1.ImportInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getImportInstanceMethodHelper(), responseObserver); - } - - /** - * - * - *
-     * Export Redis instance data into a Redis RDB format file in GCS.
-     * Redis will continue serving during this operation.
-     * The returned operation is automatically deleted after a few hours, so
-     * there is no need to call DeleteOperation.
-     * 
- */ - public void exportInstance( - com.google.cloud.redis.v1.ExportInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnimplementedUnaryCall(getExportInstanceMethodHelper(), responseObserver); - } - /** * * @@ -645,18 +509,6 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.cloud.redis.v1.UpdateInstanceRequest, com.google.longrunning.Operation>(this, METHODID_UPDATE_INSTANCE))) - .addMethod( - getImportInstanceMethodHelper(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.redis.v1.ImportInstanceRequest, - com.google.longrunning.Operation>(this, METHODID_IMPORT_INSTANCE))) - .addMethod( - getExportInstanceMethodHelper(), - asyncUnaryCall( - new MethodHandlers< - com.google.cloud.redis.v1.ExportInstanceRequest, - com.google.longrunning.Operation>(this, METHODID_EXPORT_INSTANCE))) .addMethod( getFailoverInstanceMethodHelper(), asyncUnaryCall( @@ -687,7 +539,7 @@ public final io.grpc.ServerServiceDefinition bindService() { * * Each location has a collection of Redis instances, named: `/instances/*` * * As such, Redis instances are resources of the form: * `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` - * Note that location_id must be refering to a GCP `region`; for example: + * Note that location_id must be referring to a GCP `region`; for example: * * `projects/redpepper-1290/locations/us-central1/instances/my-redis` * */ @@ -786,46 +638,6 @@ public void updateInstance( responseObserver); } - /** - * - * - *
-     * Import a Redis RDB snapshot file from GCS into a Redis instance.
-     * Redis may stop serving during this operation. Instance state will be
-     * IMPORTING for entire operation. When complete, the instance will contain
-     * only data from the imported file.
-     * The returned operation is automatically deleted after a few hours, so
-     * there is no need to call DeleteOperation.
-     * 
- */ - public void importInstance( - com.google.cloud.redis.v1.ImportInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getImportInstanceMethodHelper(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Export Redis instance data into a Redis RDB format file in GCS.
-     * Redis will continue serving during this operation.
-     * The returned operation is automatically deleted after a few hours, so
-     * there is no need to call DeleteOperation.
-     * 
- */ - public void exportInstance( - com.google.cloud.redis.v1.ExportInstanceRequest request, - io.grpc.stub.StreamObserver responseObserver) { - asyncUnaryCall( - getChannel().newCall(getExportInstanceMethodHelper(), getCallOptions()), - request, - responseObserver); - } - /** * * @@ -875,7 +687,7 @@ public void deleteInstance( * * Each location has a collection of Redis instances, named: `/instances/*` * * As such, Redis instances are resources of the form: * `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` - * Note that location_id must be refering to a GCP `region`; for example: + * Note that location_id must be referring to a GCP `region`; for example: * * `projects/redpepper-1290/locations/us-central1/instances/my-redis` * */ @@ -963,40 +775,6 @@ public com.google.longrunning.Operation updateInstance( getChannel(), getUpdateInstanceMethodHelper(), getCallOptions(), request); } - /** - * - * - *
-     * Import a Redis RDB snapshot file from GCS into a Redis instance.
-     * Redis may stop serving during this operation. Instance state will be
-     * IMPORTING for entire operation. When complete, the instance will contain
-     * only data from the imported file.
-     * The returned operation is automatically deleted after a few hours, so
-     * there is no need to call DeleteOperation.
-     * 
- */ - public com.google.longrunning.Operation importInstance( - com.google.cloud.redis.v1.ImportInstanceRequest request) { - return blockingUnaryCall( - getChannel(), getImportInstanceMethodHelper(), getCallOptions(), request); - } - - /** - * - * - *
-     * Export Redis instance data into a Redis RDB format file in GCS.
-     * Redis will continue serving during this operation.
-     * The returned operation is automatically deleted after a few hours, so
-     * there is no need to call DeleteOperation.
-     * 
- */ - public com.google.longrunning.Operation exportInstance( - com.google.cloud.redis.v1.ExportInstanceRequest request) { - return blockingUnaryCall( - getChannel(), getExportInstanceMethodHelper(), getCallOptions(), request); - } - /** * * @@ -1040,7 +818,7 @@ public com.google.longrunning.Operation deleteInstance( * * Each location has a collection of Redis instances, named: `/instances/*` * * As such, Redis instances are resources of the form: * `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` - * Note that location_id must be refering to a GCP `region`; for example: + * Note that location_id must be referring to a GCP `region`; for example: * * `projects/redpepper-1290/locations/us-central1/instances/my-redis` * */ @@ -1128,40 +906,6 @@ protected CloudRedisFutureStub build(io.grpc.Channel channel, io.grpc.CallOption getChannel().newCall(getUpdateInstanceMethodHelper(), getCallOptions()), request); } - /** - * - * - *
-     * Import a Redis RDB snapshot file from GCS into a Redis instance.
-     * Redis may stop serving during this operation. Instance state will be
-     * IMPORTING for entire operation. When complete, the instance will contain
-     * only data from the imported file.
-     * The returned operation is automatically deleted after a few hours, so
-     * there is no need to call DeleteOperation.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - importInstance(com.google.cloud.redis.v1.ImportInstanceRequest request) { - return futureUnaryCall( - getChannel().newCall(getImportInstanceMethodHelper(), getCallOptions()), request); - } - - /** - * - * - *
-     * Export Redis instance data into a Redis RDB format file in GCS.
-     * Redis will continue serving during this operation.
-     * The returned operation is automatically deleted after a few hours, so
-     * there is no need to call DeleteOperation.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - exportInstance(com.google.cloud.redis.v1.ExportInstanceRequest request) { - return futureUnaryCall( - getChannel().newCall(getExportInstanceMethodHelper(), getCallOptions()), request); - } - /** * * @@ -1195,10 +939,8 @@ protected CloudRedisFutureStub build(io.grpc.Channel channel, io.grpc.CallOption private static final int METHODID_GET_INSTANCE = 1; private static final int METHODID_CREATE_INSTANCE = 2; private static final int METHODID_UPDATE_INSTANCE = 3; - private static final int METHODID_IMPORT_INSTANCE = 4; - private static final int METHODID_EXPORT_INSTANCE = 5; - private static final int METHODID_FAILOVER_INSTANCE = 6; - private static final int METHODID_DELETE_INSTANCE = 7; + private static final int METHODID_FAILOVER_INSTANCE = 4; + private static final int METHODID_DELETE_INSTANCE = 5; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1238,16 +980,6 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.redis.v1.UpdateInstanceRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; - case METHODID_IMPORT_INSTANCE: - serviceImpl.importInstance( - (com.google.cloud.redis.v1.ImportInstanceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_EXPORT_INSTANCE: - serviceImpl.exportInstance( - (com.google.cloud.redis.v1.ExportInstanceRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; case METHODID_FAILOVER_INSTANCE: serviceImpl.failoverInstance( (com.google.cloud.redis.v1.FailoverInstanceRequest) request, @@ -1326,8 +1058,6 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getGetInstanceMethodHelper()) .addMethod(getCreateInstanceMethodHelper()) .addMethod(getUpdateInstanceMethodHelper()) - .addMethod(getImportInstanceMethodHelper()) - .addMethod(getExportInstanceMethodHelper()) .addMethod(getFailoverInstanceMethodHelper()) .addMethod(getDeleteInstanceMethodHelper()) .build(); diff --git a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/CloudRedisServiceV1Proto.java b/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/CloudRedisServiceV1Proto.java index ff5362c5fb62..383ce2948aaa 100644 --- a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/CloudRedisServiceV1Proto.java +++ b/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/CloudRedisServiceV1Proto.java @@ -48,30 +48,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_redis_v1_DeleteInstanceRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_redis_v1_DeleteInstanceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_redis_v1_GcsSource_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_redis_v1_GcsSource_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_redis_v1_InputConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_redis_v1_InputConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_redis_v1_ImportInstanceRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_redis_v1_ImportInstanceRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_redis_v1_GcsDestination_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_redis_v1_GcsDestination_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_redis_v1_OutputConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_redis_v1_OutputConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_redis_v1_ExportInstanceRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_redis_v1_ExportInstanceRequest_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_redis_v1_FailoverInstanceRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -103,108 +79,89 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n\'google/cloud/redis/v1/cloud_redis.prot" + "o\022\025google.cloud.redis.v1\032\034google/api/ann" - + "otations.proto\032#google/longrunning/opera" - + "tions.proto\032 google/protobuf/field_mask." - + "proto\032\037google/protobuf/timestamp.proto\"\224" - + "\007\n\010Instance\022\014\n\004name\030\001 \001(\t\022\024\n\014display_nam" - + "e\030\002 \001(\t\022;\n\006labels\030\003 \003(\0132+.google.cloud.r" - + "edis.v1.Instance.LabelsEntry\022\023\n\013location" - + "_id\030\004 \001(\t\022\037\n\027alternative_location_id\030\005 \001" - + "(\t\022\025\n\rredis_version\030\007 \001(\t\022\031\n\021reserved_ip" - + "_range\030\t \001(\t\022\014\n\004host\030\n \001(\t\022\014\n\004port\030\013 \001(\005" - + "\022\033\n\023current_location_id\030\014 \001(\t\022/\n\013create_" - + "time\030\r \001(\0132\032.google.protobuf.Timestamp\0224" - + "\n\005state\030\016 \001(\0162%.google.cloud.redis.v1.In" - + "stance.State\022\026\n\016status_message\030\017 \001(\t\022H\n\r" - + "redis_configs\030\020 \003(\01321.google.cloud.redis" - + ".v1.Instance.RedisConfigsEntry\0222\n\004tier\030\021" - + " \001(\0162$.google.cloud.redis.v1.Instance.Ti" - + "er\022\026\n\016memory_size_gb\030\022 \001(\005\022\032\n\022authorized" - + "_network\030\024 \001(\t\022 \n\030persistence_iam_identi" - + "ty\030\025 \001(\t\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" - + "value\030\002 \001(\t:\0028\001\0323\n\021RedisConfigsEntry\022\013\n\003" - + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\224\001\n\005State\022\025" - + "\n\021STATE_UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\t\n\005R" - + "EADY\020\002\022\014\n\010UPDATING\020\003\022\014\n\010DELETING\020\004\022\r\n\tRE" - + "PAIRING\020\005\022\017\n\013MAINTENANCE\020\006\022\r\n\tIMPORTING\020" - + "\010\022\020\n\014FAILING_OVER\020\t\"8\n\004Tier\022\024\n\020TIER_UNSP" - + "ECIFIED\020\000\022\t\n\005BASIC\020\001\022\017\n\013STANDARD_HA\020\003\"M\n" - + "\024ListInstancesRequest\022\016\n\006parent\030\001 \001(\t\022\021\n" - + "\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"y\n\025" - + "ListInstancesResponse\0222\n\tinstances\030\001 \003(\013" - + "2\037.google.cloud.redis.v1.Instance\022\027\n\017nex" - + "t_page_token\030\002 \001(\t\022\023\n\013unreachable\030\003 \003(\t\"" - + "\"\n\022GetInstanceRequest\022\014\n\004name\030\001 \001(\t\"o\n\025C" - + "reateInstanceRequest\022\016\n\006parent\030\001 \001(\t\022\023\n\013" - + "instance_id\030\002 \001(\t\0221\n\010instance\030\003 \001(\0132\037.go" - + "ogle.cloud.redis.v1.Instance\"{\n\025UpdateIn" - + "stanceRequest\022/\n\013update_mask\030\001 \001(\0132\032.goo" - + "gle.protobuf.FieldMask\0221\n\010instance\030\002 \001(\013" - + "2\037.google.cloud.redis.v1.Instance\"%\n\025Del" - + "eteInstanceRequest\022\014\n\004name\030\001 \001(\t\"\030\n\tGcsS" - + "ource\022\013\n\003uri\030\001 \001(\t\"O\n\013InputConfig\0226\n\ngcs" - + "_source\030\001 \001(\0132 .google.cloud.redis.v1.Gc" - + "sSourceH\000B\010\n\006source\"_\n\025ImportInstanceReq" - + "uest\022\014\n\004name\030\001 \001(\t\0228\n\014input_config\030\003 \001(\013" - + "2\".google.cloud.redis.v1.InputConfig\"\035\n\016" - + "GcsDestination\022\013\n\003uri\030\001 \001(\t\"_\n\014OutputCon" - + "fig\022@\n\017gcs_destination\030\001 \001(\0132%.google.cl" - + "oud.redis.v1.GcsDestinationH\000B\r\n\013destina" - + "tion\"a\n\025ExportInstanceRequest\022\014\n\004name\030\001 " - + "\001(\t\022:\n\routput_config\030\003 \001(\0132#.google.clou" - + "d.redis.v1.OutputConfig\"\360\001\n\027FailoverInst" - + "anceRequest\022\014\n\004name\030\001 \001(\t\022_\n\024data_protec" - + "tion_mode\030\002 \001(\0162A.google.cloud.redis.v1." - + "FailoverInstanceRequest.DataProtectionMo" - + "de\"f\n\022DataProtectionMode\022$\n DATA_PROTECT" - + "ION_MODE_UNSPECIFIED\020\000\022\025\n\021LIMITED_DATA_L" - + "OSS\020\001\022\023\n\017FORCE_DATA_LOSS\020\002\"\326\001\n\021Operation" - + "Metadata\022/\n\013create_time\030\001 \001(\0132\032.google.p" - + "rotobuf.Timestamp\022,\n\010end_time\030\002 \001(\0132\032.go" - + "ogle.protobuf.Timestamp\022\016\n\006target\030\003 \001(\t\022" - + "\014\n\004verb\030\004 \001(\t\022\025\n\rstatus_detail\030\005 \001(\t\022\030\n\020" - + "cancel_requested\030\006 \001(\010\022\023\n\013api_version\030\007 " - + "\001(\t\"\304\001\n\020LocationMetadata\022T\n\017available_zo" - + "nes\030\001 \003(\0132;.google.cloud.redis.v1.Locati" - + "onMetadata.AvailableZonesEntry\032Z\n\023Availa" - + "bleZonesEntry\022\013\n\003key\030\001 \001(\t\0222\n\005value\030\002 \001(" - + "\0132#.google.cloud.redis.v1.ZoneMetadata:\002" - + "8\001\"\016\n\014ZoneMetadata2\216\n\n\nCloudRedis\022\241\001\n\rLi" - + "stInstances\022+.google.cloud.redis.v1.List" - + "InstancesRequest\032,.google.cloud.redis.v1" - + ".ListInstancesResponse\"5\202\323\344\223\002/\022-/v1/{par" - + "ent=projects/*/locations/*}/instances\022\220\001" - + "\n\013GetInstance\022).google.cloud.redis.v1.Ge" - + "tInstanceRequest\032\037.google.cloud.redis.v1" - + ".Instance\"5\202\323\344\223\002/\022-/v1/{name=projects/*/" - + "locations/*/instances/*}\022\236\001\n\016CreateInsta" - + "nce\022,.google.cloud.redis.v1.CreateInstan" - + "ceRequest\032\035.google.longrunning.Operation" - + "\"?\202\323\344\223\0029\"-/v1/{parent=projects/*/locatio" - + "ns/*}/instances:\010instance\022\247\001\n\016UpdateInst" - + "ance\022,.google.cloud.redis.v1.UpdateInsta" - + "nceRequest\032\035.google.longrunning.Operatio" - + "n\"H\202\323\344\223\002B26/v1/{instance.name=projects/*" - + "/locations/*/instances/*}:\010instance\022\236\001\n\016" - + "ImportInstance\022,.google.cloud.redis.v1.I" - + "mportInstanceRequest\032\035.google.longrunnin" - + "g.Operation\"?\202\323\344\223\0029\"4/v1/{name=projects/" - + "*/locations/*/instances/*}:import:\001*\022\236\001\n" - + "\016ExportInstance\022,.google.cloud.redis.v1." - + "ExportInstanceRequest\032\035.google.longrunni" - + "ng.Operation\"?\202\323\344\223\0029\"4/v1/{name=projects" - + "/*/locations/*/instances/*}:export:\001*\022\244\001" - + "\n\020FailoverInstance\022..google.cloud.redis." - + "v1.FailoverInstanceRequest\032\035.google.long" - + "running.Operation\"A\202\323\344\223\002;\"6/v1/{name=pro" - + "jects/*/locations/*/instances/*}:failove" - + "r:\001*\022\224\001\n\016DeleteInstance\022,.google.cloud.r" - + "edis.v1.DeleteInstanceRequest\032\035.google.l" - + "ongrunning.Operation\"5\202\323\344\223\002/*-/v1/{name=" - + "projects/*/locations/*/instances/*}Bs\n\031c" - + "om.google.cloud.redis.v1B\030CloudRedisServ" - + "iceV1ProtoP\001Z:google.golang.org/genproto" - + "/googleapis/cloud/redis/v1;redisb\006proto3" + + "otations.proto\032\031google/api/resource.prot" + + "o\032#google/longrunning/operations.proto\032 " + + "google/protobuf/field_mask.proto\032\037google" + + "/protobuf/timestamp.proto\"\343\006\n\010Instance\022\014" + + "\n\004name\030\001 \001(\t\022\024\n\014display_name\030\002 \001(\t\022;\n\006la" + + "bels\030\003 \003(\0132+.google.cloud.redis.v1.Insta" + + "nce.LabelsEntry\022\023\n\013location_id\030\004 \001(\t\022\037\n\027" + + "alternative_location_id\030\005 \001(\t\022\025\n\rredis_v" + + "ersion\030\007 \001(\t\022\031\n\021reserved_ip_range\030\t \001(\t\022" + + "\014\n\004host\030\n \001(\t\022\014\n\004port\030\013 \001(\005\022\033\n\023current_l" + + "ocation_id\030\014 \001(\t\022/\n\013create_time\030\r \001(\0132\032." + + "google.protobuf.Timestamp\0224\n\005state\030\016 \001(\016" + + "2%.google.cloud.redis.v1.Instance.State\022" + + "\026\n\016status_message\030\017 \001(\t\022H\n\rredis_configs" + + "\030\020 \003(\01321.google.cloud.redis.v1.Instance." + + "RedisConfigsEntry\0222\n\004tier\030\021 \001(\0162$.google" + + ".cloud.redis.v1.Instance.Tier\022\026\n\016memory_" + + "size_gb\030\022 \001(\005\022\032\n\022authorized_network\030\024 \001(" + + "\t\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" + + " \001(\t:\0028\001\0323\n\021RedisConfigsEntry\022\013\n\003key\030\001 \001" + + "(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\205\001\n\005State\022\025\n\021STATE" + + "_UNSPECIFIED\020\000\022\014\n\010CREATING\020\001\022\t\n\005READY\020\002\022" + + "\014\n\010UPDATING\020\003\022\014\n\010DELETING\020\004\022\r\n\tREPAIRING" + + "\020\005\022\017\n\013MAINTENANCE\020\006\022\020\n\014FAILING_OVER\020\t\"8\n" + + "\004Tier\022\024\n\020TIER_UNSPECIFIED\020\000\022\t\n\005BASIC\020\001\022\017" + + "\n\013STANDARD_HA\020\003\"M\n\024ListInstancesRequest\022" + + "\016\n\006parent\030\001 \001(\t\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npa" + + "ge_token\030\003 \001(\t\"y\n\025ListInstancesResponse\022" + + "2\n\tinstances\030\001 \003(\0132\037.google.cloud.redis." + + "v1.Instance\022\027\n\017next_page_token\030\002 \001(\t\022\023\n\013" + + "unreachable\030\003 \003(\t\"\"\n\022GetInstanceRequest\022" + + "\014\n\004name\030\001 \001(\t\"o\n\025CreateInstanceRequest\022\016" + + "\n\006parent\030\001 \001(\t\022\023\n\013instance_id\030\002 \001(\t\0221\n\010i" + + "nstance\030\003 \001(\0132\037.google.cloud.redis.v1.In" + + "stance\"{\n\025UpdateInstanceRequest\022/\n\013updat" + + "e_mask\030\001 \001(\0132\032.google.protobuf.FieldMask" + + "\0221\n\010instance\030\002 \001(\0132\037.google.cloud.redis." + + "v1.Instance\"%\n\025DeleteInstanceRequest\022\014\n\004" + + "name\030\001 \001(\t\"\360\001\n\027FailoverInstanceRequest\022\014" + + "\n\004name\030\001 \001(\t\022_\n\024data_protection_mode\030\002 \001" + + "(\0162A.google.cloud.redis.v1.FailoverInsta" + + "nceRequest.DataProtectionMode\"f\n\022DataPro" + + "tectionMode\022$\n DATA_PROTECTION_MODE_UNSP" + + "ECIFIED\020\000\022\025\n\021LIMITED_DATA_LOSS\020\001\022\023\n\017FORC" + + "E_DATA_LOSS\020\002\"\326\001\n\021OperationMetadata\022/\n\013c" + + "reate_time\030\001 \001(\0132\032.google.protobuf.Times" + + "tamp\022,\n\010end_time\030\002 \001(\0132\032.google.protobuf" + + ".Timestamp\022\016\n\006target\030\003 \001(\t\022\014\n\004verb\030\004 \001(\t" + + "\022\025\n\rstatus_detail\030\005 \001(\t\022\030\n\020cancel_reques" + + "ted\030\006 \001(\010\022\023\n\013api_version\030\007 \001(\t\"\304\001\n\020Locat" + + "ionMetadata\022T\n\017available_zones\030\001 \003(\0132;.g" + + "oogle.cloud.redis.v1.LocationMetadata.Av" + + "ailableZonesEntry\032Z\n\023AvailableZonesEntry" + + "\022\013\n\003key\030\001 \001(\t\0222\n\005value\030\002 \001(\0132#.google.cl" + + "oud.redis.v1.ZoneMetadata:\0028\001\"\016\n\014ZoneMet" + + "adata2\314\007\n\nCloudRedis\022\241\001\n\rListInstances\022+" + + ".google.cloud.redis.v1.ListInstancesRequ" + + "est\032,.google.cloud.redis.v1.ListInstance" + + "sResponse\"5\202\323\344\223\002/\022-/v1/{parent=projects/" + + "*/locations/*}/instances\022\220\001\n\013GetInstance" + + "\022).google.cloud.redis.v1.GetInstanceRequ" + + "est\032\037.google.cloud.redis.v1.Instance\"5\202\323" + + "\344\223\002/\022-/v1/{name=projects/*/locations/*/i" + + "nstances/*}\022\236\001\n\016CreateInstance\022,.google." + + "cloud.redis.v1.CreateInstanceRequest\032\035.g" + + "oogle.longrunning.Operation\"?\202\323\344\223\0029\"-/v1" + + "/{parent=projects/*/locations/*}/instanc" + + "es:\010instance\022\247\001\n\016UpdateInstance\022,.google" + + ".cloud.redis.v1.UpdateInstanceRequest\032\035." + + "google.longrunning.Operation\"H\202\323\344\223\002B26/v" + + "1/{instance.name=projects/*/locations/*/" + + "instances/*}:\010instance\022\244\001\n\020FailoverInsta" + + "nce\022..google.cloud.redis.v1.FailoverInst" + + "anceRequest\032\035.google.longrunning.Operati" + + "on\"A\202\323\344\223\002;\"6/v1/{name=projects/*/locatio" + + "ns/*/instances/*}:failover:\001*\022\224\001\n\016Delete" + + "Instance\022,.google.cloud.redis.v1.DeleteI" + + "nstanceRequest\032\035.google.longrunning.Oper" + + "ation\"5\202\323\344\223\002/*-/v1/{name=projects/*/loca" + + "tions/*/instances/*}Bs\n\031com.google.cloud" + + ".redis.v1B\030CloudRedisServiceV1ProtoP\001Z:g" + + "oogle.golang.org/genproto/googleapis/clo" + + "ud/redis/v1;redisb\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -218,6 +175,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), com.google.longrunning.OperationsProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), @@ -246,7 +204,6 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( "Tier", "MemorySizeGb", "AuthorizedNetwork", - "PersistenceIamIdentity", }); internal_static_google_cloud_redis_v1_Instance_LabelsEntry_descriptor = internal_static_google_cloud_redis_v1_Instance_descriptor.getNestedTypes().get(0); @@ -312,56 +269,8 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( new java.lang.String[] { "Name", }); - internal_static_google_cloud_redis_v1_GcsSource_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_redis_v1_GcsSource_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_redis_v1_GcsSource_descriptor, - new java.lang.String[] { - "Uri", - }); - internal_static_google_cloud_redis_v1_InputConfig_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_redis_v1_InputConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_redis_v1_InputConfig_descriptor, - new java.lang.String[] { - "GcsSource", "Source", - }); - internal_static_google_cloud_redis_v1_ImportInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_redis_v1_ImportInstanceRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_redis_v1_ImportInstanceRequest_descriptor, - new java.lang.String[] { - "Name", "InputConfig", - }); - internal_static_google_cloud_redis_v1_GcsDestination_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_cloud_redis_v1_GcsDestination_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_redis_v1_GcsDestination_descriptor, - new java.lang.String[] { - "Uri", - }); - internal_static_google_cloud_redis_v1_OutputConfig_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_google_cloud_redis_v1_OutputConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_redis_v1_OutputConfig_descriptor, - new java.lang.String[] { - "GcsDestination", "Destination", - }); - internal_static_google_cloud_redis_v1_ExportInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_google_cloud_redis_v1_ExportInstanceRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_redis_v1_ExportInstanceRequest_descriptor, - new java.lang.String[] { - "Name", "OutputConfig", - }); internal_static_google_cloud_redis_v1_FailoverInstanceRequest_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(7); internal_static_google_cloud_redis_v1_FailoverInstanceRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_v1_FailoverInstanceRequest_descriptor, @@ -369,7 +278,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( "Name", "DataProtectionMode", }); internal_static_google_cloud_redis_v1_OperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_redis_v1_OperationMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_v1_OperationMetadata_descriptor, @@ -383,7 +292,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( "ApiVersion", }); internal_static_google_cloud_redis_v1_LocationMetadata_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(9); internal_static_google_cloud_redis_v1_LocationMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_v1_LocationMetadata_descriptor, @@ -399,7 +308,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( "Key", "Value", }); internal_static_google_cloud_redis_v1_ZoneMetadata_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(10); internal_static_google_cloud_redis_v1_ZoneMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_redis_v1_ZoneMetadata_descriptor, @@ -410,6 +319,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); com.google.longrunning.OperationsProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); diff --git a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/CreateInstanceRequest.java b/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/CreateInstanceRequest.java index 84adff8f338e..9b3aa3926a81 100644 --- a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/CreateInstanceRequest.java +++ b/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/CreateInstanceRequest.java @@ -7,8 +7,7 @@ * * *
- * Request for
- * [CreateInstance][google.cloud.redis.v1.CloudRedis.CreateInstance].
+ * Request for [CreateInstance][google.cloud.redis.v1.CloudRedis.CreateInstance].
  * 
* * Protobuf type {@code google.cloud.redis.v1.CreateInstanceRequest} @@ -443,8 +442,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request for
-   * [CreateInstance][google.cloud.redis.v1.CloudRedis.CreateInstance].
+   * Request for [CreateInstance][google.cloud.redis.v1.CloudRedis.CreateInstance].
    * 
* * Protobuf type {@code google.cloud.redis.v1.CreateInstanceRequest} diff --git a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/DeleteInstanceRequest.java b/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/DeleteInstanceRequest.java index 5a5db399b24b..8b219cdda7a9 100644 --- a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/DeleteInstanceRequest.java +++ b/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/DeleteInstanceRequest.java @@ -7,8 +7,7 @@ * * *
- * Request for
- * [DeleteInstance][google.cloud.redis.v1.CloudRedis.DeleteInstance].
+ * Request for [DeleteInstance][google.cloud.redis.v1.CloudRedis.DeleteInstance].
  * 
* * Protobuf type {@code google.cloud.redis.v1.DeleteInstanceRequest} @@ -303,8 +302,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request for
-   * [DeleteInstance][google.cloud.redis.v1.CloudRedis.DeleteInstance].
+   * Request for [DeleteInstance][google.cloud.redis.v1.CloudRedis.DeleteInstance].
    * 
* * Protobuf type {@code google.cloud.redis.v1.DeleteInstanceRequest} diff --git a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ExportInstanceRequest.java b/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ExportInstanceRequest.java deleted file mode 100644 index fd34946caeba..000000000000 --- a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ExportInstanceRequest.java +++ /dev/null @@ -1,878 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/redis/v1/cloud_redis.proto - -package com.google.cloud.redis.v1; - -/** - * - * - *
- * Request for [Export][google.cloud.redis.v1.CloudRedis.ExportInstance].
- * 
- * - * Protobuf type {@code google.cloud.redis.v1.ExportInstanceRequest} - */ -public final class ExportInstanceRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.redis.v1.ExportInstanceRequest) - ExportInstanceRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ExportInstanceRequest.newBuilder() to construct. - private ExportInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ExportInstanceRequest() { - name_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ExportInstanceRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 26: - { - com.google.cloud.redis.v1.OutputConfig.Builder subBuilder = null; - if (outputConfig_ != null) { - subBuilder = outputConfig_.toBuilder(); - } - outputConfig_ = - input.readMessage( - com.google.cloud.redis.v1.OutputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputConfig_); - outputConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.redis.v1.CloudRedisServiceV1Proto - .internal_static_google_cloud_redis_v1_ExportInstanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.redis.v1.CloudRedisServiceV1Proto - .internal_static_google_cloud_redis_v1_ExportInstanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.redis.v1.ExportInstanceRequest.class, - com.google.cloud.redis.v1.ExportInstanceRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. Redis instance resource name using the form:
-   *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
-   * where `location_id` refers to a GCP region
-   * 
- * - * string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. Redis instance resource name using the form:
-   *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
-   * where `location_id` refers to a GCP region
-   * 
- * - * string name = 1; - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int OUTPUT_CONFIG_FIELD_NUMBER = 3; - private com.google.cloud.redis.v1.OutputConfig outputConfig_; - /** - * - * - *
-   * Required. Specify data to be exported.
-   * 
- * - * .google.cloud.redis.v1.OutputConfig output_config = 3; - */ - public boolean hasOutputConfig() { - return outputConfig_ != null; - } - /** - * - * - *
-   * Required. Specify data to be exported.
-   * 
- * - * .google.cloud.redis.v1.OutputConfig output_config = 3; - */ - public com.google.cloud.redis.v1.OutputConfig getOutputConfig() { - return outputConfig_ == null - ? com.google.cloud.redis.v1.OutputConfig.getDefaultInstance() - : outputConfig_; - } - /** - * - * - *
-   * Required. Specify data to be exported.
-   * 
- * - * .google.cloud.redis.v1.OutputConfig output_config = 3; - */ - public com.google.cloud.redis.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - return getOutputConfig(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (outputConfig_ != null) { - output.writeMessage(3, getOutputConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (outputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOutputConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.redis.v1.ExportInstanceRequest)) { - return super.equals(obj); - } - com.google.cloud.redis.v1.ExportInstanceRequest other = - (com.google.cloud.redis.v1.ExportInstanceRequest) obj; - - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && (hasOutputConfig() == other.hasOutputConfig()); - if (hasOutputConfig()) { - result = result && getOutputConfig().equals(other.getOutputConfig()); - } - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasOutputConfig()) { - hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getOutputConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.redis.v1.ExportInstanceRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.redis.v1.ExportInstanceRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.redis.v1.ExportInstanceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.redis.v1.ExportInstanceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.redis.v1.ExportInstanceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.redis.v1.ExportInstanceRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.redis.v1.ExportInstanceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.redis.v1.ExportInstanceRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.redis.v1.ExportInstanceRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.redis.v1.ExportInstanceRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.redis.v1.ExportInstanceRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.redis.v1.ExportInstanceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.redis.v1.ExportInstanceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request for [Export][google.cloud.redis.v1.CloudRedis.ExportInstance].
-   * 
- * - * Protobuf type {@code google.cloud.redis.v1.ExportInstanceRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.redis.v1.ExportInstanceRequest) - com.google.cloud.redis.v1.ExportInstanceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.redis.v1.CloudRedisServiceV1Proto - .internal_static_google_cloud_redis_v1_ExportInstanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.redis.v1.CloudRedisServiceV1Proto - .internal_static_google_cloud_redis_v1_ExportInstanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.redis.v1.ExportInstanceRequest.class, - com.google.cloud.redis.v1.ExportInstanceRequest.Builder.class); - } - - // Construct using com.google.cloud.redis.v1.ExportInstanceRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.redis.v1.CloudRedisServiceV1Proto - .internal_static_google_cloud_redis_v1_ExportInstanceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.redis.v1.ExportInstanceRequest getDefaultInstanceForType() { - return com.google.cloud.redis.v1.ExportInstanceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.redis.v1.ExportInstanceRequest build() { - com.google.cloud.redis.v1.ExportInstanceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.redis.v1.ExportInstanceRequest buildPartial() { - com.google.cloud.redis.v1.ExportInstanceRequest result = - new com.google.cloud.redis.v1.ExportInstanceRequest(this); - result.name_ = name_; - if (outputConfigBuilder_ == null) { - result.outputConfig_ = outputConfig_; - } else { - result.outputConfig_ = outputConfigBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return (Builder) super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.redis.v1.ExportInstanceRequest) { - return mergeFrom((com.google.cloud.redis.v1.ExportInstanceRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.redis.v1.ExportInstanceRequest other) { - if (other == com.google.cloud.redis.v1.ExportInstanceRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasOutputConfig()) { - mergeOutputConfig(other.getOutputConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.redis.v1.ExportInstanceRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.redis.v1.ExportInstanceRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. Redis instance resource name using the form:
-     *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
-     * where `location_id` refers to a GCP region
-     * 
- * - * string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. Redis instance resource name using the form:
-     *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
-     * where `location_id` refers to a GCP region
-     * 
- * - * string name = 1; - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. Redis instance resource name using the form:
-     *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
-     * where `location_id` refers to a GCP region
-     * 
- * - * string name = 1; - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Redis instance resource name using the form:
-     *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
-     * where `location_id` refers to a GCP region
-     * 
- * - * string name = 1; - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Redis instance resource name using the form:
-     *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
-     * where `location_id` refers to a GCP region
-     * 
- * - * string name = 1; - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private com.google.cloud.redis.v1.OutputConfig outputConfig_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.redis.v1.OutputConfig, - com.google.cloud.redis.v1.OutputConfig.Builder, - com.google.cloud.redis.v1.OutputConfigOrBuilder> - outputConfigBuilder_; - /** - * - * - *
-     * Required. Specify data to be exported.
-     * 
- * - * .google.cloud.redis.v1.OutputConfig output_config = 3; - */ - public boolean hasOutputConfig() { - return outputConfigBuilder_ != null || outputConfig_ != null; - } - /** - * - * - *
-     * Required. Specify data to be exported.
-     * 
- * - * .google.cloud.redis.v1.OutputConfig output_config = 3; - */ - public com.google.cloud.redis.v1.OutputConfig getOutputConfig() { - if (outputConfigBuilder_ == null) { - return outputConfig_ == null - ? com.google.cloud.redis.v1.OutputConfig.getDefaultInstance() - : outputConfig_; - } else { - return outputConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. Specify data to be exported.
-     * 
- * - * .google.cloud.redis.v1.OutputConfig output_config = 3; - */ - public Builder setOutputConfig(com.google.cloud.redis.v1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - outputConfig_ = value; - onChanged(); - } else { - outputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. Specify data to be exported.
-     * 
- * - * .google.cloud.redis.v1.OutputConfig output_config = 3; - */ - public Builder setOutputConfig(com.google.cloud.redis.v1.OutputConfig.Builder builderForValue) { - if (outputConfigBuilder_ == null) { - outputConfig_ = builderForValue.build(); - onChanged(); - } else { - outputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. Specify data to be exported.
-     * 
- * - * .google.cloud.redis.v1.OutputConfig output_config = 3; - */ - public Builder mergeOutputConfig(com.google.cloud.redis.v1.OutputConfig value) { - if (outputConfigBuilder_ == null) { - if (outputConfig_ != null) { - outputConfig_ = - com.google.cloud.redis.v1.OutputConfig.newBuilder(outputConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - outputConfig_ = value; - } - onChanged(); - } else { - outputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. Specify data to be exported.
-     * 
- * - * .google.cloud.redis.v1.OutputConfig output_config = 3; - */ - public Builder clearOutputConfig() { - if (outputConfigBuilder_ == null) { - outputConfig_ = null; - onChanged(); - } else { - outputConfig_ = null; - outputConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. Specify data to be exported.
-     * 
- * - * .google.cloud.redis.v1.OutputConfig output_config = 3; - */ - public com.google.cloud.redis.v1.OutputConfig.Builder getOutputConfigBuilder() { - - onChanged(); - return getOutputConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. Specify data to be exported.
-     * 
- * - * .google.cloud.redis.v1.OutputConfig output_config = 3; - */ - public com.google.cloud.redis.v1.OutputConfigOrBuilder getOutputConfigOrBuilder() { - if (outputConfigBuilder_ != null) { - return outputConfigBuilder_.getMessageOrBuilder(); - } else { - return outputConfig_ == null - ? com.google.cloud.redis.v1.OutputConfig.getDefaultInstance() - : outputConfig_; - } - } - /** - * - * - *
-     * Required. Specify data to be exported.
-     * 
- * - * .google.cloud.redis.v1.OutputConfig output_config = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.redis.v1.OutputConfig, - com.google.cloud.redis.v1.OutputConfig.Builder, - com.google.cloud.redis.v1.OutputConfigOrBuilder> - getOutputConfigFieldBuilder() { - if (outputConfigBuilder_ == null) { - outputConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.redis.v1.OutputConfig, - com.google.cloud.redis.v1.OutputConfig.Builder, - com.google.cloud.redis.v1.OutputConfigOrBuilder>( - getOutputConfig(), getParentForChildren(), isClean()); - outputConfig_ = null; - } - return outputConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.redis.v1.ExportInstanceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.redis.v1.ExportInstanceRequest) - private static final com.google.cloud.redis.v1.ExportInstanceRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.redis.v1.ExportInstanceRequest(); - } - - public static com.google.cloud.redis.v1.ExportInstanceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ExportInstanceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ExportInstanceRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.redis.v1.ExportInstanceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ExportInstanceRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ExportInstanceRequestOrBuilder.java deleted file mode 100644 index 3ef3b5619254..000000000000 --- a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ExportInstanceRequestOrBuilder.java +++ /dev/null @@ -1,66 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/redis/v1/cloud_redis.proto - -package com.google.cloud.redis.v1; - -public interface ExportInstanceRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.redis.v1.ExportInstanceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Redis instance resource name using the form:
-   *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
-   * where `location_id` refers to a GCP region
-   * 
- * - * string name = 1; - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. Redis instance resource name using the form:
-   *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
-   * where `location_id` refers to a GCP region
-   * 
- * - * string name = 1; - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Required. Specify data to be exported.
-   * 
- * - * .google.cloud.redis.v1.OutputConfig output_config = 3; - */ - boolean hasOutputConfig(); - /** - * - * - *
-   * Required. Specify data to be exported.
-   * 
- * - * .google.cloud.redis.v1.OutputConfig output_config = 3; - */ - com.google.cloud.redis.v1.OutputConfig getOutputConfig(); - /** - * - * - *
-   * Required. Specify data to be exported.
-   * 
- * - * .google.cloud.redis.v1.OutputConfig output_config = 3; - */ - com.google.cloud.redis.v1.OutputConfigOrBuilder getOutputConfigOrBuilder(); -} diff --git a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/GcsDestination.java b/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/GcsDestination.java deleted file mode 100644 index f80a516d2f47..000000000000 --- a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/GcsDestination.java +++ /dev/null @@ -1,603 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/redis/v1/cloud_redis.proto - -package com.google.cloud.redis.v1; - -/** - * - * - *
- * The GCS location for the output content
- * 
- * - * Protobuf type {@code google.cloud.redis.v1.GcsDestination} - */ -public final class GcsDestination extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.redis.v1.GcsDestination) - GcsDestinationOrBuilder { - private static final long serialVersionUID = 0L; - // Use GcsDestination.newBuilder() to construct. - private GcsDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GcsDestination() { - uri_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private GcsDestination( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - default: - { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.redis.v1.CloudRedisServiceV1Proto - .internal_static_google_cloud_redis_v1_GcsDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.redis.v1.CloudRedisServiceV1Proto - .internal_static_google_cloud_redis_v1_GcsDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.redis.v1.GcsDestination.class, - com.google.cloud.redis.v1.GcsDestination.Builder.class); - } - - public static final int URI_FIELD_NUMBER = 1; - private volatile java.lang.Object uri_; - /** - * - * - *
-   * Required. Data destination URI (e.g.
-   * 'gs://my_bucket/my_object'). Existing files will be overwritten.
-   * 
- * - * string uri = 1; - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } - } - /** - * - * - *
-   * Required. Data destination URI (e.g.
-   * 'gs://my_bucket/my_object'). Existing files will be overwritten.
-   * 
- * - * string uri = 1; - */ - public com.google.protobuf.ByteString getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.redis.v1.GcsDestination)) { - return super.equals(obj); - } - com.google.cloud.redis.v1.GcsDestination other = (com.google.cloud.redis.v1.GcsDestination) obj; - - boolean result = true; - result = result && getUri().equals(other.getUri()); - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.redis.v1.GcsDestination parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.redis.v1.GcsDestination parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.redis.v1.GcsDestination parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.redis.v1.GcsDestination parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.redis.v1.GcsDestination parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.redis.v1.GcsDestination parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.redis.v1.GcsDestination parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.redis.v1.GcsDestination parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.redis.v1.GcsDestination parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.redis.v1.GcsDestination parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.redis.v1.GcsDestination parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.redis.v1.GcsDestination parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.redis.v1.GcsDestination prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * The GCS location for the output content
-   * 
- * - * Protobuf type {@code google.cloud.redis.v1.GcsDestination} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.redis.v1.GcsDestination) - com.google.cloud.redis.v1.GcsDestinationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.redis.v1.CloudRedisServiceV1Proto - .internal_static_google_cloud_redis_v1_GcsDestination_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.redis.v1.CloudRedisServiceV1Proto - .internal_static_google_cloud_redis_v1_GcsDestination_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.redis.v1.GcsDestination.class, - com.google.cloud.redis.v1.GcsDestination.Builder.class); - } - - // Construct using com.google.cloud.redis.v1.GcsDestination.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - uri_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.redis.v1.CloudRedisServiceV1Proto - .internal_static_google_cloud_redis_v1_GcsDestination_descriptor; - } - - @java.lang.Override - public com.google.cloud.redis.v1.GcsDestination getDefaultInstanceForType() { - return com.google.cloud.redis.v1.GcsDestination.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.redis.v1.GcsDestination build() { - com.google.cloud.redis.v1.GcsDestination result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.redis.v1.GcsDestination buildPartial() { - com.google.cloud.redis.v1.GcsDestination result = - new com.google.cloud.redis.v1.GcsDestination(this); - result.uri_ = uri_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return (Builder) super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.redis.v1.GcsDestination) { - return mergeFrom((com.google.cloud.redis.v1.GcsDestination) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.redis.v1.GcsDestination other) { - if (other == com.google.cloud.redis.v1.GcsDestination.getDefaultInstance()) return this; - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.redis.v1.GcsDestination parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.redis.v1.GcsDestination) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object uri_ = ""; - /** - * - * - *
-     * Required. Data destination URI (e.g.
-     * 'gs://my_bucket/my_object'). Existing files will be overwritten.
-     * 
- * - * string uri = 1; - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. Data destination URI (e.g.
-     * 'gs://my_bucket/my_object'). Existing files will be overwritten.
-     * 
- * - * string uri = 1; - */ - public com.google.protobuf.ByteString getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. Data destination URI (e.g.
-     * 'gs://my_bucket/my_object'). Existing files will be overwritten.
-     * 
- * - * string uri = 1; - */ - public Builder setUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - uri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Data destination URI (e.g.
-     * 'gs://my_bucket/my_object'). Existing files will be overwritten.
-     * 
- * - * string uri = 1; - */ - public Builder clearUri() { - - uri_ = getDefaultInstance().getUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Data destination URI (e.g.
-     * 'gs://my_bucket/my_object'). Existing files will be overwritten.
-     * 
- * - * string uri = 1; - */ - public Builder setUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - uri_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.redis.v1.GcsDestination) - } - - // @@protoc_insertion_point(class_scope:google.cloud.redis.v1.GcsDestination) - private static final com.google.cloud.redis.v1.GcsDestination DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.redis.v1.GcsDestination(); - } - - public static com.google.cloud.redis.v1.GcsDestination getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GcsDestination parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GcsDestination(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.redis.v1.GcsDestination getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/GcsDestinationOrBuilder.java b/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/GcsDestinationOrBuilder.java deleted file mode 100644 index a8249e373f35..000000000000 --- a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/GcsDestinationOrBuilder.java +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/redis/v1/cloud_redis.proto - -package com.google.cloud.redis.v1; - -public interface GcsDestinationOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.redis.v1.GcsDestination) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Data destination URI (e.g.
-   * 'gs://my_bucket/my_object'). Existing files will be overwritten.
-   * 
- * - * string uri = 1; - */ - java.lang.String getUri(); - /** - * - * - *
-   * Required. Data destination URI (e.g.
-   * 'gs://my_bucket/my_object'). Existing files will be overwritten.
-   * 
- * - * string uri = 1; - */ - com.google.protobuf.ByteString getUriBytes(); -} diff --git a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/GcsSource.java b/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/GcsSource.java deleted file mode 100644 index 74231b1293a2..000000000000 --- a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/GcsSource.java +++ /dev/null @@ -1,594 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/redis/v1/cloud_redis.proto - -package com.google.cloud.redis.v1; - -/** - * - * - *
- * The GCS location for the input content
- * 
- * - * Protobuf type {@code google.cloud.redis.v1.GcsSource} - */ -public final class GcsSource extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.redis.v1.GcsSource) - GcsSourceOrBuilder { - private static final long serialVersionUID = 0L; - // Use GcsSource.newBuilder() to construct. - private GcsSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GcsSource() { - uri_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private GcsSource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - default: - { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.redis.v1.CloudRedisServiceV1Proto - .internal_static_google_cloud_redis_v1_GcsSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.redis.v1.CloudRedisServiceV1Proto - .internal_static_google_cloud_redis_v1_GcsSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.redis.v1.GcsSource.class, - com.google.cloud.redis.v1.GcsSource.Builder.class); - } - - public static final int URI_FIELD_NUMBER = 1; - private volatile java.lang.Object uri_; - /** - * - * - *
-   * Required. Source data URI. (e.g. 'gs://my_bucket/my_object').
-   * 
- * - * string uri = 1; - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } - } - /** - * - * - *
-   * Required. Source data URI. (e.g. 'gs://my_bucket/my_object').
-   * 
- * - * string uri = 1; - */ - public com.google.protobuf.ByteString getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getUriBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getUriBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.redis.v1.GcsSource)) { - return super.equals(obj); - } - com.google.cloud.redis.v1.GcsSource other = (com.google.cloud.redis.v1.GcsSource) obj; - - boolean result = true; - result = result && getUri().equals(other.getUri()); - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + URI_FIELD_NUMBER; - hash = (53 * hash) + getUri().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.redis.v1.GcsSource parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.redis.v1.GcsSource parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.redis.v1.GcsSource parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.redis.v1.GcsSource parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.redis.v1.GcsSource parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.redis.v1.GcsSource parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.redis.v1.GcsSource parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.redis.v1.GcsSource parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.redis.v1.GcsSource parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.redis.v1.GcsSource parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.redis.v1.GcsSource parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.redis.v1.GcsSource parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.redis.v1.GcsSource prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * The GCS location for the input content
-   * 
- * - * Protobuf type {@code google.cloud.redis.v1.GcsSource} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.redis.v1.GcsSource) - com.google.cloud.redis.v1.GcsSourceOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.redis.v1.CloudRedisServiceV1Proto - .internal_static_google_cloud_redis_v1_GcsSource_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.redis.v1.CloudRedisServiceV1Proto - .internal_static_google_cloud_redis_v1_GcsSource_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.redis.v1.GcsSource.class, - com.google.cloud.redis.v1.GcsSource.Builder.class); - } - - // Construct using com.google.cloud.redis.v1.GcsSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - uri_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.redis.v1.CloudRedisServiceV1Proto - .internal_static_google_cloud_redis_v1_GcsSource_descriptor; - } - - @java.lang.Override - public com.google.cloud.redis.v1.GcsSource getDefaultInstanceForType() { - return com.google.cloud.redis.v1.GcsSource.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.redis.v1.GcsSource build() { - com.google.cloud.redis.v1.GcsSource result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.redis.v1.GcsSource buildPartial() { - com.google.cloud.redis.v1.GcsSource result = new com.google.cloud.redis.v1.GcsSource(this); - result.uri_ = uri_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return (Builder) super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.redis.v1.GcsSource) { - return mergeFrom((com.google.cloud.redis.v1.GcsSource) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.redis.v1.GcsSource other) { - if (other == com.google.cloud.redis.v1.GcsSource.getDefaultInstance()) return this; - if (!other.getUri().isEmpty()) { - uri_ = other.uri_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.redis.v1.GcsSource parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.redis.v1.GcsSource) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object uri_ = ""; - /** - * - * - *
-     * Required. Source data URI. (e.g. 'gs://my_bucket/my_object').
-     * 
- * - * string uri = 1; - */ - public java.lang.String getUri() { - java.lang.Object ref = uri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - uri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. Source data URI. (e.g. 'gs://my_bucket/my_object').
-     * 
- * - * string uri = 1; - */ - public com.google.protobuf.ByteString getUriBytes() { - java.lang.Object ref = uri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - uri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. Source data URI. (e.g. 'gs://my_bucket/my_object').
-     * 
- * - * string uri = 1; - */ - public Builder setUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - uri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Source data URI. (e.g. 'gs://my_bucket/my_object').
-     * 
- * - * string uri = 1; - */ - public Builder clearUri() { - - uri_ = getDefaultInstance().getUri(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Source data URI. (e.g. 'gs://my_bucket/my_object').
-     * 
- * - * string uri = 1; - */ - public Builder setUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - uri_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.redis.v1.GcsSource) - } - - // @@protoc_insertion_point(class_scope:google.cloud.redis.v1.GcsSource) - private static final com.google.cloud.redis.v1.GcsSource DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.redis.v1.GcsSource(); - } - - public static com.google.cloud.redis.v1.GcsSource getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GcsSource parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GcsSource(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.redis.v1.GcsSource getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/GcsSourceOrBuilder.java b/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/GcsSourceOrBuilder.java deleted file mode 100644 index 8c95ee546c0a..000000000000 --- a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/GcsSourceOrBuilder.java +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/redis/v1/cloud_redis.proto - -package com.google.cloud.redis.v1; - -public interface GcsSourceOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.redis.v1.GcsSource) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Source data URI. (e.g. 'gs://my_bucket/my_object').
-   * 
- * - * string uri = 1; - */ - java.lang.String getUri(); - /** - * - * - *
-   * Required. Source data URI. (e.g. 'gs://my_bucket/my_object').
-   * 
- * - * string uri = 1; - */ - com.google.protobuf.ByteString getUriBytes(); -} diff --git a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ImportInstanceRequest.java b/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ImportInstanceRequest.java deleted file mode 100644 index 9fe29af9107c..000000000000 --- a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ImportInstanceRequest.java +++ /dev/null @@ -1,878 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/redis/v1/cloud_redis.proto - -package com.google.cloud.redis.v1; - -/** - * - * - *
- * Request for [Import][google.cloud.redis.v1.CloudRedis.ImportInstance].
- * 
- * - * Protobuf type {@code google.cloud.redis.v1.ImportInstanceRequest} - */ -public final class ImportInstanceRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.redis.v1.ImportInstanceRequest) - ImportInstanceRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ImportInstanceRequest.newBuilder() to construct. - private ImportInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ImportInstanceRequest() { - name_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ImportInstanceRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 26: - { - com.google.cloud.redis.v1.InputConfig.Builder subBuilder = null; - if (inputConfig_ != null) { - subBuilder = inputConfig_.toBuilder(); - } - inputConfig_ = - input.readMessage( - com.google.cloud.redis.v1.InputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inputConfig_); - inputConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.redis.v1.CloudRedisServiceV1Proto - .internal_static_google_cloud_redis_v1_ImportInstanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.redis.v1.CloudRedisServiceV1Proto - .internal_static_google_cloud_redis_v1_ImportInstanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.redis.v1.ImportInstanceRequest.class, - com.google.cloud.redis.v1.ImportInstanceRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. Redis instance resource name using the form:
-   *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
-   * where `location_id` refers to a GCP region
-   * 
- * - * string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Required. Redis instance resource name using the form:
-   *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
-   * where `location_id` refers to a GCP region
-   * 
- * - * string name = 1; - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INPUT_CONFIG_FIELD_NUMBER = 3; - private com.google.cloud.redis.v1.InputConfig inputConfig_; - /** - * - * - *
-   * Required. Specify data to be imported.
-   * 
- * - * .google.cloud.redis.v1.InputConfig input_config = 3; - */ - public boolean hasInputConfig() { - return inputConfig_ != null; - } - /** - * - * - *
-   * Required. Specify data to be imported.
-   * 
- * - * .google.cloud.redis.v1.InputConfig input_config = 3; - */ - public com.google.cloud.redis.v1.InputConfig getInputConfig() { - return inputConfig_ == null - ? com.google.cloud.redis.v1.InputConfig.getDefaultInstance() - : inputConfig_; - } - /** - * - * - *
-   * Required. Specify data to be imported.
-   * 
- * - * .google.cloud.redis.v1.InputConfig input_config = 3; - */ - public com.google.cloud.redis.v1.InputConfigOrBuilder getInputConfigOrBuilder() { - return getInputConfig(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (inputConfig_ != null) { - output.writeMessage(3, getInputConfig()); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (inputConfig_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getInputConfig()); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.redis.v1.ImportInstanceRequest)) { - return super.equals(obj); - } - com.google.cloud.redis.v1.ImportInstanceRequest other = - (com.google.cloud.redis.v1.ImportInstanceRequest) obj; - - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && (hasInputConfig() == other.hasInputConfig()); - if (hasInputConfig()) { - result = result && getInputConfig().equals(other.getInputConfig()); - } - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasInputConfig()) { - hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getInputConfig().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.redis.v1.ImportInstanceRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.redis.v1.ImportInstanceRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.redis.v1.ImportInstanceRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.redis.v1.ImportInstanceRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.redis.v1.ImportInstanceRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.redis.v1.ImportInstanceRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.redis.v1.ImportInstanceRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.redis.v1.ImportInstanceRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.redis.v1.ImportInstanceRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.redis.v1.ImportInstanceRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.redis.v1.ImportInstanceRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.redis.v1.ImportInstanceRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.redis.v1.ImportInstanceRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request for [Import][google.cloud.redis.v1.CloudRedis.ImportInstance].
-   * 
- * - * Protobuf type {@code google.cloud.redis.v1.ImportInstanceRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.redis.v1.ImportInstanceRequest) - com.google.cloud.redis.v1.ImportInstanceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.redis.v1.CloudRedisServiceV1Proto - .internal_static_google_cloud_redis_v1_ImportInstanceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.redis.v1.CloudRedisServiceV1Proto - .internal_static_google_cloud_redis_v1_ImportInstanceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.redis.v1.ImportInstanceRequest.class, - com.google.cloud.redis.v1.ImportInstanceRequest.Builder.class); - } - - // Construct using com.google.cloud.redis.v1.ImportInstanceRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.redis.v1.CloudRedisServiceV1Proto - .internal_static_google_cloud_redis_v1_ImportInstanceRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.redis.v1.ImportInstanceRequest getDefaultInstanceForType() { - return com.google.cloud.redis.v1.ImportInstanceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.redis.v1.ImportInstanceRequest build() { - com.google.cloud.redis.v1.ImportInstanceRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.redis.v1.ImportInstanceRequest buildPartial() { - com.google.cloud.redis.v1.ImportInstanceRequest result = - new com.google.cloud.redis.v1.ImportInstanceRequest(this); - result.name_ = name_; - if (inputConfigBuilder_ == null) { - result.inputConfig_ = inputConfig_; - } else { - result.inputConfig_ = inputConfigBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return (Builder) super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.redis.v1.ImportInstanceRequest) { - return mergeFrom((com.google.cloud.redis.v1.ImportInstanceRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.redis.v1.ImportInstanceRequest other) { - if (other == com.google.cloud.redis.v1.ImportInstanceRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (other.hasInputConfig()) { - mergeInputConfig(other.getInputConfig()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.redis.v1.ImportInstanceRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.redis.v1.ImportInstanceRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. Redis instance resource name using the form:
-     *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
-     * where `location_id` refers to a GCP region
-     * 
- * - * string name = 1; - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. Redis instance resource name using the form:
-     *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
-     * where `location_id` refers to a GCP region
-     * 
- * - * string name = 1; - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. Redis instance resource name using the form:
-     *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
-     * where `location_id` refers to a GCP region
-     * 
- * - * string name = 1; - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Redis instance resource name using the form:
-     *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
-     * where `location_id` refers to a GCP region
-     * 
- * - * string name = 1; - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Redis instance resource name using the form:
-     *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
-     * where `location_id` refers to a GCP region
-     * 
- * - * string name = 1; - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private com.google.cloud.redis.v1.InputConfig inputConfig_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.redis.v1.InputConfig, - com.google.cloud.redis.v1.InputConfig.Builder, - com.google.cloud.redis.v1.InputConfigOrBuilder> - inputConfigBuilder_; - /** - * - * - *
-     * Required. Specify data to be imported.
-     * 
- * - * .google.cloud.redis.v1.InputConfig input_config = 3; - */ - public boolean hasInputConfig() { - return inputConfigBuilder_ != null || inputConfig_ != null; - } - /** - * - * - *
-     * Required. Specify data to be imported.
-     * 
- * - * .google.cloud.redis.v1.InputConfig input_config = 3; - */ - public com.google.cloud.redis.v1.InputConfig getInputConfig() { - if (inputConfigBuilder_ == null) { - return inputConfig_ == null - ? com.google.cloud.redis.v1.InputConfig.getDefaultInstance() - : inputConfig_; - } else { - return inputConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. Specify data to be imported.
-     * 
- * - * .google.cloud.redis.v1.InputConfig input_config = 3; - */ - public Builder setInputConfig(com.google.cloud.redis.v1.InputConfig value) { - if (inputConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - inputConfig_ = value; - onChanged(); - } else { - inputConfigBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. Specify data to be imported.
-     * 
- * - * .google.cloud.redis.v1.InputConfig input_config = 3; - */ - public Builder setInputConfig(com.google.cloud.redis.v1.InputConfig.Builder builderForValue) { - if (inputConfigBuilder_ == null) { - inputConfig_ = builderForValue.build(); - onChanged(); - } else { - inputConfigBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. Specify data to be imported.
-     * 
- * - * .google.cloud.redis.v1.InputConfig input_config = 3; - */ - public Builder mergeInputConfig(com.google.cloud.redis.v1.InputConfig value) { - if (inputConfigBuilder_ == null) { - if (inputConfig_ != null) { - inputConfig_ = - com.google.cloud.redis.v1.InputConfig.newBuilder(inputConfig_) - .mergeFrom(value) - .buildPartial(); - } else { - inputConfig_ = value; - } - onChanged(); - } else { - inputConfigBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. Specify data to be imported.
-     * 
- * - * .google.cloud.redis.v1.InputConfig input_config = 3; - */ - public Builder clearInputConfig() { - if (inputConfigBuilder_ == null) { - inputConfig_ = null; - onChanged(); - } else { - inputConfig_ = null; - inputConfigBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. Specify data to be imported.
-     * 
- * - * .google.cloud.redis.v1.InputConfig input_config = 3; - */ - public com.google.cloud.redis.v1.InputConfig.Builder getInputConfigBuilder() { - - onChanged(); - return getInputConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. Specify data to be imported.
-     * 
- * - * .google.cloud.redis.v1.InputConfig input_config = 3; - */ - public com.google.cloud.redis.v1.InputConfigOrBuilder getInputConfigOrBuilder() { - if (inputConfigBuilder_ != null) { - return inputConfigBuilder_.getMessageOrBuilder(); - } else { - return inputConfig_ == null - ? com.google.cloud.redis.v1.InputConfig.getDefaultInstance() - : inputConfig_; - } - } - /** - * - * - *
-     * Required. Specify data to be imported.
-     * 
- * - * .google.cloud.redis.v1.InputConfig input_config = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.redis.v1.InputConfig, - com.google.cloud.redis.v1.InputConfig.Builder, - com.google.cloud.redis.v1.InputConfigOrBuilder> - getInputConfigFieldBuilder() { - if (inputConfigBuilder_ == null) { - inputConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.redis.v1.InputConfig, - com.google.cloud.redis.v1.InputConfig.Builder, - com.google.cloud.redis.v1.InputConfigOrBuilder>( - getInputConfig(), getParentForChildren(), isClean()); - inputConfig_ = null; - } - return inputConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.redis.v1.ImportInstanceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.redis.v1.ImportInstanceRequest) - private static final com.google.cloud.redis.v1.ImportInstanceRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.redis.v1.ImportInstanceRequest(); - } - - public static com.google.cloud.redis.v1.ImportInstanceRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImportInstanceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportInstanceRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.redis.v1.ImportInstanceRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ImportInstanceRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ImportInstanceRequestOrBuilder.java deleted file mode 100644 index 52ff79b1d855..000000000000 --- a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/ImportInstanceRequestOrBuilder.java +++ /dev/null @@ -1,66 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/redis/v1/cloud_redis.proto - -package com.google.cloud.redis.v1; - -public interface ImportInstanceRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.redis.v1.ImportInstanceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Redis instance resource name using the form:
-   *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
-   * where `location_id` refers to a GCP region
-   * 
- * - * string name = 1; - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. Redis instance resource name using the form:
-   *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
-   * where `location_id` refers to a GCP region
-   * 
- * - * string name = 1; - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Required. Specify data to be imported.
-   * 
- * - * .google.cloud.redis.v1.InputConfig input_config = 3; - */ - boolean hasInputConfig(); - /** - * - * - *
-   * Required. Specify data to be imported.
-   * 
- * - * .google.cloud.redis.v1.InputConfig input_config = 3; - */ - com.google.cloud.redis.v1.InputConfig getInputConfig(); - /** - * - * - *
-   * Required. Specify data to be imported.
-   * 
- * - * .google.cloud.redis.v1.InputConfig input_config = 3; - */ - com.google.cloud.redis.v1.InputConfigOrBuilder getInputConfigOrBuilder(); -} diff --git a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/InputConfig.java b/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/InputConfig.java deleted file mode 100644 index babbcdae0556..000000000000 --- a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/InputConfig.java +++ /dev/null @@ -1,789 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/redis/v1/cloud_redis.proto - -package com.google.cloud.redis.v1; - -/** - * - * - *
- * The input content
- * 
- * - * Protobuf type {@code google.cloud.redis.v1.InputConfig} - */ -public final class InputConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.redis.v1.InputConfig) - InputConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use InputConfig.newBuilder() to construct. - private InputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private InputConfig() {} - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private InputConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.redis.v1.GcsSource.Builder subBuilder = null; - if (sourceCase_ == 1) { - subBuilder = ((com.google.cloud.redis.v1.GcsSource) source_).toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.redis.v1.GcsSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.redis.v1.GcsSource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 1; - break; - } - default: - { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.redis.v1.CloudRedisServiceV1Proto - .internal_static_google_cloud_redis_v1_InputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.redis.v1.CloudRedisServiceV1Proto - .internal_static_google_cloud_redis_v1_InputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.redis.v1.InputConfig.class, - com.google.cloud.redis.v1.InputConfig.Builder.class); - } - - private int sourceCase_ = 0; - private java.lang.Object source_; - - public enum SourceCase implements com.google.protobuf.Internal.EnumLite { - GCS_SOURCE(1), - SOURCE_NOT_SET(0); - private final int value; - - private SourceCase(int value) { - this.value = value; - } - /** @deprecated Use {@link #forNumber(int)} instead. */ - @java.lang.Deprecated - public static SourceCase valueOf(int value) { - return forNumber(value); - } - - public static SourceCase forNumber(int value) { - switch (value) { - case 1: - return GCS_SOURCE; - case 0: - return SOURCE_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public SourceCase getSourceCase() { - return SourceCase.forNumber(sourceCase_); - } - - public static final int GCS_SOURCE_FIELD_NUMBER = 1; - /** - * - * - *
-   * Google Cloud Storage location where input content is located.
-   * 
- * - * .google.cloud.redis.v1.GcsSource gcs_source = 1; - */ - public boolean hasGcsSource() { - return sourceCase_ == 1; - } - /** - * - * - *
-   * Google Cloud Storage location where input content is located.
-   * 
- * - * .google.cloud.redis.v1.GcsSource gcs_source = 1; - */ - public com.google.cloud.redis.v1.GcsSource getGcsSource() { - if (sourceCase_ == 1) { - return (com.google.cloud.redis.v1.GcsSource) source_; - } - return com.google.cloud.redis.v1.GcsSource.getDefaultInstance(); - } - /** - * - * - *
-   * Google Cloud Storage location where input content is located.
-   * 
- * - * .google.cloud.redis.v1.GcsSource gcs_source = 1; - */ - public com.google.cloud.redis.v1.GcsSourceOrBuilder getGcsSourceOrBuilder() { - if (sourceCase_ == 1) { - return (com.google.cloud.redis.v1.GcsSource) source_; - } - return com.google.cloud.redis.v1.GcsSource.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (sourceCase_ == 1) { - output.writeMessage(1, (com.google.cloud.redis.v1.GcsSource) source_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (sourceCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, (com.google.cloud.redis.v1.GcsSource) source_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.redis.v1.InputConfig)) { - return super.equals(obj); - } - com.google.cloud.redis.v1.InputConfig other = (com.google.cloud.redis.v1.InputConfig) obj; - - boolean result = true; - result = result && getSourceCase().equals(other.getSourceCase()); - if (!result) return false; - switch (sourceCase_) { - case 1: - result = result && getGcsSource().equals(other.getGcsSource()); - break; - case 0: - default: - } - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (sourceCase_) { - case 1: - hash = (37 * hash) + GCS_SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getGcsSource().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.redis.v1.InputConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.redis.v1.InputConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.redis.v1.InputConfig parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.redis.v1.InputConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.redis.v1.InputConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.redis.v1.InputConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.redis.v1.InputConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.redis.v1.InputConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.redis.v1.InputConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.redis.v1.InputConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.redis.v1.InputConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.redis.v1.InputConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.redis.v1.InputConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * The input content
-   * 
- * - * Protobuf type {@code google.cloud.redis.v1.InputConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.redis.v1.InputConfig) - com.google.cloud.redis.v1.InputConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.redis.v1.CloudRedisServiceV1Proto - .internal_static_google_cloud_redis_v1_InputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.redis.v1.CloudRedisServiceV1Proto - .internal_static_google_cloud_redis_v1_InputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.redis.v1.InputConfig.class, - com.google.cloud.redis.v1.InputConfig.Builder.class); - } - - // Construct using com.google.cloud.redis.v1.InputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - sourceCase_ = 0; - source_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.redis.v1.CloudRedisServiceV1Proto - .internal_static_google_cloud_redis_v1_InputConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.redis.v1.InputConfig getDefaultInstanceForType() { - return com.google.cloud.redis.v1.InputConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.redis.v1.InputConfig build() { - com.google.cloud.redis.v1.InputConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.redis.v1.InputConfig buildPartial() { - com.google.cloud.redis.v1.InputConfig result = - new com.google.cloud.redis.v1.InputConfig(this); - if (sourceCase_ == 1) { - if (gcsSourceBuilder_ == null) { - result.source_ = source_; - } else { - result.source_ = gcsSourceBuilder_.build(); - } - } - result.sourceCase_ = sourceCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return (Builder) super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.redis.v1.InputConfig) { - return mergeFrom((com.google.cloud.redis.v1.InputConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.redis.v1.InputConfig other) { - if (other == com.google.cloud.redis.v1.InputConfig.getDefaultInstance()) return this; - switch (other.getSourceCase()) { - case GCS_SOURCE: - { - mergeGcsSource(other.getGcsSource()); - break; - } - case SOURCE_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.redis.v1.InputConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.redis.v1.InputConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int sourceCase_ = 0; - private java.lang.Object source_; - - public SourceCase getSourceCase() { - return SourceCase.forNumber(sourceCase_); - } - - public Builder clearSource() { - sourceCase_ = 0; - source_ = null; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.redis.v1.GcsSource, - com.google.cloud.redis.v1.GcsSource.Builder, - com.google.cloud.redis.v1.GcsSourceOrBuilder> - gcsSourceBuilder_; - /** - * - * - *
-     * Google Cloud Storage location where input content is located.
-     * 
- * - * .google.cloud.redis.v1.GcsSource gcs_source = 1; - */ - public boolean hasGcsSource() { - return sourceCase_ == 1; - } - /** - * - * - *
-     * Google Cloud Storage location where input content is located.
-     * 
- * - * .google.cloud.redis.v1.GcsSource gcs_source = 1; - */ - public com.google.cloud.redis.v1.GcsSource getGcsSource() { - if (gcsSourceBuilder_ == null) { - if (sourceCase_ == 1) { - return (com.google.cloud.redis.v1.GcsSource) source_; - } - return com.google.cloud.redis.v1.GcsSource.getDefaultInstance(); - } else { - if (sourceCase_ == 1) { - return gcsSourceBuilder_.getMessage(); - } - return com.google.cloud.redis.v1.GcsSource.getDefaultInstance(); - } - } - /** - * - * - *
-     * Google Cloud Storage location where input content is located.
-     * 
- * - * .google.cloud.redis.v1.GcsSource gcs_source = 1; - */ - public Builder setGcsSource(com.google.cloud.redis.v1.GcsSource value) { - if (gcsSourceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - source_ = value; - onChanged(); - } else { - gcsSourceBuilder_.setMessage(value); - } - sourceCase_ = 1; - return this; - } - /** - * - * - *
-     * Google Cloud Storage location where input content is located.
-     * 
- * - * .google.cloud.redis.v1.GcsSource gcs_source = 1; - */ - public Builder setGcsSource(com.google.cloud.redis.v1.GcsSource.Builder builderForValue) { - if (gcsSourceBuilder_ == null) { - source_ = builderForValue.build(); - onChanged(); - } else { - gcsSourceBuilder_.setMessage(builderForValue.build()); - } - sourceCase_ = 1; - return this; - } - /** - * - * - *
-     * Google Cloud Storage location where input content is located.
-     * 
- * - * .google.cloud.redis.v1.GcsSource gcs_source = 1; - */ - public Builder mergeGcsSource(com.google.cloud.redis.v1.GcsSource value) { - if (gcsSourceBuilder_ == null) { - if (sourceCase_ == 1 - && source_ != com.google.cloud.redis.v1.GcsSource.getDefaultInstance()) { - source_ = - com.google.cloud.redis.v1.GcsSource.newBuilder( - (com.google.cloud.redis.v1.GcsSource) source_) - .mergeFrom(value) - .buildPartial(); - } else { - source_ = value; - } - onChanged(); - } else { - if (sourceCase_ == 1) { - gcsSourceBuilder_.mergeFrom(value); - } - gcsSourceBuilder_.setMessage(value); - } - sourceCase_ = 1; - return this; - } - /** - * - * - *
-     * Google Cloud Storage location where input content is located.
-     * 
- * - * .google.cloud.redis.v1.GcsSource gcs_source = 1; - */ - public Builder clearGcsSource() { - if (gcsSourceBuilder_ == null) { - if (sourceCase_ == 1) { - sourceCase_ = 0; - source_ = null; - onChanged(); - } - } else { - if (sourceCase_ == 1) { - sourceCase_ = 0; - source_ = null; - } - gcsSourceBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Google Cloud Storage location where input content is located.
-     * 
- * - * .google.cloud.redis.v1.GcsSource gcs_source = 1; - */ - public com.google.cloud.redis.v1.GcsSource.Builder getGcsSourceBuilder() { - return getGcsSourceFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Google Cloud Storage location where input content is located.
-     * 
- * - * .google.cloud.redis.v1.GcsSource gcs_source = 1; - */ - public com.google.cloud.redis.v1.GcsSourceOrBuilder getGcsSourceOrBuilder() { - if ((sourceCase_ == 1) && (gcsSourceBuilder_ != null)) { - return gcsSourceBuilder_.getMessageOrBuilder(); - } else { - if (sourceCase_ == 1) { - return (com.google.cloud.redis.v1.GcsSource) source_; - } - return com.google.cloud.redis.v1.GcsSource.getDefaultInstance(); - } - } - /** - * - * - *
-     * Google Cloud Storage location where input content is located.
-     * 
- * - * .google.cloud.redis.v1.GcsSource gcs_source = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.redis.v1.GcsSource, - com.google.cloud.redis.v1.GcsSource.Builder, - com.google.cloud.redis.v1.GcsSourceOrBuilder> - getGcsSourceFieldBuilder() { - if (gcsSourceBuilder_ == null) { - if (!(sourceCase_ == 1)) { - source_ = com.google.cloud.redis.v1.GcsSource.getDefaultInstance(); - } - gcsSourceBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.redis.v1.GcsSource, - com.google.cloud.redis.v1.GcsSource.Builder, - com.google.cloud.redis.v1.GcsSourceOrBuilder>( - (com.google.cloud.redis.v1.GcsSource) source_, getParentForChildren(), isClean()); - source_ = null; - } - sourceCase_ = 1; - onChanged(); - ; - return gcsSourceBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.redis.v1.InputConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.redis.v1.InputConfig) - private static final com.google.cloud.redis.v1.InputConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.redis.v1.InputConfig(); - } - - public static com.google.cloud.redis.v1.InputConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public InputConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new InputConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.redis.v1.InputConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/InputConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/InputConfigOrBuilder.java deleted file mode 100644 index bd01ec598664..000000000000 --- a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/InputConfigOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/redis/v1/cloud_redis.proto - -package com.google.cloud.redis.v1; - -public interface InputConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.redis.v1.InputConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Google Cloud Storage location where input content is located.
-   * 
- * - * .google.cloud.redis.v1.GcsSource gcs_source = 1; - */ - boolean hasGcsSource(); - /** - * - * - *
-   * Google Cloud Storage location where input content is located.
-   * 
- * - * .google.cloud.redis.v1.GcsSource gcs_source = 1; - */ - com.google.cloud.redis.v1.GcsSource getGcsSource(); - /** - * - * - *
-   * Google Cloud Storage location where input content is located.
-   * 
- * - * .google.cloud.redis.v1.GcsSource gcs_source = 1; - */ - com.google.cloud.redis.v1.GcsSourceOrBuilder getGcsSourceOrBuilder(); - - public com.google.cloud.redis.v1.InputConfig.SourceCase getSourceCase(); -} diff --git a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/Instance.java b/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/Instance.java index 0b4f0953f232..13bbe88a86c5 100644 --- a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/Instance.java +++ b/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/Instance.java @@ -37,7 +37,6 @@ private Instance() { tier_ = 0; memorySizeGb_ = 0; authorizedNetwork_ = ""; - persistenceIamIdentity_ = ""; } @java.lang.Override @@ -201,13 +200,6 @@ private Instance( authorizedNetwork_ = s; break; } - case 170: - { - java.lang.String s = input.readStringRequireUtf8(); - - persistenceIamIdentity_ = s; - break; - } default: { if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { @@ -337,16 +329,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * MAINTENANCE = 6; */ MAINTENANCE(6), - /** - * - * - *
-     * Redis instance is importing data (availability may be affected).
-     * 
- * - * IMPORTING = 8; - */ - IMPORTING(8), /** * * @@ -432,16 +414,6 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * MAINTENANCE = 6; */ public static final int MAINTENANCE_VALUE = 6; - /** - * - * - *
-     * Redis instance is importing data (availability may be affected).
-     * 
- * - * IMPORTING = 8; - */ - public static final int IMPORTING_VALUE = 8; /** * * @@ -483,8 +455,6 @@ public static State forNumber(int value) { return REPAIRING; case 6: return MAINTENANCE; - case 8: - return IMPORTING; case 9: return FAILING_OVER; default: @@ -982,9 +952,7 @@ public com.google.protobuf.ByteString getAlternativeLocationIdBytes() { * Optional. The version of Redis software. * If not provided, latest supported version will be used. Updating the * version will perform an upgrade/downgrade to the new version. Currently, - * the supported values are: - * * `REDIS_4_0` for Redis 4.0 compatibility - * * `REDIS_3_2` for Redis 3.2 compatibility + * the supported values are `REDIS_3_2` for Redis 3.2. * * * string redis_version = 7; @@ -1007,9 +975,7 @@ public java.lang.String getRedisVersion() { * Optional. The version of Redis software. * If not provided, latest supported version will be used. Updating the * version will perform an upgrade/downgrade to the new version. Currently, - * the supported values are: - * * `REDIS_4_0` for Redis 4.0 compatibility - * * `REDIS_3_2` for Redis 3.2 compatibility + * the supported values are `REDIS_3_2` for Redis 3.2. * * * string redis_version = 7; @@ -1334,13 +1300,8 @@ public int getRedisConfigsCount() { * Optional. Redis configuration parameters, according to * http://redis.io/topics/config. Currently, the only supported parameters * are: - * Redis 3.2 and above: - * * maxmemory-policy - * * notify-keyspace-events - * Redis 4.0 and above: - * * activedefrag - * * lfu-log-factor - * * lfu-decay-time + * * maxmemory-policy + * * notify-keyspace-events * * * map<string, string> redis_configs = 16; @@ -1363,13 +1324,8 @@ public java.util.Map getRedisConfigs() { * Optional. Redis configuration parameters, according to * http://redis.io/topics/config. Currently, the only supported parameters * are: - * Redis 3.2 and above: - * * maxmemory-policy - * * notify-keyspace-events - * Redis 4.0 and above: - * * activedefrag - * * lfu-log-factor - * * lfu-decay-time + * * maxmemory-policy + * * notify-keyspace-events * * * map<string, string> redis_configs = 16; @@ -1384,13 +1340,8 @@ public java.util.Map getRedisConfigsMap() { * Optional. Redis configuration parameters, according to * http://redis.io/topics/config. Currently, the only supported parameters * are: - * Redis 3.2 and above: - * * maxmemory-policy - * * notify-keyspace-events - * Redis 4.0 and above: - * * activedefrag - * * lfu-log-factor - * * lfu-decay-time + * * maxmemory-policy + * * notify-keyspace-events * * * map<string, string> redis_configs = 16; @@ -1410,13 +1361,8 @@ public java.lang.String getRedisConfigsOrDefault( * Optional. Redis configuration parameters, according to * http://redis.io/topics/config. Currently, the only supported parameters * are: - * Redis 3.2 and above: - * * maxmemory-policy - * * notify-keyspace-events - * Redis 4.0 and above: - * * activedefrag - * * lfu-log-factor - * * lfu-decay-time + * * maxmemory-policy + * * notify-keyspace-events * * * map<string, string> redis_configs = 16; @@ -1526,57 +1472,6 @@ public com.google.protobuf.ByteString getAuthorizedNetworkBytes() { } } - public static final int PERSISTENCE_IAM_IDENTITY_FIELD_NUMBER = 21; - private volatile java.lang.Object persistenceIamIdentity_; - /** - * - * - *
-   * Output only. Cloud IAM identity used by import / export operations to
-   * transfer data to/from Cloud Storage. Format is
-   * "serviceAccount:<service_account_email>". The value may change over time
-   * for a given instance so should be checked before each import/export
-   * operation.
-   * 
- * - * string persistence_iam_identity = 21; - */ - public java.lang.String getPersistenceIamIdentity() { - java.lang.Object ref = persistenceIamIdentity_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - persistenceIamIdentity_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. Cloud IAM identity used by import / export operations to
-   * transfer data to/from Cloud Storage. Format is
-   * "serviceAccount:<service_account_email>". The value may change over time
-   * for a given instance so should be checked before each import/export
-   * operation.
-   * 
- * - * string persistence_iam_identity = 21; - */ - public com.google.protobuf.ByteString getPersistenceIamIdentityBytes() { - java.lang.Object ref = persistenceIamIdentity_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - persistenceIamIdentity_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1640,9 +1535,6 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getAuthorizedNetworkBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 20, authorizedNetwork_); } - if (!getPersistenceIamIdentityBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 21, persistenceIamIdentity_); - } unknownFields.writeTo(output); } @@ -1717,9 +1609,6 @@ public int getSerializedSize() { if (!getAuthorizedNetworkBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(20, authorizedNetwork_); } - if (!getPersistenceIamIdentityBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(21, persistenceIamIdentity_); - } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1756,7 +1645,6 @@ public boolean equals(final java.lang.Object obj) { result = result && tier_ == other.tier_; result = result && (getMemorySizeGb() == other.getMemorySizeGb()); result = result && getAuthorizedNetwork().equals(other.getAuthorizedNetwork()); - result = result && getPersistenceIamIdentity().equals(other.getPersistenceIamIdentity()); result = result && unknownFields.equals(other.unknownFields); return result; } @@ -1808,8 +1696,6 @@ public int hashCode() { hash = (53 * hash) + getMemorySizeGb(); hash = (37 * hash) + AUTHORIZED_NETWORK_FIELD_NUMBER; hash = (53 * hash) + getAuthorizedNetwork().hashCode(); - hash = (37 * hash) + PERSISTENCE_IAM_IDENTITY_FIELD_NUMBER; - hash = (53 * hash) + getPersistenceIamIdentity().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -2014,8 +1900,6 @@ public Builder clear() { authorizedNetwork_ = ""; - persistenceIamIdentity_ = ""; - return this; } @@ -2067,7 +1951,6 @@ public com.google.cloud.redis.v1.Instance buildPartial() { result.tier_ = tier_; result.memorySizeGb_ = memorySizeGb_; result.authorizedNetwork_ = authorizedNetwork_; - result.persistenceIamIdentity_ = persistenceIamIdentity_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -2175,10 +2058,6 @@ public Builder mergeFrom(com.google.cloud.redis.v1.Instance other) { authorizedNetwork_ = other.authorizedNetwork_; onChanged(); } - if (!other.getPersistenceIamIdentity().isEmpty()) { - persistenceIamIdentity_ = other.persistenceIamIdentity_; - onChanged(); - } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -2811,9 +2690,7 @@ public Builder setAlternativeLocationIdBytes(com.google.protobuf.ByteString valu * Optional. The version of Redis software. * If not provided, latest supported version will be used. Updating the * version will perform an upgrade/downgrade to the new version. Currently, - * the supported values are: - * * `REDIS_4_0` for Redis 4.0 compatibility - * * `REDIS_3_2` for Redis 3.2 compatibility + * the supported values are `REDIS_3_2` for Redis 3.2. * * * string redis_version = 7; @@ -2836,9 +2713,7 @@ public java.lang.String getRedisVersion() { * Optional. The version of Redis software. * If not provided, latest supported version will be used. Updating the * version will perform an upgrade/downgrade to the new version. Currently, - * the supported values are: - * * `REDIS_4_0` for Redis 4.0 compatibility - * * `REDIS_3_2` for Redis 3.2 compatibility + * the supported values are `REDIS_3_2` for Redis 3.2. * * * string redis_version = 7; @@ -2861,9 +2736,7 @@ public com.google.protobuf.ByteString getRedisVersionBytes() { * Optional. The version of Redis software. * If not provided, latest supported version will be used. Updating the * version will perform an upgrade/downgrade to the new version. Currently, - * the supported values are: - * * `REDIS_4_0` for Redis 4.0 compatibility - * * `REDIS_3_2` for Redis 3.2 compatibility + * the supported values are `REDIS_3_2` for Redis 3.2. * * * string redis_version = 7; @@ -2884,9 +2757,7 @@ public Builder setRedisVersion(java.lang.String value) { * Optional. The version of Redis software. * If not provided, latest supported version will be used. Updating the * version will perform an upgrade/downgrade to the new version. Currently, - * the supported values are: - * * `REDIS_4_0` for Redis 4.0 compatibility - * * `REDIS_3_2` for Redis 3.2 compatibility + * the supported values are `REDIS_3_2` for Redis 3.2. * * * string redis_version = 7; @@ -2904,9 +2775,7 @@ public Builder clearRedisVersion() { * Optional. The version of Redis software. * If not provided, latest supported version will be used. Updating the * version will perform an upgrade/downgrade to the new version. Currently, - * the supported values are: - * * `REDIS_4_0` for Redis 4.0 compatibility - * * `REDIS_3_2` for Redis 3.2 compatibility + * the supported values are `REDIS_3_2` for Redis 3.2. * * * string redis_version = 7; @@ -3677,13 +3546,8 @@ public int getRedisConfigsCount() { * Optional. Redis configuration parameters, according to * http://redis.io/topics/config. Currently, the only supported parameters * are: - * Redis 3.2 and above: - * * maxmemory-policy - * * notify-keyspace-events - * Redis 4.0 and above: - * * activedefrag - * * lfu-log-factor - * * lfu-decay-time + * * maxmemory-policy + * * notify-keyspace-events * * * map<string, string> redis_configs = 16; @@ -3706,13 +3570,8 @@ public java.util.Map getRedisConfigs() { * Optional. Redis configuration parameters, according to * http://redis.io/topics/config. Currently, the only supported parameters * are: - * Redis 3.2 and above: - * * maxmemory-policy - * * notify-keyspace-events - * Redis 4.0 and above: - * * activedefrag - * * lfu-log-factor - * * lfu-decay-time + * * maxmemory-policy + * * notify-keyspace-events * * * map<string, string> redis_configs = 16; @@ -3727,13 +3586,8 @@ public java.util.Map getRedisConfigsMap() { * Optional. Redis configuration parameters, according to * http://redis.io/topics/config. Currently, the only supported parameters * are: - * Redis 3.2 and above: - * * maxmemory-policy - * * notify-keyspace-events - * Redis 4.0 and above: - * * activedefrag - * * lfu-log-factor - * * lfu-decay-time + * * maxmemory-policy + * * notify-keyspace-events * * * map<string, string> redis_configs = 16; @@ -3753,13 +3607,8 @@ public java.lang.String getRedisConfigsOrDefault( * Optional. Redis configuration parameters, according to * http://redis.io/topics/config. Currently, the only supported parameters * are: - * Redis 3.2 and above: - * * maxmemory-policy - * * notify-keyspace-events - * Redis 4.0 and above: - * * activedefrag - * * lfu-log-factor - * * lfu-decay-time + * * maxmemory-policy + * * notify-keyspace-events * * * map<string, string> redis_configs = 16; @@ -3786,13 +3635,8 @@ public Builder clearRedisConfigs() { * Optional. Redis configuration parameters, according to * http://redis.io/topics/config. Currently, the only supported parameters * are: - * Redis 3.2 and above: - * * maxmemory-policy - * * notify-keyspace-events - * Redis 4.0 and above: - * * activedefrag - * * lfu-log-factor - * * lfu-decay-time + * * maxmemory-policy + * * notify-keyspace-events * * * map<string, string> redis_configs = 16; @@ -3816,13 +3660,8 @@ public java.util.Map getMutableRedisConfigs( * Optional. Redis configuration parameters, according to * http://redis.io/topics/config. Currently, the only supported parameters * are: - * Redis 3.2 and above: - * * maxmemory-policy - * * notify-keyspace-events - * Redis 4.0 and above: - * * activedefrag - * * lfu-log-factor - * * lfu-decay-time + * * maxmemory-policy + * * notify-keyspace-events * * * map<string, string> redis_configs = 16; @@ -3844,13 +3683,8 @@ public Builder putRedisConfigs(java.lang.String key, java.lang.String value) { * Optional. Redis configuration parameters, according to * http://redis.io/topics/config. Currently, the only supported parameters * are: - * Redis 3.2 and above: - * * maxmemory-policy - * * notify-keyspace-events - * Redis 4.0 and above: - * * activedefrag - * * lfu-log-factor - * * lfu-decay-time + * * maxmemory-policy + * * notify-keyspace-events * * * map<string, string> redis_configs = 16; @@ -4089,120 +3923,6 @@ public Builder setAuthorizedNetworkBytes(com.google.protobuf.ByteString value) { return this; } - private java.lang.Object persistenceIamIdentity_ = ""; - /** - * - * - *
-     * Output only. Cloud IAM identity used by import / export operations to
-     * transfer data to/from Cloud Storage. Format is
-     * "serviceAccount:<service_account_email>". The value may change over time
-     * for a given instance so should be checked before each import/export
-     * operation.
-     * 
- * - * string persistence_iam_identity = 21; - */ - public java.lang.String getPersistenceIamIdentity() { - java.lang.Object ref = persistenceIamIdentity_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - persistenceIamIdentity_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. Cloud IAM identity used by import / export operations to
-     * transfer data to/from Cloud Storage. Format is
-     * "serviceAccount:<service_account_email>". The value may change over time
-     * for a given instance so should be checked before each import/export
-     * operation.
-     * 
- * - * string persistence_iam_identity = 21; - */ - public com.google.protobuf.ByteString getPersistenceIamIdentityBytes() { - java.lang.Object ref = persistenceIamIdentity_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - persistenceIamIdentity_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. Cloud IAM identity used by import / export operations to
-     * transfer data to/from Cloud Storage. Format is
-     * "serviceAccount:<service_account_email>". The value may change over time
-     * for a given instance so should be checked before each import/export
-     * operation.
-     * 
- * - * string persistence_iam_identity = 21; - */ - public Builder setPersistenceIamIdentity(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - persistenceIamIdentity_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Cloud IAM identity used by import / export operations to
-     * transfer data to/from Cloud Storage. Format is
-     * "serviceAccount:<service_account_email>". The value may change over time
-     * for a given instance so should be checked before each import/export
-     * operation.
-     * 
- * - * string persistence_iam_identity = 21; - */ - public Builder clearPersistenceIamIdentity() { - - persistenceIamIdentity_ = getDefaultInstance().getPersistenceIamIdentity(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Cloud IAM identity used by import / export operations to
-     * transfer data to/from Cloud Storage. Format is
-     * "serviceAccount:<service_account_email>". The value may change over time
-     * for a given instance so should be checked before each import/export
-     * operation.
-     * 
- * - * string persistence_iam_identity = 21; - */ - public Builder setPersistenceIamIdentityBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - persistenceIamIdentity_ = value; - onChanged(); - return this; - } - @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); diff --git a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/InstanceOrBuilder.java b/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/InstanceOrBuilder.java index d9ac287a1e3e..9cfbb6a4abc6 100644 --- a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/InstanceOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/InstanceOrBuilder.java @@ -179,9 +179,7 @@ public interface InstanceOrBuilder * Optional. The version of Redis software. * If not provided, latest supported version will be used. Updating the * version will perform an upgrade/downgrade to the new version. Currently, - * the supported values are: - * * `REDIS_4_0` for Redis 4.0 compatibility - * * `REDIS_3_2` for Redis 3.2 compatibility + * the supported values are `REDIS_3_2` for Redis 3.2. * * * string redis_version = 7; @@ -194,9 +192,7 @@ public interface InstanceOrBuilder * Optional. The version of Redis software. * If not provided, latest supported version will be used. Updating the * version will perform an upgrade/downgrade to the new version. Currently, - * the supported values are: - * * `REDIS_4_0` for Redis 4.0 compatibility - * * `REDIS_3_2` for Redis 3.2 compatibility + * the supported values are `REDIS_3_2` for Redis 3.2. * * * string redis_version = 7; @@ -375,13 +371,8 @@ public interface InstanceOrBuilder * Optional. Redis configuration parameters, according to * http://redis.io/topics/config. Currently, the only supported parameters * are: - * Redis 3.2 and above: - * * maxmemory-policy - * * notify-keyspace-events - * Redis 4.0 and above: - * * activedefrag - * * lfu-log-factor - * * lfu-decay-time + * * maxmemory-policy + * * notify-keyspace-events * * * map<string, string> redis_configs = 16; @@ -394,13 +385,8 @@ public interface InstanceOrBuilder * Optional. Redis configuration parameters, according to * http://redis.io/topics/config. Currently, the only supported parameters * are: - * Redis 3.2 and above: - * * maxmemory-policy - * * notify-keyspace-events - * Redis 4.0 and above: - * * activedefrag - * * lfu-log-factor - * * lfu-decay-time + * * maxmemory-policy + * * notify-keyspace-events * * * map<string, string> redis_configs = 16; @@ -416,13 +402,8 @@ public interface InstanceOrBuilder * Optional. Redis configuration parameters, according to * http://redis.io/topics/config. Currently, the only supported parameters * are: - * Redis 3.2 and above: - * * maxmemory-policy - * * notify-keyspace-events - * Redis 4.0 and above: - * * activedefrag - * * lfu-log-factor - * * lfu-decay-time + * * maxmemory-policy + * * notify-keyspace-events * * * map<string, string> redis_configs = 16; @@ -435,13 +416,8 @@ public interface InstanceOrBuilder * Optional. Redis configuration parameters, according to * http://redis.io/topics/config. Currently, the only supported parameters * are: - * Redis 3.2 and above: - * * maxmemory-policy - * * notify-keyspace-events - * Redis 4.0 and above: - * * activedefrag - * * lfu-log-factor - * * lfu-decay-time + * * maxmemory-policy + * * notify-keyspace-events * * * map<string, string> redis_configs = 16; @@ -454,13 +430,8 @@ public interface InstanceOrBuilder * Optional. Redis configuration parameters, according to * http://redis.io/topics/config. Currently, the only supported parameters * are: - * Redis 3.2 and above: - * * maxmemory-policy - * * notify-keyspace-events - * Redis 4.0 and above: - * * activedefrag - * * lfu-log-factor - * * lfu-decay-time + * * maxmemory-policy + * * notify-keyspace-events * * * map<string, string> redis_configs = 16; @@ -525,33 +496,4 @@ public interface InstanceOrBuilder * string authorized_network = 20; */ com.google.protobuf.ByteString getAuthorizedNetworkBytes(); - - /** - * - * - *
-   * Output only. Cloud IAM identity used by import / export operations to
-   * transfer data to/from Cloud Storage. Format is
-   * "serviceAccount:<service_account_email>". The value may change over time
-   * for a given instance so should be checked before each import/export
-   * operation.
-   * 
- * - * string persistence_iam_identity = 21; - */ - java.lang.String getPersistenceIamIdentity(); - /** - * - * - *
-   * Output only. Cloud IAM identity used by import / export operations to
-   * transfer data to/from Cloud Storage. Format is
-   * "serviceAccount:<service_account_email>". The value may change over time
-   * for a given instance so should be checked before each import/export
-   * operation.
-   * 
- * - * string persistence_iam_identity = 21; - */ - com.google.protobuf.ByteString getPersistenceIamIdentityBytes(); } diff --git a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/OutputConfig.java b/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/OutputConfig.java deleted file mode 100644 index 22e35419f1ee..000000000000 --- a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/OutputConfig.java +++ /dev/null @@ -1,793 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/redis/v1/cloud_redis.proto - -package com.google.cloud.redis.v1; - -/** - * - * - *
- * The output content
- * 
- * - * Protobuf type {@code google.cloud.redis.v1.OutputConfig} - */ -public final class OutputConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.redis.v1.OutputConfig) - OutputConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use OutputConfig.newBuilder() to construct. - private OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private OutputConfig() {} - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private OutputConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.redis.v1.GcsDestination.Builder subBuilder = null; - if (destinationCase_ == 1) { - subBuilder = ((com.google.cloud.redis.v1.GcsDestination) destination_).toBuilder(); - } - destination_ = - input.readMessage( - com.google.cloud.redis.v1.GcsDestination.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.redis.v1.GcsDestination) destination_); - destination_ = subBuilder.buildPartial(); - } - destinationCase_ = 1; - break; - } - default: - { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.redis.v1.CloudRedisServiceV1Proto - .internal_static_google_cloud_redis_v1_OutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.redis.v1.CloudRedisServiceV1Proto - .internal_static_google_cloud_redis_v1_OutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.redis.v1.OutputConfig.class, - com.google.cloud.redis.v1.OutputConfig.Builder.class); - } - - private int destinationCase_ = 0; - private java.lang.Object destination_; - - public enum DestinationCase implements com.google.protobuf.Internal.EnumLite { - GCS_DESTINATION(1), - DESTINATION_NOT_SET(0); - private final int value; - - private DestinationCase(int value) { - this.value = value; - } - /** @deprecated Use {@link #forNumber(int)} instead. */ - @java.lang.Deprecated - public static DestinationCase valueOf(int value) { - return forNumber(value); - } - - public static DestinationCase forNumber(int value) { - switch (value) { - case 1: - return GCS_DESTINATION; - case 0: - return DESTINATION_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public DestinationCase getDestinationCase() { - return DestinationCase.forNumber(destinationCase_); - } - - public static final int GCS_DESTINATION_FIELD_NUMBER = 1; - /** - * - * - *
-   * Google Cloud Storage destination for output content.
-   * 
- * - * .google.cloud.redis.v1.GcsDestination gcs_destination = 1; - */ - public boolean hasGcsDestination() { - return destinationCase_ == 1; - } - /** - * - * - *
-   * Google Cloud Storage destination for output content.
-   * 
- * - * .google.cloud.redis.v1.GcsDestination gcs_destination = 1; - */ - public com.google.cloud.redis.v1.GcsDestination getGcsDestination() { - if (destinationCase_ == 1) { - return (com.google.cloud.redis.v1.GcsDestination) destination_; - } - return com.google.cloud.redis.v1.GcsDestination.getDefaultInstance(); - } - /** - * - * - *
-   * Google Cloud Storage destination for output content.
-   * 
- * - * .google.cloud.redis.v1.GcsDestination gcs_destination = 1; - */ - public com.google.cloud.redis.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { - if (destinationCase_ == 1) { - return (com.google.cloud.redis.v1.GcsDestination) destination_; - } - return com.google.cloud.redis.v1.GcsDestination.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (destinationCase_ == 1) { - output.writeMessage(1, (com.google.cloud.redis.v1.GcsDestination) destination_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (destinationCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, (com.google.cloud.redis.v1.GcsDestination) destination_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.redis.v1.OutputConfig)) { - return super.equals(obj); - } - com.google.cloud.redis.v1.OutputConfig other = (com.google.cloud.redis.v1.OutputConfig) obj; - - boolean result = true; - result = result && getDestinationCase().equals(other.getDestinationCase()); - if (!result) return false; - switch (destinationCase_) { - case 1: - result = result && getGcsDestination().equals(other.getGcsDestination()); - break; - case 0: - default: - } - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (destinationCase_) { - case 1: - hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; - hash = (53 * hash) + getGcsDestination().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.redis.v1.OutputConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.redis.v1.OutputConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.redis.v1.OutputConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.redis.v1.OutputConfig parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.redis.v1.OutputConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.redis.v1.OutputConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.redis.v1.OutputConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.redis.v1.OutputConfig parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.redis.v1.OutputConfig parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.redis.v1.OutputConfig parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.redis.v1.OutputConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.redis.v1.OutputConfig parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.redis.v1.OutputConfig prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * The output content
-   * 
- * - * Protobuf type {@code google.cloud.redis.v1.OutputConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.redis.v1.OutputConfig) - com.google.cloud.redis.v1.OutputConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.redis.v1.CloudRedisServiceV1Proto - .internal_static_google_cloud_redis_v1_OutputConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.redis.v1.CloudRedisServiceV1Proto - .internal_static_google_cloud_redis_v1_OutputConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.redis.v1.OutputConfig.class, - com.google.cloud.redis.v1.OutputConfig.Builder.class); - } - - // Construct using com.google.cloud.redis.v1.OutputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} - } - - @java.lang.Override - public Builder clear() { - super.clear(); - destinationCase_ = 0; - destination_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.redis.v1.CloudRedisServiceV1Proto - .internal_static_google_cloud_redis_v1_OutputConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.redis.v1.OutputConfig getDefaultInstanceForType() { - return com.google.cloud.redis.v1.OutputConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.redis.v1.OutputConfig build() { - com.google.cloud.redis.v1.OutputConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.redis.v1.OutputConfig buildPartial() { - com.google.cloud.redis.v1.OutputConfig result = - new com.google.cloud.redis.v1.OutputConfig(this); - if (destinationCase_ == 1) { - if (gcsDestinationBuilder_ == null) { - result.destination_ = destination_; - } else { - result.destination_ = gcsDestinationBuilder_.build(); - } - } - result.destinationCase_ = destinationCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return (Builder) super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.redis.v1.OutputConfig) { - return mergeFrom((com.google.cloud.redis.v1.OutputConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.redis.v1.OutputConfig other) { - if (other == com.google.cloud.redis.v1.OutputConfig.getDefaultInstance()) return this; - switch (other.getDestinationCase()) { - case GCS_DESTINATION: - { - mergeGcsDestination(other.getGcsDestination()); - break; - } - case DESTINATION_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.cloud.redis.v1.OutputConfig parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.redis.v1.OutputConfig) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int destinationCase_ = 0; - private java.lang.Object destination_; - - public DestinationCase getDestinationCase() { - return DestinationCase.forNumber(destinationCase_); - } - - public Builder clearDestination() { - destinationCase_ = 0; - destination_ = null; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.redis.v1.GcsDestination, - com.google.cloud.redis.v1.GcsDestination.Builder, - com.google.cloud.redis.v1.GcsDestinationOrBuilder> - gcsDestinationBuilder_; - /** - * - * - *
-     * Google Cloud Storage destination for output content.
-     * 
- * - * .google.cloud.redis.v1.GcsDestination gcs_destination = 1; - */ - public boolean hasGcsDestination() { - return destinationCase_ == 1; - } - /** - * - * - *
-     * Google Cloud Storage destination for output content.
-     * 
- * - * .google.cloud.redis.v1.GcsDestination gcs_destination = 1; - */ - public com.google.cloud.redis.v1.GcsDestination getGcsDestination() { - if (gcsDestinationBuilder_ == null) { - if (destinationCase_ == 1) { - return (com.google.cloud.redis.v1.GcsDestination) destination_; - } - return com.google.cloud.redis.v1.GcsDestination.getDefaultInstance(); - } else { - if (destinationCase_ == 1) { - return gcsDestinationBuilder_.getMessage(); - } - return com.google.cloud.redis.v1.GcsDestination.getDefaultInstance(); - } - } - /** - * - * - *
-     * Google Cloud Storage destination for output content.
-     * 
- * - * .google.cloud.redis.v1.GcsDestination gcs_destination = 1; - */ - public Builder setGcsDestination(com.google.cloud.redis.v1.GcsDestination value) { - if (gcsDestinationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - destination_ = value; - onChanged(); - } else { - gcsDestinationBuilder_.setMessage(value); - } - destinationCase_ = 1; - return this; - } - /** - * - * - *
-     * Google Cloud Storage destination for output content.
-     * 
- * - * .google.cloud.redis.v1.GcsDestination gcs_destination = 1; - */ - public Builder setGcsDestination( - com.google.cloud.redis.v1.GcsDestination.Builder builderForValue) { - if (gcsDestinationBuilder_ == null) { - destination_ = builderForValue.build(); - onChanged(); - } else { - gcsDestinationBuilder_.setMessage(builderForValue.build()); - } - destinationCase_ = 1; - return this; - } - /** - * - * - *
-     * Google Cloud Storage destination for output content.
-     * 
- * - * .google.cloud.redis.v1.GcsDestination gcs_destination = 1; - */ - public Builder mergeGcsDestination(com.google.cloud.redis.v1.GcsDestination value) { - if (gcsDestinationBuilder_ == null) { - if (destinationCase_ == 1 - && destination_ != com.google.cloud.redis.v1.GcsDestination.getDefaultInstance()) { - destination_ = - com.google.cloud.redis.v1.GcsDestination.newBuilder( - (com.google.cloud.redis.v1.GcsDestination) destination_) - .mergeFrom(value) - .buildPartial(); - } else { - destination_ = value; - } - onChanged(); - } else { - if (destinationCase_ == 1) { - gcsDestinationBuilder_.mergeFrom(value); - } - gcsDestinationBuilder_.setMessage(value); - } - destinationCase_ = 1; - return this; - } - /** - * - * - *
-     * Google Cloud Storage destination for output content.
-     * 
- * - * .google.cloud.redis.v1.GcsDestination gcs_destination = 1; - */ - public Builder clearGcsDestination() { - if (gcsDestinationBuilder_ == null) { - if (destinationCase_ == 1) { - destinationCase_ = 0; - destination_ = null; - onChanged(); - } - } else { - if (destinationCase_ == 1) { - destinationCase_ = 0; - destination_ = null; - } - gcsDestinationBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Google Cloud Storage destination for output content.
-     * 
- * - * .google.cloud.redis.v1.GcsDestination gcs_destination = 1; - */ - public com.google.cloud.redis.v1.GcsDestination.Builder getGcsDestinationBuilder() { - return getGcsDestinationFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Google Cloud Storage destination for output content.
-     * 
- * - * .google.cloud.redis.v1.GcsDestination gcs_destination = 1; - */ - public com.google.cloud.redis.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder() { - if ((destinationCase_ == 1) && (gcsDestinationBuilder_ != null)) { - return gcsDestinationBuilder_.getMessageOrBuilder(); - } else { - if (destinationCase_ == 1) { - return (com.google.cloud.redis.v1.GcsDestination) destination_; - } - return com.google.cloud.redis.v1.GcsDestination.getDefaultInstance(); - } - } - /** - * - * - *
-     * Google Cloud Storage destination for output content.
-     * 
- * - * .google.cloud.redis.v1.GcsDestination gcs_destination = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.redis.v1.GcsDestination, - com.google.cloud.redis.v1.GcsDestination.Builder, - com.google.cloud.redis.v1.GcsDestinationOrBuilder> - getGcsDestinationFieldBuilder() { - if (gcsDestinationBuilder_ == null) { - if (!(destinationCase_ == 1)) { - destination_ = com.google.cloud.redis.v1.GcsDestination.getDefaultInstance(); - } - gcsDestinationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.redis.v1.GcsDestination, - com.google.cloud.redis.v1.GcsDestination.Builder, - com.google.cloud.redis.v1.GcsDestinationOrBuilder>( - (com.google.cloud.redis.v1.GcsDestination) destination_, - getParentForChildren(), - isClean()); - destination_ = null; - } - destinationCase_ = 1; - onChanged(); - ; - return gcsDestinationBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.redis.v1.OutputConfig) - } - - // @@protoc_insertion_point(class_scope:google.cloud.redis.v1.OutputConfig) - private static final com.google.cloud.redis.v1.OutputConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.redis.v1.OutputConfig(); - } - - public static com.google.cloud.redis.v1.OutputConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public OutputConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new OutputConfig(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.redis.v1.OutputConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/OutputConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/OutputConfigOrBuilder.java deleted file mode 100644 index ca43e09d635a..000000000000 --- a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/OutputConfigOrBuilder.java +++ /dev/null @@ -1,43 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/redis/v1/cloud_redis.proto - -package com.google.cloud.redis.v1; - -public interface OutputConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.redis.v1.OutputConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Google Cloud Storage destination for output content.
-   * 
- * - * .google.cloud.redis.v1.GcsDestination gcs_destination = 1; - */ - boolean hasGcsDestination(); - /** - * - * - *
-   * Google Cloud Storage destination for output content.
-   * 
- * - * .google.cloud.redis.v1.GcsDestination gcs_destination = 1; - */ - com.google.cloud.redis.v1.GcsDestination getGcsDestination(); - /** - * - * - *
-   * Google Cloud Storage destination for output content.
-   * 
- * - * .google.cloud.redis.v1.GcsDestination gcs_destination = 1; - */ - com.google.cloud.redis.v1.GcsDestinationOrBuilder getGcsDestinationOrBuilder(); - - public com.google.cloud.redis.v1.OutputConfig.DestinationCase getDestinationCase(); -} diff --git a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/UpdateInstanceRequest.java b/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/UpdateInstanceRequest.java index 1e57abb8287e..b32cc98b64af 100644 --- a/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/UpdateInstanceRequest.java +++ b/google-api-grpc/proto-google-cloud-redis-v1/src/main/java/com/google/cloud/redis/v1/UpdateInstanceRequest.java @@ -7,8 +7,7 @@ * * *
- * Request for
- * [UpdateInstance][google.cloud.redis.v1.CloudRedis.UpdateInstance].
+ * Request for [UpdateInstance][google.cloud.redis.v1.CloudRedis.UpdateInstance].
  * 
* * Protobuf type {@code google.cloud.redis.v1.UpdateInstanceRequest} @@ -395,8 +394,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Request for
-   * [UpdateInstance][google.cloud.redis.v1.CloudRedis.UpdateInstance].
+   * Request for [UpdateInstance][google.cloud.redis.v1.CloudRedis.UpdateInstance].
    * 
* * Protobuf type {@code google.cloud.redis.v1.UpdateInstanceRequest} diff --git a/google-api-grpc/proto-google-cloud-redis-v1/src/main/proto/google/cloud/redis/v1/cloud_redis.proto b/google-api-grpc/proto-google-cloud-redis-v1/src/main/proto/google/cloud/redis/v1/cloud_redis.proto index f8dfc5cbfa6e..8520addad485 100644 --- a/google-api-grpc/proto-google-cloud-redis-v1/src/main/proto/google/cloud/redis/v1/cloud_redis.proto +++ b/google-api-grpc/proto-google-cloud-redis-v1/src/main/proto/google/cloud/redis/v1/cloud_redis.proto @@ -1,4 +1,4 @@ -// Copyright 2018 Google LLC. +// Copyright 2019 Google LLC. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ syntax = "proto3"; package google.cloud.redis.v1; import "google/api/annotations.proto"; +import "google/api/resource.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; @@ -27,6 +28,7 @@ option java_multiple_files = true; option java_outer_classname = "CloudRedisServiceV1Proto"; option java_package = "com.google.cloud.redis.v1"; + // Configures and manages Cloud Memorystore for Redis instances // // Google Cloud Memorystore for Redis v1 @@ -40,7 +42,7 @@ option java_package = "com.google.cloud.redis.v1"; // * As such, Redis instances are resources of the form: // `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` // -// Note that location_id must be refering to a GCP `region`; for example: +// Note that location_id must be referring to a GCP `region`; for example: // * `projects/redpepper-1290/locations/us-central1/instances/my-redis` service CloudRedis { // Lists all Redis instances owned by a project in either the specified @@ -76,8 +78,7 @@ service CloudRedis { // // The returned operation is automatically deleted after a few hours, so there // is no need to call DeleteOperation. - rpc CreateInstance(CreateInstanceRequest) - returns (google.longrunning.Operation) { + rpc CreateInstance(CreateInstanceRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/instances" body: "instance" @@ -89,48 +90,16 @@ service CloudRedis { // Completed longrunning.Operation will contain the new instance object // in the response field. The returned operation is automatically deleted // after a few hours, so there is no need to call DeleteOperation. - rpc UpdateInstance(UpdateInstanceRequest) - returns (google.longrunning.Operation) { + rpc UpdateInstance(UpdateInstanceRequest) returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/{instance.name=projects/*/locations/*/instances/*}" body: "instance" }; } - // Import a Redis RDB snapshot file from GCS into a Redis instance. - // - // Redis may stop serving during this operation. Instance state will be - // IMPORTING for entire operation. When complete, the instance will contain - // only data from the imported file. - // - // The returned operation is automatically deleted after a few hours, so - // there is no need to call DeleteOperation. - rpc ImportInstance(ImportInstanceRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/instances/*}:import" - body: "*" - }; - } - - // Export Redis instance data into a Redis RDB format file in GCS. - // - // Redis will continue serving during this operation. - // - // The returned operation is automatically deleted after a few hours, so - // there is no need to call DeleteOperation. - rpc ExportInstance(ExportInstanceRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/instances/*}:export" - body: "*" - }; - } - // Failover the master role to current replica node against a specific // STANDARD tier redis instance. - rpc FailoverInstance(FailoverInstanceRequest) - returns (google.longrunning.Operation) { + rpc FailoverInstance(FailoverInstanceRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/instances/*}:failover" body: "*" @@ -139,8 +108,7 @@ service CloudRedis { // Deletes a specific Redis instance. Instance stops serving and data is // deleted. - rpc DeleteInstance(DeleteInstanceRequest) - returns (google.longrunning.Operation) { + rpc DeleteInstance(DeleteInstanceRequest) returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/instances/*}" }; @@ -174,9 +142,6 @@ message Instance { // Maintenance is being performed on this Redis instance. MAINTENANCE = 6; - // Redis instance is importing data (availability may be affected). - IMPORTING = 8; - // Redis instance is failing over (availability may be affected). FAILING_OVER = 9; } @@ -225,9 +190,7 @@ message Instance { // Optional. The version of Redis software. // If not provided, latest supported version will be used. Updating the // version will perform an upgrade/downgrade to the new version. Currently, - // the supported values are: - // * `REDIS_4_0` for Redis 4.0 compatibility - // * `REDIS_3_2` for Redis 3.2 compatibility + // the supported values are `REDIS_3_2` for Redis 3.2. string redis_version = 7; // Optional. The CIDR range of internal addresses that are reserved for this @@ -264,14 +227,8 @@ message Instance { // http://redis.io/topics/config. Currently, the only supported parameters // are: // - // Redis 3.2 and above: - // * maxmemory-policy - // * notify-keyspace-events - // - // Redis 4.0 and above: - // * activedefrag - // * lfu-log-factor - // * lfu-decay-time + // * maxmemory-policy + // * notify-keyspace-events map redis_configs = 16; // Required. The service tier of the instance. @@ -285,13 +242,6 @@ message Instance { // instance is connected. If left unspecified, the `default` network // will be used. string authorized_network = 20; - - // Output only. Cloud IAM identity used by import / export operations to - // transfer data to/from Cloud Storage. Format is - // "serviceAccount:". The value may change over time - // for a given instance so should be checked before each import/export - // operation. - string persistence_iam_identity = 21; } // Request for [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances]. @@ -345,8 +295,7 @@ message GetInstanceRequest { string name = 1; } -// Request for -// [CreateInstance][google.cloud.redis.v1.CloudRedis.CreateInstance]. +// Request for [CreateInstance][google.cloud.redis.v1.CloudRedis.CreateInstance]. message CreateInstanceRequest { // Required. The resource name of the instance location using the form: // `projects/{project_id}/locations/{location_id}` @@ -367,8 +316,7 @@ message CreateInstanceRequest { Instance instance = 3; } -// Request for -// [UpdateInstance][google.cloud.redis.v1.CloudRedis.UpdateInstance]. +// Request for [UpdateInstance][google.cloud.redis.v1.CloudRedis.UpdateInstance]. message UpdateInstanceRequest { // Required. Mask of fields to update. At least one path must be supplied in // this field. The elements of the repeated paths field may only include these @@ -385,8 +333,7 @@ message UpdateInstanceRequest { Instance instance = 2; } -// Request for -// [DeleteInstance][google.cloud.redis.v1.CloudRedis.DeleteInstance]. +// Request for [DeleteInstance][google.cloud.redis.v1.CloudRedis.DeleteInstance]. message DeleteInstanceRequest { // Required. Redis instance resource name using the form: // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` @@ -394,59 +341,6 @@ message DeleteInstanceRequest { string name = 1; } -// The GCS location for the input content -message GcsSource { - // Required. Source data URI. (e.g. 'gs://my_bucket/my_object'). - string uri = 1; -} - -// The input content -message InputConfig { - // Required. Specify source location of input data - oneof source { - // Google Cloud Storage location where input content is located. - GcsSource gcs_source = 1; - } -} - -// Request for [Import][google.cloud.redis.v1.CloudRedis.ImportInstance]. -message ImportInstanceRequest { - // Required. Redis instance resource name using the form: - // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - // where `location_id` refers to a GCP region - string name = 1; - - // Required. Specify data to be imported. - InputConfig input_config = 3; -} - -// The GCS location for the output content -message GcsDestination { - // Required. Data destination URI (e.g. - // 'gs://my_bucket/my_object'). Existing files will be overwritten. - string uri = 1; -} - -// The output content -message OutputConfig { - // Required. Specify destination location of output data - oneof destination { - // Google Cloud Storage destination for output content. - GcsDestination gcs_destination = 1; - } -} - -// Request for [Export][google.cloud.redis.v1.CloudRedis.ExportInstance]. -message ExportInstanceRequest { - // Required. Redis instance resource name using the form: - // `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - // where `location_id` refers to a GCP region - string name = 1; - - // Required. Specify data to be exported. - OutputConfig output_config = 3; -} - // Request for [Failover][google.cloud.redis.v1.CloudRedis.FailoverInstance]. message FailoverInstanceRequest { enum DataProtectionMode { @@ -510,4 +404,6 @@ message LocationMetadata { // Defines specific information for a particular zone. Currently empty and // reserved for future use only. -message ZoneMetadata {} +message ZoneMetadata { + +} diff --git a/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisClient.java b/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisClient.java index 027acd1e61de..5a89e2b84181 100644 --- a/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisClient.java +++ b/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisClient.java @@ -52,7 +52,7 @@ * instances, named: `/instances/*` * As such, Redis instances are resources of the form: * `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` * - *

Note that location_id must be refering to a GCP `region`; for example: * + *

Note that location_id must be referring to a GCP `region`; for example: * * `projects/redpepper-1290/locations/us-central1/instances/my-redis` * *

This class provides the ability to make remote calls to the backing service through method @@ -975,266 +975,6 @@ public final UnaryCallable deleteInstanceCalla return stub.deleteInstanceCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Import a Redis RDB snapshot file from GCS into a Redis instance. - * - *

Redis may stop serving during this operation. Instance state will be IMPORTING for entire - * operation. When complete, the instance will contain only data from the imported file. - * - *

The returned operation is automatically deleted after a few hours, so there is no need to - * call DeleteOperation. - * - *

Sample code: - * - *


-   * try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
-   *   String formattedName = InstanceName.format("[PROJECT]", "[LOCATION]", "[INSTANCE]");
-   *   InputConfig inputConfig = InputConfig.newBuilder().build();
-   *   Instance response = cloudRedisClient.importInstanceAsync(formattedName, inputConfig).get();
-   * }
-   * 
- * - * @param name Required. Redis instance resource name using the form: - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` - * refers to a GCP region - * @param inputConfig Required. Specify data to be imported. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture importInstanceAsync( - String name, InputConfig inputConfig) { - - ImportInstanceRequest request = - ImportInstanceRequest.newBuilder().setName(name).setInputConfig(inputConfig).build(); - return importInstanceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Import a Redis RDB snapshot file from GCS into a Redis instance. - * - *

Redis may stop serving during this operation. Instance state will be IMPORTING for entire - * operation. When complete, the instance will contain only data from the imported file. - * - *

The returned operation is automatically deleted after a few hours, so there is no need to - * call DeleteOperation. - * - *

Sample code: - * - *


-   * try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
-   *   String formattedName = InstanceName.format("[PROJECT]", "[LOCATION]", "[INSTANCE]");
-   *   InputConfig inputConfig = InputConfig.newBuilder().build();
-   *   ImportInstanceRequest request = ImportInstanceRequest.newBuilder()
-   *     .setName(formattedName)
-   *     .setInputConfig(inputConfig)
-   *     .build();
-   *   Instance response = cloudRedisClient.importInstanceAsync(request).get();
-   * }
-   * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture importInstanceAsync( - ImportInstanceRequest request) { - return importInstanceOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Import a Redis RDB snapshot file from GCS into a Redis instance. - * - *

Redis may stop serving during this operation. Instance state will be IMPORTING for entire - * operation. When complete, the instance will contain only data from the imported file. - * - *

The returned operation is automatically deleted after a few hours, so there is no need to - * call DeleteOperation. - * - *

Sample code: - * - *


-   * try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
-   *   String formattedName = InstanceName.format("[PROJECT]", "[LOCATION]", "[INSTANCE]");
-   *   InputConfig inputConfig = InputConfig.newBuilder().build();
-   *   ImportInstanceRequest request = ImportInstanceRequest.newBuilder()
-   *     .setName(formattedName)
-   *     .setInputConfig(inputConfig)
-   *     .build();
-   *   OperationFuture<Instance, OperationMetadata> future = cloudRedisClient.importInstanceOperationCallable().futureCall(request);
-   *   // Do something
-   *   Instance response = future.get();
-   * }
-   * 
- */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public final OperationCallable - importInstanceOperationCallable() { - return stub.importInstanceOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Import a Redis RDB snapshot file from GCS into a Redis instance. - * - *

Redis may stop serving during this operation. Instance state will be IMPORTING for entire - * operation. When complete, the instance will contain only data from the imported file. - * - *

The returned operation is automatically deleted after a few hours, so there is no need to - * call DeleteOperation. - * - *

Sample code: - * - *


-   * try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
-   *   String formattedName = InstanceName.format("[PROJECT]", "[LOCATION]", "[INSTANCE]");
-   *   InputConfig inputConfig = InputConfig.newBuilder().build();
-   *   ImportInstanceRequest request = ImportInstanceRequest.newBuilder()
-   *     .setName(formattedName)
-   *     .setInputConfig(inputConfig)
-   *     .build();
-   *   ApiFuture<Operation> future = cloudRedisClient.importInstanceCallable().futureCall(request);
-   *   // Do something
-   *   Operation response = future.get();
-   * }
-   * 
- */ - public final UnaryCallable importInstanceCallable() { - return stub.importInstanceCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Export Redis instance data into a Redis RDB format file in GCS. - * - *

Redis will continue serving during this operation. - * - *

The returned operation is automatically deleted after a few hours, so there is no need to - * call DeleteOperation. - * - *

Sample code: - * - *


-   * try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
-   *   String formattedName = InstanceName.format("[PROJECT]", "[LOCATION]", "[INSTANCE]");
-   *   OutputConfig outputConfig = OutputConfig.newBuilder().build();
-   *   Instance response = cloudRedisClient.exportInstanceAsync(formattedName, outputConfig).get();
-   * }
-   * 
- * - * @param name Required. Redis instance resource name using the form: - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` - * refers to a GCP region - * @param outputConfig Required. Specify data to be exported. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture exportInstanceAsync( - String name, OutputConfig outputConfig) { - - ExportInstanceRequest request = - ExportInstanceRequest.newBuilder().setName(name).setOutputConfig(outputConfig).build(); - return exportInstanceAsync(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Export Redis instance data into a Redis RDB format file in GCS. - * - *

Redis will continue serving during this operation. - * - *

The returned operation is automatically deleted after a few hours, so there is no need to - * call DeleteOperation. - * - *

Sample code: - * - *


-   * try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
-   *   String formattedName = InstanceName.format("[PROJECT]", "[LOCATION]", "[INSTANCE]");
-   *   OutputConfig outputConfig = OutputConfig.newBuilder().build();
-   *   ExportInstanceRequest request = ExportInstanceRequest.newBuilder()
-   *     .setName(formattedName)
-   *     .setOutputConfig(outputConfig)
-   *     .build();
-   *   Instance response = cloudRedisClient.exportInstanceAsync(request).get();
-   * }
-   * 
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public final OperationFuture exportInstanceAsync( - ExportInstanceRequest request) { - return exportInstanceOperationCallable().futureCall(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Export Redis instance data into a Redis RDB format file in GCS. - * - *

Redis will continue serving during this operation. - * - *

The returned operation is automatically deleted after a few hours, so there is no need to - * call DeleteOperation. - * - *

Sample code: - * - *


-   * try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
-   *   String formattedName = InstanceName.format("[PROJECT]", "[LOCATION]", "[INSTANCE]");
-   *   OutputConfig outputConfig = OutputConfig.newBuilder().build();
-   *   ExportInstanceRequest request = ExportInstanceRequest.newBuilder()
-   *     .setName(formattedName)
-   *     .setOutputConfig(outputConfig)
-   *     .build();
-   *   OperationFuture<Instance, OperationMetadata> future = cloudRedisClient.exportInstanceOperationCallable().futureCall(request);
-   *   // Do something
-   *   Instance response = future.get();
-   * }
-   * 
- */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public final OperationCallable - exportInstanceOperationCallable() { - return stub.exportInstanceOperationCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD - /** - * Export Redis instance data into a Redis RDB format file in GCS. - * - *

Redis will continue serving during this operation. - * - *

The returned operation is automatically deleted after a few hours, so there is no need to - * call DeleteOperation. - * - *

Sample code: - * - *


-   * try (CloudRedisClient cloudRedisClient = CloudRedisClient.create()) {
-   *   String formattedName = InstanceName.format("[PROJECT]", "[LOCATION]", "[INSTANCE]");
-   *   OutputConfig outputConfig = OutputConfig.newBuilder().build();
-   *   ExportInstanceRequest request = ExportInstanceRequest.newBuilder()
-   *     .setName(formattedName)
-   *     .setOutputConfig(outputConfig)
-   *     .build();
-   *   ApiFuture<Operation> future = cloudRedisClient.exportInstanceCallable().futureCall(request);
-   *   // Do something
-   *   Operation response = future.get();
-   * }
-   * 
- */ - public final UnaryCallable exportInstanceCallable() { - return stub.exportInstanceCallable(); - } - // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Failover the master role to current replica node against a specific STANDARD tier redis diff --git a/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisSettings.java b/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisSettings.java index dc4eb140e8dd..2aa7a2cb86e0 100644 --- a/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisSettings.java +++ b/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/CloudRedisSettings.java @@ -115,32 +115,6 @@ public UnaryCallSettings deleteInstanceSetting return ((CloudRedisStubSettings) getStubSettings()).deleteInstanceOperationSettings(); } - /** Returns the object with the settings used for calls to importInstance. */ - public UnaryCallSettings importInstanceSettings() { - return ((CloudRedisStubSettings) getStubSettings()).importInstanceSettings(); - } - - /** Returns the object with the settings used for calls to importInstance. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings - importInstanceOperationSettings() { - return ((CloudRedisStubSettings) getStubSettings()).importInstanceOperationSettings(); - } - - /** Returns the object with the settings used for calls to exportInstance. */ - public UnaryCallSettings exportInstanceSettings() { - return ((CloudRedisStubSettings) getStubSettings()).exportInstanceSettings(); - } - - /** Returns the object with the settings used for calls to exportInstance. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings - exportInstanceOperationSettings() { - return ((CloudRedisStubSettings) getStubSettings()).exportInstanceOperationSettings(); - } - /** Returns the object with the settings used for calls to failoverInstance. */ public UnaryCallSettings failoverInstanceSettings() { return ((CloudRedisStubSettings) getStubSettings()).failoverInstanceSettings(); @@ -301,32 +275,6 @@ public UnaryCallSettings.Builder deleteInstanc return getStubSettingsBuilder().deleteInstanceOperationSettings(); } - /** Returns the builder for the settings used for calls to importInstance. */ - public UnaryCallSettings.Builder importInstanceSettings() { - return getStubSettingsBuilder().importInstanceSettings(); - } - - /** Returns the builder for the settings used for calls to importInstance. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings.Builder - importInstanceOperationSettings() { - return getStubSettingsBuilder().importInstanceOperationSettings(); - } - - /** Returns the builder for the settings used for calls to exportInstance. */ - public UnaryCallSettings.Builder exportInstanceSettings() { - return getStubSettingsBuilder().exportInstanceSettings(); - } - - /** Returns the builder for the settings used for calls to exportInstance. */ - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - public OperationCallSettings.Builder - exportInstanceOperationSettings() { - return getStubSettingsBuilder().exportInstanceOperationSettings(); - } - /** Returns the builder for the settings used for calls to failoverInstance. */ public UnaryCallSettings.Builder failoverInstanceSettings() { diff --git a/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/package-info.java b/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/package-info.java index 7732d6404573..514fb45c0a58 100644 --- a/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/package-info.java +++ b/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/package-info.java @@ -32,7 +32,7 @@ * instances, named: `/instances/*` * As such, Redis instances are resources of the form: * `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` * - *

Note that location_id must be refering to a GCP `region`; for example: * + *

Note that location_id must be referring to a GCP `region`; for example: * * `projects/redpepper-1290/locations/us-central1/instances/my-redis` * *

Sample for CloudRedisClient: diff --git a/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/CloudRedisStub.java b/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/CloudRedisStub.java index fb00303a3e99..9fb93b79d73b 100644 --- a/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/CloudRedisStub.java +++ b/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/CloudRedisStub.java @@ -23,10 +23,8 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.redis.v1.CreateInstanceRequest; import com.google.cloud.redis.v1.DeleteInstanceRequest; -import com.google.cloud.redis.v1.ExportInstanceRequest; import com.google.cloud.redis.v1.FailoverInstanceRequest; import com.google.cloud.redis.v1.GetInstanceRequest; -import com.google.cloud.redis.v1.ImportInstanceRequest; import com.google.cloud.redis.v1.Instance; import com.google.cloud.redis.v1.ListInstancesRequest; import com.google.cloud.redis.v1.ListInstancesResponse; @@ -95,26 +93,6 @@ public UnaryCallable deleteInstanceCallable() throw new UnsupportedOperationException("Not implemented: deleteInstanceCallable()"); } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - importInstanceOperationCallable() { - throw new UnsupportedOperationException("Not implemented: importInstanceOperationCallable()"); - } - - public UnaryCallable importInstanceCallable() { - throw new UnsupportedOperationException("Not implemented: importInstanceCallable()"); - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - exportInstanceOperationCallable() { - throw new UnsupportedOperationException("Not implemented: exportInstanceOperationCallable()"); - } - - public UnaryCallable exportInstanceCallable() { - throw new UnsupportedOperationException("Not implemented: exportInstanceCallable()"); - } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable failoverInstanceOperationCallable() { diff --git a/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/CloudRedisStubSettings.java b/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/CloudRedisStubSettings.java index 229211cb104c..ed51fb443fb2 100644 --- a/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/CloudRedisStubSettings.java +++ b/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/CloudRedisStubSettings.java @@ -45,10 +45,8 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.redis.v1.CreateInstanceRequest; import com.google.cloud.redis.v1.DeleteInstanceRequest; -import com.google.cloud.redis.v1.ExportInstanceRequest; import com.google.cloud.redis.v1.FailoverInstanceRequest; import com.google.cloud.redis.v1.GetInstanceRequest; -import com.google.cloud.redis.v1.ImportInstanceRequest; import com.google.cloud.redis.v1.Instance; import com.google.cloud.redis.v1.ListInstancesRequest; import com.google.cloud.redis.v1.ListInstancesResponse; @@ -111,12 +109,6 @@ public class CloudRedisStubSettings extends StubSettings private final UnaryCallSettings deleteInstanceSettings; private final OperationCallSettings deleteInstanceOperationSettings; - private final UnaryCallSettings importInstanceSettings; - private final OperationCallSettings - importInstanceOperationSettings; - private final UnaryCallSettings exportInstanceSettings; - private final OperationCallSettings - exportInstanceOperationSettings; private final UnaryCallSettings failoverInstanceSettings; private final OperationCallSettings failoverInstanceOperationSettings; @@ -168,30 +160,6 @@ public UnaryCallSettings deleteInstanceSetting return deleteInstanceOperationSettings; } - /** Returns the object with the settings used for calls to importInstance. */ - public UnaryCallSettings importInstanceSettings() { - return importInstanceSettings; - } - - /** Returns the object with the settings used for calls to importInstance. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings - importInstanceOperationSettings() { - return importInstanceOperationSettings; - } - - /** Returns the object with the settings used for calls to exportInstance. */ - public UnaryCallSettings exportInstanceSettings() { - return exportInstanceSettings; - } - - /** Returns the object with the settings used for calls to exportInstance. */ - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings - exportInstanceOperationSettings() { - return exportInstanceOperationSettings; - } - /** Returns the object with the settings used for calls to failoverInstance. */ public UnaryCallSettings failoverInstanceSettings() { return failoverInstanceSettings; @@ -280,10 +248,6 @@ protected CloudRedisStubSettings(Builder settingsBuilder) throws IOException { updateInstanceOperationSettings = settingsBuilder.updateInstanceOperationSettings().build(); deleteInstanceSettings = settingsBuilder.deleteInstanceSettings().build(); deleteInstanceOperationSettings = settingsBuilder.deleteInstanceOperationSettings().build(); - importInstanceSettings = settingsBuilder.importInstanceSettings().build(); - importInstanceOperationSettings = settingsBuilder.importInstanceOperationSettings().build(); - exportInstanceSettings = settingsBuilder.exportInstanceSettings().build(); - exportInstanceOperationSettings = settingsBuilder.exportInstanceOperationSettings().build(); failoverInstanceSettings = settingsBuilder.failoverInstanceSettings().build(); failoverInstanceOperationSettings = settingsBuilder.failoverInstanceOperationSettings().build(); } @@ -361,14 +325,6 @@ public static class Builder extends StubSettings.Builder deleteInstanceOperationSettings; - private final UnaryCallSettings.Builder - importInstanceSettings; - private final OperationCallSettings.Builder - importInstanceOperationSettings; - private final UnaryCallSettings.Builder - exportInstanceSettings; - private final OperationCallSettings.Builder - exportInstanceOperationSettings; private final UnaryCallSettings.Builder failoverInstanceSettings; private final OperationCallSettings.Builder< @@ -432,14 +388,6 @@ protected Builder(ClientContext clientContext) { deleteInstanceOperationSettings = OperationCallSettings.newBuilder(); - importInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - importInstanceOperationSettings = OperationCallSettings.newBuilder(); - - exportInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - exportInstanceOperationSettings = OperationCallSettings.newBuilder(); - failoverInstanceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); failoverInstanceOperationSettings = OperationCallSettings.newBuilder(); @@ -451,8 +399,6 @@ protected Builder(ClientContext clientContext) { createInstanceSettings, updateInstanceSettings, deleteInstanceSettings, - importInstanceSettings, - exportInstanceSettings, failoverInstanceSettings); initDefaults(this); @@ -494,16 +440,6 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - builder - .importInstanceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - - builder - .exportInstanceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); - builder .failoverInstanceSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) @@ -577,52 +513,6 @@ private static Builder initDefaults(Builder builder) { .setMaxRpcTimeout(Duration.ZERO) // ignored .setTotalTimeout(Duration.ofMillis(1200000L)) .build())); - builder - .importInstanceOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(60000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(360000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored - .setTotalTimeout(Duration.ofMillis(18000000L)) - .build())); - builder - .exportInstanceOperationSettings() - .setInitialCallSettings( - UnaryCallSettings - .newUnaryCallSettingsBuilder() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")) - .build()) - .setResponseTransformer( - ProtoOperationTransformers.ResponseTransformer.create(Instance.class)) - .setMetadataTransformer( - ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) - .setPollingAlgorithm( - OperationTimedPollAlgorithm.create( - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(60000L)) - .setRetryDelayMultiplier(1.5) - .setMaxRetryDelay(Duration.ofMillis(360000L)) - .setInitialRpcTimeout(Duration.ZERO) // ignored - .setRpcTimeoutMultiplier(1.0) // ignored - .setMaxRpcTimeout(Duration.ZERO) // ignored - .setTotalTimeout(Duration.ofMillis(18000000L)) - .build())); builder .failoverInstanceOperationSettings() .setInitialCallSettings( @@ -661,10 +551,6 @@ protected Builder(CloudRedisStubSettings settings) { updateInstanceOperationSettings = settings.updateInstanceOperationSettings.toBuilder(); deleteInstanceSettings = settings.deleteInstanceSettings.toBuilder(); deleteInstanceOperationSettings = settings.deleteInstanceOperationSettings.toBuilder(); - importInstanceSettings = settings.importInstanceSettings.toBuilder(); - importInstanceOperationSettings = settings.importInstanceOperationSettings.toBuilder(); - exportInstanceSettings = settings.exportInstanceSettings.toBuilder(); - exportInstanceOperationSettings = settings.exportInstanceOperationSettings.toBuilder(); failoverInstanceSettings = settings.failoverInstanceSettings.toBuilder(); failoverInstanceOperationSettings = settings.failoverInstanceOperationSettings.toBuilder(); @@ -675,8 +561,6 @@ protected Builder(CloudRedisStubSettings settings) { createInstanceSettings, updateInstanceSettings, deleteInstanceSettings, - importInstanceSettings, - exportInstanceSettings, failoverInstanceSettings); } @@ -747,32 +631,6 @@ public UnaryCallSettings.Builder deleteInstanc return deleteInstanceOperationSettings; } - /** Returns the builder for the settings used for calls to importInstance. */ - public UnaryCallSettings.Builder importInstanceSettings() { - return importInstanceSettings; - } - - /** Returns the builder for the settings used for calls to importInstance. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - importInstanceOperationSettings() { - return importInstanceOperationSettings; - } - - /** Returns the builder for the settings used for calls to exportInstance. */ - public UnaryCallSettings.Builder exportInstanceSettings() { - return exportInstanceSettings; - } - - /** Returns the builder for the settings used for calls to exportInstance. */ - @BetaApi( - "The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallSettings.Builder - exportInstanceOperationSettings() { - return exportInstanceOperationSettings; - } - /** Returns the builder for the settings used for calls to failoverInstance. */ public UnaryCallSettings.Builder failoverInstanceSettings() { diff --git a/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/GrpcCloudRedisStub.java b/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/GrpcCloudRedisStub.java index 57f48e454eae..9badb859dbe2 100644 --- a/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/GrpcCloudRedisStub.java +++ b/google-cloud-clients/google-cloud-redis/src/main/java/com/google/cloud/redis/v1/stub/GrpcCloudRedisStub.java @@ -27,10 +27,8 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.redis.v1.CreateInstanceRequest; import com.google.cloud.redis.v1.DeleteInstanceRequest; -import com.google.cloud.redis.v1.ExportInstanceRequest; import com.google.cloud.redis.v1.FailoverInstanceRequest; import com.google.cloud.redis.v1.GetInstanceRequest; -import com.google.cloud.redis.v1.ImportInstanceRequest; import com.google.cloud.redis.v1.Instance; import com.google.cloud.redis.v1.ListInstancesRequest; import com.google.cloud.redis.v1.ListInstancesResponse; @@ -99,24 +97,6 @@ public class GrpcCloudRedisStub extends CloudRedisStub { ProtoUtils.marshaller(DeleteInstanceRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); - private static final MethodDescriptor - importInstanceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.redis.v1.CloudRedis/ImportInstance") - .setRequestMarshaller( - ProtoUtils.marshaller(ImportInstanceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); - private static final MethodDescriptor - exportInstanceMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.cloud.redis.v1.CloudRedis/ExportInstance") - .setRequestMarshaller( - ProtoUtils.marshaller(ExportInstanceRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) - .build(); private static final MethodDescriptor failoverInstanceMethodDescriptor = MethodDescriptor.newBuilder() @@ -143,12 +123,6 @@ public class GrpcCloudRedisStub extends CloudRedisStub { private final UnaryCallable deleteInstanceCallable; private final OperationCallable deleteInstanceOperationCallable; - private final UnaryCallable importInstanceCallable; - private final OperationCallable - importInstanceOperationCallable; - private final UnaryCallable exportInstanceCallable; - private final OperationCallable - exportInstanceOperationCallable; private final UnaryCallable failoverInstanceCallable; private final OperationCallable failoverInstanceOperationCallable; @@ -213,14 +187,6 @@ protected GrpcCloudRedisStub( GrpcCallSettings.newBuilder() .setMethodDescriptor(deleteInstanceMethodDescriptor) .build(); - GrpcCallSettings importInstanceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(importInstanceMethodDescriptor) - .build(); - GrpcCallSettings exportInstanceTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(exportInstanceMethodDescriptor) - .build(); GrpcCallSettings failoverInstanceTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(failoverInstanceMethodDescriptor) @@ -262,24 +228,6 @@ protected GrpcCloudRedisStub( settings.deleteInstanceOperationSettings(), clientContext, this.operationsStub); - this.importInstanceCallable = - callableFactory.createUnaryCallable( - importInstanceTransportSettings, settings.importInstanceSettings(), clientContext); - this.importInstanceOperationCallable = - callableFactory.createOperationCallable( - importInstanceTransportSettings, - settings.importInstanceOperationSettings(), - clientContext, - this.operationsStub); - this.exportInstanceCallable = - callableFactory.createUnaryCallable( - exportInstanceTransportSettings, settings.exportInstanceSettings(), clientContext); - this.exportInstanceOperationCallable = - callableFactory.createOperationCallable( - exportInstanceTransportSettings, - settings.exportInstanceOperationSettings(), - clientContext, - this.operationsStub); this.failoverInstanceCallable = callableFactory.createUnaryCallable( failoverInstanceTransportSettings, settings.failoverInstanceSettings(), clientContext); @@ -341,26 +289,6 @@ public UnaryCallable deleteInstanceCallable() return deleteInstanceCallable; } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - importInstanceOperationCallable() { - return importInstanceOperationCallable; - } - - public UnaryCallable importInstanceCallable() { - return importInstanceCallable; - } - - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") - public OperationCallable - exportInstanceOperationCallable() { - return exportInstanceOperationCallable; - } - - public UnaryCallable exportInstanceCallable() { - return exportInstanceCallable; - } - @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") public OperationCallable failoverInstanceOperationCallable() { diff --git a/google-cloud-clients/google-cloud-redis/src/test/java/com/google/cloud/redis/v1/CloudRedisClientTest.java b/google-cloud-clients/google-cloud-redis/src/test/java/com/google/cloud/redis/v1/CloudRedisClientTest.java index 250fe244497f..fc504735f3fb 100644 --- a/google-cloud-clients/google-cloud-redis/src/test/java/com/google/cloud/redis/v1/CloudRedisClientTest.java +++ b/google-cloud-clients/google-cloud-redis/src/test/java/com/google/cloud/redis/v1/CloudRedisClientTest.java @@ -144,7 +144,6 @@ public void getInstanceTest() { String statusMessage = "statusMessage-239442758"; int memorySizeGb = 34199707; String authorizedNetwork = "authorizedNetwork-1733809270"; - String persistenceIamIdentity = "persistenceIamIdentity1061944584"; Instance expectedResponse = Instance.newBuilder() .setName(name2) @@ -159,7 +158,6 @@ public void getInstanceTest() { .setStatusMessage(statusMessage) .setMemorySizeGb(memorySizeGb) .setAuthorizedNetwork(authorizedNetwork) - .setPersistenceIamIdentity(persistenceIamIdentity) .build(); mockCloudRedis.addResponse(expectedResponse); @@ -210,7 +208,6 @@ public void createInstanceTest() throws Exception { String statusMessage = "statusMessage-239442758"; int memorySizeGb2 = 1493816946; String authorizedNetwork = "authorizedNetwork-1733809270"; - String persistenceIamIdentity = "persistenceIamIdentity1061944584"; Instance expectedResponse = Instance.newBuilder() .setName(name) @@ -225,7 +222,6 @@ public void createInstanceTest() throws Exception { .setStatusMessage(statusMessage) .setMemorySizeGb(memorySizeGb2) .setAuthorizedNetwork(authorizedNetwork) - .setPersistenceIamIdentity(persistenceIamIdentity) .build(); Operation resultOperation = Operation.newBuilder() @@ -294,7 +290,6 @@ public void updateInstanceTest() throws Exception { String statusMessage = "statusMessage-239442758"; int memorySizeGb2 = 1493816946; String authorizedNetwork = "authorizedNetwork-1733809270"; - String persistenceIamIdentity = "persistenceIamIdentity1061944584"; Instance expectedResponse = Instance.newBuilder() .setName(name) @@ -309,7 +304,6 @@ public void updateInstanceTest() throws Exception { .setStatusMessage(statusMessage) .setMemorySizeGb(memorySizeGb2) .setAuthorizedNetwork(authorizedNetwork) - .setPersistenceIamIdentity(persistenceIamIdentity) .build(); Operation resultOperation = Operation.newBuilder() @@ -414,160 +408,6 @@ public void deleteInstanceExceptionTest() throws Exception { } } - @Test - @SuppressWarnings("all") - public void importInstanceTest() throws Exception { - String name2 = "name2-1052831874"; - String displayName = "displayName1615086568"; - String locationId = "locationId552319461"; - String alternativeLocationId = "alternativeLocationId-718920621"; - String redisVersion = "redisVersion-685310444"; - String reservedIpRange = "reservedIpRange-1082940580"; - String host = "host3208616"; - int port = 3446913; - String currentLocationId = "currentLocationId1312712735"; - String statusMessage = "statusMessage-239442758"; - int memorySizeGb = 34199707; - String authorizedNetwork = "authorizedNetwork-1733809270"; - String persistenceIamIdentity = "persistenceIamIdentity1061944584"; - Instance expectedResponse = - Instance.newBuilder() - .setName(name2) - .setDisplayName(displayName) - .setLocationId(locationId) - .setAlternativeLocationId(alternativeLocationId) - .setRedisVersion(redisVersion) - .setReservedIpRange(reservedIpRange) - .setHost(host) - .setPort(port) - .setCurrentLocationId(currentLocationId) - .setStatusMessage(statusMessage) - .setMemorySizeGb(memorySizeGb) - .setAuthorizedNetwork(authorizedNetwork) - .setPersistenceIamIdentity(persistenceIamIdentity) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("importInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockCloudRedis.addResponse(resultOperation); - - String formattedName = InstanceName.format("[PROJECT]", "[LOCATION]", "[INSTANCE]"); - InputConfig inputConfig = InputConfig.newBuilder().build(); - - Instance actualResponse = client.importInstanceAsync(formattedName, inputConfig).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockCloudRedis.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ImportInstanceRequest actualRequest = (ImportInstanceRequest) actualRequests.get(0); - - Assert.assertEquals(formattedName, actualRequest.getName()); - Assert.assertEquals(inputConfig, actualRequest.getInputConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void importInstanceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockCloudRedis.addException(exception); - - try { - String formattedName = InstanceName.format("[PROJECT]", "[LOCATION]", "[INSTANCE]"); - InputConfig inputConfig = InputConfig.newBuilder().build(); - - client.importInstanceAsync(formattedName, inputConfig).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - - @Test - @SuppressWarnings("all") - public void exportInstanceTest() throws Exception { - String name2 = "name2-1052831874"; - String displayName = "displayName1615086568"; - String locationId = "locationId552319461"; - String alternativeLocationId = "alternativeLocationId-718920621"; - String redisVersion = "redisVersion-685310444"; - String reservedIpRange = "reservedIpRange-1082940580"; - String host = "host3208616"; - int port = 3446913; - String currentLocationId = "currentLocationId1312712735"; - String statusMessage = "statusMessage-239442758"; - int memorySizeGb = 34199707; - String authorizedNetwork = "authorizedNetwork-1733809270"; - String persistenceIamIdentity = "persistenceIamIdentity1061944584"; - Instance expectedResponse = - Instance.newBuilder() - .setName(name2) - .setDisplayName(displayName) - .setLocationId(locationId) - .setAlternativeLocationId(alternativeLocationId) - .setRedisVersion(redisVersion) - .setReservedIpRange(reservedIpRange) - .setHost(host) - .setPort(port) - .setCurrentLocationId(currentLocationId) - .setStatusMessage(statusMessage) - .setMemorySizeGb(memorySizeGb) - .setAuthorizedNetwork(authorizedNetwork) - .setPersistenceIamIdentity(persistenceIamIdentity) - .build(); - Operation resultOperation = - Operation.newBuilder() - .setName("exportInstanceTest") - .setDone(true) - .setResponse(Any.pack(expectedResponse)) - .build(); - mockCloudRedis.addResponse(resultOperation); - - String formattedName = InstanceName.format("[PROJECT]", "[LOCATION]", "[INSTANCE]"); - OutputConfig outputConfig = OutputConfig.newBuilder().build(); - - Instance actualResponse = client.exportInstanceAsync(formattedName, outputConfig).get(); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockCloudRedis.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ExportInstanceRequest actualRequest = (ExportInstanceRequest) actualRequests.get(0); - - Assert.assertEquals(formattedName, actualRequest.getName()); - Assert.assertEquals(outputConfig, actualRequest.getOutputConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - @SuppressWarnings("all") - public void exportInstanceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); - mockCloudRedis.addException(exception); - - try { - String formattedName = InstanceName.format("[PROJECT]", "[LOCATION]", "[INSTANCE]"); - OutputConfig outputConfig = OutputConfig.newBuilder().build(); - - client.exportInstanceAsync(formattedName, outputConfig).get(); - Assert.fail("No exception raised"); - } catch (ExecutionException e) { - Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); - InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); - Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); - } - } - @Test @SuppressWarnings("all") public void failoverInstanceTest() throws Exception { @@ -583,7 +423,6 @@ public void failoverInstanceTest() throws Exception { String statusMessage = "statusMessage-239442758"; int memorySizeGb = 34199707; String authorizedNetwork = "authorizedNetwork-1733809270"; - String persistenceIamIdentity = "persistenceIamIdentity1061944584"; Instance expectedResponse = Instance.newBuilder() .setName(name2) @@ -598,7 +437,6 @@ public void failoverInstanceTest() throws Exception { .setStatusMessage(statusMessage) .setMemorySizeGb(memorySizeGb) .setAuthorizedNetwork(authorizedNetwork) - .setPersistenceIamIdentity(persistenceIamIdentity) .build(); Operation resultOperation = Operation.newBuilder() diff --git a/google-cloud-clients/google-cloud-redis/src/test/java/com/google/cloud/redis/v1/MockCloudRedisImpl.java b/google-cloud-clients/google-cloud-redis/src/test/java/com/google/cloud/redis/v1/MockCloudRedisImpl.java index eb77fe5726e7..44131a5de186 100644 --- a/google-cloud-clients/google-cloud-redis/src/test/java/com/google/cloud/redis/v1/MockCloudRedisImpl.java +++ b/google-cloud-clients/google-cloud-redis/src/test/java/com/google/cloud/redis/v1/MockCloudRedisImpl.java @@ -116,36 +116,6 @@ public void updateInstance( } } - @Override - public void importInstance( - ImportInstanceRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext((Operation) response); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); - } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); - } - } - - @Override - public void exportInstance( - ExportInstanceRequest request, StreamObserver responseObserver) { - Object response = responses.remove(); - if (response instanceof Operation) { - requests.add(request); - responseObserver.onNext((Operation) response); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError((Exception) response); - } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); - } - } - @Override public void failoverInstance( FailoverInstanceRequest request, StreamObserver responseObserver) {