From 55a621aba77309e53450de3c4efc218b63aa09e1 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Sat, 19 Oct 2024 02:25:53 +0000 Subject: [PATCH] chore: generate libraries at Sat Oct 19 02:23:09 UTC 2024 --- .../com/google/storage/v2/StorageClient.java | 1776 +------------- .../google/storage/v2/StorageSettings.java | 222 -- .../storage/v2/stub/GrpcStorageStub.java | 385 --- .../google/storage/v2/stub/StorageStub.java | 83 - .../storage/v2/stub/StorageStubSettings.java | 508 +--- .../com.google.storage.v2/reflect-config.json | 288 --- .../com/google/storage/v2/gapic_metadata.json | 30 - .../google/storage/v2/MockStorageImpl.java | 211 -- .../google/storage/v2/StorageClientTest.java | 822 ------- .../com/google/storage/v2/StorageGrpc.java | 1236 +--------- .../storage/v2/CreateHmacKeyRequest.java | 834 ------- .../v2/CreateHmacKeyRequestOrBuilder.java | 84 - .../storage/v2/CreateHmacKeyResponse.java | 821 ------- .../v2/CreateHmacKeyResponseOrBuilder.java | 75 - .../v2/CreateNotificationConfigRequest.java | 950 -------- ...ateNotificationConfigRequestOrBuilder.java | 96 - .../storage/v2/DeleteHmacKeyRequest.java | 834 ------- .../v2/DeleteHmacKeyRequestOrBuilder.java | 84 - .../v2/DeleteNotificationConfigRequest.java | 641 ----- ...eteNotificationConfigRequestOrBuilder.java | 55 - .../google/storage/v2/GetHmacKeyRequest.java | 833 ------- .../v2/GetHmacKeyRequestOrBuilder.java | 84 - .../v2/GetNotificationConfigRequest.java | 653 ----- ...GetNotificationConfigRequestOrBuilder.java | 59 - .../storage/v2/GetServiceAccountRequest.java | 645 ----- .../v2/GetServiceAccountRequestOrBuilder.java | 57 - .../google/storage/v2/HmacKeyMetadata.java | 2162 ----------------- .../storage/v2/HmacKeyMetadataOrBuilder.java | 266 -- .../storage/v2/ListHmacKeysRequest.java | 1202 --------- .../v2/ListHmacKeysRequestOrBuilder.java | 135 - .../storage/v2/ListHmacKeysResponse.java | 1122 --------- .../v2/ListHmacKeysResponseOrBuilder.java | 105 - .../v2/ListNotificationConfigsRequest.java | 951 -------- ...stNotificationConfigsRequestOrBuilder.java | 103 - .../v2/ListNotificationConfigsResponse.java | 1139 --------- ...tNotificationConfigsResponseOrBuilder.java | 105 - .../google/storage/v2/NotificationConfig.java | 2075 ---------------- .../storage/v2/NotificationConfigName.java | 228 -- .../v2/NotificationConfigOrBuilder.java | 295 --- .../com/google/storage/v2/ServiceAccount.java | 625 ----- .../storage/v2/ServiceAccountOrBuilder.java | 51 - .../com/google/storage/v2/StorageProto.java | 874 +++---- .../storage/v2/UpdateHmacKeyRequest.java | 1070 -------- .../v2/UpdateHmacKeyRequestOrBuilder.java | 117 - .../proto/google/storage/v2/storage.proto | 387 --- 45 files changed, 321 insertions(+), 25057 deletions(-) delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyRequest.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyRequestOrBuilder.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyResponse.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyResponseOrBuilder.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateNotificationConfigRequest.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateNotificationConfigRequestOrBuilder.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteHmacKeyRequest.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteHmacKeyRequestOrBuilder.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteNotificationConfigRequest.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteNotificationConfigRequestOrBuilder.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetHmacKeyRequest.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetHmacKeyRequestOrBuilder.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetNotificationConfigRequest.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetNotificationConfigRequestOrBuilder.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetServiceAccountRequest.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetServiceAccountRequestOrBuilder.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/HmacKeyMetadata.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/HmacKeyMetadataOrBuilder.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysRequest.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysRequestOrBuilder.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysResponse.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysResponseOrBuilder.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsRequest.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsRequestOrBuilder.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsResponse.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsResponseOrBuilder.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/NotificationConfig.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/NotificationConfigName.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/NotificationConfigOrBuilder.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ServiceAccount.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ServiceAccountOrBuilder.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateHmacKeyRequest.java delete mode 100644 proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateHmacKeyRequestOrBuilder.java diff --git a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageClient.java b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageClient.java index 2f7aa14b04..3dfec9ca3c 100644 --- a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageClient.java +++ b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageClient.java @@ -476,197 +476,6 @@ * * * - * - *

GetServiceAccount - *

Retrieves the name of a project's Google Cloud Storage service account. - * - *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- * - *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

- * - *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- * - * - * - * - *

CreateHmacKey - *

Creates a new HMAC key for the given service account. - * - *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- * - *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

- * - *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- * - * - * - * - *

DeleteHmacKey - *

Deletes a given HMAC key. Key must be in an INACTIVE state. - * - *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- * - *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

- * - *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- * - * - * - * - *

GetHmacKey - *

Gets an existing HMAC key metadata for the given id. - * - *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- * - *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

- * - *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- * - * - * - * - *

ListHmacKeys - *

Lists HMAC keys under a given project with the additional filters provided. - * - *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- * - *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

- * - *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- * - * - * - * - *

UpdateHmacKey - *

Updates a given HMAC key state between ACTIVE and INACTIVE. - * - *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- * - *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

- * - *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- * - * - * - * - *

DeleteNotificationConfig - *

Permanently deletes a NotificationConfig. - * - *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- * - *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

- * - *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- * - * - * - * - *

GetNotificationConfig - *

View a NotificationConfig. - * - *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- * - *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

- * - *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- * - * - * - * - *

CreateNotificationConfig - *

Creates a NotificationConfig for a given bucket. These NotificationConfigs, when triggered, publish messages to the specified Pub/Sub topics. See https://cloud.google.com/storage/docs/pubsub-notifications. - * - *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- * - *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

- * - *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- * - * - * - * - *

ListNotificationConfigs - *

Retrieves a list of NotificationConfigs for a given bucket. - * - *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

- * - *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

- * - *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

- * - * - * * * *

See the individual methods for example code. @@ -3432,1419 +3241,34 @@ public final QueryWriteStatusResponse queryWriteStatus(QueryWriteStatusRequest r return stub.queryWriteStatusCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves the name of a project's Google Cloud Storage service account. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   ServiceAccount response = storageClient.getServiceAccount(project);
-   * }
-   * }
- * - * @param project Required. Project ID, in the format of "projects/{projectIdentifier}". - * {projectIdentifier} can be the project ID or project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final ServiceAccount getServiceAccount(ProjectName project) { - GetServiceAccountRequest request = - GetServiceAccountRequest.newBuilder() - .setProject(project == null ? null : project.toString()) - .build(); - return getServiceAccount(request); + @Override + public final void close() { + stub.close(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves the name of a project's Google Cloud Storage service account. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   String project = ProjectName.of("[PROJECT]").toString();
-   *   ServiceAccount response = storageClient.getServiceAccount(project);
-   * }
-   * }
- * - * @param project Required. Project ID, in the format of "projects/{projectIdentifier}". - * {projectIdentifier} can be the project ID or project number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final ServiceAccount getServiceAccount(String project) { - GetServiceAccountRequest request = - GetServiceAccountRequest.newBuilder().setProject(project).build(); - return getServiceAccount(request); + @Override + public void shutdown() { + stub.shutdown(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves the name of a project's Google Cloud Storage service account. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   GetServiceAccountRequest request =
-   *       GetServiceAccountRequest.newBuilder()
-   *           .setProject(ProjectName.of("[PROJECT]").toString())
-   *           .build();
-   *   ServiceAccount response = storageClient.getServiceAccount(request);
-   * }
-   * }
- * - * @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 - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final ServiceAccount getServiceAccount(GetServiceAccountRequest request) { - return getServiceAccountCallable().call(request); + @Override + public boolean isShutdown() { + return stub.isShutdown(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves the name of a project's Google Cloud Storage service account. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   GetServiceAccountRequest request =
-   *       GetServiceAccountRequest.newBuilder()
-   *           .setProject(ProjectName.of("[PROJECT]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       storageClient.getServiceAccountCallable().futureCall(request);
-   *   // Do something.
-   *   ServiceAccount response = future.get();
-   * }
-   * }
- * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final UnaryCallable getServiceAccountCallable() { - return stub.getServiceAccountCallable(); + @Override + public boolean isTerminated() { + return stub.isTerminated(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new HMAC key for the given service account. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   String serviceAccountEmail = "serviceAccountEmail1825953988";
-   *   CreateHmacKeyResponse response = storageClient.createHmacKey(project, serviceAccountEmail);
-   * }
-   * }
- * - * @param project Required. The project that the HMAC-owning service account lives in, in the - * format of "projects/{projectIdentifier}". {projectIdentifier} can be the project ID or - * project number. - * @param serviceAccountEmail Required. The service account to create the HMAC for. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final CreateHmacKeyResponse createHmacKey( - ProjectName project, String serviceAccountEmail) { - CreateHmacKeyRequest request = - CreateHmacKeyRequest.newBuilder() - .setProject(project == null ? null : project.toString()) - .setServiceAccountEmail(serviceAccountEmail) - .build(); - return createHmacKey(request); + @Override + public void shutdownNow() { + stub.shutdownNow(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new HMAC key for the given service account. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   String project = ProjectName.of("[PROJECT]").toString();
-   *   String serviceAccountEmail = "serviceAccountEmail1825953988";
-   *   CreateHmacKeyResponse response = storageClient.createHmacKey(project, serviceAccountEmail);
-   * }
-   * }
- * - * @param project Required. The project that the HMAC-owning service account lives in, in the - * format of "projects/{projectIdentifier}". {projectIdentifier} can be the project ID or - * project number. - * @param serviceAccountEmail Required. The service account to create the HMAC for. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final CreateHmacKeyResponse createHmacKey(String project, String serviceAccountEmail) { - CreateHmacKeyRequest request = - CreateHmacKeyRequest.newBuilder() - .setProject(project) - .setServiceAccountEmail(serviceAccountEmail) - .build(); - return createHmacKey(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new HMAC key for the given service account. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   CreateHmacKeyRequest request =
-   *       CreateHmacKeyRequest.newBuilder()
-   *           .setProject(ProjectName.of("[PROJECT]").toString())
-   *           .setServiceAccountEmail("serviceAccountEmail1825953988")
-   *           .build();
-   *   CreateHmacKeyResponse response = storageClient.createHmacKey(request);
-   * }
-   * }
- * - * @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 - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final CreateHmacKeyResponse createHmacKey(CreateHmacKeyRequest request) { - return createHmacKeyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a new HMAC key for the given service account. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   CreateHmacKeyRequest request =
-   *       CreateHmacKeyRequest.newBuilder()
-   *           .setProject(ProjectName.of("[PROJECT]").toString())
-   *           .setServiceAccountEmail("serviceAccountEmail1825953988")
-   *           .build();
-   *   ApiFuture future =
-   *       storageClient.createHmacKeyCallable().futureCall(request);
-   *   // Do something.
-   *   CreateHmacKeyResponse response = future.get();
-   * }
-   * }
- * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final UnaryCallable createHmacKeyCallable() { - return stub.createHmacKeyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a given HMAC key. Key must be in an INACTIVE state. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   String accessId = "accessId-2146437729";
-   *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   storageClient.deleteHmacKey(accessId, project);
-   * }
-   * }
- * - * @param accessId Required. The identifying key for the HMAC to delete. - * @param project Required. The project that owns the HMAC key, in the format of - * "projects/{projectIdentifier}". {projectIdentifier} can be the project ID or project - * number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final void deleteHmacKey(String accessId, ProjectName project) { - DeleteHmacKeyRequest request = - DeleteHmacKeyRequest.newBuilder() - .setAccessId(accessId) - .setProject(project == null ? null : project.toString()) - .build(); - deleteHmacKey(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a given HMAC key. Key must be in an INACTIVE state. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   String accessId = "accessId-2146437729";
-   *   String project = ProjectName.of("[PROJECT]").toString();
-   *   storageClient.deleteHmacKey(accessId, project);
-   * }
-   * }
- * - * @param accessId Required. The identifying key for the HMAC to delete. - * @param project Required. The project that owns the HMAC key, in the format of - * "projects/{projectIdentifier}". {projectIdentifier} can be the project ID or project - * number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final void deleteHmacKey(String accessId, String project) { - DeleteHmacKeyRequest request = - DeleteHmacKeyRequest.newBuilder().setAccessId(accessId).setProject(project).build(); - deleteHmacKey(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a given HMAC key. Key must be in an INACTIVE state. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   DeleteHmacKeyRequest request =
-   *       DeleteHmacKeyRequest.newBuilder()
-   *           .setAccessId("accessId-2146437729")
-   *           .setProject(ProjectName.of("[PROJECT]").toString())
-   *           .build();
-   *   storageClient.deleteHmacKey(request);
-   * }
-   * }
- * - * @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 - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final void deleteHmacKey(DeleteHmacKeyRequest request) { - deleteHmacKeyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes a given HMAC key. Key must be in an INACTIVE state. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   DeleteHmacKeyRequest request =
-   *       DeleteHmacKeyRequest.newBuilder()
-   *           .setAccessId("accessId-2146437729")
-   *           .setProject(ProjectName.of("[PROJECT]").toString())
-   *           .build();
-   *   ApiFuture future = storageClient.deleteHmacKeyCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final UnaryCallable deleteHmacKeyCallable() { - return stub.deleteHmacKeyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets an existing HMAC key metadata for the given id. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   String accessId = "accessId-2146437729";
-   *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   HmacKeyMetadata response = storageClient.getHmacKey(accessId, project);
-   * }
-   * }
- * - * @param accessId Required. The identifying key for the HMAC to delete. - * @param project Required. The project the HMAC key lies in, in the format of - * "projects/{projectIdentifier}". {projectIdentifier} can be the project ID or project - * number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final HmacKeyMetadata getHmacKey(String accessId, ProjectName project) { - GetHmacKeyRequest request = - GetHmacKeyRequest.newBuilder() - .setAccessId(accessId) - .setProject(project == null ? null : project.toString()) - .build(); - return getHmacKey(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets an existing HMAC key metadata for the given id. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   String accessId = "accessId-2146437729";
-   *   String project = ProjectName.of("[PROJECT]").toString();
-   *   HmacKeyMetadata response = storageClient.getHmacKey(accessId, project);
-   * }
-   * }
- * - * @param accessId Required. The identifying key for the HMAC to delete. - * @param project Required. The project the HMAC key lies in, in the format of - * "projects/{projectIdentifier}". {projectIdentifier} can be the project ID or project - * number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final HmacKeyMetadata getHmacKey(String accessId, String project) { - GetHmacKeyRequest request = - GetHmacKeyRequest.newBuilder().setAccessId(accessId).setProject(project).build(); - return getHmacKey(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets an existing HMAC key metadata for the given id. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   GetHmacKeyRequest request =
-   *       GetHmacKeyRequest.newBuilder()
-   *           .setAccessId("accessId-2146437729")
-   *           .setProject(ProjectName.of("[PROJECT]").toString())
-   *           .build();
-   *   HmacKeyMetadata response = storageClient.getHmacKey(request);
-   * }
-   * }
- * - * @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 - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final HmacKeyMetadata getHmacKey(GetHmacKeyRequest request) { - return getHmacKeyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets an existing HMAC key metadata for the given id. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   GetHmacKeyRequest request =
-   *       GetHmacKeyRequest.newBuilder()
-   *           .setAccessId("accessId-2146437729")
-   *           .setProject(ProjectName.of("[PROJECT]").toString())
-   *           .build();
-   *   ApiFuture future = storageClient.getHmacKeyCallable().futureCall(request);
-   *   // Do something.
-   *   HmacKeyMetadata response = future.get();
-   * }
-   * }
- * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final UnaryCallable getHmacKeyCallable() { - return stub.getHmacKeyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists HMAC keys under a given project with the additional filters provided. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   ProjectName project = ProjectName.of("[PROJECT]");
-   *   for (HmacKeyMetadata element : storageClient.listHmacKeys(project).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param project Required. The project to list HMAC keys for, in the format of - * "projects/{projectIdentifier}". {projectIdentifier} can be the project ID or project - * number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final ListHmacKeysPagedResponse listHmacKeys(ProjectName project) { - ListHmacKeysRequest request = - ListHmacKeysRequest.newBuilder() - .setProject(project == null ? null : project.toString()) - .build(); - return listHmacKeys(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists HMAC keys under a given project with the additional filters provided. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   String project = ProjectName.of("[PROJECT]").toString();
-   *   for (HmacKeyMetadata element : storageClient.listHmacKeys(project).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param project Required. The project to list HMAC keys for, in the format of - * "projects/{projectIdentifier}". {projectIdentifier} can be the project ID or project - * number. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final ListHmacKeysPagedResponse listHmacKeys(String project) { - ListHmacKeysRequest request = ListHmacKeysRequest.newBuilder().setProject(project).build(); - return listHmacKeys(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists HMAC keys under a given project with the additional filters provided. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   ListHmacKeysRequest request =
-   *       ListHmacKeysRequest.newBuilder()
-   *           .setProject(ProjectName.of("[PROJECT]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setServiceAccountEmail("serviceAccountEmail1825953988")
-   *           .setShowDeletedKeys(true)
-   *           .build();
-   *   for (HmacKeyMetadata element : storageClient.listHmacKeys(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @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 - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final ListHmacKeysPagedResponse listHmacKeys(ListHmacKeysRequest request) { - return listHmacKeysPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists HMAC keys under a given project with the additional filters provided. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   ListHmacKeysRequest request =
-   *       ListHmacKeysRequest.newBuilder()
-   *           .setProject(ProjectName.of("[PROJECT]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setServiceAccountEmail("serviceAccountEmail1825953988")
-   *           .setShowDeletedKeys(true)
-   *           .build();
-   *   ApiFuture future =
-   *       storageClient.listHmacKeysPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (HmacKeyMetadata element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final UnaryCallable - listHmacKeysPagedCallable() { - return stub.listHmacKeysPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists HMAC keys under a given project with the additional filters provided. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   ListHmacKeysRequest request =
-   *       ListHmacKeysRequest.newBuilder()
-   *           .setProject(ProjectName.of("[PROJECT]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .setServiceAccountEmail("serviceAccountEmail1825953988")
-   *           .setShowDeletedKeys(true)
-   *           .build();
-   *   while (true) {
-   *     ListHmacKeysResponse response = storageClient.listHmacKeysCallable().call(request);
-   *     for (HmacKeyMetadata element : response.getHmacKeysList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final UnaryCallable listHmacKeysCallable() { - return stub.listHmacKeysCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a given HMAC key state between ACTIVE and INACTIVE. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   HmacKeyMetadata hmacKey = HmacKeyMetadata.newBuilder().build();
-   *   FieldMask updateMask = FieldMask.newBuilder().build();
-   *   HmacKeyMetadata response = storageClient.updateHmacKey(hmacKey, updateMask);
-   * }
-   * }
- * - * @param hmacKey Required. The HMAC key to update. If present, the hmac_key's `id` field will be - * used to identify the key. Otherwise, the hmac_key's access_id and project fields will be - * used to identify the key. - * @param updateMask Update mask for hmac_key. Not specifying any fields will mean only the - * `state` field is updated to the value specified in `hmac_key`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final HmacKeyMetadata updateHmacKey(HmacKeyMetadata hmacKey, FieldMask updateMask) { - UpdateHmacKeyRequest request = - UpdateHmacKeyRequest.newBuilder().setHmacKey(hmacKey).setUpdateMask(updateMask).build(); - return updateHmacKey(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a given HMAC key state between ACTIVE and INACTIVE. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   UpdateHmacKeyRequest request =
-   *       UpdateHmacKeyRequest.newBuilder()
-   *           .setHmacKey(HmacKeyMetadata.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   HmacKeyMetadata response = storageClient.updateHmacKey(request);
-   * }
-   * }
- * - * @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 - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final HmacKeyMetadata updateHmacKey(UpdateHmacKeyRequest request) { - return updateHmacKeyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates a given HMAC key state between ACTIVE and INACTIVE. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   UpdateHmacKeyRequest request =
-   *       UpdateHmacKeyRequest.newBuilder()
-   *           .setHmacKey(HmacKeyMetadata.newBuilder().build())
-   *           .setUpdateMask(FieldMask.newBuilder().build())
-   *           .build();
-   *   ApiFuture future = storageClient.updateHmacKeyCallable().futureCall(request);
-   *   // Do something.
-   *   HmacKeyMetadata response = future.get();
-   * }
-   * }
- * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final UnaryCallable updateHmacKeyCallable() { - return stub.updateHmacKeyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a NotificationConfig. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   NotificationConfigName name =
-   *       NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]");
-   *   storageClient.deleteNotificationConfig(name);
-   * }
-   * }
- * - * @param name Required. The parent bucket of the NotificationConfig. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final void deleteNotificationConfig(NotificationConfigName name) { - DeleteNotificationConfigRequest request = - DeleteNotificationConfigRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - deleteNotificationConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a NotificationConfig. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   String name =
-   *       NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]").toString();
-   *   storageClient.deleteNotificationConfig(name);
-   * }
-   * }
- * - * @param name Required. The parent bucket of the NotificationConfig. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final void deleteNotificationConfig(String name) { - DeleteNotificationConfigRequest request = - DeleteNotificationConfigRequest.newBuilder().setName(name).build(); - deleteNotificationConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a NotificationConfig. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   DeleteNotificationConfigRequest request =
-   *       DeleteNotificationConfigRequest.newBuilder()
-   *           .setName(
-   *               NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]")
-   *                   .toString())
-   *           .build();
-   *   storageClient.deleteNotificationConfig(request);
-   * }
-   * }
- * - * @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 - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final void deleteNotificationConfig(DeleteNotificationConfigRequest request) { - deleteNotificationConfigCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Permanently deletes a NotificationConfig. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   DeleteNotificationConfigRequest request =
-   *       DeleteNotificationConfigRequest.newBuilder()
-   *           .setName(
-   *               NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       storageClient.deleteNotificationConfigCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final UnaryCallable - deleteNotificationConfigCallable() { - return stub.deleteNotificationConfigCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * View a NotificationConfig. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   NotificationConfigName name =
-   *       NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]");
-   *   NotificationConfig response = storageClient.getNotificationConfig(name);
-   * }
-   * }
- * - * @param name Required. The parent bucket of the NotificationConfig. Format: - * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final NotificationConfig getNotificationConfig(NotificationConfigName name) { - GetNotificationConfigRequest request = - GetNotificationConfigRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getNotificationConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * View a NotificationConfig. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   String name =
-   *       NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]").toString();
-   *   NotificationConfig response = storageClient.getNotificationConfig(name);
-   * }
-   * }
- * - * @param name Required. The parent bucket of the NotificationConfig. Format: - * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}` - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final NotificationConfig getNotificationConfig(String name) { - GetNotificationConfigRequest request = - GetNotificationConfigRequest.newBuilder().setName(name).build(); - return getNotificationConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * View a NotificationConfig. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   GetNotificationConfigRequest request =
-   *       GetNotificationConfigRequest.newBuilder()
-   *           .setName(
-   *               NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]")
-   *                   .toString())
-   *           .build();
-   *   NotificationConfig response = storageClient.getNotificationConfig(request);
-   * }
-   * }
- * - * @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 - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final NotificationConfig getNotificationConfig(GetNotificationConfigRequest request) { - return getNotificationConfigCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * View a NotificationConfig. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   GetNotificationConfigRequest request =
-   *       GetNotificationConfigRequest.newBuilder()
-   *           .setName(
-   *               NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]")
-   *                   .toString())
-   *           .build();
-   *   ApiFuture future =
-   *       storageClient.getNotificationConfigCallable().futureCall(request);
-   *   // Do something.
-   *   NotificationConfig response = future.get();
-   * }
-   * }
- * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final UnaryCallable - getNotificationConfigCallable() { - return stub.getNotificationConfigCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a NotificationConfig for a given bucket. These NotificationConfigs, when triggered, - * publish messages to the specified Pub/Sub topics. See - * https://cloud.google.com/storage/docs/pubsub-notifications. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   BucketName parent = BucketName.of("[PROJECT]", "[BUCKET]");
-   *   NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
-   *   NotificationConfig response =
-   *       storageClient.createNotificationConfig(parent, notificationConfig);
-   * }
-   * }
- * - * @param parent Required. The bucket to which this NotificationConfig belongs. - * @param notificationConfig Required. Properties of the NotificationConfig to be inserted. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final NotificationConfig createNotificationConfig( - BucketName parent, NotificationConfig notificationConfig) { - CreateNotificationConfigRequest request = - CreateNotificationConfigRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setNotificationConfig(notificationConfig) - .build(); - return createNotificationConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a NotificationConfig for a given bucket. These NotificationConfigs, when triggered, - * publish messages to the specified Pub/Sub topics. See - * https://cloud.google.com/storage/docs/pubsub-notifications. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   String parent = BucketName.of("[PROJECT]", "[BUCKET]").toString();
-   *   NotificationConfig notificationConfig = NotificationConfig.newBuilder().build();
-   *   NotificationConfig response =
-   *       storageClient.createNotificationConfig(parent, notificationConfig);
-   * }
-   * }
- * - * @param parent Required. The bucket to which this NotificationConfig belongs. - * @param notificationConfig Required. Properties of the NotificationConfig to be inserted. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final NotificationConfig createNotificationConfig( - String parent, NotificationConfig notificationConfig) { - CreateNotificationConfigRequest request = - CreateNotificationConfigRequest.newBuilder() - .setParent(parent) - .setNotificationConfig(notificationConfig) - .build(); - return createNotificationConfig(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a NotificationConfig for a given bucket. These NotificationConfigs, when triggered, - * publish messages to the specified Pub/Sub topics. See - * https://cloud.google.com/storage/docs/pubsub-notifications. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   CreateNotificationConfigRequest request =
-   *       CreateNotificationConfigRequest.newBuilder()
-   *           .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
-   *           .setNotificationConfig(NotificationConfig.newBuilder().build())
-   *           .build();
-   *   NotificationConfig response = storageClient.createNotificationConfig(request);
-   * }
-   * }
- * - * @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 - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final NotificationConfig createNotificationConfig( - CreateNotificationConfigRequest request) { - return createNotificationConfigCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates a NotificationConfig for a given bucket. These NotificationConfigs, when triggered, - * publish messages to the specified Pub/Sub topics. See - * https://cloud.google.com/storage/docs/pubsub-notifications. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   CreateNotificationConfigRequest request =
-   *       CreateNotificationConfigRequest.newBuilder()
-   *           .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
-   *           .setNotificationConfig(NotificationConfig.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       storageClient.createNotificationConfigCallable().futureCall(request);
-   *   // Do something.
-   *   NotificationConfig response = future.get();
-   * }
-   * }
- * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final UnaryCallable - createNotificationConfigCallable() { - return stub.createNotificationConfigCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves a list of NotificationConfigs for a given bucket. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   BucketName parent = BucketName.of("[PROJECT]", "[BUCKET]");
-   *   for (NotificationConfig element :
-   *       storageClient.listNotificationConfigs(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Name of a Google Cloud Storage bucket. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final ListNotificationConfigsPagedResponse listNotificationConfigs(BucketName parent) { - ListNotificationConfigsRequest request = - ListNotificationConfigsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listNotificationConfigs(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves a list of NotificationConfigs for a given bucket. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   String parent = BucketName.of("[PROJECT]", "[BUCKET]").toString();
-   *   for (NotificationConfig element :
-   *       storageClient.listNotificationConfigs(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. Name of a Google Cloud Storage bucket. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final ListNotificationConfigsPagedResponse listNotificationConfigs(String parent) { - ListNotificationConfigsRequest request = - ListNotificationConfigsRequest.newBuilder().setParent(parent).build(); - return listNotificationConfigs(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves a list of NotificationConfigs for a given bucket. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   ListNotificationConfigsRequest request =
-   *       ListNotificationConfigsRequest.newBuilder()
-   *           .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (NotificationConfig element :
-   *       storageClient.listNotificationConfigs(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @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 - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final ListNotificationConfigsPagedResponse listNotificationConfigs( - ListNotificationConfigsRequest request) { - return listNotificationConfigsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves a list of NotificationConfigs for a given bucket. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   ListNotificationConfigsRequest request =
-   *       ListNotificationConfigsRequest.newBuilder()
-   *           .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       storageClient.listNotificationConfigsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (NotificationConfig element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final UnaryCallable - listNotificationConfigsPagedCallable() { - return stub.listNotificationConfigsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves a list of NotificationConfigs for a given bucket. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (StorageClient storageClient = StorageClient.create()) {
-   *   ListNotificationConfigsRequest request =
-   *       ListNotificationConfigsRequest.newBuilder()
-   *           .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListNotificationConfigsResponse response =
-   *         storageClient.listNotificationConfigsCallable().call(request);
-   *     for (NotificationConfig element : response.getNotificationConfigsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public final UnaryCallable - listNotificationConfigsCallable() { - return stub.listNotificationConfigsCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); } public static class ListBucketsPagedResponse @@ -4992,168 +3416,4 @@ protected ListObjectsFixedSizeCollection createCollection( return new ListObjectsFixedSizeCollection(pages, collectionSize); } } - - public static class ListHmacKeysPagedResponse - extends AbstractPagedListResponse< - ListHmacKeysRequest, - ListHmacKeysResponse, - HmacKeyMetadata, - ListHmacKeysPage, - ListHmacKeysFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListHmacKeysPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListHmacKeysPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListHmacKeysPagedResponse(ListHmacKeysPage page) { - super(page, ListHmacKeysFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListHmacKeysPage - extends AbstractPage< - ListHmacKeysRequest, ListHmacKeysResponse, HmacKeyMetadata, ListHmacKeysPage> { - - private ListHmacKeysPage( - PageContext context, - ListHmacKeysResponse response) { - super(context, response); - } - - private static ListHmacKeysPage createEmptyPage() { - return new ListHmacKeysPage(null, null); - } - - @Override - protected ListHmacKeysPage createPage( - PageContext context, - ListHmacKeysResponse response) { - return new ListHmacKeysPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListHmacKeysFixedSizeCollection - extends AbstractFixedSizeCollection< - ListHmacKeysRequest, - ListHmacKeysResponse, - HmacKeyMetadata, - ListHmacKeysPage, - ListHmacKeysFixedSizeCollection> { - - private ListHmacKeysFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListHmacKeysFixedSizeCollection createEmptyCollection() { - return new ListHmacKeysFixedSizeCollection(null, 0); - } - - @Override - protected ListHmacKeysFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListHmacKeysFixedSizeCollection(pages, collectionSize); - } - } - - public static class ListNotificationConfigsPagedResponse - extends AbstractPagedListResponse< - ListNotificationConfigsRequest, - ListNotificationConfigsResponse, - NotificationConfig, - ListNotificationConfigsPage, - ListNotificationConfigsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext< - ListNotificationConfigsRequest, ListNotificationConfigsResponse, NotificationConfig> - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListNotificationConfigsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListNotificationConfigsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListNotificationConfigsPagedResponse(ListNotificationConfigsPage page) { - super(page, ListNotificationConfigsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListNotificationConfigsPage - extends AbstractPage< - ListNotificationConfigsRequest, - ListNotificationConfigsResponse, - NotificationConfig, - ListNotificationConfigsPage> { - - private ListNotificationConfigsPage( - PageContext< - ListNotificationConfigsRequest, ListNotificationConfigsResponse, NotificationConfig> - context, - ListNotificationConfigsResponse response) { - super(context, response); - } - - private static ListNotificationConfigsPage createEmptyPage() { - return new ListNotificationConfigsPage(null, null); - } - - @Override - protected ListNotificationConfigsPage createPage( - PageContext< - ListNotificationConfigsRequest, ListNotificationConfigsResponse, NotificationConfig> - context, - ListNotificationConfigsResponse response) { - return new ListNotificationConfigsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext< - ListNotificationConfigsRequest, ListNotificationConfigsResponse, NotificationConfig> - context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListNotificationConfigsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListNotificationConfigsRequest, - ListNotificationConfigsResponse, - NotificationConfig, - ListNotificationConfigsPage, - ListNotificationConfigsFixedSizeCollection> { - - private ListNotificationConfigsFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListNotificationConfigsFixedSizeCollection createEmptyCollection() { - return new ListNotificationConfigsFixedSizeCollection(null, 0); - } - - @Override - protected ListNotificationConfigsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListNotificationConfigsFixedSizeCollection(pages, collectionSize); - } - } } diff --git a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageSettings.java b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageSettings.java index 185fbb7a4c..da7cc623c9 100644 --- a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageSettings.java +++ b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageSettings.java @@ -17,8 +17,6 @@ package com.google.storage.v2; import static com.google.storage.v2.StorageClient.ListBucketsPagedResponse; -import static com.google.storage.v2.StorageClient.ListHmacKeysPagedResponse; -import static com.google.storage.v2.StorageClient.ListNotificationConfigsPagedResponse; import static com.google.storage.v2.StorageClient.ListObjectsPagedResponse; import com.google.api.core.ApiFunction; @@ -214,114 +212,6 @@ public UnaryCallSettings rewriteObjectSet return ((StorageStubSettings) getStubSettings()).queryWriteStatusSettings(); } - /** - * Returns the object with the settings used for calls to getServiceAccount. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings getServiceAccountSettings() { - return ((StorageStubSettings) getStubSettings()).getServiceAccountSettings(); - } - - /** - * Returns the object with the settings used for calls to createHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings createHmacKeySettings() { - return ((StorageStubSettings) getStubSettings()).createHmacKeySettings(); - } - - /** - * Returns the object with the settings used for calls to deleteHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings deleteHmacKeySettings() { - return ((StorageStubSettings) getStubSettings()).deleteHmacKeySettings(); - } - - /** - * Returns the object with the settings used for calls to getHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings getHmacKeySettings() { - return ((StorageStubSettings) getStubSettings()).getHmacKeySettings(); - } - - /** - * Returns the object with the settings used for calls to listHmacKeys. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public PagedCallSettings - listHmacKeysSettings() { - return ((StorageStubSettings) getStubSettings()).listHmacKeysSettings(); - } - - /** - * Returns the object with the settings used for calls to updateHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings updateHmacKeySettings() { - return ((StorageStubSettings) getStubSettings()).updateHmacKeySettings(); - } - - /** - * Returns the object with the settings used for calls to deleteNotificationConfig. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings - deleteNotificationConfigSettings() { - return ((StorageStubSettings) getStubSettings()).deleteNotificationConfigSettings(); - } - - /** - * Returns the object with the settings used for calls to getNotificationConfig. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings - getNotificationConfigSettings() { - return ((StorageStubSettings) getStubSettings()).getNotificationConfigSettings(); - } - - /** - * Returns the object with the settings used for calls to createNotificationConfig. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings - createNotificationConfigSettings() { - return ((StorageStubSettings) getStubSettings()).createNotificationConfigSettings(); - } - - /** - * Returns the object with the settings used for calls to listNotificationConfigs. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public PagedCallSettings< - ListNotificationConfigsRequest, - ListNotificationConfigsResponse, - ListNotificationConfigsPagedResponse> - listNotificationConfigsSettings() { - return ((StorageStubSettings) getStubSettings()).listNotificationConfigsSettings(); - } - public static final StorageSettings create(StorageStubSettings stub) throws IOException { return new StorageSettings.Builder(stub.toBuilder()).build(); } @@ -540,118 +430,6 @@ public UnaryCallSettings.Builder updateObjectSettin return getStubSettingsBuilder().queryWriteStatusSettings(); } - /** - * Returns the builder for the settings used for calls to getServiceAccount. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder - getServiceAccountSettings() { - return getStubSettingsBuilder().getServiceAccountSettings(); - } - - /** - * Returns the builder for the settings used for calls to createHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder - createHmacKeySettings() { - return getStubSettingsBuilder().createHmacKeySettings(); - } - - /** - * Returns the builder for the settings used for calls to deleteHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder deleteHmacKeySettings() { - return getStubSettingsBuilder().deleteHmacKeySettings(); - } - - /** - * Returns the builder for the settings used for calls to getHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder getHmacKeySettings() { - return getStubSettingsBuilder().getHmacKeySettings(); - } - - /** - * Returns the builder for the settings used for calls to listHmacKeys. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public PagedCallSettings.Builder< - ListHmacKeysRequest, ListHmacKeysResponse, ListHmacKeysPagedResponse> - listHmacKeysSettings() { - return getStubSettingsBuilder().listHmacKeysSettings(); - } - - /** - * Returns the builder for the settings used for calls to updateHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder - updateHmacKeySettings() { - return getStubSettingsBuilder().updateHmacKeySettings(); - } - - /** - * Returns the builder for the settings used for calls to deleteNotificationConfig. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder - deleteNotificationConfigSettings() { - return getStubSettingsBuilder().deleteNotificationConfigSettings(); - } - - /** - * Returns the builder for the settings used for calls to getNotificationConfig. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder - getNotificationConfigSettings() { - return getStubSettingsBuilder().getNotificationConfigSettings(); - } - - /** - * Returns the builder for the settings used for calls to createNotificationConfig. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder - createNotificationConfigSettings() { - return getStubSettingsBuilder().createNotificationConfigSettings(); - } - - /** - * Returns the builder for the settings used for calls to listNotificationConfigs. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public PagedCallSettings.Builder< - ListNotificationConfigsRequest, - ListNotificationConfigsResponse, - ListNotificationConfigsPagedResponse> - listNotificationConfigsSettings() { - return getStubSettingsBuilder().listNotificationConfigsSettings(); - } - @Override public StorageSettings build() throws IOException { return new StorageSettings(this); diff --git a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/GrpcStorageStub.java b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/GrpcStorageStub.java index 397d152cc8..adab458a4e 100644 --- a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/GrpcStorageStub.java +++ b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/GrpcStorageStub.java @@ -17,8 +17,6 @@ package com.google.storage.v2.stub; import static com.google.storage.v2.StorageClient.ListBucketsPagedResponse; -import static com.google.storage.v2.StorageClient.ListHmacKeysPagedResponse; -import static com.google.storage.v2.StorageClient.ListNotificationConfigsPagedResponse; import static com.google.storage.v2.StorageClient.ListObjectsPagedResponse; import com.google.api.gax.core.BackgroundResource; @@ -46,29 +44,15 @@ import com.google.storage.v2.CancelResumableWriteResponse; import com.google.storage.v2.ComposeObjectRequest; import com.google.storage.v2.CreateBucketRequest; -import com.google.storage.v2.CreateHmacKeyRequest; -import com.google.storage.v2.CreateHmacKeyResponse; -import com.google.storage.v2.CreateNotificationConfigRequest; import com.google.storage.v2.DeleteBucketRequest; -import com.google.storage.v2.DeleteHmacKeyRequest; -import com.google.storage.v2.DeleteNotificationConfigRequest; import com.google.storage.v2.DeleteObjectRequest; import com.google.storage.v2.GetBucketRequest; -import com.google.storage.v2.GetHmacKeyRequest; -import com.google.storage.v2.GetNotificationConfigRequest; import com.google.storage.v2.GetObjectRequest; -import com.google.storage.v2.GetServiceAccountRequest; -import com.google.storage.v2.HmacKeyMetadata; import com.google.storage.v2.ListBucketsRequest; import com.google.storage.v2.ListBucketsResponse; -import com.google.storage.v2.ListHmacKeysRequest; -import com.google.storage.v2.ListHmacKeysResponse; -import com.google.storage.v2.ListNotificationConfigsRequest; -import com.google.storage.v2.ListNotificationConfigsResponse; import com.google.storage.v2.ListObjectsRequest; import com.google.storage.v2.ListObjectsResponse; import com.google.storage.v2.LockBucketRetentionPolicyRequest; -import com.google.storage.v2.NotificationConfig; import com.google.storage.v2.Object; import com.google.storage.v2.QueryWriteStatusRequest; import com.google.storage.v2.QueryWriteStatusResponse; @@ -77,11 +61,9 @@ import com.google.storage.v2.RestoreObjectRequest; import com.google.storage.v2.RewriteObjectRequest; import com.google.storage.v2.RewriteResponse; -import com.google.storage.v2.ServiceAccount; import com.google.storage.v2.StartResumableWriteRequest; import com.google.storage.v2.StartResumableWriteResponse; import com.google.storage.v2.UpdateBucketRequest; -import com.google.storage.v2.UpdateHmacKeyRequest; import com.google.storage.v2.UpdateObjectRequest; import com.google.storage.v2.WriteObjectRequest; import com.google.storage.v2.WriteObjectResponse; @@ -305,107 +287,6 @@ public class GrpcStorageStub extends StorageStub { ProtoUtils.marshaller(QueryWriteStatusResponse.getDefaultInstance())) .build(); - private static final MethodDescriptor - getServiceAccountMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.storage.v2.Storage/GetServiceAccount") - .setRequestMarshaller( - ProtoUtils.marshaller(GetServiceAccountRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(ServiceAccount.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createHmacKeyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.storage.v2.Storage/CreateHmacKey") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateHmacKeyRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(CreateHmacKeyResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor deleteHmacKeyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.storage.v2.Storage/DeleteHmacKey") - .setRequestMarshaller(ProtoUtils.marshaller(DeleteHmacKeyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getHmacKeyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.storage.v2.Storage/GetHmacKey") - .setRequestMarshaller(ProtoUtils.marshaller(GetHmacKeyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(HmacKeyMetadata.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listHmacKeysMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.storage.v2.Storage/ListHmacKeys") - .setRequestMarshaller(ProtoUtils.marshaller(ListHmacKeysRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListHmacKeysResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateHmacKeyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.storage.v2.Storage/UpdateHmacKey") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateHmacKeyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(HmacKeyMetadata.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteNotificationConfigMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.storage.v2.Storage/DeleteNotificationConfig") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteNotificationConfigRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getNotificationConfigMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.storage.v2.Storage/GetNotificationConfig") - .setRequestMarshaller( - ProtoUtils.marshaller(GetNotificationConfigRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(NotificationConfig.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createNotificationConfigMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.storage.v2.Storage/CreateNotificationConfig") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateNotificationConfigRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(NotificationConfig.getDefaultInstance())) - .build(); - - private static final MethodDescriptor< - ListNotificationConfigsRequest, ListNotificationConfigsResponse> - listNotificationConfigsMethodDescriptor = - MethodDescriptor - .newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.storage.v2.Storage/ListNotificationConfigs") - .setRequestMarshaller( - ProtoUtils.marshaller(ListNotificationConfigsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListNotificationConfigsResponse.getDefaultInstance())) - .build(); - private final UnaryCallable deleteBucketCallable; private final UnaryCallable getBucketCallable; private final UnaryCallable createBucketCallable; @@ -439,24 +320,6 @@ public class GrpcStorageStub extends StorageStub { startResumableWriteCallable; private final UnaryCallable queryWriteStatusCallable; - private final UnaryCallable getServiceAccountCallable; - private final UnaryCallable createHmacKeyCallable; - private final UnaryCallable deleteHmacKeyCallable; - private final UnaryCallable getHmacKeyCallable; - private final UnaryCallable listHmacKeysCallable; - private final UnaryCallable - listHmacKeysPagedCallable; - private final UnaryCallable updateHmacKeyCallable; - private final UnaryCallable - deleteNotificationConfigCallable; - private final UnaryCallable - getNotificationConfigCallable; - private final UnaryCallable - createNotificationConfigCallable; - private final UnaryCallable - listNotificationConfigsCallable; - private final UnaryCallable - listNotificationConfigsPagedCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -508,26 +371,6 @@ public class GrpcStorageStub extends StorageStub { PathTemplate.create("{bucket=**}"); private static final PathTemplate QUERY_WRITE_STATUS_0_PATH_TEMPLATE = PathTemplate.create("{bucket=projects/*/buckets/*}/**"); - private static final PathTemplate GET_SERVICE_ACCOUNT_0_PATH_TEMPLATE = - PathTemplate.create("{project=**}"); - private static final PathTemplate CREATE_HMAC_KEY_0_PATH_TEMPLATE = - PathTemplate.create("{project=**}"); - private static final PathTemplate DELETE_HMAC_KEY_0_PATH_TEMPLATE = - PathTemplate.create("{project=**}"); - private static final PathTemplate GET_HMAC_KEY_0_PATH_TEMPLATE = - PathTemplate.create("{project=**}"); - private static final PathTemplate LIST_HMAC_KEYS_0_PATH_TEMPLATE = - PathTemplate.create("{project=**}"); - private static final PathTemplate UPDATE_HMAC_KEY_0_PATH_TEMPLATE = - PathTemplate.create("{project=**}"); - private static final PathTemplate DELETE_NOTIFICATION_CONFIG_0_PATH_TEMPLATE = - PathTemplate.create("{bucket=projects/*/buckets/*}/**"); - private static final PathTemplate GET_NOTIFICATION_CONFIG_0_PATH_TEMPLATE = - PathTemplate.create("{bucket=projects/*/buckets/*}/**"); - private static final PathTemplate CREATE_NOTIFICATION_CONFIG_0_PATH_TEMPLATE = - PathTemplate.create("{bucket=**}"); - private static final PathTemplate LIST_NOTIFICATION_CONFIGS_0_PATH_TEMPLATE = - PathTemplate.create("{bucket=**}"); public static final GrpcStorageStub create(StorageStubSettings settings) throws IOException { return new GrpcStorageStub(settings, ClientContext.create(settings)); @@ -812,122 +655,6 @@ protected GrpcStorageStub( return builder.build(); }) .build(); - GrpcCallSettings getServiceAccountTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getServiceAccountMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add(request.getProject(), "project", GET_SERVICE_ACCOUNT_0_PATH_TEMPLATE); - return builder.build(); - }) - .build(); - GrpcCallSettings createHmacKeyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createHmacKeyMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add(request.getProject(), "project", CREATE_HMAC_KEY_0_PATH_TEMPLATE); - return builder.build(); - }) - .build(); - GrpcCallSettings deleteHmacKeyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteHmacKeyMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add(request.getProject(), "project", DELETE_HMAC_KEY_0_PATH_TEMPLATE); - return builder.build(); - }) - .build(); - GrpcCallSettings getHmacKeyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getHmacKeyMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add(request.getProject(), "project", GET_HMAC_KEY_0_PATH_TEMPLATE); - return builder.build(); - }) - .build(); - GrpcCallSettings listHmacKeysTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listHmacKeysMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add(request.getProject(), "project", LIST_HMAC_KEYS_0_PATH_TEMPLATE); - return builder.build(); - }) - .build(); - GrpcCallSettings updateHmacKeyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateHmacKeyMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - if (request.getHmacKey() != null) { - builder.add( - request.getHmacKey().getProject(), - "project", - UPDATE_HMAC_KEY_0_PATH_TEMPLATE); - } - return builder.build(); - }) - .build(); - GrpcCallSettings - deleteNotificationConfigTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteNotificationConfigMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add( - request.getName(), "bucket", DELETE_NOTIFICATION_CONFIG_0_PATH_TEMPLATE); - return builder.build(); - }) - .build(); - GrpcCallSettings - getNotificationConfigTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getNotificationConfigMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add( - request.getName(), "bucket", GET_NOTIFICATION_CONFIG_0_PATH_TEMPLATE); - return builder.build(); - }) - .build(); - GrpcCallSettings - createNotificationConfigTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createNotificationConfigMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add( - request.getParent(), - "bucket", - CREATE_NOTIFICATION_CONFIG_0_PATH_TEMPLATE); - return builder.build(); - }) - .build(); - GrpcCallSettings - listNotificationConfigsTransportSettings = - GrpcCallSettings - .newBuilder() - .setMethodDescriptor(listNotificationConfigsMethodDescriptor) - .setParamsExtractor( - request -> { - RequestParamsBuilder builder = RequestParamsBuilder.create(); - builder.add( - request.getParent(), "bucket", LIST_NOTIFICATION_CONFIGS_0_PATH_TEMPLATE); - return builder.build(); - }) - .build(); this.deleteBucketCallable = callableFactory.createUnaryCallable( @@ -1009,54 +736,6 @@ protected GrpcStorageStub( this.queryWriteStatusCallable = callableFactory.createUnaryCallable( queryWriteStatusTransportSettings, settings.queryWriteStatusSettings(), clientContext); - this.getServiceAccountCallable = - callableFactory.createUnaryCallable( - getServiceAccountTransportSettings, - settings.getServiceAccountSettings(), - clientContext); - this.createHmacKeyCallable = - callableFactory.createUnaryCallable( - createHmacKeyTransportSettings, settings.createHmacKeySettings(), clientContext); - this.deleteHmacKeyCallable = - callableFactory.createUnaryCallable( - deleteHmacKeyTransportSettings, settings.deleteHmacKeySettings(), clientContext); - this.getHmacKeyCallable = - callableFactory.createUnaryCallable( - getHmacKeyTransportSettings, settings.getHmacKeySettings(), clientContext); - this.listHmacKeysCallable = - callableFactory.createUnaryCallable( - listHmacKeysTransportSettings, settings.listHmacKeysSettings(), clientContext); - this.listHmacKeysPagedCallable = - callableFactory.createPagedCallable( - listHmacKeysTransportSettings, settings.listHmacKeysSettings(), clientContext); - this.updateHmacKeyCallable = - callableFactory.createUnaryCallable( - updateHmacKeyTransportSettings, settings.updateHmacKeySettings(), clientContext); - this.deleteNotificationConfigCallable = - callableFactory.createUnaryCallable( - deleteNotificationConfigTransportSettings, - settings.deleteNotificationConfigSettings(), - clientContext); - this.getNotificationConfigCallable = - callableFactory.createUnaryCallable( - getNotificationConfigTransportSettings, - settings.getNotificationConfigSettings(), - clientContext); - this.createNotificationConfigCallable = - callableFactory.createUnaryCallable( - createNotificationConfigTransportSettings, - settings.createNotificationConfigSettings(), - clientContext); - this.listNotificationConfigsCallable = - callableFactory.createUnaryCallable( - listNotificationConfigsTransportSettings, - settings.listNotificationConfigsSettings(), - clientContext); - this.listNotificationConfigsPagedCallable = - callableFactory.createPagedCallable( - listNotificationConfigsTransportSettings, - settings.listNotificationConfigsSettings(), - clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -1192,70 +871,6 @@ public UnaryCallable rewriteObjectCallabl return queryWriteStatusCallable; } - @Override - public UnaryCallable getServiceAccountCallable() { - return getServiceAccountCallable; - } - - @Override - public UnaryCallable createHmacKeyCallable() { - return createHmacKeyCallable; - } - - @Override - public UnaryCallable deleteHmacKeyCallable() { - return deleteHmacKeyCallable; - } - - @Override - public UnaryCallable getHmacKeyCallable() { - return getHmacKeyCallable; - } - - @Override - public UnaryCallable listHmacKeysCallable() { - return listHmacKeysCallable; - } - - @Override - public UnaryCallable listHmacKeysPagedCallable() { - return listHmacKeysPagedCallable; - } - - @Override - public UnaryCallable updateHmacKeyCallable() { - return updateHmacKeyCallable; - } - - @Override - public UnaryCallable deleteNotificationConfigCallable() { - return deleteNotificationConfigCallable; - } - - @Override - public UnaryCallable - getNotificationConfigCallable() { - return getNotificationConfigCallable; - } - - @Override - public UnaryCallable - createNotificationConfigCallable() { - return createNotificationConfigCallable; - } - - @Override - public UnaryCallable - listNotificationConfigsCallable() { - return listNotificationConfigsCallable; - } - - @Override - public UnaryCallable - listNotificationConfigsPagedCallable() { - return listNotificationConfigsPagedCallable; - } - @Override public final void close() { try { diff --git a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStub.java b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStub.java index d169d4b083..85c17399fa 100644 --- a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStub.java +++ b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStub.java @@ -17,8 +17,6 @@ package com.google.storage.v2.stub; import static com.google.storage.v2.StorageClient.ListBucketsPagedResponse; -import static com.google.storage.v2.StorageClient.ListHmacKeysPagedResponse; -import static com.google.storage.v2.StorageClient.ListNotificationConfigsPagedResponse; import static com.google.storage.v2.StorageClient.ListObjectsPagedResponse; import com.google.api.gax.core.BackgroundResource; @@ -39,29 +37,15 @@ import com.google.storage.v2.CancelResumableWriteResponse; import com.google.storage.v2.ComposeObjectRequest; import com.google.storage.v2.CreateBucketRequest; -import com.google.storage.v2.CreateHmacKeyRequest; -import com.google.storage.v2.CreateHmacKeyResponse; -import com.google.storage.v2.CreateNotificationConfigRequest; import com.google.storage.v2.DeleteBucketRequest; -import com.google.storage.v2.DeleteHmacKeyRequest; -import com.google.storage.v2.DeleteNotificationConfigRequest; import com.google.storage.v2.DeleteObjectRequest; import com.google.storage.v2.GetBucketRequest; -import com.google.storage.v2.GetHmacKeyRequest; -import com.google.storage.v2.GetNotificationConfigRequest; import com.google.storage.v2.GetObjectRequest; -import com.google.storage.v2.GetServiceAccountRequest; -import com.google.storage.v2.HmacKeyMetadata; import com.google.storage.v2.ListBucketsRequest; import com.google.storage.v2.ListBucketsResponse; -import com.google.storage.v2.ListHmacKeysRequest; -import com.google.storage.v2.ListHmacKeysResponse; -import com.google.storage.v2.ListNotificationConfigsRequest; -import com.google.storage.v2.ListNotificationConfigsResponse; import com.google.storage.v2.ListObjectsRequest; import com.google.storage.v2.ListObjectsResponse; import com.google.storage.v2.LockBucketRetentionPolicyRequest; -import com.google.storage.v2.NotificationConfig; import com.google.storage.v2.Object; import com.google.storage.v2.QueryWriteStatusRequest; import com.google.storage.v2.QueryWriteStatusResponse; @@ -70,11 +54,9 @@ import com.google.storage.v2.RestoreObjectRequest; import com.google.storage.v2.RewriteObjectRequest; import com.google.storage.v2.RewriteResponse; -import com.google.storage.v2.ServiceAccount; import com.google.storage.v2.StartResumableWriteRequest; import com.google.storage.v2.StartResumableWriteResponse; import com.google.storage.v2.UpdateBucketRequest; -import com.google.storage.v2.UpdateHmacKeyRequest; import com.google.storage.v2.UpdateObjectRequest; import com.google.storage.v2.WriteObjectRequest; import com.google.storage.v2.WriteObjectResponse; @@ -191,71 +173,6 @@ public UnaryCallable rewriteObjectCallabl throw new UnsupportedOperationException("Not implemented: queryWriteStatusCallable()"); } - @Deprecated - public UnaryCallable getServiceAccountCallable() { - throw new UnsupportedOperationException("Not implemented: getServiceAccountCallable()"); - } - - @Deprecated - public UnaryCallable createHmacKeyCallable() { - throw new UnsupportedOperationException("Not implemented: createHmacKeyCallable()"); - } - - @Deprecated - public UnaryCallable deleteHmacKeyCallable() { - throw new UnsupportedOperationException("Not implemented: deleteHmacKeyCallable()"); - } - - @Deprecated - public UnaryCallable getHmacKeyCallable() { - throw new UnsupportedOperationException("Not implemented: getHmacKeyCallable()"); - } - - @Deprecated - public UnaryCallable listHmacKeysPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listHmacKeysPagedCallable()"); - } - - @Deprecated - public UnaryCallable listHmacKeysCallable() { - throw new UnsupportedOperationException("Not implemented: listHmacKeysCallable()"); - } - - @Deprecated - public UnaryCallable updateHmacKeyCallable() { - throw new UnsupportedOperationException("Not implemented: updateHmacKeyCallable()"); - } - - @Deprecated - public UnaryCallable deleteNotificationConfigCallable() { - throw new UnsupportedOperationException("Not implemented: deleteNotificationConfigCallable()"); - } - - @Deprecated - public UnaryCallable - getNotificationConfigCallable() { - throw new UnsupportedOperationException("Not implemented: getNotificationConfigCallable()"); - } - - @Deprecated - public UnaryCallable - createNotificationConfigCallable() { - throw new UnsupportedOperationException("Not implemented: createNotificationConfigCallable()"); - } - - @Deprecated - public UnaryCallable - listNotificationConfigsPagedCallable() { - throw new UnsupportedOperationException( - "Not implemented: listNotificationConfigsPagedCallable()"); - } - - @Deprecated - public UnaryCallable - listNotificationConfigsCallable() { - throw new UnsupportedOperationException("Not implemented: listNotificationConfigsCallable()"); - } - @Override public abstract void close(); } diff --git a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStubSettings.java b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStubSettings.java index f3109d93fc..ebe3630245 100644 --- a/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStubSettings.java +++ b/gapic-google-cloud-storage-v2/src/main/java/com/google/storage/v2/stub/StorageStubSettings.java @@ -17,8 +17,6 @@ package com.google.storage.v2.stub; import static com.google.storage.v2.StorageClient.ListBucketsPagedResponse; -import static com.google.storage.v2.StorageClient.ListHmacKeysPagedResponse; -import static com.google.storage.v2.StorageClient.ListNotificationConfigsPagedResponse; import static com.google.storage.v2.StorageClient.ListObjectsPagedResponse; import com.google.api.core.ApiFunction; @@ -62,29 +60,15 @@ import com.google.storage.v2.CancelResumableWriteResponse; import com.google.storage.v2.ComposeObjectRequest; import com.google.storage.v2.CreateBucketRequest; -import com.google.storage.v2.CreateHmacKeyRequest; -import com.google.storage.v2.CreateHmacKeyResponse; -import com.google.storage.v2.CreateNotificationConfigRequest; import com.google.storage.v2.DeleteBucketRequest; -import com.google.storage.v2.DeleteHmacKeyRequest; -import com.google.storage.v2.DeleteNotificationConfigRequest; import com.google.storage.v2.DeleteObjectRequest; import com.google.storage.v2.GetBucketRequest; -import com.google.storage.v2.GetHmacKeyRequest; -import com.google.storage.v2.GetNotificationConfigRequest; import com.google.storage.v2.GetObjectRequest; -import com.google.storage.v2.GetServiceAccountRequest; -import com.google.storage.v2.HmacKeyMetadata; import com.google.storage.v2.ListBucketsRequest; import com.google.storage.v2.ListBucketsResponse; -import com.google.storage.v2.ListHmacKeysRequest; -import com.google.storage.v2.ListHmacKeysResponse; -import com.google.storage.v2.ListNotificationConfigsRequest; -import com.google.storage.v2.ListNotificationConfigsResponse; import com.google.storage.v2.ListObjectsRequest; import com.google.storage.v2.ListObjectsResponse; import com.google.storage.v2.LockBucketRetentionPolicyRequest; -import com.google.storage.v2.NotificationConfig; import com.google.storage.v2.Object; import com.google.storage.v2.QueryWriteStatusRequest; import com.google.storage.v2.QueryWriteStatusResponse; @@ -93,11 +77,9 @@ import com.google.storage.v2.RestoreObjectRequest; import com.google.storage.v2.RewriteObjectRequest; import com.google.storage.v2.RewriteResponse; -import com.google.storage.v2.ServiceAccount; import com.google.storage.v2.StartResumableWriteRequest; import com.google.storage.v2.StartResumableWriteResponse; import com.google.storage.v2.UpdateBucketRequest; -import com.google.storage.v2.UpdateHmacKeyRequest; import com.google.storage.v2.UpdateObjectRequest; import com.google.storage.v2.WriteObjectRequest; import com.google.storage.v2.WriteObjectResponse; @@ -198,27 +180,6 @@ public class StorageStubSettings extends StubSettings { startResumableWriteSettings; private final UnaryCallSettings queryWriteStatusSettings; - private final UnaryCallSettings - getServiceAccountSettings; - private final UnaryCallSettings - createHmacKeySettings; - private final UnaryCallSettings deleteHmacKeySettings; - private final UnaryCallSettings getHmacKeySettings; - private final PagedCallSettings< - ListHmacKeysRequest, ListHmacKeysResponse, ListHmacKeysPagedResponse> - listHmacKeysSettings; - private final UnaryCallSettings updateHmacKeySettings; - private final UnaryCallSettings - deleteNotificationConfigSettings; - private final UnaryCallSettings - getNotificationConfigSettings; - private final UnaryCallSettings - createNotificationConfigSettings; - private final PagedCallSettings< - ListNotificationConfigsRequest, - ListNotificationConfigsResponse, - ListNotificationConfigsPagedResponse> - listNotificationConfigsSettings; private static final PagedListDescriptor LIST_BUCKETS_PAGE_STR_DESC = @@ -288,84 +249,6 @@ public Iterable extractResources(ListObjectsResponse payload) { } }; - private static final PagedListDescriptor< - ListHmacKeysRequest, ListHmacKeysResponse, HmacKeyMetadata> - LIST_HMAC_KEYS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListHmacKeysRequest injectToken(ListHmacKeysRequest payload, String token) { - return ListHmacKeysRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListHmacKeysRequest injectPageSize(ListHmacKeysRequest payload, int pageSize) { - return ListHmacKeysRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListHmacKeysRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListHmacKeysResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListHmacKeysResponse payload) { - return payload.getHmacKeysList(); - } - }; - - private static final PagedListDescriptor< - ListNotificationConfigsRequest, ListNotificationConfigsResponse, NotificationConfig> - LIST_NOTIFICATION_CONFIGS_PAGE_STR_DESC = - new PagedListDescriptor< - ListNotificationConfigsRequest, - ListNotificationConfigsResponse, - NotificationConfig>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListNotificationConfigsRequest injectToken( - ListNotificationConfigsRequest payload, String token) { - return ListNotificationConfigsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListNotificationConfigsRequest injectPageSize( - ListNotificationConfigsRequest payload, int pageSize) { - return ListNotificationConfigsRequest.newBuilder(payload) - .setPageSize(pageSize) - .build(); - } - - @Override - public Integer extractPageSize(ListNotificationConfigsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListNotificationConfigsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources( - ListNotificationConfigsResponse payload) { - return payload.getNotificationConfigsList(); - } - }; - private static final PagedListResponseFactory< ListBucketsRequest, ListBucketsResponse, ListBucketsPagedResponse> LIST_BUCKETS_PAGE_STR_FACT = @@ -400,50 +283,6 @@ public ApiFuture getFuturePagedResponse( } }; - private static final PagedListResponseFactory< - ListHmacKeysRequest, ListHmacKeysResponse, ListHmacKeysPagedResponse> - LIST_HMAC_KEYS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListHmacKeysRequest, ListHmacKeysResponse, ListHmacKeysPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListHmacKeysRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_HMAC_KEYS_PAGE_STR_DESC, request, context); - return ListHmacKeysPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - private static final PagedListResponseFactory< - ListNotificationConfigsRequest, - ListNotificationConfigsResponse, - ListNotificationConfigsPagedResponse> - LIST_NOTIFICATION_CONFIGS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListNotificationConfigsRequest, - ListNotificationConfigsResponse, - ListNotificationConfigsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable - callable, - ListNotificationConfigsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext< - ListNotificationConfigsRequest, - ListNotificationConfigsResponse, - NotificationConfig> - pageContext = - PageContext.create( - callable, LIST_NOTIFICATION_CONFIGS_PAGE_STR_DESC, request, context); - return ListNotificationConfigsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - /** Returns the object with the settings used for calls to deleteBucket. */ public UnaryCallSettings deleteBucketSettings() { return deleteBucketSettings; @@ -562,114 +401,6 @@ public UnaryCallSettings rewriteObjectSet return queryWriteStatusSettings; } - /** - * Returns the object with the settings used for calls to getServiceAccount. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings getServiceAccountSettings() { - return getServiceAccountSettings; - } - - /** - * Returns the object with the settings used for calls to createHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings createHmacKeySettings() { - return createHmacKeySettings; - } - - /** - * Returns the object with the settings used for calls to deleteHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings deleteHmacKeySettings() { - return deleteHmacKeySettings; - } - - /** - * Returns the object with the settings used for calls to getHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings getHmacKeySettings() { - return getHmacKeySettings; - } - - /** - * Returns the object with the settings used for calls to listHmacKeys. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public PagedCallSettings - listHmacKeysSettings() { - return listHmacKeysSettings; - } - - /** - * Returns the object with the settings used for calls to updateHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings updateHmacKeySettings() { - return updateHmacKeySettings; - } - - /** - * Returns the object with the settings used for calls to deleteNotificationConfig. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings - deleteNotificationConfigSettings() { - return deleteNotificationConfigSettings; - } - - /** - * Returns the object with the settings used for calls to getNotificationConfig. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings - getNotificationConfigSettings() { - return getNotificationConfigSettings; - } - - /** - * Returns the object with the settings used for calls to createNotificationConfig. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings - createNotificationConfigSettings() { - return createNotificationConfigSettings; - } - - /** - * Returns the object with the settings used for calls to listNotificationConfigs. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public PagedCallSettings< - ListNotificationConfigsRequest, - ListNotificationConfigsResponse, - ListNotificationConfigsPagedResponse> - listNotificationConfigsSettings() { - return listNotificationConfigsSettings; - } - public StorageStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -772,16 +503,6 @@ protected StorageStubSettings(Builder settingsBuilder) throws IOException { rewriteObjectSettings = settingsBuilder.rewriteObjectSettings().build(); startResumableWriteSettings = settingsBuilder.startResumableWriteSettings().build(); queryWriteStatusSettings = settingsBuilder.queryWriteStatusSettings().build(); - getServiceAccountSettings = settingsBuilder.getServiceAccountSettings().build(); - createHmacKeySettings = settingsBuilder.createHmacKeySettings().build(); - deleteHmacKeySettings = settingsBuilder.deleteHmacKeySettings().build(); - getHmacKeySettings = settingsBuilder.getHmacKeySettings().build(); - listHmacKeysSettings = settingsBuilder.listHmacKeysSettings().build(); - updateHmacKeySettings = settingsBuilder.updateHmacKeySettings().build(); - deleteNotificationConfigSettings = settingsBuilder.deleteNotificationConfigSettings().build(); - getNotificationConfigSettings = settingsBuilder.getNotificationConfigSettings().build(); - createNotificationConfigSettings = settingsBuilder.createNotificationConfigSettings().build(); - listNotificationConfigsSettings = settingsBuilder.listNotificationConfigsSettings().build(); } /** Builder for StorageStubSettings. */ @@ -823,28 +544,6 @@ public static class Builder extends StubSettings.Builder queryWriteStatusSettings; - private final UnaryCallSettings.Builder - getServiceAccountSettings; - private final UnaryCallSettings.Builder - createHmacKeySettings; - private final UnaryCallSettings.Builder deleteHmacKeySettings; - private final UnaryCallSettings.Builder getHmacKeySettings; - private final PagedCallSettings.Builder< - ListHmacKeysRequest, ListHmacKeysResponse, ListHmacKeysPagedResponse> - listHmacKeysSettings; - private final UnaryCallSettings.Builder - updateHmacKeySettings; - private final UnaryCallSettings.Builder - deleteNotificationConfigSettings; - private final UnaryCallSettings.Builder - getNotificationConfigSettings; - private final UnaryCallSettings.Builder - createNotificationConfigSettings; - private final PagedCallSettings.Builder< - ListNotificationConfigsRequest, - ListNotificationConfigsResponse, - ListNotificationConfigsPagedResponse> - listNotificationConfigsSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -907,17 +606,6 @@ protected Builder(ClientContext clientContext) { rewriteObjectSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); startResumableWriteSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); queryWriteStatusSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getServiceAccountSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createHmacKeySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteHmacKeySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getHmacKeySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listHmacKeysSettings = PagedCallSettings.newBuilder(LIST_HMAC_KEYS_PAGE_STR_FACT); - updateHmacKeySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - deleteNotificationConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getNotificationConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createNotificationConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listNotificationConfigsSettings = - PagedCallSettings.newBuilder(LIST_NOTIFICATION_CONFIGS_PAGE_STR_FACT); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -939,17 +627,7 @@ protected Builder(ClientContext clientContext) { listObjectsSettings, rewriteObjectSettings, startResumableWriteSettings, - queryWriteStatusSettings, - getServiceAccountSettings, - createHmacKeySettings, - deleteHmacKeySettings, - getHmacKeySettings, - listHmacKeysSettings, - updateHmacKeySettings, - deleteNotificationConfigSettings, - getNotificationConfigSettings, - createNotificationConfigSettings, - listNotificationConfigsSettings); + queryWriteStatusSettings); initDefaults(this); } @@ -978,16 +656,6 @@ protected Builder(StorageStubSettings settings) { rewriteObjectSettings = settings.rewriteObjectSettings.toBuilder(); startResumableWriteSettings = settings.startResumableWriteSettings.toBuilder(); queryWriteStatusSettings = settings.queryWriteStatusSettings.toBuilder(); - getServiceAccountSettings = settings.getServiceAccountSettings.toBuilder(); - createHmacKeySettings = settings.createHmacKeySettings.toBuilder(); - deleteHmacKeySettings = settings.deleteHmacKeySettings.toBuilder(); - getHmacKeySettings = settings.getHmacKeySettings.toBuilder(); - listHmacKeysSettings = settings.listHmacKeysSettings.toBuilder(); - updateHmacKeySettings = settings.updateHmacKeySettings.toBuilder(); - deleteNotificationConfigSettings = settings.deleteNotificationConfigSettings.toBuilder(); - getNotificationConfigSettings = settings.getNotificationConfigSettings.toBuilder(); - createNotificationConfigSettings = settings.createNotificationConfigSettings.toBuilder(); - listNotificationConfigsSettings = settings.listNotificationConfigsSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -1009,17 +677,7 @@ protected Builder(StorageStubSettings settings) { listObjectsSettings, rewriteObjectSettings, startResumableWriteSettings, - queryWriteStatusSettings, - getServiceAccountSettings, - createHmacKeySettings, - deleteHmacKeySettings, - getHmacKeySettings, - listHmacKeysSettings, - updateHmacKeySettings, - deleteNotificationConfigSettings, - getNotificationConfigSettings, - createNotificationConfigSettings, - listNotificationConfigsSettings); + queryWriteStatusSettings); } private static Builder createDefault() { @@ -1135,56 +793,6 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - builder - .getServiceAccountSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createHmacKeySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .deleteHmacKeySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getHmacKeySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .listHmacKeysSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .updateHmacKeySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .deleteNotificationConfigSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .getNotificationConfigSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createNotificationConfigSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .listNotificationConfigsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - return builder; } @@ -1326,118 +934,6 @@ public UnaryCallSettings.Builder updateObjectSettin return queryWriteStatusSettings; } - /** - * Returns the builder for the settings used for calls to getServiceAccount. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder - getServiceAccountSettings() { - return getServiceAccountSettings; - } - - /** - * Returns the builder for the settings used for calls to createHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder - createHmacKeySettings() { - return createHmacKeySettings; - } - - /** - * Returns the builder for the settings used for calls to deleteHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder deleteHmacKeySettings() { - return deleteHmacKeySettings; - } - - /** - * Returns the builder for the settings used for calls to getHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder getHmacKeySettings() { - return getHmacKeySettings; - } - - /** - * Returns the builder for the settings used for calls to listHmacKeys. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public PagedCallSettings.Builder< - ListHmacKeysRequest, ListHmacKeysResponse, ListHmacKeysPagedResponse> - listHmacKeysSettings() { - return listHmacKeysSettings; - } - - /** - * Returns the builder for the settings used for calls to updateHmacKey. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder - updateHmacKeySettings() { - return updateHmacKeySettings; - } - - /** - * Returns the builder for the settings used for calls to deleteNotificationConfig. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder - deleteNotificationConfigSettings() { - return deleteNotificationConfigSettings; - } - - /** - * Returns the builder for the settings used for calls to getNotificationConfig. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder - getNotificationConfigSettings() { - return getNotificationConfigSettings; - } - - /** - * Returns the builder for the settings used for calls to createNotificationConfig. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public UnaryCallSettings.Builder - createNotificationConfigSettings() { - return createNotificationConfigSettings; - } - - /** - * Returns the builder for the settings used for calls to listNotificationConfigs. - * - * @deprecated This method is deprecated and will be removed in the next major version update. - */ - @Deprecated - public PagedCallSettings.Builder< - ListNotificationConfigsRequest, - ListNotificationConfigsResponse, - ListNotificationConfigsPagedResponse> - listNotificationConfigsSettings() { - return listNotificationConfigsSettings; - } - @Override public StorageStubSettings build() throws IOException { return new StorageStubSettings(this); diff --git a/gapic-google-cloud-storage-v2/src/main/resources/META-INF/native-image/com.google.storage.v2/reflect-config.json b/gapic-google-cloud-storage-v2/src/main/resources/META-INF/native-image/com.google.storage.v2/reflect-config.json index f7e94466f6..f63c1baef2 100644 --- a/gapic-google-cloud-storage-v2/src/main/resources/META-INF/native-image/com.google.storage.v2/reflect-config.json +++ b/gapic-google-cloud-storage-v2/src/main/resources/META-INF/native-image/com.google.storage.v2/reflect-config.json @@ -2015,60 +2015,6 @@ "allDeclaredClasses": true, "allPublicClasses": true }, - { - "name": "com.google.storage.v2.CreateHmacKeyRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.CreateHmacKeyRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.CreateHmacKeyResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.CreateHmacKeyResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.CreateNotificationConfigRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.CreateNotificationConfigRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, { "name": "com.google.storage.v2.CustomerEncryption", "queryAllDeclaredConstructors": true, @@ -2105,42 +2051,6 @@ "allDeclaredClasses": true, "allPublicClasses": true }, - { - "name": "com.google.storage.v2.DeleteHmacKeyRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.DeleteHmacKeyRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.DeleteNotificationConfigRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.DeleteNotificationConfigRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, { "name": "com.google.storage.v2.DeleteObjectRequest", "queryAllDeclaredConstructors": true, @@ -2177,42 +2087,6 @@ "allDeclaredClasses": true, "allPublicClasses": true }, - { - "name": "com.google.storage.v2.GetHmacKeyRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.GetHmacKeyRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.GetNotificationConfigRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.GetNotificationConfigRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, { "name": "com.google.storage.v2.GetObjectRequest", "queryAllDeclaredConstructors": true, @@ -2231,42 +2105,6 @@ "allDeclaredClasses": true, "allPublicClasses": true }, - { - "name": "com.google.storage.v2.GetServiceAccountRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.GetServiceAccountRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.HmacKeyMetadata", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.HmacKeyMetadata$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, { "name": "com.google.storage.v2.ListBucketsRequest", "queryAllDeclaredConstructors": true, @@ -2303,78 +2141,6 @@ "allDeclaredClasses": true, "allPublicClasses": true }, - { - "name": "com.google.storage.v2.ListHmacKeysRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.ListHmacKeysRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.ListHmacKeysResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.ListHmacKeysResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.ListNotificationConfigsRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.ListNotificationConfigsRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.ListNotificationConfigsResponse", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.ListNotificationConfigsResponse$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, { "name": "com.google.storage.v2.ListObjectsRequest", "queryAllDeclaredConstructors": true, @@ -2429,24 +2195,6 @@ "allDeclaredClasses": true, "allPublicClasses": true }, - { - "name": "com.google.storage.v2.NotificationConfig", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.NotificationConfig$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, { "name": "com.google.storage.v2.Object", "queryAllDeclaredConstructors": true, @@ -2663,24 +2411,6 @@ "allDeclaredClasses": true, "allPublicClasses": true }, - { - "name": "com.google.storage.v2.ServiceAccount", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.ServiceAccount$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, { "name": "com.google.storage.v2.ServiceConstants", "queryAllDeclaredConstructors": true, @@ -2762,24 +2492,6 @@ "allDeclaredClasses": true, "allPublicClasses": true }, - { - "name": "com.google.storage.v2.UpdateHmacKeyRequest", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, - { - "name": "com.google.storage.v2.UpdateHmacKeyRequest$Builder", - "queryAllDeclaredConstructors": true, - "queryAllPublicConstructors": true, - "queryAllDeclaredMethods": true, - "allPublicMethods": true, - "allDeclaredClasses": true, - "allPublicClasses": true - }, { "name": "com.google.storage.v2.UpdateObjectRequest", "queryAllDeclaredConstructors": true, diff --git a/gapic-google-cloud-storage-v2/src/main/resources/com/google/storage/v2/gapic_metadata.json b/gapic-google-cloud-storage-v2/src/main/resources/com/google/storage/v2/gapic_metadata.json index f3a73a24b2..3d06494946 100644 --- a/gapic-google-cloud-storage-v2/src/main/resources/com/google/storage/v2/gapic_metadata.json +++ b/gapic-google-cloud-storage-v2/src/main/resources/com/google/storage/v2/gapic_metadata.json @@ -22,51 +22,24 @@ "CreateBucket": { "methods": ["createBucket", "createBucket", "createBucket", "createBucketCallable"] }, - "CreateHmacKey": { - "methods": ["createHmacKey", "createHmacKey", "createHmacKey", "createHmacKeyCallable"] - }, - "CreateNotificationConfig": { - "methods": ["createNotificationConfig", "createNotificationConfig", "createNotificationConfig", "createNotificationConfigCallable"] - }, "DeleteBucket": { "methods": ["deleteBucket", "deleteBucket", "deleteBucket", "deleteBucketCallable"] }, - "DeleteHmacKey": { - "methods": ["deleteHmacKey", "deleteHmacKey", "deleteHmacKey", "deleteHmacKeyCallable"] - }, - "DeleteNotificationConfig": { - "methods": ["deleteNotificationConfig", "deleteNotificationConfig", "deleteNotificationConfig", "deleteNotificationConfigCallable"] - }, "DeleteObject": { "methods": ["deleteObject", "deleteObject", "deleteObject", "deleteObject", "deleteObject", "deleteObjectCallable"] }, "GetBucket": { "methods": ["getBucket", "getBucket", "getBucket", "getBucketCallable"] }, - "GetHmacKey": { - "methods": ["getHmacKey", "getHmacKey", "getHmacKey", "getHmacKeyCallable"] - }, "GetIamPolicy": { "methods": ["getIamPolicy", "getIamPolicy", "getIamPolicy", "getIamPolicyCallable"] }, - "GetNotificationConfig": { - "methods": ["getNotificationConfig", "getNotificationConfig", "getNotificationConfig", "getNotificationConfigCallable"] - }, "GetObject": { "methods": ["getObject", "getObject", "getObject", "getObject", "getObject", "getObjectCallable"] }, - "GetServiceAccount": { - "methods": ["getServiceAccount", "getServiceAccount", "getServiceAccount", "getServiceAccountCallable"] - }, "ListBuckets": { "methods": ["listBuckets", "listBuckets", "listBuckets", "listBucketsPagedCallable", "listBucketsCallable"] }, - "ListHmacKeys": { - "methods": ["listHmacKeys", "listHmacKeys", "listHmacKeys", "listHmacKeysPagedCallable", "listHmacKeysCallable"] - }, - "ListNotificationConfigs": { - "methods": ["listNotificationConfigs", "listNotificationConfigs", "listNotificationConfigs", "listNotificationConfigsPagedCallable", "listNotificationConfigsCallable"] - }, "ListObjects": { "methods": ["listObjects", "listObjects", "listObjects", "listObjectsPagedCallable", "listObjectsCallable"] }, @@ -97,9 +70,6 @@ "UpdateBucket": { "methods": ["updateBucket", "updateBucket", "updateBucketCallable"] }, - "UpdateHmacKey": { - "methods": ["updateHmacKey", "updateHmacKey", "updateHmacKeyCallable"] - }, "UpdateObject": { "methods": ["updateObject", "updateObject", "updateObjectCallable"] }, diff --git a/gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/MockStorageImpl.java b/gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/MockStorageImpl.java index 8612f38cbb..e016a3007c 100644 --- a/gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/MockStorageImpl.java +++ b/gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/MockStorageImpl.java @@ -549,215 +549,4 @@ public void queryWriteStatus( Exception.class.getName()))); } } - - @Override - public void getServiceAccount( - GetServiceAccountRequest request, StreamObserver responseObserver) { - java.lang.Object response = responses.poll(); - if (response instanceof ServiceAccount) { - requests.add(request); - responseObserver.onNext(((ServiceAccount) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetServiceAccount, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ServiceAccount.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createHmacKey( - CreateHmacKeyRequest request, StreamObserver responseObserver) { - java.lang.Object response = responses.poll(); - if (response instanceof CreateHmacKeyResponse) { - requests.add(request); - responseObserver.onNext(((CreateHmacKeyResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateHmacKey, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - CreateHmacKeyResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteHmacKey(DeleteHmacKeyRequest request, StreamObserver responseObserver) { - java.lang.Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteHmacKey, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getHmacKey( - GetHmacKeyRequest request, StreamObserver responseObserver) { - java.lang.Object response = responses.poll(); - if (response instanceof HmacKeyMetadata) { - requests.add(request); - responseObserver.onNext(((HmacKeyMetadata) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetHmacKey, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - HmacKeyMetadata.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listHmacKeys( - ListHmacKeysRequest request, StreamObserver responseObserver) { - java.lang.Object response = responses.poll(); - if (response instanceof ListHmacKeysResponse) { - requests.add(request); - responseObserver.onNext(((ListHmacKeysResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListHmacKeys, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListHmacKeysResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateHmacKey( - UpdateHmacKeyRequest request, StreamObserver responseObserver) { - java.lang.Object response = responses.poll(); - if (response instanceof HmacKeyMetadata) { - requests.add(request); - responseObserver.onNext(((HmacKeyMetadata) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method UpdateHmacKey, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - HmacKeyMetadata.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteNotificationConfig( - DeleteNotificationConfigRequest request, StreamObserver responseObserver) { - java.lang.Object response = responses.poll(); - if (response instanceof Empty) { - requests.add(request); - responseObserver.onNext(((Empty) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method DeleteNotificationConfig, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getNotificationConfig( - GetNotificationConfigRequest request, StreamObserver responseObserver) { - java.lang.Object response = responses.poll(); - if (response instanceof NotificationConfig) { - requests.add(request); - responseObserver.onNext(((NotificationConfig) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method GetNotificationConfig, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - NotificationConfig.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createNotificationConfig( - CreateNotificationConfigRequest request, - StreamObserver responseObserver) { - java.lang.Object response = responses.poll(); - if (response instanceof NotificationConfig) { - requests.add(request); - responseObserver.onNext(((NotificationConfig) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method CreateNotificationConfig, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - NotificationConfig.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listNotificationConfigs( - ListNotificationConfigsRequest request, - StreamObserver responseObserver) { - java.lang.Object response = responses.poll(); - if (response instanceof ListNotificationConfigsResponse) { - requests.add(request); - responseObserver.onNext(((ListNotificationConfigsResponse) response)); - responseObserver.onCompleted(); - } else if (response instanceof Exception) { - responseObserver.onError(((Exception) response)); - } else { - responseObserver.onError( - new IllegalArgumentException( - String.format( - "Unrecognized response type %s for method ListNotificationConfigs, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListNotificationConfigsResponse.class.getName(), - Exception.class.getName()))); - } - } } diff --git a/gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/StorageClientTest.java b/gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/StorageClientTest.java index 632f508292..ab4fc0b153 100644 --- a/gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/StorageClientTest.java +++ b/gapic-google-cloud-storage-v2/src/test/java/com/google/storage/v2/StorageClientTest.java @@ -17,8 +17,6 @@ package com.google.storage.v2; import static com.google.storage.v2.StorageClient.ListBucketsPagedResponse; -import static com.google.storage.v2.StorageClient.ListHmacKeysPagedResponse; -import static com.google.storage.v2.StorageClient.ListNotificationConfigsPagedResponse; import static com.google.storage.v2.StorageClient.ListObjectsPagedResponse; import com.google.api.gax.core.NoCredentialsProvider; @@ -2303,824 +2301,4 @@ public void queryWriteStatusExceptionTest() throws Exception { // Expected exception. } } - - @Test - public void getServiceAccountTest() throws Exception { - ServiceAccount expectedResponse = - ServiceAccount.newBuilder().setEmailAddress("emailAddress-1070931784").build(); - mockStorage.addResponse(expectedResponse); - - ProjectName project = ProjectName.of("[PROJECT]"); - - ServiceAccount actualResponse = client.getServiceAccount(project); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetServiceAccountRequest actualRequest = ((GetServiceAccountRequest) actualRequests.get(0)); - - Assert.assertEquals(project.toString(), actualRequest.getProject()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getServiceAccountExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - ProjectName project = ProjectName.of("[PROJECT]"); - client.getServiceAccount(project); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getServiceAccountTest2() throws Exception { - ServiceAccount expectedResponse = - ServiceAccount.newBuilder().setEmailAddress("emailAddress-1070931784").build(); - mockStorage.addResponse(expectedResponse); - - String project = "project-309310695"; - - ServiceAccount actualResponse = client.getServiceAccount(project); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetServiceAccountRequest actualRequest = ((GetServiceAccountRequest) actualRequests.get(0)); - - Assert.assertEquals(project, actualRequest.getProject()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getServiceAccountExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - String project = "project-309310695"; - client.getServiceAccount(project); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createHmacKeyTest() throws Exception { - CreateHmacKeyResponse expectedResponse = - CreateHmacKeyResponse.newBuilder() - .setMetadata(HmacKeyMetadata.newBuilder().build()) - .setSecretKeyBytes(ByteString.EMPTY) - .build(); - mockStorage.addResponse(expectedResponse); - - ProjectName project = ProjectName.of("[PROJECT]"); - String serviceAccountEmail = "serviceAccountEmail1825953988"; - - CreateHmacKeyResponse actualResponse = client.createHmacKey(project, serviceAccountEmail); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateHmacKeyRequest actualRequest = ((CreateHmacKeyRequest) actualRequests.get(0)); - - Assert.assertEquals(project.toString(), actualRequest.getProject()); - Assert.assertEquals(serviceAccountEmail, actualRequest.getServiceAccountEmail()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createHmacKeyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - ProjectName project = ProjectName.of("[PROJECT]"); - String serviceAccountEmail = "serviceAccountEmail1825953988"; - client.createHmacKey(project, serviceAccountEmail); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createHmacKeyTest2() throws Exception { - CreateHmacKeyResponse expectedResponse = - CreateHmacKeyResponse.newBuilder() - .setMetadata(HmacKeyMetadata.newBuilder().build()) - .setSecretKeyBytes(ByteString.EMPTY) - .build(); - mockStorage.addResponse(expectedResponse); - - String project = "project-309310695"; - String serviceAccountEmail = "serviceAccountEmail1825953988"; - - CreateHmacKeyResponse actualResponse = client.createHmacKey(project, serviceAccountEmail); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateHmacKeyRequest actualRequest = ((CreateHmacKeyRequest) actualRequests.get(0)); - - Assert.assertEquals(project, actualRequest.getProject()); - Assert.assertEquals(serviceAccountEmail, actualRequest.getServiceAccountEmail()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createHmacKeyExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - String project = "project-309310695"; - String serviceAccountEmail = "serviceAccountEmail1825953988"; - client.createHmacKey(project, serviceAccountEmail); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteHmacKeyTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockStorage.addResponse(expectedResponse); - - String accessId = "accessId-2146437729"; - ProjectName project = ProjectName.of("[PROJECT]"); - - client.deleteHmacKey(accessId, project); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteHmacKeyRequest actualRequest = ((DeleteHmacKeyRequest) actualRequests.get(0)); - - Assert.assertEquals(accessId, actualRequest.getAccessId()); - Assert.assertEquals(project.toString(), actualRequest.getProject()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteHmacKeyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - String accessId = "accessId-2146437729"; - ProjectName project = ProjectName.of("[PROJECT]"); - client.deleteHmacKey(accessId, project); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteHmacKeyTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockStorage.addResponse(expectedResponse); - - String accessId = "accessId-2146437729"; - String project = "project-309310695"; - - client.deleteHmacKey(accessId, project); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteHmacKeyRequest actualRequest = ((DeleteHmacKeyRequest) actualRequests.get(0)); - - Assert.assertEquals(accessId, actualRequest.getAccessId()); - Assert.assertEquals(project, actualRequest.getProject()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteHmacKeyExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - String accessId = "accessId-2146437729"; - String project = "project-309310695"; - client.deleteHmacKey(accessId, project); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getHmacKeyTest() throws Exception { - HmacKeyMetadata expectedResponse = - HmacKeyMetadata.newBuilder() - .setId("id3355") - .setAccessId("accessId-2146437729") - .setProject(ProjectName.of("[PROJECT]").toString()) - .setServiceAccountEmail("serviceAccountEmail1825953988") - .setState("state109757585") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEtag("etag3123477") - .build(); - mockStorage.addResponse(expectedResponse); - - String accessId = "accessId-2146437729"; - ProjectName project = ProjectName.of("[PROJECT]"); - - HmacKeyMetadata actualResponse = client.getHmacKey(accessId, project); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetHmacKeyRequest actualRequest = ((GetHmacKeyRequest) actualRequests.get(0)); - - Assert.assertEquals(accessId, actualRequest.getAccessId()); - Assert.assertEquals(project.toString(), actualRequest.getProject()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getHmacKeyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - String accessId = "accessId-2146437729"; - ProjectName project = ProjectName.of("[PROJECT]"); - client.getHmacKey(accessId, project); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getHmacKeyTest2() throws Exception { - HmacKeyMetadata expectedResponse = - HmacKeyMetadata.newBuilder() - .setId("id3355") - .setAccessId("accessId-2146437729") - .setProject(ProjectName.of("[PROJECT]").toString()) - .setServiceAccountEmail("serviceAccountEmail1825953988") - .setState("state109757585") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEtag("etag3123477") - .build(); - mockStorage.addResponse(expectedResponse); - - String accessId = "accessId-2146437729"; - String project = "project-309310695"; - - HmacKeyMetadata actualResponse = client.getHmacKey(accessId, project); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetHmacKeyRequest actualRequest = ((GetHmacKeyRequest) actualRequests.get(0)); - - Assert.assertEquals(accessId, actualRequest.getAccessId()); - Assert.assertEquals(project, actualRequest.getProject()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getHmacKeyExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - String accessId = "accessId-2146437729"; - String project = "project-309310695"; - client.getHmacKey(accessId, project); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listHmacKeysTest() throws Exception { - HmacKeyMetadata responsesElement = HmacKeyMetadata.newBuilder().build(); - ListHmacKeysResponse expectedResponse = - ListHmacKeysResponse.newBuilder() - .setNextPageToken("") - .addAllHmacKeys(Arrays.asList(responsesElement)) - .build(); - mockStorage.addResponse(expectedResponse); - - ProjectName project = ProjectName.of("[PROJECT]"); - - ListHmacKeysPagedResponse pagedListResponse = client.listHmacKeys(project); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getHmacKeysList().get(0), resources.get(0)); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListHmacKeysRequest actualRequest = ((ListHmacKeysRequest) actualRequests.get(0)); - - Assert.assertEquals(project.toString(), actualRequest.getProject()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listHmacKeysExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - ProjectName project = ProjectName.of("[PROJECT]"); - client.listHmacKeys(project); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listHmacKeysTest2() throws Exception { - HmacKeyMetadata responsesElement = HmacKeyMetadata.newBuilder().build(); - ListHmacKeysResponse expectedResponse = - ListHmacKeysResponse.newBuilder() - .setNextPageToken("") - .addAllHmacKeys(Arrays.asList(responsesElement)) - .build(); - mockStorage.addResponse(expectedResponse); - - String project = "project-309310695"; - - ListHmacKeysPagedResponse pagedListResponse = client.listHmacKeys(project); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getHmacKeysList().get(0), resources.get(0)); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListHmacKeysRequest actualRequest = ((ListHmacKeysRequest) actualRequests.get(0)); - - Assert.assertEquals(project, actualRequest.getProject()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listHmacKeysExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - String project = "project-309310695"; - client.listHmacKeys(project); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateHmacKeyTest() throws Exception { - HmacKeyMetadata expectedResponse = - HmacKeyMetadata.newBuilder() - .setId("id3355") - .setAccessId("accessId-2146437729") - .setProject(ProjectName.of("[PROJECT]").toString()) - .setServiceAccountEmail("serviceAccountEmail1825953988") - .setState("state109757585") - .setCreateTime(Timestamp.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .setEtag("etag3123477") - .build(); - mockStorage.addResponse(expectedResponse); - - HmacKeyMetadata hmacKey = HmacKeyMetadata.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - - HmacKeyMetadata actualResponse = client.updateHmacKey(hmacKey, updateMask); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateHmacKeyRequest actualRequest = ((UpdateHmacKeyRequest) actualRequests.get(0)); - - Assert.assertEquals(hmacKey, actualRequest.getHmacKey()); - Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateHmacKeyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - HmacKeyMetadata hmacKey = HmacKeyMetadata.newBuilder().build(); - FieldMask updateMask = FieldMask.newBuilder().build(); - client.updateHmacKey(hmacKey, updateMask); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteNotificationConfigTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockStorage.addResponse(expectedResponse); - - NotificationConfigName name = - NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]"); - - client.deleteNotificationConfig(name); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteNotificationConfigRequest actualRequest = - ((DeleteNotificationConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteNotificationConfigExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - NotificationConfigName name = - NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]"); - client.deleteNotificationConfig(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteNotificationConfigTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockStorage.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteNotificationConfig(name); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteNotificationConfigRequest actualRequest = - ((DeleteNotificationConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteNotificationConfigExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - String name = "name3373707"; - client.deleteNotificationConfig(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getNotificationConfigTest() throws Exception { - NotificationConfig expectedResponse = - NotificationConfig.newBuilder() - .setName( - NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]") - .toString()) - .setTopic("topic110546223") - .setEtag("etag3123477") - .addAllEventTypes(new ArrayList()) - .putAllCustomAttributes(new HashMap()) - .setObjectNamePrefix("objectNamePrefix-1978236516") - .setPayloadFormat("payloadFormat-2140609755") - .build(); - mockStorage.addResponse(expectedResponse); - - NotificationConfigName name = - NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]"); - - NotificationConfig actualResponse = client.getNotificationConfig(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetNotificationConfigRequest actualRequest = - ((GetNotificationConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getNotificationConfigExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - NotificationConfigName name = - NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]"); - client.getNotificationConfig(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getNotificationConfigTest2() throws Exception { - NotificationConfig expectedResponse = - NotificationConfig.newBuilder() - .setName( - NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]") - .toString()) - .setTopic("topic110546223") - .setEtag("etag3123477") - .addAllEventTypes(new ArrayList()) - .putAllCustomAttributes(new HashMap()) - .setObjectNamePrefix("objectNamePrefix-1978236516") - .setPayloadFormat("payloadFormat-2140609755") - .build(); - mockStorage.addResponse(expectedResponse); - - String name = "name3373707"; - - NotificationConfig actualResponse = client.getNotificationConfig(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetNotificationConfigRequest actualRequest = - ((GetNotificationConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getNotificationConfigExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - String name = "name3373707"; - client.getNotificationConfig(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createNotificationConfigTest() throws Exception { - NotificationConfig expectedResponse = - NotificationConfig.newBuilder() - .setName( - NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]") - .toString()) - .setTopic("topic110546223") - .setEtag("etag3123477") - .addAllEventTypes(new ArrayList()) - .putAllCustomAttributes(new HashMap()) - .setObjectNamePrefix("objectNamePrefix-1978236516") - .setPayloadFormat("payloadFormat-2140609755") - .build(); - mockStorage.addResponse(expectedResponse); - - BucketName parent = BucketName.of("[PROJECT]", "[BUCKET]"); - NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); - - NotificationConfig actualResponse = client.createNotificationConfig(parent, notificationConfig); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateNotificationConfigRequest actualRequest = - ((CreateNotificationConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(notificationConfig, actualRequest.getNotificationConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createNotificationConfigExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - BucketName parent = BucketName.of("[PROJECT]", "[BUCKET]"); - NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); - client.createNotificationConfig(parent, notificationConfig); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createNotificationConfigTest2() throws Exception { - NotificationConfig expectedResponse = - NotificationConfig.newBuilder() - .setName( - NotificationConfigName.of("[PROJECT]", "[BUCKET]", "[NOTIFICATION_CONFIG]") - .toString()) - .setTopic("topic110546223") - .setEtag("etag3123477") - .addAllEventTypes(new ArrayList()) - .putAllCustomAttributes(new HashMap()) - .setObjectNamePrefix("objectNamePrefix-1978236516") - .setPayloadFormat("payloadFormat-2140609755") - .build(); - mockStorage.addResponse(expectedResponse); - - String parent = "parent-995424086"; - NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); - - NotificationConfig actualResponse = client.createNotificationConfig(parent, notificationConfig); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateNotificationConfigRequest actualRequest = - ((CreateNotificationConfigRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(notificationConfig, actualRequest.getNotificationConfig()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createNotificationConfigExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - String parent = "parent-995424086"; - NotificationConfig notificationConfig = NotificationConfig.newBuilder().build(); - client.createNotificationConfig(parent, notificationConfig); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listNotificationConfigsTest() throws Exception { - NotificationConfig responsesElement = NotificationConfig.newBuilder().build(); - ListNotificationConfigsResponse expectedResponse = - ListNotificationConfigsResponse.newBuilder() - .setNextPageToken("") - .addAllNotificationConfigs(Arrays.asList(responsesElement)) - .build(); - mockStorage.addResponse(expectedResponse); - - BucketName parent = BucketName.of("[PROJECT]", "[BUCKET]"); - - ListNotificationConfigsPagedResponse pagedListResponse = client.listNotificationConfigs(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getNotificationConfigsList().get(0), resources.get(0)); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListNotificationConfigsRequest actualRequest = - ((ListNotificationConfigsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listNotificationConfigsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - BucketName parent = BucketName.of("[PROJECT]", "[BUCKET]"); - client.listNotificationConfigs(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listNotificationConfigsTest2() throws Exception { - NotificationConfig responsesElement = NotificationConfig.newBuilder().build(); - ListNotificationConfigsResponse expectedResponse = - ListNotificationConfigsResponse.newBuilder() - .setNextPageToken("") - .addAllNotificationConfigs(Arrays.asList(responsesElement)) - .build(); - mockStorage.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListNotificationConfigsPagedResponse pagedListResponse = client.listNotificationConfigs(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getNotificationConfigsList().get(0), resources.get(0)); - - List actualRequests = mockStorage.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListNotificationConfigsRequest actualRequest = - ((ListNotificationConfigsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listNotificationConfigsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockStorage.addException(exception); - - try { - String parent = "parent-995424086"; - client.listNotificationConfigs(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } } diff --git a/grpc-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageGrpc.java b/grpc-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageGrpc.java index 3e357db534..4db7e12745 100644 --- a/grpc-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageGrpc.java +++ b/grpc-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageGrpc.java @@ -962,441 +962,6 @@ private StorageGrpc() {} return getQueryWriteStatusMethod; } - private static volatile io.grpc.MethodDescriptor< - com.google.storage.v2.GetServiceAccountRequest, com.google.storage.v2.ServiceAccount> - getGetServiceAccountMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetServiceAccount", - requestType = com.google.storage.v2.GetServiceAccountRequest.class, - responseType = com.google.storage.v2.ServiceAccount.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.storage.v2.GetServiceAccountRequest, com.google.storage.v2.ServiceAccount> - getGetServiceAccountMethod() { - io.grpc.MethodDescriptor< - com.google.storage.v2.GetServiceAccountRequest, com.google.storage.v2.ServiceAccount> - getGetServiceAccountMethod; - if ((getGetServiceAccountMethod = StorageGrpc.getGetServiceAccountMethod) == null) { - synchronized (StorageGrpc.class) { - if ((getGetServiceAccountMethod = StorageGrpc.getGetServiceAccountMethod) == null) { - StorageGrpc.getGetServiceAccountMethod = - getGetServiceAccountMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetServiceAccount")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.GetServiceAccountRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.ServiceAccount.getDefaultInstance())) - .setSchemaDescriptor(new StorageMethodDescriptorSupplier("GetServiceAccount")) - .build(); - } - } - } - return getGetServiceAccountMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.storage.v2.CreateHmacKeyRequest, com.google.storage.v2.CreateHmacKeyResponse> - getCreateHmacKeyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateHmacKey", - requestType = com.google.storage.v2.CreateHmacKeyRequest.class, - responseType = com.google.storage.v2.CreateHmacKeyResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.storage.v2.CreateHmacKeyRequest, com.google.storage.v2.CreateHmacKeyResponse> - getCreateHmacKeyMethod() { - io.grpc.MethodDescriptor< - com.google.storage.v2.CreateHmacKeyRequest, com.google.storage.v2.CreateHmacKeyResponse> - getCreateHmacKeyMethod; - if ((getCreateHmacKeyMethod = StorageGrpc.getCreateHmacKeyMethod) == null) { - synchronized (StorageGrpc.class) { - if ((getCreateHmacKeyMethod = StorageGrpc.getCreateHmacKeyMethod) == null) { - StorageGrpc.getCreateHmacKeyMethod = - getCreateHmacKeyMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateHmacKey")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.CreateHmacKeyRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.CreateHmacKeyResponse.getDefaultInstance())) - .setSchemaDescriptor(new StorageMethodDescriptorSupplier("CreateHmacKey")) - .build(); - } - } - } - return getCreateHmacKeyMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.storage.v2.DeleteHmacKeyRequest, com.google.protobuf.Empty> - getDeleteHmacKeyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteHmacKey", - requestType = com.google.storage.v2.DeleteHmacKeyRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.storage.v2.DeleteHmacKeyRequest, com.google.protobuf.Empty> - getDeleteHmacKeyMethod() { - io.grpc.MethodDescriptor - getDeleteHmacKeyMethod; - if ((getDeleteHmacKeyMethod = StorageGrpc.getDeleteHmacKeyMethod) == null) { - synchronized (StorageGrpc.class) { - if ((getDeleteHmacKeyMethod = StorageGrpc.getDeleteHmacKeyMethod) == null) { - StorageGrpc.getDeleteHmacKeyMethod = - getDeleteHmacKeyMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteHmacKey")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.DeleteHmacKeyRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor(new StorageMethodDescriptorSupplier("DeleteHmacKey")) - .build(); - } - } - } - return getDeleteHmacKeyMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.storage.v2.GetHmacKeyRequest, com.google.storage.v2.HmacKeyMetadata> - getGetHmacKeyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetHmacKey", - requestType = com.google.storage.v2.GetHmacKeyRequest.class, - responseType = com.google.storage.v2.HmacKeyMetadata.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.storage.v2.GetHmacKeyRequest, com.google.storage.v2.HmacKeyMetadata> - getGetHmacKeyMethod() { - io.grpc.MethodDescriptor< - com.google.storage.v2.GetHmacKeyRequest, com.google.storage.v2.HmacKeyMetadata> - getGetHmacKeyMethod; - if ((getGetHmacKeyMethod = StorageGrpc.getGetHmacKeyMethod) == null) { - synchronized (StorageGrpc.class) { - if ((getGetHmacKeyMethod = StorageGrpc.getGetHmacKeyMethod) == null) { - StorageGrpc.getGetHmacKeyMethod = - getGetHmacKeyMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetHmacKey")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.GetHmacKeyRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.HmacKeyMetadata.getDefaultInstance())) - .setSchemaDescriptor(new StorageMethodDescriptorSupplier("GetHmacKey")) - .build(); - } - } - } - return getGetHmacKeyMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.storage.v2.ListHmacKeysRequest, com.google.storage.v2.ListHmacKeysResponse> - getListHmacKeysMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListHmacKeys", - requestType = com.google.storage.v2.ListHmacKeysRequest.class, - responseType = com.google.storage.v2.ListHmacKeysResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.storage.v2.ListHmacKeysRequest, com.google.storage.v2.ListHmacKeysResponse> - getListHmacKeysMethod() { - io.grpc.MethodDescriptor< - com.google.storage.v2.ListHmacKeysRequest, com.google.storage.v2.ListHmacKeysResponse> - getListHmacKeysMethod; - if ((getListHmacKeysMethod = StorageGrpc.getListHmacKeysMethod) == null) { - synchronized (StorageGrpc.class) { - if ((getListHmacKeysMethod = StorageGrpc.getListHmacKeysMethod) == null) { - StorageGrpc.getListHmacKeysMethod = - getListHmacKeysMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListHmacKeys")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.ListHmacKeysRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.ListHmacKeysResponse.getDefaultInstance())) - .setSchemaDescriptor(new StorageMethodDescriptorSupplier("ListHmacKeys")) - .build(); - } - } - } - return getListHmacKeysMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.storage.v2.UpdateHmacKeyRequest, com.google.storage.v2.HmacKeyMetadata> - getUpdateHmacKeyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateHmacKey", - requestType = com.google.storage.v2.UpdateHmacKeyRequest.class, - responseType = com.google.storage.v2.HmacKeyMetadata.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.storage.v2.UpdateHmacKeyRequest, com.google.storage.v2.HmacKeyMetadata> - getUpdateHmacKeyMethod() { - io.grpc.MethodDescriptor< - com.google.storage.v2.UpdateHmacKeyRequest, com.google.storage.v2.HmacKeyMetadata> - getUpdateHmacKeyMethod; - if ((getUpdateHmacKeyMethod = StorageGrpc.getUpdateHmacKeyMethod) == null) { - synchronized (StorageGrpc.class) { - if ((getUpdateHmacKeyMethod = StorageGrpc.getUpdateHmacKeyMethod) == null) { - StorageGrpc.getUpdateHmacKeyMethod = - getUpdateHmacKeyMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateHmacKey")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.UpdateHmacKeyRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.HmacKeyMetadata.getDefaultInstance())) - .setSchemaDescriptor(new StorageMethodDescriptorSupplier("UpdateHmacKey")) - .build(); - } - } - } - return getUpdateHmacKeyMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.storage.v2.DeleteNotificationConfigRequest, com.google.protobuf.Empty> - getDeleteNotificationConfigMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteNotificationConfig", - requestType = com.google.storage.v2.DeleteNotificationConfigRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.storage.v2.DeleteNotificationConfigRequest, com.google.protobuf.Empty> - getDeleteNotificationConfigMethod() { - io.grpc.MethodDescriptor< - com.google.storage.v2.DeleteNotificationConfigRequest, com.google.protobuf.Empty> - getDeleteNotificationConfigMethod; - if ((getDeleteNotificationConfigMethod = StorageGrpc.getDeleteNotificationConfigMethod) - == null) { - synchronized (StorageGrpc.class) { - if ((getDeleteNotificationConfigMethod = StorageGrpc.getDeleteNotificationConfigMethod) - == null) { - StorageGrpc.getDeleteNotificationConfigMethod = - getDeleteNotificationConfigMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "DeleteNotificationConfig")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.DeleteNotificationConfigRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor( - new StorageMethodDescriptorSupplier("DeleteNotificationConfig")) - .build(); - } - } - } - return getDeleteNotificationConfigMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.storage.v2.GetNotificationConfigRequest, - com.google.storage.v2.NotificationConfig> - getGetNotificationConfigMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetNotificationConfig", - requestType = com.google.storage.v2.GetNotificationConfigRequest.class, - responseType = com.google.storage.v2.NotificationConfig.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.storage.v2.GetNotificationConfigRequest, - com.google.storage.v2.NotificationConfig> - getGetNotificationConfigMethod() { - io.grpc.MethodDescriptor< - com.google.storage.v2.GetNotificationConfigRequest, - com.google.storage.v2.NotificationConfig> - getGetNotificationConfigMethod; - if ((getGetNotificationConfigMethod = StorageGrpc.getGetNotificationConfigMethod) == null) { - synchronized (StorageGrpc.class) { - if ((getGetNotificationConfigMethod = StorageGrpc.getGetNotificationConfigMethod) == null) { - StorageGrpc.getGetNotificationConfigMethod = - getGetNotificationConfigMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "GetNotificationConfig")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.GetNotificationConfigRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.NotificationConfig.getDefaultInstance())) - .setSchemaDescriptor( - new StorageMethodDescriptorSupplier("GetNotificationConfig")) - .build(); - } - } - } - return getGetNotificationConfigMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.storage.v2.CreateNotificationConfigRequest, - com.google.storage.v2.NotificationConfig> - getCreateNotificationConfigMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateNotificationConfig", - requestType = com.google.storage.v2.CreateNotificationConfigRequest.class, - responseType = com.google.storage.v2.NotificationConfig.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.storage.v2.CreateNotificationConfigRequest, - com.google.storage.v2.NotificationConfig> - getCreateNotificationConfigMethod() { - io.grpc.MethodDescriptor< - com.google.storage.v2.CreateNotificationConfigRequest, - com.google.storage.v2.NotificationConfig> - getCreateNotificationConfigMethod; - if ((getCreateNotificationConfigMethod = StorageGrpc.getCreateNotificationConfigMethod) - == null) { - synchronized (StorageGrpc.class) { - if ((getCreateNotificationConfigMethod = StorageGrpc.getCreateNotificationConfigMethod) - == null) { - StorageGrpc.getCreateNotificationConfigMethod = - getCreateNotificationConfigMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "CreateNotificationConfig")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.CreateNotificationConfigRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.NotificationConfig.getDefaultInstance())) - .setSchemaDescriptor( - new StorageMethodDescriptorSupplier("CreateNotificationConfig")) - .build(); - } - } - } - return getCreateNotificationConfigMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.storage.v2.ListNotificationConfigsRequest, - com.google.storage.v2.ListNotificationConfigsResponse> - getListNotificationConfigsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListNotificationConfigs", - requestType = com.google.storage.v2.ListNotificationConfigsRequest.class, - responseType = com.google.storage.v2.ListNotificationConfigsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.storage.v2.ListNotificationConfigsRequest, - com.google.storage.v2.ListNotificationConfigsResponse> - getListNotificationConfigsMethod() { - io.grpc.MethodDescriptor< - com.google.storage.v2.ListNotificationConfigsRequest, - com.google.storage.v2.ListNotificationConfigsResponse> - getListNotificationConfigsMethod; - if ((getListNotificationConfigsMethod = StorageGrpc.getListNotificationConfigsMethod) == null) { - synchronized (StorageGrpc.class) { - if ((getListNotificationConfigsMethod = StorageGrpc.getListNotificationConfigsMethod) - == null) { - StorageGrpc.getListNotificationConfigsMethod = - getListNotificationConfigsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "ListNotificationConfigs")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.ListNotificationConfigsRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.storage.v2.ListNotificationConfigsResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new StorageMethodDescriptorSupplier("ListNotificationConfigs")) - .build(); - } - } - } - return getListNotificationConfigsMethod; - } - /** Creates a new async stub that supports all call types for the service */ public static StorageStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -1870,159 +1435,6 @@ default void queryWriteStatus( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getQueryWriteStatusMethod(), responseObserver); } - - /** - * - * - *
-     * Retrieves the name of a project's Google Cloud Storage service account.
-     * 
- */ - @java.lang.Deprecated - default void getServiceAccount( - com.google.storage.v2.GetServiceAccountRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetServiceAccountMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates a new HMAC key for the given service account.
-     * 
- */ - @java.lang.Deprecated - default void createHmacKey( - com.google.storage.v2.CreateHmacKeyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateHmacKeyMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes a given HMAC key.  Key must be in an INACTIVE state.
-     * 
- */ - @java.lang.Deprecated - default void deleteHmacKey( - com.google.storage.v2.DeleteHmacKeyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteHmacKeyMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets an existing HMAC key metadata for the given id.
-     * 
- */ - @java.lang.Deprecated - default void getHmacKey( - com.google.storage.v2.GetHmacKeyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetHmacKeyMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists HMAC keys under a given project with the additional filters provided.
-     * 
- */ - @java.lang.Deprecated - default void listHmacKeys( - com.google.storage.v2.ListHmacKeysRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListHmacKeysMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates a given HMAC key state between ACTIVE and INACTIVE.
-     * 
- */ - @java.lang.Deprecated - default void updateHmacKey( - com.google.storage.v2.UpdateHmacKeyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateHmacKeyMethod(), responseObserver); - } - - /** - * - * - *
-     * Permanently deletes a NotificationConfig.
-     * 
- */ - @java.lang.Deprecated - default void deleteNotificationConfig( - com.google.storage.v2.DeleteNotificationConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteNotificationConfigMethod(), responseObserver); - } - - /** - * - * - *
-     * View a NotificationConfig.
-     * 
- */ - @java.lang.Deprecated - default void getNotificationConfig( - com.google.storage.v2.GetNotificationConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetNotificationConfigMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates a NotificationConfig for a given bucket.
-     * These NotificationConfigs, when triggered, publish messages to the
-     * specified Pub/Sub topics. See
-     * https://cloud.google.com/storage/docs/pubsub-notifications.
-     * 
- */ - @java.lang.Deprecated - default void createNotificationConfig( - com.google.storage.v2.CreateNotificationConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateNotificationConfigMethod(), responseObserver); - } - - /** - * - * - *
-     * Retrieves a list of NotificationConfigs for a given bucket.
-     * 
- */ - @java.lang.Deprecated - default void listNotificationConfigs( - com.google.storage.v2.ListNotificationConfigsRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListNotificationConfigsMethod(), responseObserver); - } } /** @@ -2499,193 +1911,12 @@ public void rewriteObject( * service-dependent. * */ - public void startResumableWrite( - com.google.storage.v2.StartResumableWriteRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getStartResumableWriteMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Determines the `persisted_size` for an object that is being written, which
-     * can then be used as the `write_offset` for the next `Write()` call.
-     * If the object does not exist (i.e., the object has been deleted, or the
-     * first `Write()` has not yet reached the service), this method returns the
-     * error `NOT_FOUND`.
-     * The client **may** call `QueryWriteStatus()` at any time to determine how
-     * much data has been processed for this object. This is useful if the
-     * client is buffering data and needs to know which data can be safely
-     * evicted. For any sequence of `QueryWriteStatus()` calls for a given
-     * object name, the sequence of returned `persisted_size` values will be
-     * non-decreasing.
-     * 
- */ - public void queryWriteStatus( - com.google.storage.v2.QueryWriteStatusRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getQueryWriteStatusMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Retrieves the name of a project's Google Cloud Storage service account.
-     * 
- */ - @java.lang.Deprecated - public void getServiceAccount( - com.google.storage.v2.GetServiceAccountRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetServiceAccountMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Creates a new HMAC key for the given service account.
-     * 
- */ - @java.lang.Deprecated - public void createHmacKey( - com.google.storage.v2.CreateHmacKeyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateHmacKeyMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deletes a given HMAC key.  Key must be in an INACTIVE state.
-     * 
- */ - @java.lang.Deprecated - public void deleteHmacKey( - com.google.storage.v2.DeleteHmacKeyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteHmacKeyMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets an existing HMAC key metadata for the given id.
-     * 
- */ - @java.lang.Deprecated - public void getHmacKey( - com.google.storage.v2.GetHmacKeyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetHmacKeyMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Lists HMAC keys under a given project with the additional filters provided.
-     * 
- */ - @java.lang.Deprecated - public void listHmacKeys( - com.google.storage.v2.ListHmacKeysRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListHmacKeysMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates a given HMAC key state between ACTIVE and INACTIVE.
-     * 
- */ - @java.lang.Deprecated - public void updateHmacKey( - com.google.storage.v2.UpdateHmacKeyRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateHmacKeyMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Permanently deletes a NotificationConfig.
-     * 
- */ - @java.lang.Deprecated - public void deleteNotificationConfig( - com.google.storage.v2.DeleteNotificationConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteNotificationConfigMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * View a NotificationConfig.
-     * 
- */ - @java.lang.Deprecated - public void getNotificationConfig( - com.google.storage.v2.GetNotificationConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetNotificationConfigMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Creates a NotificationConfig for a given bucket.
-     * These NotificationConfigs, when triggered, publish messages to the
-     * specified Pub/Sub topics. See
-     * https://cloud.google.com/storage/docs/pubsub-notifications.
-     * 
- */ - @java.lang.Deprecated - public void createNotificationConfig( - com.google.storage.v2.CreateNotificationConfigRequest request, - io.grpc.stub.StreamObserver responseObserver) { + public void startResumableWrite( + com.google.storage.v2.StartResumableWriteRequest request, + io.grpc.stub.StreamObserver + responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateNotificationConfigMethod(), getCallOptions()), + getChannel().newCall(getStartResumableWriteMethod(), getCallOptions()), request, responseObserver); } @@ -2694,16 +1925,25 @@ public void createNotificationConfig( * * *
-     * Retrieves a list of NotificationConfigs for a given bucket.
+     * Determines the `persisted_size` for an object that is being written, which
+     * can then be used as the `write_offset` for the next `Write()` call.
+     * If the object does not exist (i.e., the object has been deleted, or the
+     * first `Write()` has not yet reached the service), this method returns the
+     * error `NOT_FOUND`.
+     * The client **may** call `QueryWriteStatus()` at any time to determine how
+     * much data has been processed for this object. This is useful if the
+     * client is buffering data and needs to know which data can be safely
+     * evicted. For any sequence of `QueryWriteStatus()` calls for a given
+     * object name, the sequence of returned `persisted_size` values will be
+     * non-decreasing.
      * 
*/ - @java.lang.Deprecated - public void listNotificationConfigs( - com.google.storage.v2.ListNotificationConfigsRequest request, - io.grpc.stub.StreamObserver + public void queryWriteStatus( + com.google.storage.v2.QueryWriteStatusRequest request, + io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListNotificationConfigsMethod(), getCallOptions()), + getChannel().newCall(getQueryWriteStatusMethod(), getCallOptions()), request, responseObserver); } @@ -3033,149 +2273,6 @@ public com.google.storage.v2.QueryWriteStatusResponse queryWriteStatus( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getQueryWriteStatusMethod(), getCallOptions(), request); } - - /** - * - * - *
-     * Retrieves the name of a project's Google Cloud Storage service account.
-     * 
- */ - @java.lang.Deprecated - public com.google.storage.v2.ServiceAccount getServiceAccount( - com.google.storage.v2.GetServiceAccountRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetServiceAccountMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates a new HMAC key for the given service account.
-     * 
- */ - @java.lang.Deprecated - public com.google.storage.v2.CreateHmacKeyResponse createHmacKey( - com.google.storage.v2.CreateHmacKeyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateHmacKeyMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes a given HMAC key.  Key must be in an INACTIVE state.
-     * 
- */ - @java.lang.Deprecated - public com.google.protobuf.Empty deleteHmacKey( - com.google.storage.v2.DeleteHmacKeyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteHmacKeyMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets an existing HMAC key metadata for the given id.
-     * 
- */ - @java.lang.Deprecated - public com.google.storage.v2.HmacKeyMetadata getHmacKey( - com.google.storage.v2.GetHmacKeyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetHmacKeyMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists HMAC keys under a given project with the additional filters provided.
-     * 
- */ - @java.lang.Deprecated - public com.google.storage.v2.ListHmacKeysResponse listHmacKeys( - com.google.storage.v2.ListHmacKeysRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListHmacKeysMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates a given HMAC key state between ACTIVE and INACTIVE.
-     * 
- */ - @java.lang.Deprecated - public com.google.storage.v2.HmacKeyMetadata updateHmacKey( - com.google.storage.v2.UpdateHmacKeyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateHmacKeyMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Permanently deletes a NotificationConfig.
-     * 
- */ - @java.lang.Deprecated - public com.google.protobuf.Empty deleteNotificationConfig( - com.google.storage.v2.DeleteNotificationConfigRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteNotificationConfigMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * View a NotificationConfig.
-     * 
- */ - @java.lang.Deprecated - public com.google.storage.v2.NotificationConfig getNotificationConfig( - com.google.storage.v2.GetNotificationConfigRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetNotificationConfigMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates a NotificationConfig for a given bucket.
-     * These NotificationConfigs, when triggered, publish messages to the
-     * specified Pub/Sub topics. See
-     * https://cloud.google.com/storage/docs/pubsub-notifications.
-     * 
- */ - @java.lang.Deprecated - public com.google.storage.v2.NotificationConfig createNotificationConfig( - com.google.storage.v2.CreateNotificationConfigRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateNotificationConfigMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Retrieves a list of NotificationConfigs for a given bucket.
-     * 
- */ - @java.lang.Deprecated - public com.google.storage.v2.ListNotificationConfigsResponse listNotificationConfigs( - com.google.storage.v2.ListNotificationConfigsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListNotificationConfigsMethod(), getCallOptions(), request); - } } /** @@ -3499,154 +2596,6 @@ protected StorageFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions c return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getQueryWriteStatusMethod(), getCallOptions()), request); } - - /** - * - * - *
-     * Retrieves the name of a project's Google Cloud Storage service account.
-     * 
- */ - @java.lang.Deprecated - public com.google.common.util.concurrent.ListenableFuture - getServiceAccount(com.google.storage.v2.GetServiceAccountRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetServiceAccountMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates a new HMAC key for the given service account.
-     * 
- */ - @java.lang.Deprecated - public com.google.common.util.concurrent.ListenableFuture< - com.google.storage.v2.CreateHmacKeyResponse> - createHmacKey(com.google.storage.v2.CreateHmacKeyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateHmacKeyMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes a given HMAC key.  Key must be in an INACTIVE state.
-     * 
- */ - @java.lang.Deprecated - public com.google.common.util.concurrent.ListenableFuture - deleteHmacKey(com.google.storage.v2.DeleteHmacKeyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteHmacKeyMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets an existing HMAC key metadata for the given id.
-     * 
- */ - @java.lang.Deprecated - public com.google.common.util.concurrent.ListenableFuture - getHmacKey(com.google.storage.v2.GetHmacKeyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetHmacKeyMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Lists HMAC keys under a given project with the additional filters provided.
-     * 
- */ - @java.lang.Deprecated - public com.google.common.util.concurrent.ListenableFuture< - com.google.storage.v2.ListHmacKeysResponse> - listHmacKeys(com.google.storage.v2.ListHmacKeysRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListHmacKeysMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates a given HMAC key state between ACTIVE and INACTIVE.
-     * 
- */ - @java.lang.Deprecated - public com.google.common.util.concurrent.ListenableFuture - updateHmacKey(com.google.storage.v2.UpdateHmacKeyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateHmacKeyMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Permanently deletes a NotificationConfig.
-     * 
- */ - @java.lang.Deprecated - public com.google.common.util.concurrent.ListenableFuture - deleteNotificationConfig(com.google.storage.v2.DeleteNotificationConfigRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteNotificationConfigMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * View a NotificationConfig.
-     * 
- */ - @java.lang.Deprecated - public com.google.common.util.concurrent.ListenableFuture< - com.google.storage.v2.NotificationConfig> - getNotificationConfig(com.google.storage.v2.GetNotificationConfigRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetNotificationConfigMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates a NotificationConfig for a given bucket.
-     * These NotificationConfigs, when triggered, publish messages to the
-     * specified Pub/Sub topics. See
-     * https://cloud.google.com/storage/docs/pubsub-notifications.
-     * 
- */ - @java.lang.Deprecated - public com.google.common.util.concurrent.ListenableFuture< - com.google.storage.v2.NotificationConfig> - createNotificationConfig(com.google.storage.v2.CreateNotificationConfigRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateNotificationConfigMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Retrieves a list of NotificationConfigs for a given bucket.
-     * 
- */ - @java.lang.Deprecated - public com.google.common.util.concurrent.ListenableFuture< - com.google.storage.v2.ListNotificationConfigsResponse> - listNotificationConfigs(com.google.storage.v2.ListNotificationConfigsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListNotificationConfigsMethod(), getCallOptions()), request); - } } private static final int METHODID_DELETE_BUCKET = 0; @@ -3669,18 +2618,8 @@ protected StorageFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions c private static final int METHODID_REWRITE_OBJECT = 17; private static final int METHODID_START_RESUMABLE_WRITE = 18; private static final int METHODID_QUERY_WRITE_STATUS = 19; - private static final int METHODID_GET_SERVICE_ACCOUNT = 20; - private static final int METHODID_CREATE_HMAC_KEY = 21; - private static final int METHODID_DELETE_HMAC_KEY = 22; - private static final int METHODID_GET_HMAC_KEY = 23; - private static final int METHODID_LIST_HMAC_KEYS = 24; - private static final int METHODID_UPDATE_HMAC_KEY = 25; - private static final int METHODID_DELETE_NOTIFICATION_CONFIG = 26; - private static final int METHODID_GET_NOTIFICATION_CONFIG = 27; - private static final int METHODID_CREATE_NOTIFICATION_CONFIG = 28; - private static final int METHODID_LIST_NOTIFICATION_CONFIGS = 29; - private static final int METHODID_WRITE_OBJECT = 30; - private static final int METHODID_BIDI_WRITE_OBJECT = 31; + private static final int METHODID_WRITE_OBJECT = 20; + private static final int METHODID_BIDI_WRITE_OBJECT = 21; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -3807,63 +2746,6 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; - case METHODID_GET_SERVICE_ACCOUNT: - serviceImpl.getServiceAccount( - (com.google.storage.v2.GetServiceAccountRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_CREATE_HMAC_KEY: - serviceImpl.createHmacKey( - (com.google.storage.v2.CreateHmacKeyRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_DELETE_HMAC_KEY: - serviceImpl.deleteHmacKey( - (com.google.storage.v2.DeleteHmacKeyRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_HMAC_KEY: - serviceImpl.getHmacKey( - (com.google.storage.v2.GetHmacKeyRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_LIST_HMAC_KEYS: - serviceImpl.listHmacKeys( - (com.google.storage.v2.ListHmacKeysRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_UPDATE_HMAC_KEY: - serviceImpl.updateHmacKey( - (com.google.storage.v2.UpdateHmacKeyRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_DELETE_NOTIFICATION_CONFIG: - serviceImpl.deleteNotificationConfig( - (com.google.storage.v2.DeleteNotificationConfigRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - case METHODID_GET_NOTIFICATION_CONFIG: - serviceImpl.getNotificationConfig( - (com.google.storage.v2.GetNotificationConfigRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_CREATE_NOTIFICATION_CONFIG: - serviceImpl.createNotificationConfig( - (com.google.storage.v2.CreateNotificationConfigRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_LIST_NOTIFICATION_CONFIGS: - serviceImpl.listNotificationConfigs( - (com.google.storage.v2.ListNotificationConfigsRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; default: throw new AssertionError(); } @@ -4027,70 +2909,6 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.storage.v2.QueryWriteStatusRequest, com.google.storage.v2.QueryWriteStatusResponse>( service, METHODID_QUERY_WRITE_STATUS))) - .addMethod( - getGetServiceAccountMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.storage.v2.GetServiceAccountRequest, - com.google.storage.v2.ServiceAccount>(service, METHODID_GET_SERVICE_ACCOUNT))) - .addMethod( - getCreateHmacKeyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.storage.v2.CreateHmacKeyRequest, - com.google.storage.v2.CreateHmacKeyResponse>( - service, METHODID_CREATE_HMAC_KEY))) - .addMethod( - getDeleteHmacKeyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.storage.v2.DeleteHmacKeyRequest, com.google.protobuf.Empty>( - service, METHODID_DELETE_HMAC_KEY))) - .addMethod( - getGetHmacKeyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.storage.v2.GetHmacKeyRequest, com.google.storage.v2.HmacKeyMetadata>( - service, METHODID_GET_HMAC_KEY))) - .addMethod( - getListHmacKeysMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.storage.v2.ListHmacKeysRequest, - com.google.storage.v2.ListHmacKeysResponse>(service, METHODID_LIST_HMAC_KEYS))) - .addMethod( - getUpdateHmacKeyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.storage.v2.UpdateHmacKeyRequest, - com.google.storage.v2.HmacKeyMetadata>(service, METHODID_UPDATE_HMAC_KEY))) - .addMethod( - getDeleteNotificationConfigMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.storage.v2.DeleteNotificationConfigRequest, - com.google.protobuf.Empty>(service, METHODID_DELETE_NOTIFICATION_CONFIG))) - .addMethod( - getGetNotificationConfigMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.storage.v2.GetNotificationConfigRequest, - com.google.storage.v2.NotificationConfig>( - service, METHODID_GET_NOTIFICATION_CONFIG))) - .addMethod( - getCreateNotificationConfigMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.storage.v2.CreateNotificationConfigRequest, - com.google.storage.v2.NotificationConfig>( - service, METHODID_CREATE_NOTIFICATION_CONFIG))) - .addMethod( - getListNotificationConfigsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.storage.v2.ListNotificationConfigsRequest, - com.google.storage.v2.ListNotificationConfigsResponse>( - service, METHODID_LIST_NOTIFICATION_CONFIGS))) .build(); } @@ -4162,16 +2980,6 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getRewriteObjectMethod()) .addMethod(getStartResumableWriteMethod()) .addMethod(getQueryWriteStatusMethod()) - .addMethod(getGetServiceAccountMethod()) - .addMethod(getCreateHmacKeyMethod()) - .addMethod(getDeleteHmacKeyMethod()) - .addMethod(getGetHmacKeyMethod()) - .addMethod(getListHmacKeysMethod()) - .addMethod(getUpdateHmacKeyMethod()) - .addMethod(getDeleteNotificationConfigMethod()) - .addMethod(getGetNotificationConfigMethod()) - .addMethod(getCreateNotificationConfigMethod()) - .addMethod(getListNotificationConfigsMethod()) .build(); } } diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyRequest.java deleted file mode 100644 index daf77ba16f..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyRequest.java +++ /dev/null @@ -1,834 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * Request message for CreateHmacKey.
- * 
- * - * Protobuf type {@code google.storage.v2.CreateHmacKeyRequest} - */ -public final class CreateHmacKeyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.CreateHmacKeyRequest) - CreateHmacKeyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateHmacKeyRequest.newBuilder() to construct. - private CreateHmacKeyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateHmacKeyRequest() { - project_ = ""; - serviceAccountEmail_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateHmacKeyRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_CreateHmacKeyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_CreateHmacKeyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.CreateHmacKeyRequest.class, - com.google.storage.v2.CreateHmacKeyRequest.Builder.class); - } - - public static final int PROJECT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object project_ = ""; - /** - * - * - *
-   * Required. The project that the HMAC-owning service account lives in, in the
-   * format of "projects/{projectIdentifier}". {projectIdentifier} can be the
-   * project ID or project number.
-   * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - @java.lang.Override - public java.lang.String getProject() { - java.lang.Object ref = project_; - 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(); - project_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The project that the HMAC-owning service account lives in, in the
-   * format of "projects/{projectIdentifier}". {projectIdentifier} can be the
-   * project ID or project number.
-   * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object serviceAccountEmail_ = ""; - /** - * - * - *
-   * Required. The service account to create the HMAC for.
-   * 
- * - * string service_account_email = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The serviceAccountEmail. - */ - @java.lang.Override - public java.lang.String getServiceAccountEmail() { - java.lang.Object ref = serviceAccountEmail_; - 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(); - serviceAccountEmail_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The service account to create the HMAC for.
-   * 
- * - * string service_account_email = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for serviceAccountEmail. - */ - @java.lang.Override - public com.google.protobuf.ByteString getServiceAccountEmailBytes() { - java.lang.Object ref = serviceAccountEmail_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - serviceAccountEmail_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, project_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, serviceAccountEmail_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, project_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, serviceAccountEmail_); - } - size += getUnknownFields().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.storage.v2.CreateHmacKeyRequest)) { - return super.equals(obj); - } - com.google.storage.v2.CreateHmacKeyRequest other = - (com.google.storage.v2.CreateHmacKeyRequest) obj; - - if (!getProject().equals(other.getProject())) return false; - if (!getServiceAccountEmail().equals(other.getServiceAccountEmail())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PROJECT_FIELD_NUMBER; - hash = (53 * hash) + getProject().hashCode(); - hash = (37 * hash) + SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER; - hash = (53 * hash) + getServiceAccountEmail().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.CreateHmacKeyRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.CreateHmacKeyRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.CreateHmacKeyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.CreateHmacKeyRequest 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.storage.v2.CreateHmacKeyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.CreateHmacKeyRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.CreateHmacKeyRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.CreateHmacKeyRequest 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.storage.v2.CreateHmacKeyRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.CreateHmacKeyRequest 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.storage.v2.CreateHmacKeyRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.CreateHmacKeyRequest 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.storage.v2.CreateHmacKeyRequest 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 message for CreateHmacKey.
-   * 
- * - * Protobuf type {@code google.storage.v2.CreateHmacKeyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.CreateHmacKeyRequest) - com.google.storage.v2.CreateHmacKeyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_CreateHmacKeyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_CreateHmacKeyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.CreateHmacKeyRequest.class, - com.google.storage.v2.CreateHmacKeyRequest.Builder.class); - } - - // Construct using com.google.storage.v2.CreateHmacKeyRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - project_ = ""; - serviceAccountEmail_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_CreateHmacKeyRequest_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.CreateHmacKeyRequest getDefaultInstanceForType() { - return com.google.storage.v2.CreateHmacKeyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.CreateHmacKeyRequest build() { - com.google.storage.v2.CreateHmacKeyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.CreateHmacKeyRequest buildPartial() { - com.google.storage.v2.CreateHmacKeyRequest result = - new com.google.storage.v2.CreateHmacKeyRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.storage.v2.CreateHmacKeyRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.project_ = project_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.serviceAccountEmail_ = serviceAccountEmail_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.storage.v2.CreateHmacKeyRequest) { - return mergeFrom((com.google.storage.v2.CreateHmacKeyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.CreateHmacKeyRequest other) { - if (other == com.google.storage.v2.CreateHmacKeyRequest.getDefaultInstance()) return this; - if (!other.getProject().isEmpty()) { - project_ = other.project_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getServiceAccountEmail().isEmpty()) { - serviceAccountEmail_ = other.serviceAccountEmail_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - project_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - serviceAccountEmail_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object project_ = ""; - /** - * - * - *
-     * Required. The project that the HMAC-owning service account lives in, in the
-     * format of "projects/{projectIdentifier}". {projectIdentifier} can be the
-     * project ID or project number.
-     * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - public java.lang.String getProject() { - java.lang.Object ref = project_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - project_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The project that the HMAC-owning service account lives in, in the
-     * format of "projects/{projectIdentifier}". {projectIdentifier} can be the
-     * project ID or project number.
-     * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - public com.google.protobuf.ByteString getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The project that the HMAC-owning service account lives in, in the
-     * format of "projects/{projectIdentifier}". {projectIdentifier} can be the
-     * project ID or project number.
-     * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The project to set. - * @return This builder for chaining. - */ - public Builder setProject(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - project_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The project that the HMAC-owning service account lives in, in the
-     * format of "projects/{projectIdentifier}". {projectIdentifier} can be the
-     * project ID or project number.
-     * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearProject() { - project_ = getDefaultInstance().getProject(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The project that the HMAC-owning service account lives in, in the
-     * format of "projects/{projectIdentifier}". {projectIdentifier} can be the
-     * project ID or project number.
-     * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for project to set. - * @return This builder for chaining. - */ - public Builder setProjectBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - project_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object serviceAccountEmail_ = ""; - /** - * - * - *
-     * Required. The service account to create the HMAC for.
-     * 
- * - * string service_account_email = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The serviceAccountEmail. - */ - public java.lang.String getServiceAccountEmail() { - java.lang.Object ref = serviceAccountEmail_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - serviceAccountEmail_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The service account to create the HMAC for.
-     * 
- * - * string service_account_email = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for serviceAccountEmail. - */ - public com.google.protobuf.ByteString getServiceAccountEmailBytes() { - java.lang.Object ref = serviceAccountEmail_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - serviceAccountEmail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The service account to create the HMAC for.
-     * 
- * - * string service_account_email = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The serviceAccountEmail to set. - * @return This builder for chaining. - */ - public Builder setServiceAccountEmail(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - serviceAccountEmail_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The service account to create the HMAC for.
-     * 
- * - * string service_account_email = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearServiceAccountEmail() { - serviceAccountEmail_ = getDefaultInstance().getServiceAccountEmail(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The service account to create the HMAC for.
-     * 
- * - * string service_account_email = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for serviceAccountEmail to set. - * @return This builder for chaining. - */ - public Builder setServiceAccountEmailBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - serviceAccountEmail_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.storage.v2.CreateHmacKeyRequest) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.CreateHmacKeyRequest) - private static final com.google.storage.v2.CreateHmacKeyRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.CreateHmacKeyRequest(); - } - - public static com.google.storage.v2.CreateHmacKeyRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateHmacKeyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.storage.v2.CreateHmacKeyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyRequestOrBuilder.java deleted file mode 100644 index 9c9aae12d9..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyRequestOrBuilder.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface CreateHmacKeyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.CreateHmacKeyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The project that the HMAC-owning service account lives in, in the
-   * format of "projects/{projectIdentifier}". {projectIdentifier} can be the
-   * project ID or project number.
-   * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - java.lang.String getProject(); - /** - * - * - *
-   * Required. The project that the HMAC-owning service account lives in, in the
-   * format of "projects/{projectIdentifier}". {projectIdentifier} can be the
-   * project ID or project number.
-   * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - com.google.protobuf.ByteString getProjectBytes(); - - /** - * - * - *
-   * Required. The service account to create the HMAC for.
-   * 
- * - * string service_account_email = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The serviceAccountEmail. - */ - java.lang.String getServiceAccountEmail(); - /** - * - * - *
-   * Required. The service account to create the HMAC for.
-   * 
- * - * string service_account_email = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for serviceAccountEmail. - */ - com.google.protobuf.ByteString getServiceAccountEmailBytes(); -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyResponse.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyResponse.java deleted file mode 100644 index b0caffbf0a..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyResponse.java +++ /dev/null @@ -1,821 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * Create hmac response.  The only time the secret for an HMAC will be returned.
- * 
- * - * Protobuf type {@code google.storage.v2.CreateHmacKeyResponse} - */ -public final class CreateHmacKeyResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.CreateHmacKeyResponse) - CreateHmacKeyResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateHmacKeyResponse.newBuilder() to construct. - private CreateHmacKeyResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateHmacKeyResponse() { - secretKeyBytes_ = com.google.protobuf.ByteString.EMPTY; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateHmacKeyResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_CreateHmacKeyResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_CreateHmacKeyResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.CreateHmacKeyResponse.class, - com.google.storage.v2.CreateHmacKeyResponse.Builder.class); - } - - private int bitField0_; - public static final int METADATA_FIELD_NUMBER = 1; - private com.google.storage.v2.HmacKeyMetadata metadata_; - /** - * - * - *
-   * Key metadata.
-   * 
- * - * .google.storage.v2.HmacKeyMetadata metadata = 1; - * - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-   * Key metadata.
-   * 
- * - * .google.storage.v2.HmacKeyMetadata metadata = 1; - * - * @return The metadata. - */ - @java.lang.Override - public com.google.storage.v2.HmacKeyMetadata getMetadata() { - return metadata_ == null - ? com.google.storage.v2.HmacKeyMetadata.getDefaultInstance() - : metadata_; - } - /** - * - * - *
-   * Key metadata.
-   * 
- * - * .google.storage.v2.HmacKeyMetadata metadata = 1; - */ - @java.lang.Override - public com.google.storage.v2.HmacKeyMetadataOrBuilder getMetadataOrBuilder() { - return metadata_ == null - ? com.google.storage.v2.HmacKeyMetadata.getDefaultInstance() - : metadata_; - } - - public static final int SECRET_KEY_BYTES_FIELD_NUMBER = 3; - private com.google.protobuf.ByteString secretKeyBytes_ = com.google.protobuf.ByteString.EMPTY; - /** - * - * - *
-   * HMAC key secret material.
-   * In raw bytes format (not base64-encoded).
-   * 
- * - * bytes secret_key_bytes = 3; - * - * @return The secretKeyBytes. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSecretKeyBytes() { - return secretKeyBytes_; - } - - 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 (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getMetadata()); - } - if (!secretKeyBytes_.isEmpty()) { - output.writeBytes(3, secretKeyBytes_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMetadata()); - } - if (!secretKeyBytes_.isEmpty()) { - size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, secretKeyBytes_); - } - size += getUnknownFields().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.storage.v2.CreateHmacKeyResponse)) { - return super.equals(obj); - } - com.google.storage.v2.CreateHmacKeyResponse other = - (com.google.storage.v2.CreateHmacKeyResponse) obj; - - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata().equals(other.getMetadata())) return false; - } - if (!getSecretKeyBytes().equals(other.getSecretKeyBytes())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - hash = (37 * hash) + SECRET_KEY_BYTES_FIELD_NUMBER; - hash = (53 * hash) + getSecretKeyBytes().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.CreateHmacKeyResponse parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.CreateHmacKeyResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.CreateHmacKeyResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.CreateHmacKeyResponse 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.storage.v2.CreateHmacKeyResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.CreateHmacKeyResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.CreateHmacKeyResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.CreateHmacKeyResponse 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.storage.v2.CreateHmacKeyResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.CreateHmacKeyResponse 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.storage.v2.CreateHmacKeyResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.CreateHmacKeyResponse 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.storage.v2.CreateHmacKeyResponse 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; - } - /** - * - * - *
-   * Create hmac response.  The only time the secret for an HMAC will be returned.
-   * 
- * - * Protobuf type {@code google.storage.v2.CreateHmacKeyResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.CreateHmacKeyResponse) - com.google.storage.v2.CreateHmacKeyResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_CreateHmacKeyResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_CreateHmacKeyResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.CreateHmacKeyResponse.class, - com.google.storage.v2.CreateHmacKeyResponse.Builder.class); - } - - // Construct using com.google.storage.v2.CreateHmacKeyResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getMetadataFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - secretKeyBytes_ = com.google.protobuf.ByteString.EMPTY; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_CreateHmacKeyResponse_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.CreateHmacKeyResponse getDefaultInstanceForType() { - return com.google.storage.v2.CreateHmacKeyResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.CreateHmacKeyResponse build() { - com.google.storage.v2.CreateHmacKeyResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.CreateHmacKeyResponse buildPartial() { - com.google.storage.v2.CreateHmacKeyResponse result = - new com.google.storage.v2.CreateHmacKeyResponse(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.storage.v2.CreateHmacKeyResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.metadata_ = metadataBuilder_ == null ? metadata_ : metadataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.secretKeyBytes_ = secretKeyBytes_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.storage.v2.CreateHmacKeyResponse) { - return mergeFrom((com.google.storage.v2.CreateHmacKeyResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.CreateHmacKeyResponse other) { - if (other == com.google.storage.v2.CreateHmacKeyResponse.getDefaultInstance()) return this; - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - if (other.getSecretKeyBytes() != com.google.protobuf.ByteString.EMPTY) { - setSecretKeyBytes(other.getSecretKeyBytes()); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getMetadataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 26: - { - secretKeyBytes_ = input.readBytes(); - bitField0_ |= 0x00000002; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.storage.v2.HmacKeyMetadata metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.storage.v2.HmacKeyMetadata, - com.google.storage.v2.HmacKeyMetadata.Builder, - com.google.storage.v2.HmacKeyMetadataOrBuilder> - metadataBuilder_; - /** - * - * - *
-     * Key metadata.
-     * 
- * - * .google.storage.v2.HmacKeyMetadata metadata = 1; - * - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * Key metadata.
-     * 
- * - * .google.storage.v2.HmacKeyMetadata metadata = 1; - * - * @return The metadata. - */ - public com.google.storage.v2.HmacKeyMetadata getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null - ? com.google.storage.v2.HmacKeyMetadata.getDefaultInstance() - : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Key metadata.
-     * 
- * - * .google.storage.v2.HmacKeyMetadata metadata = 1; - */ - public Builder setMetadata(com.google.storage.v2.HmacKeyMetadata value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Key metadata.
-     * 
- * - * .google.storage.v2.HmacKeyMetadata metadata = 1; - */ - public Builder setMetadata(com.google.storage.v2.HmacKeyMetadata.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Key metadata.
-     * 
- * - * .google.storage.v2.HmacKeyMetadata metadata = 1; - */ - public Builder mergeMetadata(com.google.storage.v2.HmacKeyMetadata value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && metadata_ != null - && metadata_ != com.google.storage.v2.HmacKeyMetadata.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - if (metadata_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * - * - *
-     * Key metadata.
-     * 
- * - * .google.storage.v2.HmacKeyMetadata metadata = 1; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000001); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Key metadata.
-     * 
- * - * .google.storage.v2.HmacKeyMetadata metadata = 1; - */ - public com.google.storage.v2.HmacKeyMetadata.Builder getMetadataBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Key metadata.
-     * 
- * - * .google.storage.v2.HmacKeyMetadata metadata = 1; - */ - public com.google.storage.v2.HmacKeyMetadataOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null - ? com.google.storage.v2.HmacKeyMetadata.getDefaultInstance() - : metadata_; - } - } - /** - * - * - *
-     * Key metadata.
-     * 
- * - * .google.storage.v2.HmacKeyMetadata metadata = 1; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.storage.v2.HmacKeyMetadata, - com.google.storage.v2.HmacKeyMetadata.Builder, - com.google.storage.v2.HmacKeyMetadataOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.storage.v2.HmacKeyMetadata, - com.google.storage.v2.HmacKeyMetadata.Builder, - com.google.storage.v2.HmacKeyMetadataOrBuilder>( - getMetadata(), getParentForChildren(), isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - - private com.google.protobuf.ByteString secretKeyBytes_ = com.google.protobuf.ByteString.EMPTY; - /** - * - * - *
-     * HMAC key secret material.
-     * In raw bytes format (not base64-encoded).
-     * 
- * - * bytes secret_key_bytes = 3; - * - * @return The secretKeyBytes. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSecretKeyBytes() { - return secretKeyBytes_; - } - /** - * - * - *
-     * HMAC key secret material.
-     * In raw bytes format (not base64-encoded).
-     * 
- * - * bytes secret_key_bytes = 3; - * - * @param value The secretKeyBytes to set. - * @return This builder for chaining. - */ - public Builder setSecretKeyBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - secretKeyBytes_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * HMAC key secret material.
-     * In raw bytes format (not base64-encoded).
-     * 
- * - * bytes secret_key_bytes = 3; - * - * @return This builder for chaining. - */ - public Builder clearSecretKeyBytes() { - bitField0_ = (bitField0_ & ~0x00000002); - secretKeyBytes_ = getDefaultInstance().getSecretKeyBytes(); - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.storage.v2.CreateHmacKeyResponse) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.CreateHmacKeyResponse) - private static final com.google.storage.v2.CreateHmacKeyResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.CreateHmacKeyResponse(); - } - - public static com.google.storage.v2.CreateHmacKeyResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateHmacKeyResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.storage.v2.CreateHmacKeyResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyResponseOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyResponseOrBuilder.java deleted file mode 100644 index 0a405a14bd..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateHmacKeyResponseOrBuilder.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface CreateHmacKeyResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.CreateHmacKeyResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Key metadata.
-   * 
- * - * .google.storage.v2.HmacKeyMetadata metadata = 1; - * - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - * - * - *
-   * Key metadata.
-   * 
- * - * .google.storage.v2.HmacKeyMetadata metadata = 1; - * - * @return The metadata. - */ - com.google.storage.v2.HmacKeyMetadata getMetadata(); - /** - * - * - *
-   * Key metadata.
-   * 
- * - * .google.storage.v2.HmacKeyMetadata metadata = 1; - */ - com.google.storage.v2.HmacKeyMetadataOrBuilder getMetadataOrBuilder(); - - /** - * - * - *
-   * HMAC key secret material.
-   * In raw bytes format (not base64-encoded).
-   * 
- * - * bytes secret_key_bytes = 3; - * - * @return The secretKeyBytes. - */ - com.google.protobuf.ByteString getSecretKeyBytes(); -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateNotificationConfigRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateNotificationConfigRequest.java deleted file mode 100644 index 71e77efcf1..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateNotificationConfigRequest.java +++ /dev/null @@ -1,950 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * Request message for CreateNotificationConfig.
- * 
- * - * Protobuf type {@code google.storage.v2.CreateNotificationConfigRequest} - */ -public final class CreateNotificationConfigRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.CreateNotificationConfigRequest) - CreateNotificationConfigRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateNotificationConfigRequest.newBuilder() to construct. - private CreateNotificationConfigRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateNotificationConfigRequest() { - parent_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateNotificationConfigRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_CreateNotificationConfigRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_CreateNotificationConfigRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.CreateNotificationConfigRequest.class, - com.google.storage.v2.CreateNotificationConfigRequest.Builder.class); - } - - private int bitField0_; - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - * - * - *
-   * Required. The bucket to which this NotificationConfig belongs.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - 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(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The bucket to which this NotificationConfig belongs.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NOTIFICATION_CONFIG_FIELD_NUMBER = 2; - private com.google.storage.v2.NotificationConfig notificationConfig_; - /** - * - * - *
-   * Required. Properties of the NotificationConfig to be inserted.
-   * 
- * - * - * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the notificationConfig field is set. - */ - @java.lang.Override - public boolean hasNotificationConfig() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-   * Required. Properties of the NotificationConfig to be inserted.
-   * 
- * - * - * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The notificationConfig. - */ - @java.lang.Override - public com.google.storage.v2.NotificationConfig getNotificationConfig() { - return notificationConfig_ == null - ? com.google.storage.v2.NotificationConfig.getDefaultInstance() - : notificationConfig_; - } - /** - * - * - *
-   * Required. Properties of the NotificationConfig to be inserted.
-   * 
- * - * - * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.storage.v2.NotificationConfigOrBuilder getNotificationConfigOrBuilder() { - return notificationConfig_ == null - ? com.google.storage.v2.NotificationConfig.getDefaultInstance() - : notificationConfig_; - } - - 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getNotificationConfig()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getNotificationConfig()); - } - size += getUnknownFields().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.storage.v2.CreateNotificationConfigRequest)) { - return super.equals(obj); - } - com.google.storage.v2.CreateNotificationConfigRequest other = - (com.google.storage.v2.CreateNotificationConfigRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (hasNotificationConfig() != other.hasNotificationConfig()) return false; - if (hasNotificationConfig()) { - if (!getNotificationConfig().equals(other.getNotificationConfig())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - if (hasNotificationConfig()) { - hash = (37 * hash) + NOTIFICATION_CONFIG_FIELD_NUMBER; - hash = (53 * hash) + getNotificationConfig().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.CreateNotificationConfigRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.CreateNotificationConfigRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.CreateNotificationConfigRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.CreateNotificationConfigRequest 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.storage.v2.CreateNotificationConfigRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.CreateNotificationConfigRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.CreateNotificationConfigRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.CreateNotificationConfigRequest 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.storage.v2.CreateNotificationConfigRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.CreateNotificationConfigRequest 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.storage.v2.CreateNotificationConfigRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.CreateNotificationConfigRequest 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.storage.v2.CreateNotificationConfigRequest 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 message for CreateNotificationConfig.
-   * 
- * - * Protobuf type {@code google.storage.v2.CreateNotificationConfigRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.CreateNotificationConfigRequest) - com.google.storage.v2.CreateNotificationConfigRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_CreateNotificationConfigRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_CreateNotificationConfigRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.CreateNotificationConfigRequest.class, - com.google.storage.v2.CreateNotificationConfigRequest.Builder.class); - } - - // Construct using com.google.storage.v2.CreateNotificationConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getNotificationConfigFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - notificationConfig_ = null; - if (notificationConfigBuilder_ != null) { - notificationConfigBuilder_.dispose(); - notificationConfigBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_CreateNotificationConfigRequest_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.CreateNotificationConfigRequest getDefaultInstanceForType() { - return com.google.storage.v2.CreateNotificationConfigRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.CreateNotificationConfigRequest build() { - com.google.storage.v2.CreateNotificationConfigRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.CreateNotificationConfigRequest buildPartial() { - com.google.storage.v2.CreateNotificationConfigRequest result = - new com.google.storage.v2.CreateNotificationConfigRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.storage.v2.CreateNotificationConfigRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.notificationConfig_ = - notificationConfigBuilder_ == null - ? notificationConfig_ - : notificationConfigBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.storage.v2.CreateNotificationConfigRequest) { - return mergeFrom((com.google.storage.v2.CreateNotificationConfigRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.CreateNotificationConfigRequest other) { - if (other == com.google.storage.v2.CreateNotificationConfigRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasNotificationConfig()) { - mergeNotificationConfig(other.getNotificationConfig()); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - input.readMessage( - getNotificationConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The bucket to which this NotificationConfig belongs.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The bucket to which this NotificationConfig belongs.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The bucket to which this NotificationConfig belongs.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The bucket to which this NotificationConfig belongs.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The bucket to which this NotificationConfig belongs.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private com.google.storage.v2.NotificationConfig notificationConfig_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.storage.v2.NotificationConfig, - com.google.storage.v2.NotificationConfig.Builder, - com.google.storage.v2.NotificationConfigOrBuilder> - notificationConfigBuilder_; - /** - * - * - *
-     * Required. Properties of the NotificationConfig to be inserted.
-     * 
- * - * - * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the notificationConfig field is set. - */ - public boolean hasNotificationConfig() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Required. Properties of the NotificationConfig to be inserted.
-     * 
- * - * - * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The notificationConfig. - */ - public com.google.storage.v2.NotificationConfig getNotificationConfig() { - if (notificationConfigBuilder_ == null) { - return notificationConfig_ == null - ? com.google.storage.v2.NotificationConfig.getDefaultInstance() - : notificationConfig_; - } else { - return notificationConfigBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. Properties of the NotificationConfig to be inserted.
-     * 
- * - * - * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setNotificationConfig(com.google.storage.v2.NotificationConfig value) { - if (notificationConfigBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - notificationConfig_ = value; - } else { - notificationConfigBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Properties of the NotificationConfig to be inserted.
-     * 
- * - * - * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setNotificationConfig( - com.google.storage.v2.NotificationConfig.Builder builderForValue) { - if (notificationConfigBuilder_ == null) { - notificationConfig_ = builderForValue.build(); - } else { - notificationConfigBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Properties of the NotificationConfig to be inserted.
-     * 
- * - * - * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeNotificationConfig(com.google.storage.v2.NotificationConfig value) { - if (notificationConfigBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && notificationConfig_ != null - && notificationConfig_ - != com.google.storage.v2.NotificationConfig.getDefaultInstance()) { - getNotificationConfigBuilder().mergeFrom(value); - } else { - notificationConfig_ = value; - } - } else { - notificationConfigBuilder_.mergeFrom(value); - } - if (notificationConfig_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - * - * - *
-     * Required. Properties of the NotificationConfig to be inserted.
-     * 
- * - * - * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearNotificationConfig() { - bitField0_ = (bitField0_ & ~0x00000002); - notificationConfig_ = null; - if (notificationConfigBuilder_ != null) { - notificationConfigBuilder_.dispose(); - notificationConfigBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Properties of the NotificationConfig to be inserted.
-     * 
- * - * - * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.storage.v2.NotificationConfig.Builder getNotificationConfigBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getNotificationConfigFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. Properties of the NotificationConfig to be inserted.
-     * 
- * - * - * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.storage.v2.NotificationConfigOrBuilder getNotificationConfigOrBuilder() { - if (notificationConfigBuilder_ != null) { - return notificationConfigBuilder_.getMessageOrBuilder(); - } else { - return notificationConfig_ == null - ? com.google.storage.v2.NotificationConfig.getDefaultInstance() - : notificationConfig_; - } - } - /** - * - * - *
-     * Required. Properties of the NotificationConfig to be inserted.
-     * 
- * - * - * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.storage.v2.NotificationConfig, - com.google.storage.v2.NotificationConfig.Builder, - com.google.storage.v2.NotificationConfigOrBuilder> - getNotificationConfigFieldBuilder() { - if (notificationConfigBuilder_ == null) { - notificationConfigBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.storage.v2.NotificationConfig, - com.google.storage.v2.NotificationConfig.Builder, - com.google.storage.v2.NotificationConfigOrBuilder>( - getNotificationConfig(), getParentForChildren(), isClean()); - notificationConfig_ = null; - } - return notificationConfigBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.storage.v2.CreateNotificationConfigRequest) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.CreateNotificationConfigRequest) - private static final com.google.storage.v2.CreateNotificationConfigRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.CreateNotificationConfigRequest(); - } - - public static com.google.storage.v2.CreateNotificationConfigRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateNotificationConfigRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.storage.v2.CreateNotificationConfigRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateNotificationConfigRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateNotificationConfigRequestOrBuilder.java deleted file mode 100644 index 3d88929eb8..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateNotificationConfigRequestOrBuilder.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface CreateNotificationConfigRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.CreateNotificationConfigRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The bucket to which this NotificationConfig belongs.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The bucket to which this NotificationConfig belongs.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Required. Properties of the NotificationConfig to be inserted.
-   * 
- * - * - * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the notificationConfig field is set. - */ - boolean hasNotificationConfig(); - /** - * - * - *
-   * Required. Properties of the NotificationConfig to be inserted.
-   * 
- * - * - * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The notificationConfig. - */ - com.google.storage.v2.NotificationConfig getNotificationConfig(); - /** - * - * - *
-   * Required. Properties of the NotificationConfig to be inserted.
-   * 
- * - * - * .google.storage.v2.NotificationConfig notification_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.storage.v2.NotificationConfigOrBuilder getNotificationConfigOrBuilder(); -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteHmacKeyRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteHmacKeyRequest.java deleted file mode 100644 index 8c870a8d65..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteHmacKeyRequest.java +++ /dev/null @@ -1,834 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * Request object to delete a given HMAC key.
- * 
- * - * Protobuf type {@code google.storage.v2.DeleteHmacKeyRequest} - */ -public final class DeleteHmacKeyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.DeleteHmacKeyRequest) - DeleteHmacKeyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeleteHmacKeyRequest.newBuilder() to construct. - private DeleteHmacKeyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DeleteHmacKeyRequest() { - accessId_ = ""; - project_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteHmacKeyRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_DeleteHmacKeyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_DeleteHmacKeyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.DeleteHmacKeyRequest.class, - com.google.storage.v2.DeleteHmacKeyRequest.Builder.class); - } - - public static final int ACCESS_ID_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object accessId_ = ""; - /** - * - * - *
-   * Required. The identifying key for the HMAC to delete.
-   * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The accessId. - */ - @java.lang.Override - public java.lang.String getAccessId() { - java.lang.Object ref = accessId_; - 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(); - accessId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The identifying key for the HMAC to delete.
-   * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for accessId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getAccessIdBytes() { - java.lang.Object ref = accessId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - accessId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PROJECT_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object project_ = ""; - /** - * - * - *
-   * Required. The project that owns the HMAC key, in the format of
-   * "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - @java.lang.Override - public java.lang.String getProject() { - java.lang.Object ref = project_; - 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(); - project_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The project that owns the HMAC key, in the format of
-   * "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - project_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accessId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, accessId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, project_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accessId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, accessId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, project_); - } - size += getUnknownFields().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.storage.v2.DeleteHmacKeyRequest)) { - return super.equals(obj); - } - com.google.storage.v2.DeleteHmacKeyRequest other = - (com.google.storage.v2.DeleteHmacKeyRequest) obj; - - if (!getAccessId().equals(other.getAccessId())) return false; - if (!getProject().equals(other.getProject())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ACCESS_ID_FIELD_NUMBER; - hash = (53 * hash) + getAccessId().hashCode(); - hash = (37 * hash) + PROJECT_FIELD_NUMBER; - hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.DeleteHmacKeyRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.DeleteHmacKeyRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.DeleteHmacKeyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.DeleteHmacKeyRequest 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.storage.v2.DeleteHmacKeyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.DeleteHmacKeyRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.DeleteHmacKeyRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.DeleteHmacKeyRequest 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.storage.v2.DeleteHmacKeyRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.DeleteHmacKeyRequest 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.storage.v2.DeleteHmacKeyRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.DeleteHmacKeyRequest 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.storage.v2.DeleteHmacKeyRequest 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 object to delete a given HMAC key.
-   * 
- * - * Protobuf type {@code google.storage.v2.DeleteHmacKeyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.DeleteHmacKeyRequest) - com.google.storage.v2.DeleteHmacKeyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_DeleteHmacKeyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_DeleteHmacKeyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.DeleteHmacKeyRequest.class, - com.google.storage.v2.DeleteHmacKeyRequest.Builder.class); - } - - // Construct using com.google.storage.v2.DeleteHmacKeyRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - accessId_ = ""; - project_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_DeleteHmacKeyRequest_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.DeleteHmacKeyRequest getDefaultInstanceForType() { - return com.google.storage.v2.DeleteHmacKeyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.DeleteHmacKeyRequest build() { - com.google.storage.v2.DeleteHmacKeyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.DeleteHmacKeyRequest buildPartial() { - com.google.storage.v2.DeleteHmacKeyRequest result = - new com.google.storage.v2.DeleteHmacKeyRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.storage.v2.DeleteHmacKeyRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.accessId_ = accessId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.project_ = project_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.storage.v2.DeleteHmacKeyRequest) { - return mergeFrom((com.google.storage.v2.DeleteHmacKeyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.DeleteHmacKeyRequest other) { - if (other == com.google.storage.v2.DeleteHmacKeyRequest.getDefaultInstance()) return this; - if (!other.getAccessId().isEmpty()) { - accessId_ = other.accessId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getProject().isEmpty()) { - project_ = other.project_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - accessId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - project_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object accessId_ = ""; - /** - * - * - *
-     * Required. The identifying key for the HMAC to delete.
-     * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The accessId. - */ - public java.lang.String getAccessId() { - java.lang.Object ref = accessId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - accessId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The identifying key for the HMAC to delete.
-     * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for accessId. - */ - public com.google.protobuf.ByteString getAccessIdBytes() { - java.lang.Object ref = accessId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - accessId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The identifying key for the HMAC to delete.
-     * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The accessId to set. - * @return This builder for chaining. - */ - public Builder setAccessId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - accessId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The identifying key for the HMAC to delete.
-     * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearAccessId() { - accessId_ = getDefaultInstance().getAccessId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The identifying key for the HMAC to delete.
-     * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for accessId to set. - * @return This builder for chaining. - */ - public Builder setAccessIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - accessId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object project_ = ""; - /** - * - * - *
-     * Required. The project that owns the HMAC key, in the format of
-     * "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - public java.lang.String getProject() { - java.lang.Object ref = project_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - project_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The project that owns the HMAC key, in the format of
-     * "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - public com.google.protobuf.ByteString getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The project that owns the HMAC key, in the format of
-     * "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The project to set. - * @return This builder for chaining. - */ - public Builder setProject(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - project_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The project that owns the HMAC key, in the format of
-     * "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearProject() { - project_ = getDefaultInstance().getProject(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The project that owns the HMAC key, in the format of
-     * "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for project to set. - * @return This builder for chaining. - */ - public Builder setProjectBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - project_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.storage.v2.DeleteHmacKeyRequest) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.DeleteHmacKeyRequest) - private static final com.google.storage.v2.DeleteHmacKeyRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.DeleteHmacKeyRequest(); - } - - public static com.google.storage.v2.DeleteHmacKeyRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteHmacKeyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.storage.v2.DeleteHmacKeyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteHmacKeyRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteHmacKeyRequestOrBuilder.java deleted file mode 100644 index 4c742441e3..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteHmacKeyRequestOrBuilder.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface DeleteHmacKeyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.DeleteHmacKeyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The identifying key for the HMAC to delete.
-   * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The accessId. - */ - java.lang.String getAccessId(); - /** - * - * - *
-   * Required. The identifying key for the HMAC to delete.
-   * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for accessId. - */ - com.google.protobuf.ByteString getAccessIdBytes(); - - /** - * - * - *
-   * Required. The project that owns the HMAC key, in the format of
-   * "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - java.lang.String getProject(); - /** - * - * - *
-   * Required. The project that owns the HMAC key, in the format of
-   * "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - com.google.protobuf.ByteString getProjectBytes(); -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteNotificationConfigRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteNotificationConfigRequest.java deleted file mode 100644 index fe8197a5aa..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteNotificationConfigRequest.java +++ /dev/null @@ -1,641 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * Request message for DeleteNotificationConfig.
- * 
- * - * Protobuf type {@code google.storage.v2.DeleteNotificationConfigRequest} - */ -public final class DeleteNotificationConfigRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.DeleteNotificationConfigRequest) - DeleteNotificationConfigRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeleteNotificationConfigRequest.newBuilder() to construct. - private DeleteNotificationConfigRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DeleteNotificationConfigRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteNotificationConfigRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_DeleteNotificationConfigRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_DeleteNotificationConfigRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.DeleteNotificationConfigRequest.class, - com.google.storage.v2.DeleteNotificationConfigRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Required. The parent bucket of the NotificationConfig.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - 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. The parent bucket of the NotificationConfig.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - 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; - } - } - - 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().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.storage.v2.DeleteNotificationConfigRequest)) { - return super.equals(obj); - } - com.google.storage.v2.DeleteNotificationConfigRequest other = - (com.google.storage.v2.DeleteNotificationConfigRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @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(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.DeleteNotificationConfigRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.DeleteNotificationConfigRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.DeleteNotificationConfigRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.DeleteNotificationConfigRequest 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.storage.v2.DeleteNotificationConfigRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.DeleteNotificationConfigRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.DeleteNotificationConfigRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.DeleteNotificationConfigRequest 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.storage.v2.DeleteNotificationConfigRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.DeleteNotificationConfigRequest 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.storage.v2.DeleteNotificationConfigRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.DeleteNotificationConfigRequest 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.storage.v2.DeleteNotificationConfigRequest 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 message for DeleteNotificationConfig.
-   * 
- * - * Protobuf type {@code google.storage.v2.DeleteNotificationConfigRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.DeleteNotificationConfigRequest) - com.google.storage.v2.DeleteNotificationConfigRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_DeleteNotificationConfigRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_DeleteNotificationConfigRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.DeleteNotificationConfigRequest.class, - com.google.storage.v2.DeleteNotificationConfigRequest.Builder.class); - } - - // Construct using com.google.storage.v2.DeleteNotificationConfigRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_DeleteNotificationConfigRequest_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.DeleteNotificationConfigRequest getDefaultInstanceForType() { - return com.google.storage.v2.DeleteNotificationConfigRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.DeleteNotificationConfigRequest build() { - com.google.storage.v2.DeleteNotificationConfigRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.DeleteNotificationConfigRequest buildPartial() { - com.google.storage.v2.DeleteNotificationConfigRequest result = - new com.google.storage.v2.DeleteNotificationConfigRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.storage.v2.DeleteNotificationConfigRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.storage.v2.DeleteNotificationConfigRequest) { - return mergeFrom((com.google.storage.v2.DeleteNotificationConfigRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.DeleteNotificationConfigRequest other) { - if (other == com.google.storage.v2.DeleteNotificationConfigRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The parent bucket of the NotificationConfig.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - 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. The parent bucket of the NotificationConfig.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - 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. The parent bucket of the NotificationConfig.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The parent bucket of the NotificationConfig.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The parent bucket of the NotificationConfig.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.storage.v2.DeleteNotificationConfigRequest) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.DeleteNotificationConfigRequest) - private static final com.google.storage.v2.DeleteNotificationConfigRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.DeleteNotificationConfigRequest(); - } - - public static com.google.storage.v2.DeleteNotificationConfigRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteNotificationConfigRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.storage.v2.DeleteNotificationConfigRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteNotificationConfigRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteNotificationConfigRequestOrBuilder.java deleted file mode 100644 index f122b0b589..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteNotificationConfigRequestOrBuilder.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface DeleteNotificationConfigRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.DeleteNotificationConfigRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The parent bucket of the NotificationConfig.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The parent bucket of the NotificationConfig.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetHmacKeyRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetHmacKeyRequest.java deleted file mode 100644 index e617f5266e..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetHmacKeyRequest.java +++ /dev/null @@ -1,833 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * Request object to get metadata on a given HMAC key.
- * 
- * - * Protobuf type {@code google.storage.v2.GetHmacKeyRequest} - */ -public final class GetHmacKeyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.GetHmacKeyRequest) - GetHmacKeyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetHmacKeyRequest.newBuilder() to construct. - private GetHmacKeyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetHmacKeyRequest() { - accessId_ = ""; - project_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetHmacKeyRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_GetHmacKeyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_GetHmacKeyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.GetHmacKeyRequest.class, - com.google.storage.v2.GetHmacKeyRequest.Builder.class); - } - - public static final int ACCESS_ID_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object accessId_ = ""; - /** - * - * - *
-   * Required. The identifying key for the HMAC to delete.
-   * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The accessId. - */ - @java.lang.Override - public java.lang.String getAccessId() { - java.lang.Object ref = accessId_; - 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(); - accessId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The identifying key for the HMAC to delete.
-   * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for accessId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getAccessIdBytes() { - java.lang.Object ref = accessId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - accessId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PROJECT_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object project_ = ""; - /** - * - * - *
-   * Required. The project the HMAC key lies in, in the format of
-   * "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - @java.lang.Override - public java.lang.String getProject() { - java.lang.Object ref = project_; - 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(); - project_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The project the HMAC key lies in, in the format of
-   * "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - project_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accessId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, accessId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, project_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accessId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, accessId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, project_); - } - size += getUnknownFields().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.storage.v2.GetHmacKeyRequest)) { - return super.equals(obj); - } - com.google.storage.v2.GetHmacKeyRequest other = (com.google.storage.v2.GetHmacKeyRequest) obj; - - if (!getAccessId().equals(other.getAccessId())) return false; - if (!getProject().equals(other.getProject())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ACCESS_ID_FIELD_NUMBER; - hash = (53 * hash) + getAccessId().hashCode(); - hash = (37 * hash) + PROJECT_FIELD_NUMBER; - hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.GetHmacKeyRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.GetHmacKeyRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.GetHmacKeyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.GetHmacKeyRequest 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.storage.v2.GetHmacKeyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.GetHmacKeyRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.GetHmacKeyRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.GetHmacKeyRequest 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.storage.v2.GetHmacKeyRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.GetHmacKeyRequest 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.storage.v2.GetHmacKeyRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.GetHmacKeyRequest 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.storage.v2.GetHmacKeyRequest 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 object to get metadata on a given HMAC key.
-   * 
- * - * Protobuf type {@code google.storage.v2.GetHmacKeyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.GetHmacKeyRequest) - com.google.storage.v2.GetHmacKeyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_GetHmacKeyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_GetHmacKeyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.GetHmacKeyRequest.class, - com.google.storage.v2.GetHmacKeyRequest.Builder.class); - } - - // Construct using com.google.storage.v2.GetHmacKeyRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - accessId_ = ""; - project_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_GetHmacKeyRequest_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.GetHmacKeyRequest getDefaultInstanceForType() { - return com.google.storage.v2.GetHmacKeyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.GetHmacKeyRequest build() { - com.google.storage.v2.GetHmacKeyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.GetHmacKeyRequest buildPartial() { - com.google.storage.v2.GetHmacKeyRequest result = - new com.google.storage.v2.GetHmacKeyRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.storage.v2.GetHmacKeyRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.accessId_ = accessId_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.project_ = project_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.storage.v2.GetHmacKeyRequest) { - return mergeFrom((com.google.storage.v2.GetHmacKeyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.GetHmacKeyRequest other) { - if (other == com.google.storage.v2.GetHmacKeyRequest.getDefaultInstance()) return this; - if (!other.getAccessId().isEmpty()) { - accessId_ = other.accessId_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getProject().isEmpty()) { - project_ = other.project_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - accessId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - project_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object accessId_ = ""; - /** - * - * - *
-     * Required. The identifying key for the HMAC to delete.
-     * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The accessId. - */ - public java.lang.String getAccessId() { - java.lang.Object ref = accessId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - accessId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The identifying key for the HMAC to delete.
-     * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for accessId. - */ - public com.google.protobuf.ByteString getAccessIdBytes() { - java.lang.Object ref = accessId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - accessId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The identifying key for the HMAC to delete.
-     * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The accessId to set. - * @return This builder for chaining. - */ - public Builder setAccessId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - accessId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The identifying key for the HMAC to delete.
-     * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearAccessId() { - accessId_ = getDefaultInstance().getAccessId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The identifying key for the HMAC to delete.
-     * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for accessId to set. - * @return This builder for chaining. - */ - public Builder setAccessIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - accessId_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object project_ = ""; - /** - * - * - *
-     * Required. The project the HMAC key lies in, in the format of
-     * "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - public java.lang.String getProject() { - java.lang.Object ref = project_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - project_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The project the HMAC key lies in, in the format of
-     * "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - public com.google.protobuf.ByteString getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The project the HMAC key lies in, in the format of
-     * "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The project to set. - * @return This builder for chaining. - */ - public Builder setProject(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - project_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The project the HMAC key lies in, in the format of
-     * "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearProject() { - project_ = getDefaultInstance().getProject(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The project the HMAC key lies in, in the format of
-     * "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for project to set. - * @return This builder for chaining. - */ - public Builder setProjectBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - project_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.storage.v2.GetHmacKeyRequest) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.GetHmacKeyRequest) - private static final com.google.storage.v2.GetHmacKeyRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.GetHmacKeyRequest(); - } - - public static com.google.storage.v2.GetHmacKeyRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetHmacKeyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.storage.v2.GetHmacKeyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetHmacKeyRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetHmacKeyRequestOrBuilder.java deleted file mode 100644 index 7c3c6cb762..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetHmacKeyRequestOrBuilder.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface GetHmacKeyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.GetHmacKeyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The identifying key for the HMAC to delete.
-   * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The accessId. - */ - java.lang.String getAccessId(); - /** - * - * - *
-   * Required. The identifying key for the HMAC to delete.
-   * 
- * - * string access_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for accessId. - */ - com.google.protobuf.ByteString getAccessIdBytes(); - - /** - * - * - *
-   * Required. The project the HMAC key lies in, in the format of
-   * "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - java.lang.String getProject(); - /** - * - * - *
-   * Required. The project the HMAC key lies in, in the format of
-   * "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - com.google.protobuf.ByteString getProjectBytes(); -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetNotificationConfigRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetNotificationConfigRequest.java deleted file mode 100644 index da16123032..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetNotificationConfigRequest.java +++ /dev/null @@ -1,653 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * Request message for GetNotificationConfig.
- * 
- * - * Protobuf type {@code google.storage.v2.GetNotificationConfigRequest} - */ -public final class GetNotificationConfigRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.GetNotificationConfigRequest) - GetNotificationConfigRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetNotificationConfigRequest.newBuilder() to construct. - private GetNotificationConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetNotificationConfigRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetNotificationConfigRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_GetNotificationConfigRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_GetNotificationConfigRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.GetNotificationConfigRequest.class, - com.google.storage.v2.GetNotificationConfigRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Required. The parent bucket of the NotificationConfig.
-   * Format:
-   * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - @java.lang.Override - 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. The parent bucket of the NotificationConfig.
-   * Format:
-   * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - @java.lang.Override - 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; - } - } - - 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().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.storage.v2.GetNotificationConfigRequest)) { - return super.equals(obj); - } - com.google.storage.v2.GetNotificationConfigRequest other = - (com.google.storage.v2.GetNotificationConfigRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @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(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.GetNotificationConfigRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.GetNotificationConfigRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.GetNotificationConfigRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.GetNotificationConfigRequest 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.storage.v2.GetNotificationConfigRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.GetNotificationConfigRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.GetNotificationConfigRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.GetNotificationConfigRequest 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.storage.v2.GetNotificationConfigRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.GetNotificationConfigRequest 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.storage.v2.GetNotificationConfigRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.GetNotificationConfigRequest 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.storage.v2.GetNotificationConfigRequest 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 message for GetNotificationConfig.
-   * 
- * - * Protobuf type {@code google.storage.v2.GetNotificationConfigRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.GetNotificationConfigRequest) - com.google.storage.v2.GetNotificationConfigRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_GetNotificationConfigRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_GetNotificationConfigRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.GetNotificationConfigRequest.class, - com.google.storage.v2.GetNotificationConfigRequest.Builder.class); - } - - // Construct using com.google.storage.v2.GetNotificationConfigRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_GetNotificationConfigRequest_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.GetNotificationConfigRequest getDefaultInstanceForType() { - return com.google.storage.v2.GetNotificationConfigRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.GetNotificationConfigRequest build() { - com.google.storage.v2.GetNotificationConfigRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.GetNotificationConfigRequest buildPartial() { - com.google.storage.v2.GetNotificationConfigRequest result = - new com.google.storage.v2.GetNotificationConfigRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.storage.v2.GetNotificationConfigRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.storage.v2.GetNotificationConfigRequest) { - return mergeFrom((com.google.storage.v2.GetNotificationConfigRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.GetNotificationConfigRequest other) { - if (other == com.google.storage.v2.GetNotificationConfigRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The parent bucket of the NotificationConfig.
-     * Format:
-     * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - 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. The parent bucket of the NotificationConfig.
-     * Format:
-     * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - 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. The parent bucket of the NotificationConfig.
-     * Format:
-     * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The parent bucket of the NotificationConfig.
-     * Format:
-     * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The parent bucket of the NotificationConfig.
-     * Format:
-     * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.storage.v2.GetNotificationConfigRequest) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.GetNotificationConfigRequest) - private static final com.google.storage.v2.GetNotificationConfigRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.GetNotificationConfigRequest(); - } - - public static com.google.storage.v2.GetNotificationConfigRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetNotificationConfigRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.storage.v2.GetNotificationConfigRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetNotificationConfigRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetNotificationConfigRequestOrBuilder.java deleted file mode 100644 index 9039ecc6f1..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetNotificationConfigRequestOrBuilder.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface GetNotificationConfigRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.GetNotificationConfigRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The parent bucket of the NotificationConfig.
-   * Format:
-   * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The parent bucket of the NotificationConfig.
-   * Format:
-   * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetServiceAccountRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetServiceAccountRequest.java deleted file mode 100644 index d4292f958b..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetServiceAccountRequest.java +++ /dev/null @@ -1,645 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * Request message for GetServiceAccount.
- * 
- * - * Protobuf type {@code google.storage.v2.GetServiceAccountRequest} - */ -public final class GetServiceAccountRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.GetServiceAccountRequest) - GetServiceAccountRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetServiceAccountRequest.newBuilder() to construct. - private GetServiceAccountRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetServiceAccountRequest() { - project_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetServiceAccountRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_GetServiceAccountRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_GetServiceAccountRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.GetServiceAccountRequest.class, - com.google.storage.v2.GetServiceAccountRequest.Builder.class); - } - - public static final int PROJECT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object project_ = ""; - /** - * - * - *
-   * Required. Project ID, in the format of "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - @java.lang.Override - public java.lang.String getProject() { - java.lang.Object ref = project_; - 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(); - project_ = s; - return s; - } - } - /** - * - * - *
-   * Required. Project ID, in the format of "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - project_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, project_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, project_); - } - size += getUnknownFields().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.storage.v2.GetServiceAccountRequest)) { - return super.equals(obj); - } - com.google.storage.v2.GetServiceAccountRequest other = - (com.google.storage.v2.GetServiceAccountRequest) obj; - - if (!getProject().equals(other.getProject())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PROJECT_FIELD_NUMBER; - hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.GetServiceAccountRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.GetServiceAccountRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.GetServiceAccountRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.GetServiceAccountRequest 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.storage.v2.GetServiceAccountRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.GetServiceAccountRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.GetServiceAccountRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.GetServiceAccountRequest 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.storage.v2.GetServiceAccountRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.GetServiceAccountRequest 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.storage.v2.GetServiceAccountRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.GetServiceAccountRequest 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.storage.v2.GetServiceAccountRequest 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 message for GetServiceAccount.
-   * 
- * - * Protobuf type {@code google.storage.v2.GetServiceAccountRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.GetServiceAccountRequest) - com.google.storage.v2.GetServiceAccountRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_GetServiceAccountRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_GetServiceAccountRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.GetServiceAccountRequest.class, - com.google.storage.v2.GetServiceAccountRequest.Builder.class); - } - - // Construct using com.google.storage.v2.GetServiceAccountRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - project_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_GetServiceAccountRequest_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.GetServiceAccountRequest getDefaultInstanceForType() { - return com.google.storage.v2.GetServiceAccountRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.GetServiceAccountRequest build() { - com.google.storage.v2.GetServiceAccountRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.GetServiceAccountRequest buildPartial() { - com.google.storage.v2.GetServiceAccountRequest result = - new com.google.storage.v2.GetServiceAccountRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.storage.v2.GetServiceAccountRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.project_ = project_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.storage.v2.GetServiceAccountRequest) { - return mergeFrom((com.google.storage.v2.GetServiceAccountRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.GetServiceAccountRequest other) { - if (other == com.google.storage.v2.GetServiceAccountRequest.getDefaultInstance()) return this; - if (!other.getProject().isEmpty()) { - project_ = other.project_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - project_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object project_ = ""; - /** - * - * - *
-     * Required. Project ID, in the format of "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - public java.lang.String getProject() { - java.lang.Object ref = project_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - project_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. Project ID, in the format of "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - public com.google.protobuf.ByteString getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. Project ID, in the format of "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The project to set. - * @return This builder for chaining. - */ - public Builder setProject(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - project_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Project ID, in the format of "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearProject() { - project_ = getDefaultInstance().getProject(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Project ID, in the format of "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for project to set. - * @return This builder for chaining. - */ - public Builder setProjectBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - project_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.storage.v2.GetServiceAccountRequest) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.GetServiceAccountRequest) - private static final com.google.storage.v2.GetServiceAccountRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.GetServiceAccountRequest(); - } - - public static com.google.storage.v2.GetServiceAccountRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetServiceAccountRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.storage.v2.GetServiceAccountRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetServiceAccountRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetServiceAccountRequestOrBuilder.java deleted file mode 100644 index 13a1c09342..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetServiceAccountRequestOrBuilder.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface GetServiceAccountRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.GetServiceAccountRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Project ID, in the format of "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - java.lang.String getProject(); - /** - * - * - *
-   * Required. Project ID, in the format of "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - com.google.protobuf.ByteString getProjectBytes(); -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/HmacKeyMetadata.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/HmacKeyMetadata.java deleted file mode 100644 index 362361e859..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/HmacKeyMetadata.java +++ /dev/null @@ -1,2162 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * Hmac Key Metadata, which includes all information other than the secret.
- * 
- * - * Protobuf type {@code google.storage.v2.HmacKeyMetadata} - */ -public final class HmacKeyMetadata extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.HmacKeyMetadata) - HmacKeyMetadataOrBuilder { - private static final long serialVersionUID = 0L; - // Use HmacKeyMetadata.newBuilder() to construct. - private HmacKeyMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private HmacKeyMetadata() { - id_ = ""; - accessId_ = ""; - project_ = ""; - serviceAccountEmail_ = ""; - state_ = ""; - etag_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new HmacKeyMetadata(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_HmacKeyMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_HmacKeyMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.HmacKeyMetadata.class, - com.google.storage.v2.HmacKeyMetadata.Builder.class); - } - - private int bitField0_; - public static final int ID_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * - * - *
-   * Immutable. Resource name ID of the key in the format
-   * {projectIdentifier}/{accessId}.
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - 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(); - id_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. Resource name ID of the key in the format
-   * {projectIdentifier}/{accessId}.
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ACCESS_ID_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object accessId_ = ""; - /** - * - * - *
-   * Immutable. Globally unique id for keys.
-   * 
- * - * string access_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The accessId. - */ - @java.lang.Override - public java.lang.String getAccessId() { - java.lang.Object ref = accessId_; - 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(); - accessId_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. Globally unique id for keys.
-   * 
- * - * string access_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for accessId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getAccessIdBytes() { - java.lang.Object ref = accessId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - accessId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PROJECT_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object project_ = ""; - /** - * - * - *
-   * Immutable. Identifies the project that owns the service account of the
-   * specified HMAC key, in the format "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - @java.lang.Override - public java.lang.String getProject() { - java.lang.Object ref = project_; - 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(); - project_ = s; - return s; - } - } - /** - * - * - *
-   * Immutable. Identifies the project that owns the service account of the
-   * specified HMAC key, in the format "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object serviceAccountEmail_ = ""; - /** - * - * - *
-   * Output only. Email of the service account the key authenticates as.
-   * 
- * - * string service_account_email = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The serviceAccountEmail. - */ - @java.lang.Override - public java.lang.String getServiceAccountEmail() { - java.lang.Object ref = serviceAccountEmail_; - 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(); - serviceAccountEmail_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. Email of the service account the key authenticates as.
-   * 
- * - * string service_account_email = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for serviceAccountEmail. - */ - @java.lang.Override - public com.google.protobuf.ByteString getServiceAccountEmailBytes() { - java.lang.Object ref = serviceAccountEmail_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - serviceAccountEmail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int STATE_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object state_ = ""; - /** - * - * - *
-   * Optional. State of the key. One of ACTIVE, INACTIVE, or DELETED.
-   * Writable, can be updated by UpdateHmacKey operation.
-   * 
- * - * string state = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The state. - */ - @java.lang.Override - public java.lang.String getState() { - java.lang.Object ref = state_; - 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(); - state_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. State of the key. One of ACTIVE, INACTIVE, or DELETED.
-   * Writable, can be updated by UpdateHmacKey operation.
-   * 
- * - * string state = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for state. - */ - @java.lang.Override - public com.google.protobuf.ByteString getStateBytes() { - java.lang.Object ref = state_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - state_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int CREATE_TIME_FIELD_NUMBER = 6; - private com.google.protobuf.Timestamp createTime_; - /** - * - * - *
-   * Output only. The creation time of the HMAC key.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - @java.lang.Override - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-   * Output only. The creation time of the HMAC key.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getCreateTime() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - /** - * - * - *
-   * Output only. The creation time of the HMAC key.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 7; - private com.google.protobuf.Timestamp updateTime_; - /** - * - * - *
-   * Output only. The last modification time of the HMAC key metadata.
-   * 
- * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-   * Output only. The last modification time of the HMAC key metadata.
-   * 
- * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - * - * - *
-   * Output only. The last modification time of the HMAC key metadata.
-   * 
- * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - - public static final int ETAG_FIELD_NUMBER = 8; - - @SuppressWarnings("serial") - private volatile java.lang.Object etag_ = ""; - /** - * - * - *
-   * Optional. The etag of the HMAC key.
-   * 
- * - * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The etag. - */ - @java.lang.Override - public java.lang.String getEtag() { - java.lang.Object ref = etag_; - 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(); - etag_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The etag of the HMAC key.
-   * 
- * - * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for etag. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEtagBytes() { - java.lang.Object ref = etag_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - etag_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accessId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, accessId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, project_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, serviceAccountEmail_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(state_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, state_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(6, getCreateTime()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(7, getUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, etag_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accessId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, accessId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, project_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, serviceAccountEmail_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(state_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, state_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, etag_); - } - size += getUnknownFields().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.storage.v2.HmacKeyMetadata)) { - return super.equals(obj); - } - com.google.storage.v2.HmacKeyMetadata other = (com.google.storage.v2.HmacKeyMetadata) obj; - - if (!getId().equals(other.getId())) return false; - if (!getAccessId().equals(other.getAccessId())) return false; - if (!getProject().equals(other.getProject())) return false; - if (!getServiceAccountEmail().equals(other.getServiceAccountEmail())) return false; - if (!getState().equals(other.getState())) return false; - if (hasCreateTime() != other.hasCreateTime()) return false; - if (hasCreateTime()) { - if (!getCreateTime().equals(other.getCreateTime())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime().equals(other.getUpdateTime())) return false; - } - if (!getEtag().equals(other.getEtag())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (37 * hash) + ACCESS_ID_FIELD_NUMBER; - hash = (53 * hash) + getAccessId().hashCode(); - hash = (37 * hash) + PROJECT_FIELD_NUMBER; - hash = (53 * hash) + getProject().hashCode(); - hash = (37 * hash) + SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER; - hash = (53 * hash) + getServiceAccountEmail().hashCode(); - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + getState().hashCode(); - if (hasCreateTime()) { - hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getCreateTime().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - hash = (37 * hash) + ETAG_FIELD_NUMBER; - hash = (53 * hash) + getEtag().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.HmacKeyMetadata parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.HmacKeyMetadata parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.HmacKeyMetadata parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.HmacKeyMetadata 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.storage.v2.HmacKeyMetadata parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.HmacKeyMetadata parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.HmacKeyMetadata parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.HmacKeyMetadata 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.storage.v2.HmacKeyMetadata parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.HmacKeyMetadata 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.storage.v2.HmacKeyMetadata parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.HmacKeyMetadata 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.storage.v2.HmacKeyMetadata 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; - } - /** - * - * - *
-   * Hmac Key Metadata, which includes all information other than the secret.
-   * 
- * - * Protobuf type {@code google.storage.v2.HmacKeyMetadata} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.HmacKeyMetadata) - com.google.storage.v2.HmacKeyMetadataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_HmacKeyMetadata_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_HmacKeyMetadata_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.HmacKeyMetadata.class, - com.google.storage.v2.HmacKeyMetadata.Builder.class); - } - - // Construct using com.google.storage.v2.HmacKeyMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getCreateTimeFieldBuilder(); - getUpdateTimeFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - accessId_ = ""; - project_ = ""; - serviceAccountEmail_ = ""; - state_ = ""; - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - etag_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_HmacKeyMetadata_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.HmacKeyMetadata getDefaultInstanceForType() { - return com.google.storage.v2.HmacKeyMetadata.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.HmacKeyMetadata build() { - com.google.storage.v2.HmacKeyMetadata result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.HmacKeyMetadata buildPartial() { - com.google.storage.v2.HmacKeyMetadata result = - new com.google.storage.v2.HmacKeyMetadata(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.storage.v2.HmacKeyMetadata result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.accessId_ = accessId_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.project_ = project_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.serviceAccountEmail_ = serviceAccountEmail_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.state_ = state_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000020) != 0)) { - result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.etag_ = etag_; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.storage.v2.HmacKeyMetadata) { - return mergeFrom((com.google.storage.v2.HmacKeyMetadata) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.HmacKeyMetadata other) { - if (other == com.google.storage.v2.HmacKeyMetadata.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getAccessId().isEmpty()) { - accessId_ = other.accessId_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getProject().isEmpty()) { - project_ = other.project_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getServiceAccountEmail().isEmpty()) { - serviceAccountEmail_ = other.serviceAccountEmail_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (!other.getState().isEmpty()) { - state_ = other.state_; - bitField0_ |= 0x00000010; - onChanged(); - } - if (other.hasCreateTime()) { - mergeCreateTime(other.getCreateTime()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - if (!other.getEtag().isEmpty()) { - etag_ = other.etag_; - bitField0_ |= 0x00000080; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - accessId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - project_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - serviceAccountEmail_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: - { - state_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - break; - } // case 42 - case 50: - { - input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000020; - break; - } // case 50 - case 58: - { - input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000040; - break; - } // case 58 - case 66: - { - etag_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - break; - } // case 66 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * - * - *
-     * Immutable. Resource name ID of the key in the format
-     * {projectIdentifier}/{accessId}.
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. Resource name ID of the key in the format
-     * {projectIdentifier}/{accessId}.
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for id. - */ - public com.google.protobuf.ByteString getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. Resource name ID of the key in the format
-     * {projectIdentifier}/{accessId}.
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. Resource name ID of the key in the format
-     * {projectIdentifier}/{accessId}.
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. Resource name ID of the key in the format
-     * {projectIdentifier}/{accessId}.
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object accessId_ = ""; - /** - * - * - *
-     * Immutable. Globally unique id for keys.
-     * 
- * - * string access_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The accessId. - */ - public java.lang.String getAccessId() { - java.lang.Object ref = accessId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - accessId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. Globally unique id for keys.
-     * 
- * - * string access_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for accessId. - */ - public com.google.protobuf.ByteString getAccessIdBytes() { - java.lang.Object ref = accessId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - accessId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. Globally unique id for keys.
-     * 
- * - * string access_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The accessId to set. - * @return This builder for chaining. - */ - public Builder setAccessId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - accessId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. Globally unique id for keys.
-     * 
- * - * string access_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return This builder for chaining. - */ - public Builder clearAccessId() { - accessId_ = getDefaultInstance().getAccessId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. Globally unique id for keys.
-     * 
- * - * string access_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @param value The bytes for accessId to set. - * @return This builder for chaining. - */ - public Builder setAccessIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - accessId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object project_ = ""; - /** - * - * - *
-     * Immutable. Identifies the project that owns the service account of the
-     * specified HMAC key, in the format "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - public java.lang.String getProject() { - java.lang.Object ref = project_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - project_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Immutable. Identifies the project that owns the service account of the
-     * specified HMAC key, in the format "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - public com.google.protobuf.ByteString getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Immutable. Identifies the project that owns the service account of the
-     * specified HMAC key, in the format "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @param value The project to set. - * @return This builder for chaining. - */ - public Builder setProject(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - project_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. Identifies the project that owns the service account of the
-     * specified HMAC key, in the format "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearProject() { - project_ = getDefaultInstance().getProject(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Immutable. Identifies the project that owns the service account of the
-     * specified HMAC key, in the format "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for project to set. - * @return This builder for chaining. - */ - public Builder setProjectBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - project_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object serviceAccountEmail_ = ""; - /** - * - * - *
-     * Output only. Email of the service account the key authenticates as.
-     * 
- * - * string service_account_email = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The serviceAccountEmail. - */ - public java.lang.String getServiceAccountEmail() { - java.lang.Object ref = serviceAccountEmail_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - serviceAccountEmail_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. Email of the service account the key authenticates as.
-     * 
- * - * string service_account_email = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for serviceAccountEmail. - */ - public com.google.protobuf.ByteString getServiceAccountEmailBytes() { - java.lang.Object ref = serviceAccountEmail_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - serviceAccountEmail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. Email of the service account the key authenticates as.
-     * 
- * - * string service_account_email = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The serviceAccountEmail to set. - * @return This builder for chaining. - */ - public Builder setServiceAccountEmail(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - serviceAccountEmail_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Email of the service account the key authenticates as.
-     * 
- * - * string service_account_email = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearServiceAccountEmail() { - serviceAccountEmail_ = getDefaultInstance().getServiceAccountEmail(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. Email of the service account the key authenticates as.
-     * 
- * - * string service_account_email = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for serviceAccountEmail to set. - * @return This builder for chaining. - */ - public Builder setServiceAccountEmailBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - serviceAccountEmail_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private java.lang.Object state_ = ""; - /** - * - * - *
-     * Optional. State of the key. One of ACTIVE, INACTIVE, or DELETED.
-     * Writable, can be updated by UpdateHmacKey operation.
-     * 
- * - * string state = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The state. - */ - public java.lang.String getState() { - java.lang.Object ref = state_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - state_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. State of the key. One of ACTIVE, INACTIVE, or DELETED.
-     * Writable, can be updated by UpdateHmacKey operation.
-     * 
- * - * string state = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for state. - */ - public com.google.protobuf.ByteString getStateBytes() { - java.lang.Object ref = state_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - state_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. State of the key. One of ACTIVE, INACTIVE, or DELETED.
-     * Writable, can be updated by UpdateHmacKey operation.
-     * 
- * - * string state = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The state to set. - * @return This builder for chaining. - */ - public Builder setState(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - state_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. State of the key. One of ACTIVE, INACTIVE, or DELETED.
-     * Writable, can be updated by UpdateHmacKey operation.
-     * 
- * - * string state = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearState() { - state_ = getDefaultInstance().getState(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. State of the key. One of ACTIVE, INACTIVE, or DELETED.
-     * Writable, can be updated by UpdateHmacKey operation.
-     * 
- * - * string state = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for state to set. - * @return This builder for chaining. - */ - public Builder setStateBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - state_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp createTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - createTimeBuilder_; - /** - * - * - *
-     * Output only. The creation time of the HMAC key.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - public boolean hasCreateTime() { - return ((bitField0_ & 0x00000020) != 0); - } - /** - * - * - *
-     * Output only. The creation time of the HMAC key.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - public com.google.protobuf.Timestamp getCreateTime() { - if (createTimeBuilder_ == null) { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } else { - return createTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The creation time of the HMAC key.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - createTime_ = value; - } else { - createTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The creation time of the HMAC key.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (createTimeBuilder_ == null) { - createTime_ = builderForValue.build(); - } else { - createTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The creation time of the HMAC key.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { - if (createTimeBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) - && createTime_ != null - && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getCreateTimeBuilder().mergeFrom(value); - } else { - createTime_ = value; - } - } else { - createTimeBuilder_.mergeFrom(value); - } - if (createTime_ != null) { - bitField0_ |= 0x00000020; - onChanged(); - } - return this; - } - /** - * - * - *
-     * Output only. The creation time of the HMAC key.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearCreateTime() { - bitField0_ = (bitField0_ & ~0x00000020); - createTime_ = null; - if (createTimeBuilder_ != null) { - createTimeBuilder_.dispose(); - createTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The creation time of the HMAC key.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { - bitField0_ |= 0x00000020; - onChanged(); - return getCreateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The creation time of the HMAC key.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { - if (createTimeBuilder_ != null) { - return createTimeBuilder_.getMessageOrBuilder(); - } else { - return createTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : createTime_; - } - } - /** - * - * - *
-     * Output only. The creation time of the HMAC key.
-     * 
- * - * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getCreateTimeFieldBuilder() { - if (createTimeBuilder_ == null) { - createTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getCreateTime(), getParentForChildren(), isClean()); - createTime_ = null; - } - return createTimeBuilder_; - } - - private com.google.protobuf.Timestamp updateTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - updateTimeBuilder_; - /** - * - * - *
-     * Output only. The last modification time of the HMAC key metadata.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return ((bitField0_ & 0x00000040) != 0); - } - /** - * - * - *
-     * Output only. The last modification time of the HMAC key metadata.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. The last modification time of the HMAC key metadata.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - } else { - updateTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The last modification time of the HMAC key metadata.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The last modification time of the HMAC key metadata.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (((bitField0_ & 0x00000040) != 0) - && updateTime_ != null - && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getUpdateTimeBuilder().mergeFrom(value); - } else { - updateTime_ = value; - } - } else { - updateTimeBuilder_.mergeFrom(value); - } - if (updateTime_ != null) { - bitField0_ |= 0x00000040; - onChanged(); - } - return this; - } - /** - * - * - *
-     * Output only. The last modification time of the HMAC key metadata.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearUpdateTime() { - bitField0_ = (bitField0_ & ~0x00000040); - updateTime_ = null; - if (updateTimeBuilder_ != null) { - updateTimeBuilder_.dispose(); - updateTimeBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The last modification time of the HMAC key metadata.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - bitField0_ |= 0x00000040; - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. The last modification time of the HMAC key metadata.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } - } - /** - * - * - *
-     * Output only. The last modification time of the HMAC key metadata.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), getParentForChildren(), isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - private java.lang.Object etag_ = ""; - /** - * - * - *
-     * Optional. The etag of the HMAC key.
-     * 
- * - * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The etag. - */ - public java.lang.String getEtag() { - java.lang.Object ref = etag_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - etag_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The etag of the HMAC key.
-     * 
- * - * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for etag. - */ - public com.google.protobuf.ByteString getEtagBytes() { - java.lang.Object ref = etag_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - etag_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The etag of the HMAC key.
-     * 
- * - * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The etag to set. - * @return This builder for chaining. - */ - public Builder setEtag(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - etag_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The etag of the HMAC key.
-     * 
- * - * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearEtag() { - etag_ = getDefaultInstance().getEtag(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The etag of the HMAC key.
-     * 
- * - * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for etag to set. - * @return This builder for chaining. - */ - public Builder setEtagBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - etag_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.storage.v2.HmacKeyMetadata) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.HmacKeyMetadata) - private static final com.google.storage.v2.HmacKeyMetadata DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.HmacKeyMetadata(); - } - - public static com.google.storage.v2.HmacKeyMetadata getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public HmacKeyMetadata parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.storage.v2.HmacKeyMetadata getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/HmacKeyMetadataOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/HmacKeyMetadataOrBuilder.java deleted file mode 100644 index 817312e9fa..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/HmacKeyMetadataOrBuilder.java +++ /dev/null @@ -1,266 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface HmacKeyMetadataOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.HmacKeyMetadata) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Immutable. Resource name ID of the key in the format
-   * {projectIdentifier}/{accessId}.
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The id. - */ - java.lang.String getId(); - /** - * - * - *
-   * Immutable. Resource name ID of the key in the format
-   * {projectIdentifier}/{accessId}.
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * string id = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for id. - */ - com.google.protobuf.ByteString getIdBytes(); - - /** - * - * - *
-   * Immutable. Globally unique id for keys.
-   * 
- * - * string access_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The accessId. - */ - java.lang.String getAccessId(); - /** - * - * - *
-   * Immutable. Globally unique id for keys.
-   * 
- * - * string access_id = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * - * @return The bytes for accessId. - */ - com.google.protobuf.ByteString getAccessIdBytes(); - - /** - * - * - *
-   * Immutable. Identifies the project that owns the service account of the
-   * specified HMAC key, in the format "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - java.lang.String getProject(); - /** - * - * - *
-   * Immutable. Identifies the project that owns the service account of the
-   * specified HMAC key, in the format "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - com.google.protobuf.ByteString getProjectBytes(); - - /** - * - * - *
-   * Output only. Email of the service account the key authenticates as.
-   * 
- * - * string service_account_email = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The serviceAccountEmail. - */ - java.lang.String getServiceAccountEmail(); - /** - * - * - *
-   * Output only. Email of the service account the key authenticates as.
-   * 
- * - * string service_account_email = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for serviceAccountEmail. - */ - com.google.protobuf.ByteString getServiceAccountEmailBytes(); - - /** - * - * - *
-   * Optional. State of the key. One of ACTIVE, INACTIVE, or DELETED.
-   * Writable, can be updated by UpdateHmacKey operation.
-   * 
- * - * string state = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The state. - */ - java.lang.String getState(); - /** - * - * - *
-   * Optional. State of the key. One of ACTIVE, INACTIVE, or DELETED.
-   * Writable, can be updated by UpdateHmacKey operation.
-   * 
- * - * string state = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for state. - */ - com.google.protobuf.ByteString getStateBytes(); - - /** - * - * - *
-   * Output only. The creation time of the HMAC key.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the createTime field is set. - */ - boolean hasCreateTime(); - /** - * - * - *
-   * Output only. The creation time of the HMAC key.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The createTime. - */ - com.google.protobuf.Timestamp getCreateTime(); - /** - * - * - *
-   * Output only. The creation time of the HMAC key.
-   * 
- * - * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); - - /** - * - * - *
-   * Output only. The last modification time of the HMAC key metadata.
-   * 
- * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - * - * - *
-   * Output only. The last modification time of the HMAC key metadata.
-   * 
- * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - * - * - *
-   * Output only. The last modification time of the HMAC key metadata.
-   * 
- * - * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - /** - * - * - *
-   * Optional. The etag of the HMAC key.
-   * 
- * - * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The etag. - */ - java.lang.String getEtag(); - /** - * - * - *
-   * Optional. The etag of the HMAC key.
-   * 
- * - * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for etag. - */ - com.google.protobuf.ByteString getEtagBytes(); -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysRequest.java deleted file mode 100644 index 729af7ce4b..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysRequest.java +++ /dev/null @@ -1,1202 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * Request to fetch a list of HMAC keys under a given project.
- * 
- * - * Protobuf type {@code google.storage.v2.ListHmacKeysRequest} - */ -public final class ListHmacKeysRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.ListHmacKeysRequest) - ListHmacKeysRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListHmacKeysRequest.newBuilder() to construct. - private ListHmacKeysRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListHmacKeysRequest() { - project_ = ""; - pageToken_ = ""; - serviceAccountEmail_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListHmacKeysRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListHmacKeysRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListHmacKeysRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.ListHmacKeysRequest.class, - com.google.storage.v2.ListHmacKeysRequest.Builder.class); - } - - public static final int PROJECT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object project_ = ""; - /** - * - * - *
-   * Required. The project to list HMAC keys for, in the format of
-   * "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - @java.lang.Override - public java.lang.String getProject() { - java.lang.Object ref = project_; - 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(); - project_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The project to list HMAC keys for, in the format of
-   * "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - @java.lang.Override - public com.google.protobuf.ByteString getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_ = 0; - /** - * - * - *
-   * The maximum number of keys to return.
-   * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object pageToken_ = ""; - /** - * - * - *
-   * A previously returned token from ListHmacKeysResponse to get the next page.
-   * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - 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(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A previously returned token from ListHmacKeysResponse to get the next page.
-   * 
- * - * string page_token = 3; - * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER = 4; - - @SuppressWarnings("serial") - private volatile java.lang.Object serviceAccountEmail_ = ""; - /** - * - * - *
-   * If set, filters to only return HMAC keys for specified service account.
-   * 
- * - * string service_account_email = 4; - * - * @return The serviceAccountEmail. - */ - @java.lang.Override - public java.lang.String getServiceAccountEmail() { - java.lang.Object ref = serviceAccountEmail_; - 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(); - serviceAccountEmail_ = s; - return s; - } - } - /** - * - * - *
-   * If set, filters to only return HMAC keys for specified service account.
-   * 
- * - * string service_account_email = 4; - * - * @return The bytes for serviceAccountEmail. - */ - @java.lang.Override - public com.google.protobuf.ByteString getServiceAccountEmailBytes() { - java.lang.Object ref = serviceAccountEmail_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - serviceAccountEmail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SHOW_DELETED_KEYS_FIELD_NUMBER = 5; - private boolean showDeletedKeys_ = false; - /** - * - * - *
-   * If set, return deleted keys that have not yet been wiped out.
-   * 
- * - * bool show_deleted_keys = 5; - * - * @return The showDeletedKeys. - */ - @java.lang.Override - public boolean getShowDeletedKeys() { - return showDeletedKeys_; - } - - 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, project_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, serviceAccountEmail_); - } - if (showDeletedKeys_ != false) { - output.writeBool(5, showDeletedKeys_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, project_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountEmail_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, serviceAccountEmail_); - } - if (showDeletedKeys_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, showDeletedKeys_); - } - size += getUnknownFields().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.storage.v2.ListHmacKeysRequest)) { - return super.equals(obj); - } - com.google.storage.v2.ListHmacKeysRequest other = - (com.google.storage.v2.ListHmacKeysRequest) obj; - - if (!getProject().equals(other.getProject())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!getServiceAccountEmail().equals(other.getServiceAccountEmail())) return false; - if (getShowDeletedKeys() != other.getShowDeletedKeys()) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PROJECT_FIELD_NUMBER; - hash = (53 * hash) + getProject().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (37 * hash) + SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER; - hash = (53 * hash) + getServiceAccountEmail().hashCode(); - hash = (37 * hash) + SHOW_DELETED_KEYS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getShowDeletedKeys()); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.ListHmacKeysRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.ListHmacKeysRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.ListHmacKeysRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.ListHmacKeysRequest 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.storage.v2.ListHmacKeysRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.ListHmacKeysRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.ListHmacKeysRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.ListHmacKeysRequest 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.storage.v2.ListHmacKeysRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.ListHmacKeysRequest 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.storage.v2.ListHmacKeysRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.ListHmacKeysRequest 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.storage.v2.ListHmacKeysRequest 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 to fetch a list of HMAC keys under a given project.
-   * 
- * - * Protobuf type {@code google.storage.v2.ListHmacKeysRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.ListHmacKeysRequest) - com.google.storage.v2.ListHmacKeysRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListHmacKeysRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListHmacKeysRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.ListHmacKeysRequest.class, - com.google.storage.v2.ListHmacKeysRequest.Builder.class); - } - - // Construct using com.google.storage.v2.ListHmacKeysRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - project_ = ""; - pageSize_ = 0; - pageToken_ = ""; - serviceAccountEmail_ = ""; - showDeletedKeys_ = false; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListHmacKeysRequest_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.ListHmacKeysRequest getDefaultInstanceForType() { - return com.google.storage.v2.ListHmacKeysRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.ListHmacKeysRequest build() { - com.google.storage.v2.ListHmacKeysRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.ListHmacKeysRequest buildPartial() { - com.google.storage.v2.ListHmacKeysRequest result = - new com.google.storage.v2.ListHmacKeysRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.storage.v2.ListHmacKeysRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.project_ = project_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.pageSize_ = pageSize_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.pageToken_ = pageToken_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.serviceAccountEmail_ = serviceAccountEmail_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.showDeletedKeys_ = showDeletedKeys_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.storage.v2.ListHmacKeysRequest) { - return mergeFrom((com.google.storage.v2.ListHmacKeysRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.ListHmacKeysRequest other) { - if (other == com.google.storage.v2.ListHmacKeysRequest.getDefaultInstance()) return this; - if (!other.getProject().isEmpty()) { - project_ = other.project_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getServiceAccountEmail().isEmpty()) { - serviceAccountEmail_ = other.serviceAccountEmail_; - bitField0_ |= 0x00000008; - onChanged(); - } - if (other.getShowDeletedKeys() != false) { - setShowDeletedKeys(other.getShowDeletedKeys()); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - project_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - serviceAccountEmail_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 40: - { - showDeletedKeys_ = input.readBool(); - bitField0_ |= 0x00000010; - break; - } // case 40 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object project_ = ""; - /** - * - * - *
-     * Required. The project to list HMAC keys for, in the format of
-     * "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - public java.lang.String getProject() { - java.lang.Object ref = project_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - project_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The project to list HMAC keys for, in the format of
-     * "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - public com.google.protobuf.ByteString getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The project to list HMAC keys for, in the format of
-     * "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The project to set. - * @return This builder for chaining. - */ - public Builder setProject(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - project_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The project to list HMAC keys for, in the format of
-     * "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearProject() { - project_ = getDefaultInstance().getProject(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The project to list HMAC keys for, in the format of
-     * "projects/{projectIdentifier}".
-     * {projectIdentifier} can be the project ID or project number.
-     * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for project to set. - * @return This builder for chaining. - */ - public Builder setProjectBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - project_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int pageSize_; - /** - * - * - *
-     * The maximum number of keys to return.
-     * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * The maximum number of keys to return.
-     * 
- * - * int32 page_size = 2; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * The maximum number of keys to return.
-     * 
- * - * int32 page_size = 2; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - bitField0_ = (bitField0_ & ~0x00000002); - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * A previously returned token from ListHmacKeysResponse to get the next page.
-     * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A previously returned token from ListHmacKeysResponse to get the next page.
-     * 
- * - * string page_token = 3; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A previously returned token from ListHmacKeysResponse to get the next page.
-     * 
- * - * string page_token = 3; - * - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * A previously returned token from ListHmacKeysResponse to get the next page.
-     * 
- * - * string page_token = 3; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - pageToken_ = getDefaultInstance().getPageToken(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * A previously returned token from ListHmacKeysResponse to get the next page.
-     * 
- * - * string page_token = 3; - * - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object serviceAccountEmail_ = ""; - /** - * - * - *
-     * If set, filters to only return HMAC keys for specified service account.
-     * 
- * - * string service_account_email = 4; - * - * @return The serviceAccountEmail. - */ - public java.lang.String getServiceAccountEmail() { - java.lang.Object ref = serviceAccountEmail_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - serviceAccountEmail_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * If set, filters to only return HMAC keys for specified service account.
-     * 
- * - * string service_account_email = 4; - * - * @return The bytes for serviceAccountEmail. - */ - public com.google.protobuf.ByteString getServiceAccountEmailBytes() { - java.lang.Object ref = serviceAccountEmail_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - serviceAccountEmail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * If set, filters to only return HMAC keys for specified service account.
-     * 
- * - * string service_account_email = 4; - * - * @param value The serviceAccountEmail to set. - * @return This builder for chaining. - */ - public Builder setServiceAccountEmail(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - serviceAccountEmail_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * If set, filters to only return HMAC keys for specified service account.
-     * 
- * - * string service_account_email = 4; - * - * @return This builder for chaining. - */ - public Builder clearServiceAccountEmail() { - serviceAccountEmail_ = getDefaultInstance().getServiceAccountEmail(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - * - * - *
-     * If set, filters to only return HMAC keys for specified service account.
-     * 
- * - * string service_account_email = 4; - * - * @param value The bytes for serviceAccountEmail to set. - * @return This builder for chaining. - */ - public Builder setServiceAccountEmailBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - serviceAccountEmail_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private boolean showDeletedKeys_; - /** - * - * - *
-     * If set, return deleted keys that have not yet been wiped out.
-     * 
- * - * bool show_deleted_keys = 5; - * - * @return The showDeletedKeys. - */ - @java.lang.Override - public boolean getShowDeletedKeys() { - return showDeletedKeys_; - } - /** - * - * - *
-     * If set, return deleted keys that have not yet been wiped out.
-     * 
- * - * bool show_deleted_keys = 5; - * - * @param value The showDeletedKeys to set. - * @return This builder for chaining. - */ - public Builder setShowDeletedKeys(boolean value) { - - showDeletedKeys_ = value; - bitField0_ |= 0x00000010; - onChanged(); - return this; - } - /** - * - * - *
-     * If set, return deleted keys that have not yet been wiped out.
-     * 
- * - * bool show_deleted_keys = 5; - * - * @return This builder for chaining. - */ - public Builder clearShowDeletedKeys() { - bitField0_ = (bitField0_ & ~0x00000010); - showDeletedKeys_ = false; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.storage.v2.ListHmacKeysRequest) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.ListHmacKeysRequest) - private static final com.google.storage.v2.ListHmacKeysRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.ListHmacKeysRequest(); - } - - public static com.google.storage.v2.ListHmacKeysRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListHmacKeysRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.storage.v2.ListHmacKeysRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysRequestOrBuilder.java deleted file mode 100644 index bae89afe1d..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysRequestOrBuilder.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface ListHmacKeysRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.ListHmacKeysRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The project to list HMAC keys for, in the format of
-   * "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The project. - */ - java.lang.String getProject(); - /** - * - * - *
-   * Required. The project to list HMAC keys for, in the format of
-   * "projects/{projectIdentifier}".
-   * {projectIdentifier} can be the project ID or project number.
-   * 
- * - * - * string project = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for project. - */ - com.google.protobuf.ByteString getProjectBytes(); - - /** - * - * - *
-   * The maximum number of keys to return.
-   * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * A previously returned token from ListHmacKeysResponse to get the next page.
-   * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * A previously returned token from ListHmacKeysResponse to get the next page.
-   * 
- * - * string page_token = 3; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); - - /** - * - * - *
-   * If set, filters to only return HMAC keys for specified service account.
-   * 
- * - * string service_account_email = 4; - * - * @return The serviceAccountEmail. - */ - java.lang.String getServiceAccountEmail(); - /** - * - * - *
-   * If set, filters to only return HMAC keys for specified service account.
-   * 
- * - * string service_account_email = 4; - * - * @return The bytes for serviceAccountEmail. - */ - com.google.protobuf.ByteString getServiceAccountEmailBytes(); - - /** - * - * - *
-   * If set, return deleted keys that have not yet been wiped out.
-   * 
- * - * bool show_deleted_keys = 5; - * - * @return The showDeletedKeys. - */ - boolean getShowDeletedKeys(); -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysResponse.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysResponse.java deleted file mode 100644 index 67eb5162cf..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysResponse.java +++ /dev/null @@ -1,1122 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * Hmac key list response with next page information.
- * 
- * - * Protobuf type {@code google.storage.v2.ListHmacKeysResponse} - */ -public final class ListHmacKeysResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.ListHmacKeysResponse) - ListHmacKeysResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListHmacKeysResponse.newBuilder() to construct. - private ListHmacKeysResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListHmacKeysResponse() { - hmacKeys_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListHmacKeysResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListHmacKeysResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListHmacKeysResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.ListHmacKeysResponse.class, - com.google.storage.v2.ListHmacKeysResponse.Builder.class); - } - - public static final int HMAC_KEYS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List hmacKeys_; - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - @java.lang.Override - public java.util.List getHmacKeysList() { - return hmacKeys_; - } - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - @java.lang.Override - public java.util.List - getHmacKeysOrBuilderList() { - return hmacKeys_; - } - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - @java.lang.Override - public int getHmacKeysCount() { - return hmacKeys_.size(); - } - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - @java.lang.Override - public com.google.storage.v2.HmacKeyMetadata getHmacKeys(int index) { - return hmacKeys_.get(index); - } - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - @java.lang.Override - public com.google.storage.v2.HmacKeyMetadataOrBuilder getHmacKeysOrBuilder(int index) { - return hmacKeys_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-   * The continuation token, used to page through large result sets. Provide
-   * this value in a subsequent request to return the next page of results.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - 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(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * The continuation token, used to page through large result sets. Provide
-   * this value in a subsequent request to return the next page of results.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = 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 { - for (int i = 0; i < hmacKeys_.size(); i++) { - output.writeMessage(1, hmacKeys_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < hmacKeys_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, hmacKeys_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += getUnknownFields().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.storage.v2.ListHmacKeysResponse)) { - return super.equals(obj); - } - com.google.storage.v2.ListHmacKeysResponse other = - (com.google.storage.v2.ListHmacKeysResponse) obj; - - if (!getHmacKeysList().equals(other.getHmacKeysList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getHmacKeysCount() > 0) { - hash = (37 * hash) + HMAC_KEYS_FIELD_NUMBER; - hash = (53 * hash) + getHmacKeysList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.ListHmacKeysResponse parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.ListHmacKeysResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.ListHmacKeysResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.ListHmacKeysResponse 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.storage.v2.ListHmacKeysResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.ListHmacKeysResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.ListHmacKeysResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.ListHmacKeysResponse 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.storage.v2.ListHmacKeysResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.ListHmacKeysResponse 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.storage.v2.ListHmacKeysResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.ListHmacKeysResponse 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.storage.v2.ListHmacKeysResponse 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; - } - /** - * - * - *
-   * Hmac key list response with next page information.
-   * 
- * - * Protobuf type {@code google.storage.v2.ListHmacKeysResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.ListHmacKeysResponse) - com.google.storage.v2.ListHmacKeysResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListHmacKeysResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListHmacKeysResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.ListHmacKeysResponse.class, - com.google.storage.v2.ListHmacKeysResponse.Builder.class); - } - - // Construct using com.google.storage.v2.ListHmacKeysResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (hmacKeysBuilder_ == null) { - hmacKeys_ = java.util.Collections.emptyList(); - } else { - hmacKeys_ = null; - hmacKeysBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListHmacKeysResponse_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.ListHmacKeysResponse getDefaultInstanceForType() { - return com.google.storage.v2.ListHmacKeysResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.ListHmacKeysResponse build() { - com.google.storage.v2.ListHmacKeysResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.ListHmacKeysResponse buildPartial() { - com.google.storage.v2.ListHmacKeysResponse result = - new com.google.storage.v2.ListHmacKeysResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(com.google.storage.v2.ListHmacKeysResponse result) { - if (hmacKeysBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - hmacKeys_ = java.util.Collections.unmodifiableList(hmacKeys_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.hmacKeys_ = hmacKeys_; - } else { - result.hmacKeys_ = hmacKeysBuilder_.build(); - } - } - - private void buildPartial0(com.google.storage.v2.ListHmacKeysResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.nextPageToken_ = nextPageToken_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.storage.v2.ListHmacKeysResponse) { - return mergeFrom((com.google.storage.v2.ListHmacKeysResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.ListHmacKeysResponse other) { - if (other == com.google.storage.v2.ListHmacKeysResponse.getDefaultInstance()) return this; - if (hmacKeysBuilder_ == null) { - if (!other.hmacKeys_.isEmpty()) { - if (hmacKeys_.isEmpty()) { - hmacKeys_ = other.hmacKeys_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureHmacKeysIsMutable(); - hmacKeys_.addAll(other.hmacKeys_); - } - onChanged(); - } - } else { - if (!other.hmacKeys_.isEmpty()) { - if (hmacKeysBuilder_.isEmpty()) { - hmacKeysBuilder_.dispose(); - hmacKeysBuilder_ = null; - hmacKeys_ = other.hmacKeys_; - bitField0_ = (bitField0_ & ~0x00000001); - hmacKeysBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getHmacKeysFieldBuilder() - : null; - } else { - hmacKeysBuilder_.addAllMessages(other.hmacKeys_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.storage.v2.HmacKeyMetadata m = - input.readMessage( - com.google.storage.v2.HmacKeyMetadata.parser(), extensionRegistry); - if (hmacKeysBuilder_ == null) { - ensureHmacKeysIsMutable(); - hmacKeys_.add(m); - } else { - hmacKeysBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List hmacKeys_ = - java.util.Collections.emptyList(); - - private void ensureHmacKeysIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - hmacKeys_ = new java.util.ArrayList(hmacKeys_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.storage.v2.HmacKeyMetadata, - com.google.storage.v2.HmacKeyMetadata.Builder, - com.google.storage.v2.HmacKeyMetadataOrBuilder> - hmacKeysBuilder_; - - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public java.util.List getHmacKeysList() { - if (hmacKeysBuilder_ == null) { - return java.util.Collections.unmodifiableList(hmacKeys_); - } else { - return hmacKeysBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public int getHmacKeysCount() { - if (hmacKeysBuilder_ == null) { - return hmacKeys_.size(); - } else { - return hmacKeysBuilder_.getCount(); - } - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public com.google.storage.v2.HmacKeyMetadata getHmacKeys(int index) { - if (hmacKeysBuilder_ == null) { - return hmacKeys_.get(index); - } else { - return hmacKeysBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public Builder setHmacKeys(int index, com.google.storage.v2.HmacKeyMetadata value) { - if (hmacKeysBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureHmacKeysIsMutable(); - hmacKeys_.set(index, value); - onChanged(); - } else { - hmacKeysBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public Builder setHmacKeys( - int index, com.google.storage.v2.HmacKeyMetadata.Builder builderForValue) { - if (hmacKeysBuilder_ == null) { - ensureHmacKeysIsMutable(); - hmacKeys_.set(index, builderForValue.build()); - onChanged(); - } else { - hmacKeysBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public Builder addHmacKeys(com.google.storage.v2.HmacKeyMetadata value) { - if (hmacKeysBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureHmacKeysIsMutable(); - hmacKeys_.add(value); - onChanged(); - } else { - hmacKeysBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public Builder addHmacKeys(int index, com.google.storage.v2.HmacKeyMetadata value) { - if (hmacKeysBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureHmacKeysIsMutable(); - hmacKeys_.add(index, value); - onChanged(); - } else { - hmacKeysBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public Builder addHmacKeys(com.google.storage.v2.HmacKeyMetadata.Builder builderForValue) { - if (hmacKeysBuilder_ == null) { - ensureHmacKeysIsMutable(); - hmacKeys_.add(builderForValue.build()); - onChanged(); - } else { - hmacKeysBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public Builder addHmacKeys( - int index, com.google.storage.v2.HmacKeyMetadata.Builder builderForValue) { - if (hmacKeysBuilder_ == null) { - ensureHmacKeysIsMutable(); - hmacKeys_.add(index, builderForValue.build()); - onChanged(); - } else { - hmacKeysBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public Builder addAllHmacKeys( - java.lang.Iterable values) { - if (hmacKeysBuilder_ == null) { - ensureHmacKeysIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, hmacKeys_); - onChanged(); - } else { - hmacKeysBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public Builder clearHmacKeys() { - if (hmacKeysBuilder_ == null) { - hmacKeys_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - hmacKeysBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public Builder removeHmacKeys(int index) { - if (hmacKeysBuilder_ == null) { - ensureHmacKeysIsMutable(); - hmacKeys_.remove(index); - onChanged(); - } else { - hmacKeysBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public com.google.storage.v2.HmacKeyMetadata.Builder getHmacKeysBuilder(int index) { - return getHmacKeysFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public com.google.storage.v2.HmacKeyMetadataOrBuilder getHmacKeysOrBuilder(int index) { - if (hmacKeysBuilder_ == null) { - return hmacKeys_.get(index); - } else { - return hmacKeysBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public java.util.List - getHmacKeysOrBuilderList() { - if (hmacKeysBuilder_ != null) { - return hmacKeysBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(hmacKeys_); - } - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public com.google.storage.v2.HmacKeyMetadata.Builder addHmacKeysBuilder() { - return getHmacKeysFieldBuilder() - .addBuilder(com.google.storage.v2.HmacKeyMetadata.getDefaultInstance()); - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public com.google.storage.v2.HmacKeyMetadata.Builder addHmacKeysBuilder(int index) { - return getHmacKeysFieldBuilder() - .addBuilder(index, com.google.storage.v2.HmacKeyMetadata.getDefaultInstance()); - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - public java.util.List getHmacKeysBuilderList() { - return getHmacKeysFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.storage.v2.HmacKeyMetadata, - com.google.storage.v2.HmacKeyMetadata.Builder, - com.google.storage.v2.HmacKeyMetadataOrBuilder> - getHmacKeysFieldBuilder() { - if (hmacKeysBuilder_ == null) { - hmacKeysBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.storage.v2.HmacKeyMetadata, - com.google.storage.v2.HmacKeyMetadata.Builder, - com.google.storage.v2.HmacKeyMetadataOrBuilder>( - hmacKeys_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - hmacKeys_ = null; - } - return hmacKeysBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * The continuation token, used to page through large result sets. Provide
-     * this value in a subsequent request to return the next page of results.
-     * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The continuation token, used to page through large result sets. Provide
-     * this value in a subsequent request to return the next page of results.
-     * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The continuation token, used to page through large result sets. Provide
-     * this value in a subsequent request to return the next page of results.
-     * 
- * - * string next_page_token = 2; - * - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * The continuation token, used to page through large result sets. Provide
-     * this value in a subsequent request to return the next page of results.
-     * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - nextPageToken_ = getDefaultInstance().getNextPageToken(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * The continuation token, used to page through large result sets. Provide
-     * this value in a subsequent request to return the next page of results.
-     * 
- * - * string next_page_token = 2; - * - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.storage.v2.ListHmacKeysResponse) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.ListHmacKeysResponse) - private static final com.google.storage.v2.ListHmacKeysResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.ListHmacKeysResponse(); - } - - public static com.google.storage.v2.ListHmacKeysResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListHmacKeysResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.storage.v2.ListHmacKeysResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysResponseOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysResponseOrBuilder.java deleted file mode 100644 index 67b9061ee5..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListHmacKeysResponseOrBuilder.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface ListHmacKeysResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.ListHmacKeysResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - java.util.List getHmacKeysList(); - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - com.google.storage.v2.HmacKeyMetadata getHmacKeys(int index); - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - int getHmacKeysCount(); - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - java.util.List - getHmacKeysOrBuilderList(); - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.HmacKeyMetadata hmac_keys = 1; - */ - com.google.storage.v2.HmacKeyMetadataOrBuilder getHmacKeysOrBuilder(int index); - - /** - * - * - *
-   * The continuation token, used to page through large result sets. Provide
-   * this value in a subsequent request to return the next page of results.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * The continuation token, used to page through large result sets. Provide
-   * this value in a subsequent request to return the next page of results.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsRequest.java deleted file mode 100644 index 3d208d8c2c..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsRequest.java +++ /dev/null @@ -1,951 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * Request message for ListNotifications.
- * 
- * - * Protobuf type {@code google.storage.v2.ListNotificationConfigsRequest} - */ -public final class ListNotificationConfigsRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.ListNotificationConfigsRequest) - ListNotificationConfigsRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListNotificationConfigsRequest.newBuilder() to construct. - private ListNotificationConfigsRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListNotificationConfigsRequest() { - parent_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListNotificationConfigsRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListNotificationConfigsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListNotificationConfigsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.ListNotificationConfigsRequest.class, - com.google.storage.v2.ListNotificationConfigsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; - /** - * - * - *
-   * Required. Name of a Google Cloud Storage bucket.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; - 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(); - parent_ = s; - return s; - } - } - /** - * - * - *
-   * Required. Name of a Google Cloud Storage bucket.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - @java.lang.Override - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 2; - private int pageSize_ = 0; - /** - * - * - *
-   * Optional. The maximum number of NotificationConfigs to return. The service
-   * may return fewer than this value. The default value is 100. Specifying a
-   * value above 100 will result in a page_size of 100.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private volatile java.lang.Object pageToken_ = ""; - /** - * - * - *
-   * Optional. A page token, received from a previous `ListNotificationConfigs`
-   * call. Provide this to retrieve the subsequent page.
-   *
-   * When paginating, all other parameters provided to `ListNotificationConfigs`
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - 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(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A page token, received from a previous `ListNotificationConfigs`
-   * call. Provide this to retrieve the subsequent page.
-   *
-   * When paginating, all other parameters provided to `ListNotificationConfigs`
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - size += getUnknownFields().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.storage.v2.ListNotificationConfigsRequest)) { - return super.equals(obj); - } - com.google.storage.v2.ListNotificationConfigsRequest other = - (com.google.storage.v2.ListNotificationConfigsRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.ListNotificationConfigsRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.ListNotificationConfigsRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.ListNotificationConfigsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.ListNotificationConfigsRequest 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.storage.v2.ListNotificationConfigsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.ListNotificationConfigsRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.ListNotificationConfigsRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.ListNotificationConfigsRequest 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.storage.v2.ListNotificationConfigsRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.ListNotificationConfigsRequest 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.storage.v2.ListNotificationConfigsRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.ListNotificationConfigsRequest 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.storage.v2.ListNotificationConfigsRequest 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 message for ListNotifications.
-   * 
- * - * Protobuf type {@code google.storage.v2.ListNotificationConfigsRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.ListNotificationConfigsRequest) - com.google.storage.v2.ListNotificationConfigsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListNotificationConfigsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListNotificationConfigsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.ListNotificationConfigsRequest.class, - com.google.storage.v2.ListNotificationConfigsRequest.Builder.class); - } - - // Construct using com.google.storage.v2.ListNotificationConfigsRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - parent_ = ""; - pageSize_ = 0; - pageToken_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListNotificationConfigsRequest_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.ListNotificationConfigsRequest getDefaultInstanceForType() { - return com.google.storage.v2.ListNotificationConfigsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.ListNotificationConfigsRequest build() { - com.google.storage.v2.ListNotificationConfigsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.ListNotificationConfigsRequest buildPartial() { - com.google.storage.v2.ListNotificationConfigsRequest result = - new com.google.storage.v2.ListNotificationConfigsRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.storage.v2.ListNotificationConfigsRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.parent_ = parent_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.pageSize_ = pageSize_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.pageToken_ = pageToken_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.storage.v2.ListNotificationConfigsRequest) { - return mergeFrom((com.google.storage.v2.ListNotificationConfigsRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.ListNotificationConfigsRequest other) { - if (other == com.google.storage.v2.ListNotificationConfigsRequest.getDefaultInstance()) - return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - bitField0_ |= 0x00000004; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); - bitField0_ |= 0x00000002; - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. Name of a Google Cloud Storage bucket.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. Name of a Google Cloud Storage bucket.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. Name of a Google Cloud Storage bucket.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Name of a Google Cloud Storage bucket.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. Name of a Google Cloud Storage bucket.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - parent_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private int pageSize_; - /** - * - * - *
-     * Optional. The maximum number of NotificationConfigs to return. The service
-     * may return fewer than this value. The default value is 100. Specifying a
-     * value above 100 will result in a page_size of 100.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * Optional. The maximum number of NotificationConfigs to return. The service
-     * may return fewer than this value. The default value is 100. Specifying a
-     * value above 100 will result in a page_size of 100.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The maximum number of NotificationConfigs to return. The service
-     * may return fewer than this value. The default value is 100. Specifying a
-     * value above 100 will result in a page_size of 100.
-     * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - bitField0_ = (bitField0_ & ~0x00000002); - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * Optional. A page token, received from a previous `ListNotificationConfigs`
-     * call. Provide this to retrieve the subsequent page.
-     *
-     * When paginating, all other parameters provided to `ListNotificationConfigs`
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A page token, received from a previous `ListNotificationConfigs`
-     * call. Provide this to retrieve the subsequent page.
-     *
-     * When paginating, all other parameters provided to `ListNotificationConfigs`
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A page token, received from a previous `ListNotificationConfigs`
-     * call. Provide this to retrieve the subsequent page.
-     *
-     * When paginating, all other parameters provided to `ListNotificationConfigs`
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A page token, received from a previous `ListNotificationConfigs`
-     * call. Provide this to retrieve the subsequent page.
-     *
-     * When paginating, all other parameters provided to `ListNotificationConfigs`
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - pageToken_ = getDefaultInstance().getPageToken(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A page token, received from a previous `ListNotificationConfigs`
-     * call. Provide this to retrieve the subsequent page.
-     *
-     * When paginating, all other parameters provided to `ListNotificationConfigs`
-     * must match the call that provided the page token.
-     * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - pageToken_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.storage.v2.ListNotificationConfigsRequest) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.ListNotificationConfigsRequest) - private static final com.google.storage.v2.ListNotificationConfigsRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.ListNotificationConfigsRequest(); - } - - public static com.google.storage.v2.ListNotificationConfigsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListNotificationConfigsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.storage.v2.ListNotificationConfigsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsRequestOrBuilder.java deleted file mode 100644 index 05fd43cf46..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsRequestOrBuilder.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface ListNotificationConfigsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.ListNotificationConfigsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. Name of a Google Cloud Storage bucket.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. Name of a Google Cloud Storage bucket.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Optional. The maximum number of NotificationConfigs to return. The service
-   * may return fewer than this value. The default value is 100. Specifying a
-   * value above 100 will result in a page_size of 100.
-   * 
- * - * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * Optional. A page token, received from a previous `ListNotificationConfigs`
-   * call. Provide this to retrieve the subsequent page.
-   *
-   * When paginating, all other parameters provided to `ListNotificationConfigs`
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * Optional. A page token, received from a previous `ListNotificationConfigs`
-   * call. Provide this to retrieve the subsequent page.
-   *
-   * When paginating, all other parameters provided to `ListNotificationConfigs`
-   * must match the call that provided the page token.
-   * 
- * - * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsResponse.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsResponse.java deleted file mode 100644 index aadd413618..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsResponse.java +++ /dev/null @@ -1,1139 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * The result of a call to ListNotificationConfigs
- * 
- * - * Protobuf type {@code google.storage.v2.ListNotificationConfigsResponse} - */ -public final class ListNotificationConfigsResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.ListNotificationConfigsResponse) - ListNotificationConfigsResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListNotificationConfigsResponse.newBuilder() to construct. - private ListNotificationConfigsResponse( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListNotificationConfigsResponse() { - notificationConfigs_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListNotificationConfigsResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListNotificationConfigsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListNotificationConfigsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.ListNotificationConfigsResponse.class, - com.google.storage.v2.ListNotificationConfigsResponse.Builder.class); - } - - public static final int NOTIFICATION_CONFIGS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private java.util.List notificationConfigs_; - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - @java.lang.Override - public java.util.List getNotificationConfigsList() { - return notificationConfigs_; - } - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - @java.lang.Override - public java.util.List - getNotificationConfigsOrBuilderList() { - return notificationConfigs_; - } - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - @java.lang.Override - public int getNotificationConfigsCount() { - return notificationConfigs_.size(); - } - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - @java.lang.Override - public com.google.storage.v2.NotificationConfig getNotificationConfigs(int index) { - return notificationConfigs_.get(index); - } - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - @java.lang.Override - public com.google.storage.v2.NotificationConfigOrBuilder getNotificationConfigsOrBuilder( - int index) { - return notificationConfigs_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - 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(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = 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 { - for (int i = 0; i < notificationConfigs_.size(); i++) { - output.writeMessage(1, notificationConfigs_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < notificationConfigs_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(1, notificationConfigs_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += getUnknownFields().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.storage.v2.ListNotificationConfigsResponse)) { - return super.equals(obj); - } - com.google.storage.v2.ListNotificationConfigsResponse other = - (com.google.storage.v2.ListNotificationConfigsResponse) obj; - - if (!getNotificationConfigsList().equals(other.getNotificationConfigsList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getNotificationConfigsCount() > 0) { - hash = (37 * hash) + NOTIFICATION_CONFIGS_FIELD_NUMBER; - hash = (53 * hash) + getNotificationConfigsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.ListNotificationConfigsResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.ListNotificationConfigsResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.ListNotificationConfigsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.ListNotificationConfigsResponse 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.storage.v2.ListNotificationConfigsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.ListNotificationConfigsResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.ListNotificationConfigsResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.ListNotificationConfigsResponse 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.storage.v2.ListNotificationConfigsResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.ListNotificationConfigsResponse 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.storage.v2.ListNotificationConfigsResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.ListNotificationConfigsResponse 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.storage.v2.ListNotificationConfigsResponse 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 result of a call to ListNotificationConfigs
-   * 
- * - * Protobuf type {@code google.storage.v2.ListNotificationConfigsResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.ListNotificationConfigsResponse) - com.google.storage.v2.ListNotificationConfigsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListNotificationConfigsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListNotificationConfigsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.ListNotificationConfigsResponse.class, - com.google.storage.v2.ListNotificationConfigsResponse.Builder.class); - } - - // Construct using com.google.storage.v2.ListNotificationConfigsResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (notificationConfigsBuilder_ == null) { - notificationConfigs_ = java.util.Collections.emptyList(); - } else { - notificationConfigs_ = null; - notificationConfigsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ListNotificationConfigsResponse_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.ListNotificationConfigsResponse getDefaultInstanceForType() { - return com.google.storage.v2.ListNotificationConfigsResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.ListNotificationConfigsResponse build() { - com.google.storage.v2.ListNotificationConfigsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.ListNotificationConfigsResponse buildPartial() { - com.google.storage.v2.ListNotificationConfigsResponse result = - new com.google.storage.v2.ListNotificationConfigsResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields( - com.google.storage.v2.ListNotificationConfigsResponse result) { - if (notificationConfigsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - notificationConfigs_ = java.util.Collections.unmodifiableList(notificationConfigs_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.notificationConfigs_ = notificationConfigs_; - } else { - result.notificationConfigs_ = notificationConfigsBuilder_.build(); - } - } - - private void buildPartial0(com.google.storage.v2.ListNotificationConfigsResponse result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.nextPageToken_ = nextPageToken_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.storage.v2.ListNotificationConfigsResponse) { - return mergeFrom((com.google.storage.v2.ListNotificationConfigsResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.ListNotificationConfigsResponse other) { - if (other == com.google.storage.v2.ListNotificationConfigsResponse.getDefaultInstance()) - return this; - if (notificationConfigsBuilder_ == null) { - if (!other.notificationConfigs_.isEmpty()) { - if (notificationConfigs_.isEmpty()) { - notificationConfigs_ = other.notificationConfigs_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureNotificationConfigsIsMutable(); - notificationConfigs_.addAll(other.notificationConfigs_); - } - onChanged(); - } - } else { - if (!other.notificationConfigs_.isEmpty()) { - if (notificationConfigsBuilder_.isEmpty()) { - notificationConfigsBuilder_.dispose(); - notificationConfigsBuilder_ = null; - notificationConfigs_ = other.notificationConfigs_; - bitField0_ = (bitField0_ & ~0x00000001); - notificationConfigsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getNotificationConfigsFieldBuilder() - : null; - } else { - notificationConfigsBuilder_.addAllMessages(other.notificationConfigs_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - bitField0_ |= 0x00000002; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.storage.v2.NotificationConfig m = - input.readMessage( - com.google.storage.v2.NotificationConfig.parser(), extensionRegistry); - if (notificationConfigsBuilder_ == null) { - ensureNotificationConfigsIsMutable(); - notificationConfigs_.add(m); - } else { - notificationConfigsBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List notificationConfigs_ = - java.util.Collections.emptyList(); - - private void ensureNotificationConfigsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - notificationConfigs_ = - new java.util.ArrayList(notificationConfigs_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.storage.v2.NotificationConfig, - com.google.storage.v2.NotificationConfig.Builder, - com.google.storage.v2.NotificationConfigOrBuilder> - notificationConfigsBuilder_; - - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public java.util.List getNotificationConfigsList() { - if (notificationConfigsBuilder_ == null) { - return java.util.Collections.unmodifiableList(notificationConfigs_); - } else { - return notificationConfigsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public int getNotificationConfigsCount() { - if (notificationConfigsBuilder_ == null) { - return notificationConfigs_.size(); - } else { - return notificationConfigsBuilder_.getCount(); - } - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public com.google.storage.v2.NotificationConfig getNotificationConfigs(int index) { - if (notificationConfigsBuilder_ == null) { - return notificationConfigs_.get(index); - } else { - return notificationConfigsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public Builder setNotificationConfigs( - int index, com.google.storage.v2.NotificationConfig value) { - if (notificationConfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNotificationConfigsIsMutable(); - notificationConfigs_.set(index, value); - onChanged(); - } else { - notificationConfigsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public Builder setNotificationConfigs( - int index, com.google.storage.v2.NotificationConfig.Builder builderForValue) { - if (notificationConfigsBuilder_ == null) { - ensureNotificationConfigsIsMutable(); - notificationConfigs_.set(index, builderForValue.build()); - onChanged(); - } else { - notificationConfigsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public Builder addNotificationConfigs(com.google.storage.v2.NotificationConfig value) { - if (notificationConfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNotificationConfigsIsMutable(); - notificationConfigs_.add(value); - onChanged(); - } else { - notificationConfigsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public Builder addNotificationConfigs( - int index, com.google.storage.v2.NotificationConfig value) { - if (notificationConfigsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNotificationConfigsIsMutable(); - notificationConfigs_.add(index, value); - onChanged(); - } else { - notificationConfigsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public Builder addNotificationConfigs( - com.google.storage.v2.NotificationConfig.Builder builderForValue) { - if (notificationConfigsBuilder_ == null) { - ensureNotificationConfigsIsMutable(); - notificationConfigs_.add(builderForValue.build()); - onChanged(); - } else { - notificationConfigsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public Builder addNotificationConfigs( - int index, com.google.storage.v2.NotificationConfig.Builder builderForValue) { - if (notificationConfigsBuilder_ == null) { - ensureNotificationConfigsIsMutable(); - notificationConfigs_.add(index, builderForValue.build()); - onChanged(); - } else { - notificationConfigsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public Builder addAllNotificationConfigs( - java.lang.Iterable values) { - if (notificationConfigsBuilder_ == null) { - ensureNotificationConfigsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, notificationConfigs_); - onChanged(); - } else { - notificationConfigsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public Builder clearNotificationConfigs() { - if (notificationConfigsBuilder_ == null) { - notificationConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - notificationConfigsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public Builder removeNotificationConfigs(int index) { - if (notificationConfigsBuilder_ == null) { - ensureNotificationConfigsIsMutable(); - notificationConfigs_.remove(index); - onChanged(); - } else { - notificationConfigsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public com.google.storage.v2.NotificationConfig.Builder getNotificationConfigsBuilder( - int index) { - return getNotificationConfigsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public com.google.storage.v2.NotificationConfigOrBuilder getNotificationConfigsOrBuilder( - int index) { - if (notificationConfigsBuilder_ == null) { - return notificationConfigs_.get(index); - } else { - return notificationConfigsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public java.util.List - getNotificationConfigsOrBuilderList() { - if (notificationConfigsBuilder_ != null) { - return notificationConfigsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(notificationConfigs_); - } - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public com.google.storage.v2.NotificationConfig.Builder addNotificationConfigsBuilder() { - return getNotificationConfigsFieldBuilder() - .addBuilder(com.google.storage.v2.NotificationConfig.getDefaultInstance()); - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public com.google.storage.v2.NotificationConfig.Builder addNotificationConfigsBuilder( - int index) { - return getNotificationConfigsFieldBuilder() - .addBuilder(index, com.google.storage.v2.NotificationConfig.getDefaultInstance()); - } - /** - * - * - *
-     * The list of items.
-     * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - public java.util.List - getNotificationConfigsBuilderList() { - return getNotificationConfigsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.storage.v2.NotificationConfig, - com.google.storage.v2.NotificationConfig.Builder, - com.google.storage.v2.NotificationConfigOrBuilder> - getNotificationConfigsFieldBuilder() { - if (notificationConfigsBuilder_ == null) { - notificationConfigsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.storage.v2.NotificationConfig, - com.google.storage.v2.NotificationConfig.Builder, - com.google.storage.v2.NotificationConfigOrBuilder>( - notificationConfigs_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - notificationConfigs_ = null; - } - return notificationConfigsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - nextPageToken_ = getDefaultInstance().getNextPageToken(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * A token, which can be sent as `page_token` to retrieve the next page.
-     * If this field is omitted, there are no subsequent pages.
-     * 
- * - * string next_page_token = 2; - * - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - nextPageToken_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.storage.v2.ListNotificationConfigsResponse) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.ListNotificationConfigsResponse) - private static final com.google.storage.v2.ListNotificationConfigsResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.ListNotificationConfigsResponse(); - } - - public static com.google.storage.v2.ListNotificationConfigsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListNotificationConfigsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.storage.v2.ListNotificationConfigsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsResponseOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsResponseOrBuilder.java deleted file mode 100644 index 54075ea698..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListNotificationConfigsResponseOrBuilder.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface ListNotificationConfigsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.ListNotificationConfigsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - java.util.List getNotificationConfigsList(); - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - com.google.storage.v2.NotificationConfig getNotificationConfigs(int index); - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - int getNotificationConfigsCount(); - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - java.util.List - getNotificationConfigsOrBuilderList(); - /** - * - * - *
-   * The list of items.
-   * 
- * - * repeated .google.storage.v2.NotificationConfig notification_configs = 1; - */ - com.google.storage.v2.NotificationConfigOrBuilder getNotificationConfigsOrBuilder(int index); - - /** - * - * - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * A token, which can be sent as `page_token` to retrieve the next page.
-   * If this field is omitted, there are no subsequent pages.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/NotificationConfig.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/NotificationConfig.java deleted file mode 100644 index 3b22eef1b1..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/NotificationConfig.java +++ /dev/null @@ -1,2075 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * A directive to publish Pub/Sub notifications upon changes to a bucket.
- * 
- * - * Protobuf type {@code google.storage.v2.NotificationConfig} - */ -public final class NotificationConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.NotificationConfig) - NotificationConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use NotificationConfig.newBuilder() to construct. - private NotificationConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private NotificationConfig() { - name_ = ""; - topic_ = ""; - etag_ = ""; - eventTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); - objectNamePrefix_ = ""; - payloadFormat_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new NotificationConfig(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_NotificationConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 4: - return internalGetCustomAttributes(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_NotificationConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.NotificationConfig.class, - com.google.storage.v2.NotificationConfig.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - * - * - *
-   * Required. The resource name of this NotificationConfig.
-   * Format:
-   * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-   * The `{project}` portion may be `_` for globally unique buckets.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The name. - */ - @java.lang.Override - 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. The resource name of this NotificationConfig.
-   * Format:
-   * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-   * The `{project}` portion may be `_` for globally unique buckets.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for name. - */ - @java.lang.Override - 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 TOPIC_FIELD_NUMBER = 2; - - @SuppressWarnings("serial") - private volatile java.lang.Object topic_ = ""; - /** - * - * - *
-   * Required. The Pub/Sub topic to which this subscription publishes. Formatted
-   * as:
-   * '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'
-   * 
- * - * string topic = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The topic. - */ - @java.lang.Override - public java.lang.String getTopic() { - java.lang.Object ref = topic_; - 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(); - topic_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The Pub/Sub topic to which this subscription publishes. Formatted
-   * as:
-   * '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'
-   * 
- * - * string topic = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for topic. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTopicBytes() { - java.lang.Object ref = topic_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - topic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ETAG_FIELD_NUMBER = 7; - - @SuppressWarnings("serial") - private volatile java.lang.Object etag_ = ""; - /** - * - * - *
-   * Optional. The etag of the NotificationConfig.
-   * If included in the metadata of GetNotificationConfigRequest, the operation
-   * will only be performed if the etag matches that of the NotificationConfig.
-   * 
- * - * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The etag. - */ - @java.lang.Override - public java.lang.String getEtag() { - java.lang.Object ref = etag_; - 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(); - etag_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. The etag of the NotificationConfig.
-   * If included in the metadata of GetNotificationConfigRequest, the operation
-   * will only be performed if the etag matches that of the NotificationConfig.
-   * 
- * - * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for etag. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEtagBytes() { - java.lang.Object ref = etag_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - etag_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EVENT_TYPES_FIELD_NUMBER = 3; - - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList eventTypes_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - * - * - *
-   * Optional. If present, only send notifications about listed event types. If
-   * empty, sent notifications for all event types.
-   * 
- * - * repeated string event_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the eventTypes. - */ - public com.google.protobuf.ProtocolStringList getEventTypesList() { - return eventTypes_; - } - /** - * - * - *
-   * Optional. If present, only send notifications about listed event types. If
-   * empty, sent notifications for all event types.
-   * 
- * - * repeated string event_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of eventTypes. - */ - public int getEventTypesCount() { - return eventTypes_.size(); - } - /** - * - * - *
-   * Optional. If present, only send notifications about listed event types. If
-   * empty, sent notifications for all event types.
-   * 
- * - * repeated string event_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The eventTypes at the given index. - */ - public java.lang.String getEventTypes(int index) { - return eventTypes_.get(index); - } - /** - * - * - *
-   * Optional. If present, only send notifications about listed event types. If
-   * empty, sent notifications for all event types.
-   * 
- * - * repeated string event_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the eventTypes at the given index. - */ - public com.google.protobuf.ByteString getEventTypesBytes(int index) { - return eventTypes_.getByteString(index); - } - - public static final int CUSTOM_ATTRIBUTES_FIELD_NUMBER = 4; - - private static final class CustomAttributesDefaultEntryHolder { - static final com.google.protobuf.MapEntry defaultEntry = - com.google.protobuf.MapEntry.newDefaultInstance( - com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_NotificationConfig_CustomAttributesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.STRING, - ""); - } - - @SuppressWarnings("serial") - private com.google.protobuf.MapField customAttributes_; - - private com.google.protobuf.MapField - internalGetCustomAttributes() { - if (customAttributes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - CustomAttributesDefaultEntryHolder.defaultEntry); - } - return customAttributes_; - } - - public int getCustomAttributesCount() { - return internalGetCustomAttributes().getMap().size(); - } - /** - * - * - *
-   * Optional. A list of additional attributes to attach to each Pub/Sub
-   * message published for this NotificationConfig.
-   * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsCustomAttributes(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetCustomAttributes().getMap().containsKey(key); - } - /** Use {@link #getCustomAttributesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getCustomAttributes() { - return getCustomAttributesMap(); - } - /** - * - * - *
-   * Optional. A list of additional attributes to attach to each Pub/Sub
-   * message published for this NotificationConfig.
-   * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getCustomAttributesMap() { - return internalGetCustomAttributes().getMap(); - } - /** - * - * - *
-   * Optional. A list of additional attributes to attach to each Pub/Sub
-   * message published for this NotificationConfig.
-   * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public /* nullable */ java.lang.String getCustomAttributesOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetCustomAttributes().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Optional. A list of additional attributes to attach to each Pub/Sub
-   * message published for this NotificationConfig.
-   * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getCustomAttributesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = internalGetCustomAttributes().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int OBJECT_NAME_PREFIX_FIELD_NUMBER = 5; - - @SuppressWarnings("serial") - private volatile java.lang.Object objectNamePrefix_ = ""; - /** - * - * - *
-   * Optional. If present, only apply this NotificationConfig to object names
-   * that begin with this prefix.
-   * 
- * - * string object_name_prefix = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The objectNamePrefix. - */ - @java.lang.Override - public java.lang.String getObjectNamePrefix() { - java.lang.Object ref = objectNamePrefix_; - 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(); - objectNamePrefix_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. If present, only apply this NotificationConfig to object names
-   * that begin with this prefix.
-   * 
- * - * string object_name_prefix = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for objectNamePrefix. - */ - @java.lang.Override - public com.google.protobuf.ByteString getObjectNamePrefixBytes() { - java.lang.Object ref = objectNamePrefix_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - objectNamePrefix_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAYLOAD_FORMAT_FIELD_NUMBER = 6; - - @SuppressWarnings("serial") - private volatile java.lang.Object payloadFormat_ = ""; - /** - * - * - *
-   * Required. The desired content of the Payload.
-   * 
- * - * string payload_format = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The payloadFormat. - */ - @java.lang.Override - public java.lang.String getPayloadFormat() { - java.lang.Object ref = payloadFormat_; - 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(); - payloadFormat_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The desired content of the Payload.
-   * 
- * - * string payload_format = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for payloadFormat. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPayloadFormatBytes() { - java.lang.Object ref = payloadFormat_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - payloadFormat_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, topic_); - } - for (int i = 0; i < eventTypes_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, eventTypes_.getRaw(i)); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, internalGetCustomAttributes(), CustomAttributesDefaultEntryHolder.defaultEntry, 4); - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(objectNamePrefix_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 5, objectNamePrefix_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadFormat_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, payloadFormat_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, etag_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, topic_); - } - { - int dataSize = 0; - for (int i = 0; i < eventTypes_.size(); i++) { - dataSize += computeStringSizeNoTag(eventTypes_.getRaw(i)); - } - size += dataSize; - size += 1 * getEventTypesList().size(); - } - for (java.util.Map.Entry entry : - internalGetCustomAttributes().getMap().entrySet()) { - com.google.protobuf.MapEntry customAttributes__ = - CustomAttributesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, customAttributes__); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(objectNamePrefix_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, objectNamePrefix_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payloadFormat_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, payloadFormat_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, etag_); - } - size += getUnknownFields().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.storage.v2.NotificationConfig)) { - return super.equals(obj); - } - com.google.storage.v2.NotificationConfig other = (com.google.storage.v2.NotificationConfig) obj; - - if (!getName().equals(other.getName())) return false; - if (!getTopic().equals(other.getTopic())) return false; - if (!getEtag().equals(other.getEtag())) return false; - if (!getEventTypesList().equals(other.getEventTypesList())) return false; - if (!internalGetCustomAttributes().equals(other.internalGetCustomAttributes())) return false; - if (!getObjectNamePrefix().equals(other.getObjectNamePrefix())) return false; - if (!getPayloadFormat().equals(other.getPayloadFormat())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @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(); - hash = (37 * hash) + TOPIC_FIELD_NUMBER; - hash = (53 * hash) + getTopic().hashCode(); - hash = (37 * hash) + ETAG_FIELD_NUMBER; - hash = (53 * hash) + getEtag().hashCode(); - if (getEventTypesCount() > 0) { - hash = (37 * hash) + EVENT_TYPES_FIELD_NUMBER; - hash = (53 * hash) + getEventTypesList().hashCode(); - } - if (!internalGetCustomAttributes().getMap().isEmpty()) { - hash = (37 * hash) + CUSTOM_ATTRIBUTES_FIELD_NUMBER; - hash = (53 * hash) + internalGetCustomAttributes().hashCode(); - } - hash = (37 * hash) + OBJECT_NAME_PREFIX_FIELD_NUMBER; - hash = (53 * hash) + getObjectNamePrefix().hashCode(); - hash = (37 * hash) + PAYLOAD_FORMAT_FIELD_NUMBER; - hash = (53 * hash) + getPayloadFormat().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.NotificationConfig parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.NotificationConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.NotificationConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.NotificationConfig 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.storage.v2.NotificationConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.NotificationConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.NotificationConfig parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.NotificationConfig 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.storage.v2.NotificationConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.NotificationConfig 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.storage.v2.NotificationConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.NotificationConfig 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.storage.v2.NotificationConfig 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; - } - /** - * - * - *
-   * A directive to publish Pub/Sub notifications upon changes to a bucket.
-   * 
- * - * Protobuf type {@code google.storage.v2.NotificationConfig} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.NotificationConfig) - com.google.storage.v2.NotificationConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_NotificationConfig_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( - int number) { - switch (number) { - case 4: - return internalGetCustomAttributes(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( - int number) { - switch (number) { - case 4: - return internalGetMutableCustomAttributes(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_NotificationConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.NotificationConfig.class, - com.google.storage.v2.NotificationConfig.Builder.class); - } - - // Construct using com.google.storage.v2.NotificationConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - name_ = ""; - topic_ = ""; - etag_ = ""; - eventTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); - internalGetMutableCustomAttributes().clear(); - objectNamePrefix_ = ""; - payloadFormat_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_NotificationConfig_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.NotificationConfig getDefaultInstanceForType() { - return com.google.storage.v2.NotificationConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.NotificationConfig build() { - com.google.storage.v2.NotificationConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.NotificationConfig buildPartial() { - com.google.storage.v2.NotificationConfig result = - new com.google.storage.v2.NotificationConfig(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.storage.v2.NotificationConfig result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.topic_ = topic_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.etag_ = etag_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - eventTypes_.makeImmutable(); - result.eventTypes_ = eventTypes_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.customAttributes_ = internalGetCustomAttributes(); - result.customAttributes_.makeImmutable(); - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.objectNamePrefix_ = objectNamePrefix_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.payloadFormat_ = payloadFormat_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.storage.v2.NotificationConfig) { - return mergeFrom((com.google.storage.v2.NotificationConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.NotificationConfig other) { - if (other == com.google.storage.v2.NotificationConfig.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getTopic().isEmpty()) { - topic_ = other.topic_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getEtag().isEmpty()) { - etag_ = other.etag_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.eventTypes_.isEmpty()) { - if (eventTypes_.isEmpty()) { - eventTypes_ = other.eventTypes_; - bitField0_ |= 0x00000008; - } else { - ensureEventTypesIsMutable(); - eventTypes_.addAll(other.eventTypes_); - } - onChanged(); - } - internalGetMutableCustomAttributes().mergeFrom(other.internalGetCustomAttributes()); - bitField0_ |= 0x00000010; - if (!other.getObjectNamePrefix().isEmpty()) { - objectNamePrefix_ = other.objectNamePrefix_; - bitField0_ |= 0x00000020; - onChanged(); - } - if (!other.getPayloadFormat().isEmpty()) { - payloadFormat_ = other.payloadFormat_; - bitField0_ |= 0x00000040; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - topic_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureEventTypesIsMutable(); - eventTypes_.add(s); - break; - } // case 26 - case 34: - { - com.google.protobuf.MapEntry - customAttributes__ = - input.readMessage( - CustomAttributesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableCustomAttributes() - .getMutableMap() - .put(customAttributes__.getKey(), customAttributes__.getValue()); - bitField0_ |= 0x00000010; - break; - } // case 34 - case 42: - { - objectNamePrefix_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - break; - } // case 42 - case 50: - { - payloadFormat_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - break; - } // case 50 - case 58: - { - etag_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 58 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The resource name of this NotificationConfig.
-     * Format:
-     * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-     * The `{project}` portion may be `_` for globally unique buckets.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The name. - */ - 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. The resource name of this NotificationConfig.
-     * Format:
-     * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-     * The `{project}` portion may be `_` for globally unique buckets.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for name. - */ - 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. The resource name of this NotificationConfig.
-     * Format:
-     * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-     * The `{project}` portion may be `_` for globally unique buckets.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The resource name of this NotificationConfig.
-     * Format:
-     * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-     * The `{project}` portion may be `_` for globally unique buckets.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The resource name of this NotificationConfig.
-     * Format:
-     * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-     * The `{project}` portion may be `_` for globally unique buckets.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private java.lang.Object topic_ = ""; - /** - * - * - *
-     * Required. The Pub/Sub topic to which this subscription publishes. Formatted
-     * as:
-     * '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'
-     * 
- * - * string topic = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The topic. - */ - public java.lang.String getTopic() { - java.lang.Object ref = topic_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - topic_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The Pub/Sub topic to which this subscription publishes. Formatted
-     * as:
-     * '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'
-     * 
- * - * string topic = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for topic. - */ - public com.google.protobuf.ByteString getTopicBytes() { - java.lang.Object ref = topic_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - topic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The Pub/Sub topic to which this subscription publishes. Formatted
-     * as:
-     * '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'
-     * 
- * - * string topic = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The topic to set. - * @return This builder for chaining. - */ - public Builder setTopic(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - topic_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Pub/Sub topic to which this subscription publishes. Formatted
-     * as:
-     * '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'
-     * 
- * - * string topic = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearTopic() { - topic_ = getDefaultInstance().getTopic(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Pub/Sub topic to which this subscription publishes. Formatted
-     * as:
-     * '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'
-     * 
- * - * string topic = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for topic to set. - * @return This builder for chaining. - */ - public Builder setTopicBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - topic_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object etag_ = ""; - /** - * - * - *
-     * Optional. The etag of the NotificationConfig.
-     * If included in the metadata of GetNotificationConfigRequest, the operation
-     * will only be performed if the etag matches that of the NotificationConfig.
-     * 
- * - * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The etag. - */ - public java.lang.String getEtag() { - java.lang.Object ref = etag_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - etag_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. The etag of the NotificationConfig.
-     * If included in the metadata of GetNotificationConfigRequest, the operation
-     * will only be performed if the etag matches that of the NotificationConfig.
-     * 
- * - * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for etag. - */ - public com.google.protobuf.ByteString getEtagBytes() { - java.lang.Object ref = etag_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - etag_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. The etag of the NotificationConfig.
-     * If included in the metadata of GetNotificationConfigRequest, the operation
-     * will only be performed if the etag matches that of the NotificationConfig.
-     * 
- * - * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The etag to set. - * @return This builder for chaining. - */ - public Builder setEtag(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - etag_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The etag of the NotificationConfig.
-     * If included in the metadata of GetNotificationConfigRequest, the operation
-     * will only be performed if the etag matches that of the NotificationConfig.
-     * 
- * - * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearEtag() { - etag_ = getDefaultInstance().getEtag(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The etag of the NotificationConfig.
-     * If included in the metadata of GetNotificationConfigRequest, the operation
-     * will only be performed if the etag matches that of the NotificationConfig.
-     * 
- * - * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for etag to set. - * @return This builder for chaining. - */ - public Builder setEtagBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - etag_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringArrayList eventTypes_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - - private void ensureEventTypesIsMutable() { - if (!eventTypes_.isModifiable()) { - eventTypes_ = new com.google.protobuf.LazyStringArrayList(eventTypes_); - } - bitField0_ |= 0x00000008; - } - /** - * - * - *
-     * Optional. If present, only send notifications about listed event types. If
-     * empty, sent notifications for all event types.
-     * 
- * - * repeated string event_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the eventTypes. - */ - public com.google.protobuf.ProtocolStringList getEventTypesList() { - eventTypes_.makeImmutable(); - return eventTypes_; - } - /** - * - * - *
-     * Optional. If present, only send notifications about listed event types. If
-     * empty, sent notifications for all event types.
-     * 
- * - * repeated string event_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of eventTypes. - */ - public int getEventTypesCount() { - return eventTypes_.size(); - } - /** - * - * - *
-     * Optional. If present, only send notifications about listed event types. If
-     * empty, sent notifications for all event types.
-     * 
- * - * repeated string event_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The eventTypes at the given index. - */ - public java.lang.String getEventTypes(int index) { - return eventTypes_.get(index); - } - /** - * - * - *
-     * Optional. If present, only send notifications about listed event types. If
-     * empty, sent notifications for all event types.
-     * 
- * - * repeated string event_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the eventTypes at the given index. - */ - public com.google.protobuf.ByteString getEventTypesBytes(int index) { - return eventTypes_.getByteString(index); - } - /** - * - * - *
-     * Optional. If present, only send notifications about listed event types. If
-     * empty, sent notifications for all event types.
-     * 
- * - * repeated string event_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index to set the value at. - * @param value The eventTypes to set. - * @return This builder for chaining. - */ - public Builder setEventTypes(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureEventTypesIsMutable(); - eventTypes_.set(index, value); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. If present, only send notifications about listed event types. If
-     * empty, sent notifications for all event types.
-     * 
- * - * repeated string event_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The eventTypes to add. - * @return This builder for chaining. - */ - public Builder addEventTypes(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureEventTypesIsMutable(); - eventTypes_.add(value); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. If present, only send notifications about listed event types. If
-     * empty, sent notifications for all event types.
-     * 
- * - * repeated string event_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param values The eventTypes to add. - * @return This builder for chaining. - */ - public Builder addAllEventTypes(java.lang.Iterable values) { - ensureEventTypesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, eventTypes_); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. If present, only send notifications about listed event types. If
-     * empty, sent notifications for all event types.
-     * 
- * - * repeated string event_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearEventTypes() { - eventTypes_ = com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - ; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. If present, only send notifications about listed event types. If
-     * empty, sent notifications for all event types.
-     * 
- * - * repeated string event_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes of the eventTypes to add. - * @return This builder for chaining. - */ - public Builder addEventTypesBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureEventTypesIsMutable(); - eventTypes_.add(value); - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - private com.google.protobuf.MapField customAttributes_; - - private com.google.protobuf.MapField - internalGetCustomAttributes() { - if (customAttributes_ == null) { - return com.google.protobuf.MapField.emptyMapField( - CustomAttributesDefaultEntryHolder.defaultEntry); - } - return customAttributes_; - } - - private com.google.protobuf.MapField - internalGetMutableCustomAttributes() { - if (customAttributes_ == null) { - customAttributes_ = - com.google.protobuf.MapField.newMapField( - CustomAttributesDefaultEntryHolder.defaultEntry); - } - if (!customAttributes_.isMutable()) { - customAttributes_ = customAttributes_.copy(); - } - bitField0_ |= 0x00000010; - onChanged(); - return customAttributes_; - } - - public int getCustomAttributesCount() { - return internalGetCustomAttributes().getMap().size(); - } - /** - * - * - *
-     * Optional. A list of additional attributes to attach to each Pub/Sub
-     * message published for this NotificationConfig.
-     * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsCustomAttributes(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetCustomAttributes().getMap().containsKey(key); - } - /** Use {@link #getCustomAttributesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getCustomAttributes() { - return getCustomAttributesMap(); - } - /** - * - * - *
-     * Optional. A list of additional attributes to attach to each Pub/Sub
-     * message published for this NotificationConfig.
-     * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map getCustomAttributesMap() { - return internalGetCustomAttributes().getMap(); - } - /** - * - * - *
-     * Optional. A list of additional attributes to attach to each Pub/Sub
-     * message published for this NotificationConfig.
-     * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public /* nullable */ java.lang.String getCustomAttributesOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetCustomAttributes().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Optional. A list of additional attributes to attach to each Pub/Sub
-     * message published for this NotificationConfig.
-     * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.lang.String getCustomAttributesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map map = - internalGetCustomAttributes().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearCustomAttributes() { - bitField0_ = (bitField0_ & ~0x00000010); - internalGetMutableCustomAttributes().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Optional. A list of additional attributes to attach to each Pub/Sub
-     * message published for this NotificationConfig.
-     * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeCustomAttributes(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableCustomAttributes().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableCustomAttributes() { - bitField0_ |= 0x00000010; - return internalGetMutableCustomAttributes().getMutableMap(); - } - /** - * - * - *
-     * Optional. A list of additional attributes to attach to each Pub/Sub
-     * message published for this NotificationConfig.
-     * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putCustomAttributes(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - internalGetMutableCustomAttributes().getMutableMap().put(key, value); - bitField0_ |= 0x00000010; - return this; - } - /** - * - * - *
-     * Optional. A list of additional attributes to attach to each Pub/Sub
-     * message published for this NotificationConfig.
-     * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putAllCustomAttributes( - java.util.Map values) { - internalGetMutableCustomAttributes().getMutableMap().putAll(values); - bitField0_ |= 0x00000010; - return this; - } - - private java.lang.Object objectNamePrefix_ = ""; - /** - * - * - *
-     * Optional. If present, only apply this NotificationConfig to object names
-     * that begin with this prefix.
-     * 
- * - * string object_name_prefix = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The objectNamePrefix. - */ - public java.lang.String getObjectNamePrefix() { - java.lang.Object ref = objectNamePrefix_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - objectNamePrefix_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. If present, only apply this NotificationConfig to object names
-     * that begin with this prefix.
-     * 
- * - * string object_name_prefix = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for objectNamePrefix. - */ - public com.google.protobuf.ByteString getObjectNamePrefixBytes() { - java.lang.Object ref = objectNamePrefix_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - objectNamePrefix_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. If present, only apply this NotificationConfig to object names
-     * that begin with this prefix.
-     * 
- * - * string object_name_prefix = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The objectNamePrefix to set. - * @return This builder for chaining. - */ - public Builder setObjectNamePrefix(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - objectNamePrefix_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. If present, only apply this NotificationConfig to object names
-     * that begin with this prefix.
-     * 
- * - * string object_name_prefix = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearObjectNamePrefix() { - objectNamePrefix_ = getDefaultInstance().getObjectNamePrefix(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. If present, only apply this NotificationConfig to object names
-     * that begin with this prefix.
-     * 
- * - * string object_name_prefix = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for objectNamePrefix to set. - * @return This builder for chaining. - */ - public Builder setObjectNamePrefixBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - objectNamePrefix_ = value; - bitField0_ |= 0x00000020; - onChanged(); - return this; - } - - private java.lang.Object payloadFormat_ = ""; - /** - * - * - *
-     * Required. The desired content of the Payload.
-     * 
- * - * string payload_format = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The payloadFormat. - */ - public java.lang.String getPayloadFormat() { - java.lang.Object ref = payloadFormat_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - payloadFormat_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The desired content of the Payload.
-     * 
- * - * string payload_format = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for payloadFormat. - */ - public com.google.protobuf.ByteString getPayloadFormatBytes() { - java.lang.Object ref = payloadFormat_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - payloadFormat_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The desired content of the Payload.
-     * 
- * - * string payload_format = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The payloadFormat to set. - * @return This builder for chaining. - */ - public Builder setPayloadFormat(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - payloadFormat_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The desired content of the Payload.
-     * 
- * - * string payload_format = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearPayloadFormat() { - payloadFormat_ = getDefaultInstance().getPayloadFormat(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The desired content of the Payload.
-     * 
- * - * string payload_format = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for payloadFormat to set. - * @return This builder for chaining. - */ - public Builder setPayloadFormatBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - payloadFormat_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.storage.v2.NotificationConfig) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.NotificationConfig) - private static final com.google.storage.v2.NotificationConfig DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.NotificationConfig(); - } - - public static com.google.storage.v2.NotificationConfig getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public NotificationConfig parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.storage.v2.NotificationConfig getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/NotificationConfigName.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/NotificationConfigName.java deleted file mode 100644 index 9d1091b7b6..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/NotificationConfigName.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.storage.v2; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class NotificationConfigName implements ResourceName { - private static final PathTemplate PROJECT_BUCKET_NOTIFICATION_CONFIG = - PathTemplate.createWithoutUrlEncoding( - "projects/{project}/buckets/{bucket}/notificationConfigs/{notification_config}"); - private volatile Map fieldValuesMap; - private final String project; - private final String bucket; - private final String notificationConfig; - - @Deprecated - protected NotificationConfigName() { - project = null; - bucket = null; - notificationConfig = null; - } - - private NotificationConfigName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - bucket = Preconditions.checkNotNull(builder.getBucket()); - notificationConfig = Preconditions.checkNotNull(builder.getNotificationConfig()); - } - - public String getProject() { - return project; - } - - public String getBucket() { - return bucket; - } - - public String getNotificationConfig() { - return notificationConfig; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static NotificationConfigName of( - String project, String bucket, String notificationConfig) { - return newBuilder() - .setProject(project) - .setBucket(bucket) - .setNotificationConfig(notificationConfig) - .build(); - } - - public static String format(String project, String bucket, String notificationConfig) { - return newBuilder() - .setProject(project) - .setBucket(bucket) - .setNotificationConfig(notificationConfig) - .build() - .toString(); - } - - public static NotificationConfigName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_BUCKET_NOTIFICATION_CONFIG.validatedMatch( - formattedString, "NotificationConfigName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("bucket"), matchMap.get("notification_config")); - } - - public static List parseList(List formattedStrings) { - List list = new ArrayList<>(formattedStrings.size()); - for (String formattedString : formattedStrings) { - list.add(parse(formattedString)); - } - return list; - } - - public static List toStringList(List values) { - List list = new ArrayList<>(values.size()); - for (NotificationConfigName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_BUCKET_NOTIFICATION_CONFIG.matches(formattedString); - } - - @Override - public Map getFieldValuesMap() { - if (fieldValuesMap == null) { - synchronized (this) { - if (fieldValuesMap == null) { - ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); - if (project != null) { - fieldMapBuilder.put("project", project); - } - if (bucket != null) { - fieldMapBuilder.put("bucket", bucket); - } - if (notificationConfig != null) { - fieldMapBuilder.put("notification_config", notificationConfig); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_BUCKET_NOTIFICATION_CONFIG.instantiate( - "project", project, "bucket", bucket, "notification_config", notificationConfig); - } - - @Override - public boolean equals(java.lang.Object o) { - if (o == this) { - return true; - } - if (o != null && getClass() == o.getClass()) { - NotificationConfigName that = ((NotificationConfigName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.bucket, that.bucket) - && Objects.equals(this.notificationConfig, that.notificationConfig); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(bucket); - h *= 1000003; - h ^= Objects.hashCode(notificationConfig); - return h; - } - - /** Builder for projects/{project}/buckets/{bucket}/notificationConfigs/{notification_config}. */ - public static class Builder { - private String project; - private String bucket; - private String notificationConfig; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getBucket() { - return bucket; - } - - public String getNotificationConfig() { - return notificationConfig; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setBucket(String bucket) { - this.bucket = bucket; - return this; - } - - public Builder setNotificationConfig(String notificationConfig) { - this.notificationConfig = notificationConfig; - return this; - } - - private Builder(NotificationConfigName notificationConfigName) { - this.project = notificationConfigName.project; - this.bucket = notificationConfigName.bucket; - this.notificationConfig = notificationConfigName.notificationConfig; - } - - public NotificationConfigName build() { - return new NotificationConfigName(this); - } - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/NotificationConfigOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/NotificationConfigOrBuilder.java deleted file mode 100644 index f18754a19f..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/NotificationConfigOrBuilder.java +++ /dev/null @@ -1,295 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface NotificationConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.NotificationConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name of this NotificationConfig.
-   * Format:
-   * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-   * The `{project}` portion may be `_` for globally unique buckets.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The resource name of this NotificationConfig.
-   * Format:
-   * `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}`
-   * The `{project}` portion may be `_` for globally unique buckets.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Required. The Pub/Sub topic to which this subscription publishes. Formatted
-   * as:
-   * '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'
-   * 
- * - * string topic = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The topic. - */ - java.lang.String getTopic(); - /** - * - * - *
-   * Required. The Pub/Sub topic to which this subscription publishes. Formatted
-   * as:
-   * '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'
-   * 
- * - * string topic = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for topic. - */ - com.google.protobuf.ByteString getTopicBytes(); - - /** - * - * - *
-   * Optional. The etag of the NotificationConfig.
-   * If included in the metadata of GetNotificationConfigRequest, the operation
-   * will only be performed if the etag matches that of the NotificationConfig.
-   * 
- * - * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The etag. - */ - java.lang.String getEtag(); - /** - * - * - *
-   * Optional. The etag of the NotificationConfig.
-   * If included in the metadata of GetNotificationConfigRequest, the operation
-   * will only be performed if the etag matches that of the NotificationConfig.
-   * 
- * - * string etag = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for etag. - */ - com.google.protobuf.ByteString getEtagBytes(); - - /** - * - * - *
-   * Optional. If present, only send notifications about listed event types. If
-   * empty, sent notifications for all event types.
-   * 
- * - * repeated string event_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return A list containing the eventTypes. - */ - java.util.List getEventTypesList(); - /** - * - * - *
-   * Optional. If present, only send notifications about listed event types. If
-   * empty, sent notifications for all event types.
-   * 
- * - * repeated string event_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The count of eventTypes. - */ - int getEventTypesCount(); - /** - * - * - *
-   * Optional. If present, only send notifications about listed event types. If
-   * empty, sent notifications for all event types.
-   * 
- * - * repeated string event_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the element to return. - * @return The eventTypes at the given index. - */ - java.lang.String getEventTypes(int index); - /** - * - * - *
-   * Optional. If present, only send notifications about listed event types. If
-   * empty, sent notifications for all event types.
-   * 
- * - * repeated string event_types = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param index The index of the value to return. - * @return The bytes of the eventTypes at the given index. - */ - com.google.protobuf.ByteString getEventTypesBytes(int index); - - /** - * - * - *
-   * Optional. A list of additional attributes to attach to each Pub/Sub
-   * message published for this NotificationConfig.
-   * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getCustomAttributesCount(); - /** - * - * - *
-   * Optional. A list of additional attributes to attach to each Pub/Sub
-   * message published for this NotificationConfig.
-   * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - boolean containsCustomAttributes(java.lang.String key); - /** Use {@link #getCustomAttributesMap()} instead. */ - @java.lang.Deprecated - java.util.Map getCustomAttributes(); - /** - * - * - *
-   * Optional. A list of additional attributes to attach to each Pub/Sub
-   * message published for this NotificationConfig.
-   * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.Map getCustomAttributesMap(); - /** - * - * - *
-   * Optional. A list of additional attributes to attach to each Pub/Sub
-   * message published for this NotificationConfig.
-   * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - /* nullable */ - java.lang.String getCustomAttributesOrDefault( - java.lang.String key, - /* nullable */ - java.lang.String defaultValue); - /** - * - * - *
-   * Optional. A list of additional attributes to attach to each Pub/Sub
-   * message published for this NotificationConfig.
-   * 
- * - * - * map<string, string> custom_attributes = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.lang.String getCustomAttributesOrThrow(java.lang.String key); - - /** - * - * - *
-   * Optional. If present, only apply this NotificationConfig to object names
-   * that begin with this prefix.
-   * 
- * - * string object_name_prefix = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The objectNamePrefix. - */ - java.lang.String getObjectNamePrefix(); - /** - * - * - *
-   * Optional. If present, only apply this NotificationConfig to object names
-   * that begin with this prefix.
-   * 
- * - * string object_name_prefix = 5 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for objectNamePrefix. - */ - com.google.protobuf.ByteString getObjectNamePrefixBytes(); - - /** - * - * - *
-   * Required. The desired content of the Payload.
-   * 
- * - * string payload_format = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The payloadFormat. - */ - java.lang.String getPayloadFormat(); - /** - * - * - *
-   * Required. The desired content of the Payload.
-   * 
- * - * string payload_format = 6 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for payloadFormat. - */ - com.google.protobuf.ByteString getPayloadFormatBytes(); -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ServiceAccount.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ServiceAccount.java deleted file mode 100644 index ba20351688..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ServiceAccount.java +++ /dev/null @@ -1,625 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * A service account, owned by Cloud Storage, which may be used when taking
- * action on behalf of a given project, for example to publish Pub/Sub
- * notifications or to retrieve security keys.
- * 
- * - * Protobuf type {@code google.storage.v2.ServiceAccount} - */ -public final class ServiceAccount extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.ServiceAccount) - ServiceAccountOrBuilder { - private static final long serialVersionUID = 0L; - // Use ServiceAccount.newBuilder() to construct. - private ServiceAccount(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ServiceAccount() { - emailAddress_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ServiceAccount(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ServiceAccount_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ServiceAccount_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.ServiceAccount.class, - com.google.storage.v2.ServiceAccount.Builder.class); - } - - public static final int EMAIL_ADDRESS_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object emailAddress_ = ""; - /** - * - * - *
-   * The ID of the notification.
-   * 
- * - * string email_address = 1; - * - * @return The emailAddress. - */ - @java.lang.Override - public java.lang.String getEmailAddress() { - java.lang.Object ref = emailAddress_; - 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(); - emailAddress_ = s; - return s; - } - } - /** - * - * - *
-   * The ID of the notification.
-   * 
- * - * string email_address = 1; - * - * @return The bytes for emailAddress. - */ - @java.lang.Override - public com.google.protobuf.ByteString getEmailAddressBytes() { - java.lang.Object ref = emailAddress_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - emailAddress_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(emailAddress_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, emailAddress_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(emailAddress_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, emailAddress_); - } - size += getUnknownFields().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.storage.v2.ServiceAccount)) { - return super.equals(obj); - } - com.google.storage.v2.ServiceAccount other = (com.google.storage.v2.ServiceAccount) obj; - - if (!getEmailAddress().equals(other.getEmailAddress())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + EMAIL_ADDRESS_FIELD_NUMBER; - hash = (53 * hash) + getEmailAddress().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.ServiceAccount parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.ServiceAccount parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.ServiceAccount parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.ServiceAccount 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.storage.v2.ServiceAccount parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.ServiceAccount parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.ServiceAccount parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.ServiceAccount 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.storage.v2.ServiceAccount parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.ServiceAccount 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.storage.v2.ServiceAccount parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.ServiceAccount 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.storage.v2.ServiceAccount 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; - } - /** - * - * - *
-   * A service account, owned by Cloud Storage, which may be used when taking
-   * action on behalf of a given project, for example to publish Pub/Sub
-   * notifications or to retrieve security keys.
-   * 
- * - * Protobuf type {@code google.storage.v2.ServiceAccount} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.ServiceAccount) - com.google.storage.v2.ServiceAccountOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ServiceAccount_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ServiceAccount_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.ServiceAccount.class, - com.google.storage.v2.ServiceAccount.Builder.class); - } - - // Construct using com.google.storage.v2.ServiceAccount.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - emailAddress_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_ServiceAccount_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.ServiceAccount getDefaultInstanceForType() { - return com.google.storage.v2.ServiceAccount.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.ServiceAccount build() { - com.google.storage.v2.ServiceAccount result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.ServiceAccount buildPartial() { - com.google.storage.v2.ServiceAccount result = new com.google.storage.v2.ServiceAccount(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.storage.v2.ServiceAccount result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.emailAddress_ = emailAddress_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.storage.v2.ServiceAccount) { - return mergeFrom((com.google.storage.v2.ServiceAccount) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.ServiceAccount other) { - if (other == com.google.storage.v2.ServiceAccount.getDefaultInstance()) return this; - if (!other.getEmailAddress().isEmpty()) { - emailAddress_ = other.emailAddress_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - emailAddress_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object emailAddress_ = ""; - /** - * - * - *
-     * The ID of the notification.
-     * 
- * - * string email_address = 1; - * - * @return The emailAddress. - */ - public java.lang.String getEmailAddress() { - java.lang.Object ref = emailAddress_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - emailAddress_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The ID of the notification.
-     * 
- * - * string email_address = 1; - * - * @return The bytes for emailAddress. - */ - public com.google.protobuf.ByteString getEmailAddressBytes() { - java.lang.Object ref = emailAddress_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - emailAddress_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The ID of the notification.
-     * 
- * - * string email_address = 1; - * - * @param value The emailAddress to set. - * @return This builder for chaining. - */ - public Builder setEmailAddress(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - emailAddress_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * The ID of the notification.
-     * 
- * - * string email_address = 1; - * - * @return This builder for chaining. - */ - public Builder clearEmailAddress() { - emailAddress_ = getDefaultInstance().getEmailAddress(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * The ID of the notification.
-     * 
- * - * string email_address = 1; - * - * @param value The bytes for emailAddress to set. - * @return This builder for chaining. - */ - public Builder setEmailAddressBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - emailAddress_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.storage.v2.ServiceAccount) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.ServiceAccount) - private static final com.google.storage.v2.ServiceAccount DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.ServiceAccount(); - } - - public static com.google.storage.v2.ServiceAccount getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ServiceAccount parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.storage.v2.ServiceAccount getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ServiceAccountOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ServiceAccountOrBuilder.java deleted file mode 100644 index 3a6153f20f..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ServiceAccountOrBuilder.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface ServiceAccountOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.ServiceAccount) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The ID of the notification.
-   * 
- * - * string email_address = 1; - * - * @return The emailAddress. - */ - java.lang.String getEmailAddress(); - /** - * - * - *
-   * The ID of the notification.
-   * 
- * - * string email_address = 1; - * - * @return The bytes for emailAddress. - */ - com.google.protobuf.ByteString getEmailAddressBytes(); -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageProto.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageProto.java index 0a16408750..d037495f96 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageProto.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StorageProto.java @@ -148,46 +148,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_storage_v2_UpdateObjectRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_storage_v2_UpdateObjectRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_GetServiceAccountRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_GetServiceAccountRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_ServiceAccount_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_ServiceAccount_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_CreateHmacKeyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_CreateHmacKeyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_CreateHmacKeyResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_CreateHmacKeyResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_DeleteHmacKeyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_DeleteHmacKeyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_GetHmacKeyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_GetHmacKeyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_ListHmacKeysRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_ListHmacKeysRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_ListHmacKeysResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_ListHmacKeysResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_UpdateHmacKeyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_UpdateHmacKeyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_HmacKeyMetadata_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_HmacKeyMetadata_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_storage_v2_CommonObjectRequestParams_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -316,34 +276,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_storage_v2_ContentRange_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_storage_v2_ContentRange_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_DeleteNotificationConfigRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_DeleteNotificationConfigRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_GetNotificationConfigRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_GetNotificationConfigRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_CreateNotificationConfigRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_CreateNotificationConfigRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_ListNotificationConfigsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_ListNotificationConfigsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_ListNotificationConfigsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_ListNotificationConfigsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_NotificationConfig_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_NotificationConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_storage_v2_NotificationConfig_CustomAttributesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_storage_v2_NotificationConfig_CustomAttributesEntry_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -591,371 +523,272 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ObjectRequestParamsB\026\n\024_if_generation_ma" + "tchB\032\n\030_if_generation_not_matchB\032\n\030_if_m" + "etageneration_matchB\036\n\034_if_metageneratio" - + "n_not_match\"`\n\030GetServiceAccountRequest\022" - + "D\n\007project\030\001 \001(\tB3\340A\002\372A-\n+cloudresourcem" - + "anager.googleapis.com/Project\"\'\n\016Service" - + "Account\022\025\n\remail_address\030\001 \001(\t\"\200\001\n\024Creat" - + "eHmacKeyRequest\022D\n\007project\030\001 \001(\tB3\340A\002\372A-" - + "\n+cloudresourcemanager.googleapis.com/Pr" - + "oject\022\"\n\025service_account_email\030\002 \001(\tB\003\340A" - + "\002\"g\n\025CreateHmacKeyResponse\0224\n\010metadata\030\001" - + " \001(\0132\".google.storage.v2.HmacKeyMetadata" - + "\022\030\n\020secret_key_bytes\030\003 \001(\014\"t\n\024DeleteHmac" - + "KeyRequest\022\026\n\taccess_id\030\001 \001(\tB\003\340A\002\022D\n\007pr" - + "oject\030\002 \001(\tB3\340A\002\372A-\n+cloudresourcemanage" - + "r.googleapis.com/Project\"q\n\021GetHmacKeyRe" - + "quest\022\026\n\taccess_id\030\001 \001(\tB\003\340A\002\022D\n\007project" - + "\030\002 \001(\tB3\340A\002\372A-\n+cloudresourcemanager.goo" - + "gleapis.com/Project\"\274\001\n\023ListHmacKeysRequ" - + "est\022D\n\007project\030\001 \001(\tB3\340A\002\372A-\n+cloudresou" - + "rcemanager.googleapis.com/Project\022\021\n\tpag" - + "e_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\035\n\025serv" - + "ice_account_email\030\004 \001(\t\022\031\n\021show_deleted_" - + "keys\030\005 \001(\010\"f\n\024ListHmacKeysResponse\0225\n\thm" - + "ac_keys\030\001 \003(\0132\".google.storage.v2.HmacKe" - + "yMetadata\022\027\n\017next_page_token\030\002 \001(\t\"\202\001\n\024U" - + "pdateHmacKeyRequest\0229\n\010hmac_key\030\001 \001(\0132\"." - + "google.storage.v2.HmacKeyMetadataB\003\340A\002\022/" - + "\n\013update_mask\030\003 \001(\0132\032.google.protobuf.Fi" - + "eldMask\"\267\002\n\017HmacKeyMetadata\022\017\n\002id\030\001 \001(\tB" - + "\003\340A\005\022\026\n\taccess_id\030\002 \001(\tB\003\340A\005\022D\n\007project\030" - + "\003 \001(\tB3\340A\005\372A-\n+cloudresourcemanager.goog" - + "leapis.com/Project\022\"\n\025service_account_em" - + "ail\030\004 \001(\tB\003\340A\003\022\022\n\005state\030\005 \001(\tB\003\340A\001\0224\n\013cr" - + "eate_time\030\006 \001(\0132\032.google.protobuf.Timest" - + "ampB\003\340A\003\0224\n\013update_time\030\007 \001(\0132\032.google.p" - + "rotobuf.TimestampB\003\340A\003\022\021\n\004etag\030\010 \001(\tB\003\340A" - + "\001\"|\n\031CommonObjectRequestParams\022\034\n\024encryp" - + "tion_algorithm\030\001 \001(\t\022\034\n\024encryption_key_b" - + "ytes\030\004 \001(\014\022#\n\033encryption_key_sha256_byte" - + "s\030\005 \001(\014\"\312\005\n\020ServiceConstants\"\265\005\n\006Values\022" - + "\026\n\022VALUES_UNSPECIFIED\020\000\022\033\n\024MAX_READ_CHUN" - + "K_BYTES\020\200\200\200\001\022\034\n\025MAX_WRITE_CHUNK_BYTES\020\200\200" - + "\200\001\022\031\n\022MAX_OBJECT_SIZE_MB\020\200\200\300\002\022)\n$MAX_CUS" - + "TOM_METADATA_FIELD_NAME_BYTES\020\200\010\022*\n%MAX_" - + "CUSTOM_METADATA_FIELD_VALUE_BYTES\020\200 \022)\n$" - + "MAX_CUSTOM_METADATA_TOTAL_SIZE_BYTES\020\200@\022" - + "*\n$MAX_BUCKET_METADATA_TOTAL_SIZE_BYTES\020" - + "\200\240\001\022\'\n#MAX_NOTIFICATION_CONFIGS_PER_BUCK" - + "ET\020d\022\"\n\036MAX_LIFECYCLE_RULES_PER_BUCKET\020d" - + "\022&\n\"MAX_NOTIFICATION_CUSTOM_ATTRIBUTES\020\005" - + "\0221\n,MAX_NOTIFICATION_CUSTOM_ATTRIBUTE_KE" - + "Y_LENGTH\020\200\002\0223\n.MAX_NOTIFICATION_CUSTOM_A" - + "TTRIBUTE_VALUE_LENGTH\020\200\010\022\034\n\030MAX_LABELS_E" - + "NTRIES_COUNT\020@\022\037\n\033MAX_LABELS_KEY_VALUE_L" - + "ENGTH\020?\022\037\n\032MAX_LABELS_KEY_VALUE_BYTES\020\200\001" - + "\022.\n)MAX_OBJECT_IDS_PER_DELETE_OBJECTS_RE" - + "QUEST\020\350\007\022\036\n\032SPLIT_TOKEN_MAX_VALID_DAYS\020\016" - + "\032\002\020\001\"\243\034\n\006Bucket\022\021\n\004name\030\001 \001(\tB\003\340A\005\022\026\n\tbu" - + "cket_id\030\002 \001(\tB\003\340A\003\022\014\n\004etag\030\035 \001(\t\022D\n\007proj" - + "ect\030\003 \001(\tB3\340A\005\372A-\n+cloudresourcemanager." - + "googleapis.com/Project\022\033\n\016metageneration" - + "\030\004 \001(\003B\003\340A\003\022\025\n\010location\030\005 \001(\tB\003\340A\005\022\032\n\rlo" - + "cation_type\030\006 \001(\tB\003\340A\003\022\025\n\rstorage_class\030" - + "\007 \001(\t\022\013\n\003rpo\030\033 \001(\t\0223\n\003acl\030\010 \003(\0132&.google" - + ".storage.v2.BucketAccessControl\022B\n\022defau" - + "lt_object_acl\030\t \003(\0132&.google.storage.v2." - + "ObjectAccessControl\0226\n\tlifecycle\030\n \001(\0132#" - + ".google.storage.v2.Bucket.Lifecycle\0224\n\013c" - + "reate_time\030\013 \001(\0132\032.google.protobuf.Times" - + "tampB\003\340A\003\022,\n\004cors\030\014 \003(\0132\036.google.storage" - + ".v2.Bucket.Cors\0224\n\013update_time\030\r \001(\0132\032.g" - + "oogle.protobuf.TimestampB\003\340A\003\022 \n\030default" - + "_event_based_hold\030\016 \001(\010\0225\n\006labels\030\017 \003(\0132" - + "%.google.storage.v2.Bucket.LabelsEntry\0222" - + "\n\007website\030\020 \001(\0132!.google.storage.v2.Buck" - + "et.Website\0228\n\nversioning\030\021 \001(\0132$.google." - + "storage.v2.Bucket.Versioning\0222\n\007logging\030" - + "\022 \001(\0132!.google.storage.v2.Bucket.Logging" - + "\022,\n\005owner\030\023 \001(\0132\030.google.storage.v2.Owne" - + "rB\003\340A\003\0228\n\nencryption\030\024 \001(\0132$.google.stor" - + "age.v2.Bucket.Encryption\0222\n\007billing\030\025 \001(" - + "\0132!.google.storage.v2.Bucket.Billing\022C\n\020" - + "retention_policy\030\026 \001(\0132).google.storage." - + "v2.Bucket.RetentionPolicy\0227\n\niam_config\030" - + "\027 \001(\0132#.google.storage.v2.Bucket.IamConf" - + "ig\022\025\n\rsatisfies_pzs\030\031 \001(\010\022P\n\027custom_plac" - + "ement_config\030\032 \001(\0132/.google.storage.v2.B" - + "ucket.CustomPlacementConfig\0226\n\tautoclass" - + "\030\034 \001(\0132#.google.storage.v2.Bucket.Autocl" - + "ass\022T\n\026hierarchical_namespace\030 \001(\0132/.go" - + "ogle.storage.v2.Bucket.HierarchicalNames" - + "paceB\003\340A\001\022K\n\022soft_delete_policy\030\037 \001(\0132*." - + "google.storage.v2.Bucket.SoftDeletePolic" - + "yB\003\340A\001\032!\n\007Billing\022\026\n\016requester_pays\030\001 \001(" - + "\010\032X\n\004Cors\022\016\n\006origin\030\001 \003(\t\022\016\n\006method\030\002 \003(" - + "\t\022\027\n\017response_header\030\003 \003(\t\022\027\n\017max_age_se" - + "conds\030\004 \001(\005\032M\n\nEncryption\022?\n\017default_kms" - + "_key\030\001 \001(\tB&\372A#\n!cloudkms.googleapis.com" - + "/CryptoKey\032\354\001\n\tIamConfig\022a\n\033uniform_buck" - + "et_level_access\030\001 \001(\0132<.google.storage.v" - + "2.Bucket.IamConfig.UniformBucketLevelAcc" - + "ess\022 \n\030public_access_prevention\030\003 \001(\t\032Z\n" - + "\030UniformBucketLevelAccess\022\017\n\007enabled\030\001 \001" - + "(\010\022-\n\tlock_time\030\002 \001(\0132\032.google.protobuf." - + "Timestamp\032\363\005\n\tLifecycle\0226\n\004rule\030\001 \003(\0132(." - + "google.storage.v2.Bucket.Lifecycle.Rule\032" - + "\255\005\n\004Rule\022?\n\006action\030\001 \001(\0132/.google.storag" - + "e.v2.Bucket.Lifecycle.Rule.Action\022E\n\tcon" - + "dition\030\002 \001(\01322.google.storage.v2.Bucket." - + "Lifecycle.Rule.Condition\032-\n\006Action\022\014\n\004ty" - + "pe\030\001 \001(\t\022\025\n\rstorage_class\030\002 \001(\t\032\355\003\n\tCond" - + "ition\022\025\n\010age_days\030\001 \001(\005H\000\210\001\001\022)\n\016created_" - + "before\030\002 \001(\0132\021.google.type.Date\022\024\n\007is_li" - + "ve\030\003 \001(\010H\001\210\001\001\022\037\n\022num_newer_versions\030\004 \001(" - + "\005H\002\210\001\001\022\035\n\025matches_storage_class\030\005 \003(\t\022#\n" - + "\026days_since_custom_time\030\007 \001(\005H\003\210\001\001\022-\n\022cu" - + "stom_time_before\030\010 \001(\0132\021.google.type.Dat" - + "e\022\'\n\032days_since_noncurrent_time\030\t \001(\005H\004\210" - + "\001\001\0221\n\026noncurrent_time_before\030\n \001(\0132\021.goo" - + "gle.type.Date\022\026\n\016matches_prefix\030\013 \003(\t\022\026\n" - + "\016matches_suffix\030\014 \003(\tB\013\n\t_age_daysB\n\n\010_i" - + "s_liveB\025\n\023_num_newer_versionsB\031\n\027_days_s" - + "ince_custom_timeB\035\n\033_days_since_noncurre" - + "nt_time\0328\n\007Logging\022\022\n\nlog_bucket\030\001 \001(\t\022\031" - + "\n\021log_object_prefix\030\002 \001(\t\032\217\001\n\017RetentionP" - + "olicy\0222\n\016effective_time\030\001 \001(\0132\032.google.p" - + "rotobuf.Timestamp\022\021\n\tis_locked\030\002 \001(\010\0225\n\022" - + "retention_duration\030\004 \001(\0132\031.google.protob" - + "uf.Duration\032\261\001\n\020SoftDeletePolicy\022:\n\022rete" - + "ntion_duration\030\001 \001(\0132\031.google.protobuf.D" - + "urationH\000\210\001\001\0227\n\016effective_time\030\002 \001(\0132\032.g" - + "oogle.protobuf.TimestampH\001\210\001\001B\025\n\023_retent" - + "ion_durationB\021\n\017_effective_time\032\035\n\nVersi" - + "oning\022\017\n\007enabled\030\001 \001(\010\032;\n\007Website\022\030\n\020mai" - + "n_page_suffix\030\001 \001(\t\022\026\n\016not_found_page\030\002 " - + "\001(\t\032/\n\025CustomPlacementConfig\022\026\n\016data_loc" - + "ations\030\001 \003(\t\032\213\002\n\tAutoclass\022\017\n\007enabled\030\001 " - + "\001(\010\0224\n\013toggle_time\030\002 \001(\0132\032.google.protob" - + "uf.TimestampB\003\340A\003\022#\n\026terminal_storage_cl" - + "ass\030\003 \001(\tH\000\210\001\001\022P\n\"terminal_storage_class" - + "_update_time\030\004 \001(\0132\032.google.protobuf.Tim" - + "estampB\003\340A\003H\001\210\001\001B\031\n\027_terminal_storage_cl" - + "assB%\n#_terminal_storage_class_update_ti" - + "me\032-\n\025HierarchicalNamespace\022\024\n\007enabled\030\001" - + " \001(\010B\003\340A\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n" - + "\005value\030\002 \001(\t:\0028\001:X\352AU\n\035storage.googleapi" - + "s.com/Bucket\022#projects/{project}/buckets" - + "/{bucket}*\007buckets2\006bucket\"\316\001\n\023BucketAcc" - + "essControl\022\014\n\004role\030\001 \001(\t\022\n\n\002id\030\002 \001(\t\022\016\n\006" - + "entity\030\003 \001(\t\022\027\n\nentity_alt\030\t \001(\tB\003\340A\003\022\021\n" - + "\tentity_id\030\004 \001(\t\022\014\n\004etag\030\010 \001(\t\022\r\n\005email\030" - + "\005 \001(\t\022\016\n\006domain\030\006 \001(\t\0224\n\014project_team\030\007 " - + "\001(\0132\036.google.storage.v2.ProjectTeam\"I\n\017C" - + "hecksummedData\022\026\n\007content\030\001 \001(\014B\005\010\001\340A\001\022\023" - + "\n\006crc32c\030\002 \001(\007H\000\210\001\001B\t\n\007_crc32c\"C\n\017Object" - + "Checksums\022\023\n\006crc32c\030\001 \001(\007H\000\210\001\001\022\020\n\010md5_ha" - + "sh\030\002 \001(\014B\t\n\007_crc32c\"L\n\022CustomerEncryptio" - + "n\022\034\n\024encryption_algorithm\030\001 \001(\t\022\030\n\020key_s" - + "ha256_bytes\030\003 \001(\014\"\337\n\n\006Object\022\021\n\004name\030\001 \001" - + "(\tB\003\340A\005\0225\n\006bucket\030\002 \001(\tB%\340A\005\372A\037\n\035storage" - + ".googleapis.com/Bucket\022\014\n\004etag\030\033 \001(\t\022\027\n\n" - + "generation\030\003 \001(\003B\003\340A\005\022\037\n\rrestore_token\030#" - + " \001(\tB\003\340A\003H\000\210\001\001\022\033\n\016metageneration\030\004 \001(\003B\003" - + "\340A\003\022\025\n\rstorage_class\030\005 \001(\t\022\021\n\004size\030\006 \001(\003", - "B\003\340A\003\022\030\n\020content_encoding\030\007 \001(\t\022\033\n\023conte" - + "nt_disposition\030\010 \001(\t\022\025\n\rcache_control\030\t " - + "\001(\t\0223\n\003acl\030\n \003(\0132&.google.storage.v2.Obj" - + "ectAccessControl\022\030\n\020content_language\030\013 \001" - + "(\t\0224\n\013delete_time\030\014 \001(\0132\032.google.protobu" - + "f.TimestampB\003\340A\003\022\024\n\014content_type\030\r \001(\t\0224" - + "\n\013create_time\030\016 \001(\0132\032.google.protobuf.Ti" - + "mestampB\003\340A\003\022\034\n\017component_count\030\017 \001(\005B\003\340" - + "A\003\022:\n\tchecksums\030\020 \001(\0132\".google.storage.v" - + "2.ObjectChecksumsB\003\340A\003\0224\n\013update_time\030\021 " - + "\001(\0132\032.google.protobuf.TimestampB\003\340A\003\0227\n\007" - + "kms_key\030\022 \001(\tB&\372A#\n!cloudkms.googleapis." - + "com/CryptoKey\022B\n\031update_storage_class_ti" - + "me\030\023 \001(\0132\032.google.protobuf.TimestampB\003\340A" - + "\003\022\026\n\016temporary_hold\030\024 \001(\010\0229\n\025retention_e" - + "xpire_time\030\025 \001(\0132\032.google.protobuf.Times" - + "tamp\0229\n\010metadata\030\026 \003(\0132\'.google.storage." - + "v2.Object.MetadataEntry\022\035\n\020event_based_h" - + "old\030\027 \001(\010H\001\210\001\001\022,\n\005owner\030\030 \001(\0132\030.google.s" - + "torage.v2.OwnerB\003\340A\003\022B\n\023customer_encrypt" - + "ion\030\031 \001(\0132%.google.storage.v2.CustomerEn" - + "cryption\022/\n\013custom_time\030\032 \001(\0132\032.google.p" - + "rotobuf.Timestamp\022>\n\020soft_delete_time\030\034 " - + "\001(\0132\032.google.protobuf.TimestampB\003\340A\003H\002\210\001" - + "\001\022>\n\020hard_delete_time\030\035 \001(\0132\032.google.pro" - + "tobuf.TimestampB\003\340A\003H\003\210\001\001\032/\n\rMetadataEnt" - + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\020\n\016_r" - + "estore_tokenB\023\n\021_event_based_holdB\023\n\021_so" - + "ft_delete_timeB\023\n\021_hard_delete_time\"\316\001\n\023" - + "ObjectAccessControl\022\014\n\004role\030\001 \001(\t\022\n\n\002id\030" - + "\002 \001(\t\022\016\n\006entity\030\003 \001(\t\022\027\n\nentity_alt\030\t \001(" - + "\tB\003\340A\003\022\021\n\tentity_id\030\004 \001(\t\022\014\n\004etag\030\010 \001(\t\022" - + "\r\n\005email\030\005 \001(\t\022\016\n\006domain\030\006 \001(\t\0224\n\014projec" - + "t_team\030\007 \001(\0132\036.google.storage.v2.Project" - + "Team\"l\n\023ListObjectsResponse\022*\n\007objects\030\001" - + " \003(\0132\031.google.storage.v2.Object\022\020\n\010prefi" - + "xes\030\002 \003(\t\022\027\n\017next_page_token\030\003 \001(\t\"3\n\013Pr" - + "ojectTeam\022\026\n\016project_number\030\001 \001(\t\022\014\n\004tea" - + "m\030\002 \001(\t\"*\n\005Owner\022\016\n\006entity\030\001 \001(\t\022\021\n\tenti" - + "ty_id\030\002 \001(\t\"C\n\014ContentRange\022\r\n\005start\030\001 \001" - + "(\003\022\013\n\003end\030\002 \001(\003\022\027\n\017complete_length\030\003 \001(\003" - + "\"b\n\037DeleteNotificationConfigRequest\022?\n\004n" - + "ame\030\001 \001(\tB1\340A\002\372A+\n)storage.googleapis.co" - + "m/NotificationConfig\"_\n\034GetNotificationC" - + "onfigRequest\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n)stor" - + "age.googleapis.com/NotificationConfig\"\255\001" - + "\n\037CreateNotificationConfigRequest\022A\n\006par" - + "ent\030\001 \001(\tB1\340A\002\372A+\022)storage.googleapis.co" - + "m/NotificationConfig\022G\n\023notification_con" - + "fig\030\002 \001(\0132%.google.storage.v2.Notificati" - + "onConfigB\003\340A\002\"\224\001\n\036ListNotificationConfig" - + "sRequest\022A\n\006parent\030\001 \001(\tB1\340A\002\372A+\022)storag" - + "e.googleapis.com/NotificationConfig\022\026\n\tp" - + "age_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB" - + "\003\340A\001\"\177\n\037ListNotificationConfigsResponse\022" - + "C\n\024notification_configs\030\001 \003(\0132%.google.s" - + "torage.v2.NotificationConfig\022\027\n\017next_pag" - + "e_token\030\002 \001(\t\"\273\003\n\022NotificationConfig\022\021\n\004" - + "name\030\001 \001(\tB\003\340A\002\022\022\n\005topic\030\002 \001(\tB\003\340A\002\022\021\n\004e" - + "tag\030\007 \001(\tB\003\340A\001\022\030\n\013event_types\030\003 \003(\tB\003\340A\001" - + "\022[\n\021custom_attributes\030\004 \003(\0132;.google.sto" - + "rage.v2.NotificationConfig.CustomAttribu" - + "tesEntryB\003\340A\001\022\037\n\022object_name_prefix\030\005 \001(" - + "\tB\003\340A\001\022\033\n\016payload_format\030\006 \001(\tB\003\340A\002\0327\n\025C" - + "ustomAttributesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005val" - + "ue\030\002 \001(\t:\0028\001:}\352Az\n)storage.googleapis.co" - + "m/NotificationConfig\022Mprojects/{project}" - + "/buckets/{bucket}/notificationConfigs/{n" - + "otification_config}2\210(\n\007Storage\022r\n\014Delet" - + "eBucket\022&.google.storage.v2.DeleteBucket" - + "Request\032\026.google.protobuf.Empty\"\"\332A\004name" - + "\212\323\344\223\002\025\022\023\n\004name\022\013{bucket=**}\022o\n\tGetBucket" - + "\022#.google.storage.v2.GetBucketRequest\032\031." - + "google.storage.v2.Bucket\"\"\332A\004name\212\323\344\223\002\025\022" - + "\023\n\004name\022\013{bucket=**}\022\253\001\n\014CreateBucket\022&." - + "google.storage.v2.CreateBucketRequest\032\031." - + "google.storage.v2.Bucket\"X\332A\027parent,buck" - + "et,bucket_id\212\323\344\223\0028\022\026\n\006parent\022\014{project=*" - + "*}\022\036\n\016bucket.project\022\014{project=**}\022\205\001\n\013L" - + "istBuckets\022%.google.storage.v2.ListBucke" - + "tsRequest\032&.google.storage.v2.ListBucket" - + "sResponse\"\'\332A\006parent\212\323\344\223\002\030\022\026\n\006parent\022\014{p" - + "roject=**}\022\223\001\n\031LockBucketRetentionPolicy" - + "\0223.google.storage.v2.LockBucketRetention" - + "PolicyRequest\032\031.google.storage.v2.Bucket" - + "\"&\332A\006bucket\212\323\344\223\002\027\022\025\n\006bucket\022\013{bucket=**}" - + "\022u\n\014GetIamPolicy\022\".google.iam.v1.GetIamP" - + "olicyRequest\032\025.google.iam.v1.Policy\"*\332A\010" - + "resource\212\323\344\223\002\031\022\027\n\010resource\022\013{bucket=**}\022" - + "|\n\014SetIamPolicy\022\".google.iam.v1.SetIamPo" - + "licyRequest\032\025.google.iam.v1.Policy\"1\332A\017r" - + "esource,policy\212\323\344\223\002\031\022\027\n\010resource\022\013{bucke" - + "t=**}\022\226\002\n\022TestIamPermissions\022(.google.ia" - + "m.v1.TestIamPermissionsRequest\032).google." - + "iam.v1.TestIamPermissionsResponse\"\252\001\332A\024r" - + "esource,permissions\212\323\344\223\002\214\001\022\027\n\010resource\022\013" - + "{bucket=**}\0224\n\010resource\022({bucket=project" - + "s/*/buckets/*}/objects/**\022;\n\010resource\022/{" - + "bucket=projects/*/buckets/*}/managedFold" - + "ers/**\022\212\001\n\014UpdateBucket\022&.google.storage" - + ".v2.UpdateBucketRequest\032\031.google.storage" - + ".v2.Bucket\"7\332A\022bucket,update_mask\212\323\344\223\002\034\022" - + "\032\n\013bucket.name\022\013{bucket=**}\022~\n\rComposeOb" - + "ject\022\'.google.storage.v2.ComposeObjectRe" - + "quest\032\031.google.storage.v2.Object\")\212\323\344\223\002#" - + "\022!\n\022destination.bucket\022\013{bucket=**}\022\230\001\n\014" - + "DeleteObject\022&.google.storage.v2.DeleteO" - + "bjectRequest\032\026.google.protobuf.Empty\"H\332A" - + "\rbucket,object\332A\030bucket,object,generatio" - + "n\212\323\344\223\002\027\022\025\n\006bucket\022\013{bucket=**}\022\215\001\n\rResto" - + "reObject\022\'.google.storage.v2.RestoreObje" - + "ctRequest\032\031.google.storage.v2.Object\"8\332A" - + "\030bucket,object,generation\212\323\344\223\002\027\022\025\n\006bucke" - + "t\022\013{bucket=**}\022\272\001\n\024CancelResumableWrite\022" - + "..google.storage.v2.CancelResumableWrite" - + "Request\032/.google.storage.v2.CancelResuma" - + "bleWriteResponse\"A\332A\tupload_id\212\323\344\223\002/\022-\n\t" - + "upload_id\022 {bucket=projects/*/buckets/*}" - + "/**\022\225\001\n\tGetObject\022#.google.storage.v2.Ge" - + "tObjectRequest\032\031.google.storage.v2.Objec" - + "t\"H\332A\rbucket,object\332A\030bucket,object,gene" - + "ration\212\323\344\223\002\027\022\025\n\006bucket\022\013{bucket=**}\022\245\001\n\n" - + "ReadObject\022$.google.storage.v2.ReadObjec" - + "tRequest\032%.google.storage.v2.ReadObjectR" - + "esponse\"H\332A\rbucket,object\332A\030bucket,objec" - + "t,generation\212\323\344\223\002\027\022\025\n\006bucket\022\013{bucket=**" - + "}0\001\022\214\001\n\014UpdateObject\022&.google.storage.v2" - + ".UpdateObjectRequest\032\031.google.storage.v2" - + ".Object\"9\332A\022object,update_mask\212\323\344\223\002\036\022\034\n\r" - + "object.bucket\022\013{bucket=**}\022`\n\013WriteObjec" - + "t\022%.google.storage.v2.WriteObjectRequest" - + "\032&.google.storage.v2.WriteObjectResponse" - + "\"\000(\001\022n\n\017BidiWriteObject\022).google.storage" - + ".v2.BidiWriteObjectRequest\032*.google.stor" - + "age.v2.BidiWriteObjectResponse\"\000(\0010\001\022\204\001\n" - + "\013ListObjects\022%.google.storage.v2.ListObj" - + "ectsRequest\032&.google.storage.v2.ListObje" - + "ctsResponse\"&\332A\006parent\212\323\344\223\002\027\022\025\n\006parent\022\013" - + "{bucket=**}\022\230\001\n\rRewriteObject\022\'.google.s" - + "torage.v2.RewriteObjectRequest\032\".google." - + "storage.v2.RewriteResponse\":\212\323\344\223\0024\022\017\n\rso" - + "urce_bucket\022!\n\022destination_bucket\022\013{buck" - + "et=**}\022\256\001\n\023StartResumableWrite\022-.google." - + "storage.v2.StartResumableWriteRequest\032.." - + "google.storage.v2.StartResumableWriteRes" - + "ponse\"8\212\323\344\223\0022\0220\n!write_object_spec.resou" - + "rce.bucket\022\013{bucket=**}\022\256\001\n\020QueryWriteSt" - + "atus\022*.google.storage.v2.QueryWriteStatu" - + "sRequest\032+.google.storage.v2.QueryWriteS" - + "tatusResponse\"A\332A\tupload_id\212\323\344\223\002/\022-\n\tupl" - + "oad_id\022 {bucket=projects/*/buckets/*}/**" - + "\022\203\001\n\021GetServiceAccount\022+.google.storage." - + "v2.GetServiceAccountRequest\032!.google.sto" - + "rage.v2.ServiceAccount\"\036\210\002\001\332A\007project\212\323\344" - + "\223\002\013\022\t\n\007project\022\230\001\n\rCreateHmacKey\022\'.googl" - + "e.storage.v2.CreateHmacKeyRequest\032(.goog" - + "le.storage.v2.CreateHmacKeyResponse\"4\210\002\001" - + "\332A\035project,service_account_email\212\323\344\223\002\013\022\t" - + "\n\007project\022z\n\rDeleteHmacKey\022\'.google.stor" - + "age.v2.DeleteHmacKeyRequest\032\026.google.pro" - + "tobuf.Empty\"(\210\002\001\332A\021access_id,project\212\323\344\223" - + "\002\013\022\t\n\007project\022\200\001\n\nGetHmacKey\022$.google.st" - + "orage.v2.GetHmacKeyRequest\032\".google.stor" - + "age.v2.HmacKeyMetadata\"(\210\002\001\332A\021access_id," - + "project\212\323\344\223\002\013\022\t\n\007project\022\177\n\014ListHmacKeys" - + "\022&.google.storage.v2.ListHmacKeysRequest" - + "\032\'.google.storage.v2.ListHmacKeysRespons" - + "e\"\036\210\002\001\332A\007project\212\323\344\223\002\013\022\t\n\007project\022\240\001\n\rUp" - + "dateHmacKey\022\'.google.storage.v2.UpdateHm" - + "acKeyRequest\032\".google.storage.v2.HmacKey" - + "Metadata\"B\210\002\001\332A\024hmac_key,update_mask\212\323\344\223" - + "\002\"\022 \n\020hmac_key.project\022\014{project=**}\022\242\001\n" - + "\030DeleteNotificationConfig\0222.google.stora" - + "ge.v2.DeleteNotificationConfigRequest\032\026." - + "google.protobuf.Empty\":\210\002\001\332A\004name\212\323\344\223\002*\022" - + "(\n\004name\022 {bucket=projects/*/buckets/*}/*" - + "*\022\253\001\n\025GetNotificationConfig\022/.google.sto" - + "rage.v2.GetNotificationConfigRequest\032%.g" - + "oogle.storage.v2.NotificationConfig\":\210\002\001" - + "\332A\004name\212\323\344\223\002*\022(\n\004name\022 {bucket=projects/" - + "*/buckets/*}/**\022\264\001\n\030CreateNotificationCo" - + "nfig\0222.google.storage.v2.CreateNotificat" - + "ionConfigRequest\032%.google.storage.v2.Not" - + "ificationConfig\"=\210\002\001\332A\032parent,notificati" - + "on_config\212\323\344\223\002\027\022\025\n\006parent\022\013{bucket=**}\022\253" - + "\001\n\027ListNotificationConfigs\0221.google.stor" - + "age.v2.ListNotificationConfigsRequest\0322." - + "google.storage.v2.ListNotificationConfig" - + "sResponse\")\210\002\001\332A\006parent\212\323\344\223\002\027\022\025\n\006parent\022" - + "\013{bucket=**}\032\247\002\312A\026storage.googleapis.com" - + "\322A\212\002https://www.googleapis.com/auth/clou" - + "d-platform,https://www.googleapis.com/au" - + "th/cloud-platform.read-only,https://www." - + "googleapis.com/auth/devstorage.full_cont" - + "rol,https://www.googleapis.com/auth/devs" - + "torage.read_only,https://www.googleapis." - + "com/auth/devstorage.read_writeB\342\001\n\025com.g" - + "oogle.storage.v2B\014StorageProtoP\001Z>cloud." - + "google.com/go/storage/internal/apiv2/sto" - + "ragepb;storagepb\352Ax\n!cloudkms.googleapis" - + ".com/CryptoKey\022Sprojects/{project}/locat" - + "ions/{location}/keyRings/{key_ring}/cryp" - + "toKeys/{crypto_key}b\006proto3" + + "n_not_match\"|\n\031CommonObjectRequestParams" + + "\022\034\n\024encryption_algorithm\030\001 \001(\t\022\034\n\024encryp" + + "tion_key_bytes\030\004 \001(\014\022#\n\033encryption_key_s" + + "ha256_bytes\030\005 \001(\014\"\312\005\n\020ServiceConstants\"\265" + + "\005\n\006Values\022\026\n\022VALUES_UNSPECIFIED\020\000\022\033\n\024MAX" + + "_READ_CHUNK_BYTES\020\200\200\200\001\022\034\n\025MAX_WRITE_CHUN" + + "K_BYTES\020\200\200\200\001\022\031\n\022MAX_OBJECT_SIZE_MB\020\200\200\300\002\022" + + ")\n$MAX_CUSTOM_METADATA_FIELD_NAME_BYTES\020" + + "\200\010\022*\n%MAX_CUSTOM_METADATA_FIELD_VALUE_BY" + + "TES\020\200 \022)\n$MAX_CUSTOM_METADATA_TOTAL_SIZE" + + "_BYTES\020\200@\022*\n$MAX_BUCKET_METADATA_TOTAL_S" + + "IZE_BYTES\020\200\240\001\022\'\n#MAX_NOTIFICATION_CONFIG" + + "S_PER_BUCKET\020d\022\"\n\036MAX_LIFECYCLE_RULES_PE" + + "R_BUCKET\020d\022&\n\"MAX_NOTIFICATION_CUSTOM_AT" + + "TRIBUTES\020\005\0221\n,MAX_NOTIFICATION_CUSTOM_AT" + + "TRIBUTE_KEY_LENGTH\020\200\002\0223\n.MAX_NOTIFICATIO" + + "N_CUSTOM_ATTRIBUTE_VALUE_LENGTH\020\200\010\022\034\n\030MA" + + "X_LABELS_ENTRIES_COUNT\020@\022\037\n\033MAX_LABELS_K" + + "EY_VALUE_LENGTH\020?\022\037\n\032MAX_LABELS_KEY_VALU" + + "E_BYTES\020\200\001\022.\n)MAX_OBJECT_IDS_PER_DELETE_" + + "OBJECTS_REQUEST\020\350\007\022\036\n\032SPLIT_TOKEN_MAX_VA" + + "LID_DAYS\020\016\032\002\020\001\"\243\034\n\006Bucket\022\021\n\004name\030\001 \001(\tB" + + "\003\340A\005\022\026\n\tbucket_id\030\002 \001(\tB\003\340A\003\022\014\n\004etag\030\035 \001" + + "(\t\022D\n\007project\030\003 \001(\tB3\340A\005\372A-\n+cloudresour" + + "cemanager.googleapis.com/Project\022\033\n\016meta" + + "generation\030\004 \001(\003B\003\340A\003\022\025\n\010location\030\005 \001(\tB" + + "\003\340A\005\022\032\n\rlocation_type\030\006 \001(\tB\003\340A\003\022\025\n\rstor" + + "age_class\030\007 \001(\t\022\013\n\003rpo\030\033 \001(\t\0223\n\003acl\030\010 \003(" + + "\0132&.google.storage.v2.BucketAccessContro" + + "l\022B\n\022default_object_acl\030\t \003(\0132&.google.s" + + "torage.v2.ObjectAccessControl\0226\n\tlifecyc" + + "le\030\n \001(\0132#.google.storage.v2.Bucket.Life" + + "cycle\0224\n\013create_time\030\013 \001(\0132\032.google.prot" + + "obuf.TimestampB\003\340A\003\022,\n\004cors\030\014 \003(\0132\036.goog" + + "le.storage.v2.Bucket.Cors\0224\n\013update_time" + + "\030\r \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022" + + " \n\030default_event_based_hold\030\016 \001(\010\0225\n\006lab" + + "els\030\017 \003(\0132%.google.storage.v2.Bucket.Lab" + + "elsEntry\0222\n\007website\030\020 \001(\0132!.google.stora" + + "ge.v2.Bucket.Website\0228\n\nversioning\030\021 \001(\013" + + "2$.google.storage.v2.Bucket.Versioning\0222" + + "\n\007logging\030\022 \001(\0132!.google.storage.v2.Buck" + + "et.Logging\022,\n\005owner\030\023 \001(\0132\030.google.stora" + + "ge.v2.OwnerB\003\340A\003\0228\n\nencryption\030\024 \001(\0132$.g" + + "oogle.storage.v2.Bucket.Encryption\0222\n\007bi" + + "lling\030\025 \001(\0132!.google.storage.v2.Bucket.B" + + "illing\022C\n\020retention_policy\030\026 \001(\0132).googl" + + "e.storage.v2.Bucket.RetentionPolicy\0227\n\ni" + + "am_config\030\027 \001(\0132#.google.storage.v2.Buck" + + "et.IamConfig\022\025\n\rsatisfies_pzs\030\031 \001(\010\022P\n\027c" + + "ustom_placement_config\030\032 \001(\0132/.google.st" + + "orage.v2.Bucket.CustomPlacementConfig\0226\n" + + "\tautoclass\030\034 \001(\0132#.google.storage.v2.Buc" + + "ket.Autoclass\022T\n\026hierarchical_namespace\030" + + " \001(\0132/.google.storage.v2.Bucket.Hierarc" + + "hicalNamespaceB\003\340A\001\022K\n\022soft_delete_polic" + + "y\030\037 \001(\0132*.google.storage.v2.Bucket.SoftD" + + "eletePolicyB\003\340A\001\032!\n\007Billing\022\026\n\016requester" + + "_pays\030\001 \001(\010\032X\n\004Cors\022\016\n\006origin\030\001 \003(\t\022\016\n\006m" + + "ethod\030\002 \003(\t\022\027\n\017response_header\030\003 \003(\t\022\027\n\017" + + "max_age_seconds\030\004 \001(\005\032M\n\nEncryption\022?\n\017d" + + "efault_kms_key\030\001 \001(\tB&\372A#\n!cloudkms.goog" + + "leapis.com/CryptoKey\032\354\001\n\tIamConfig\022a\n\033un" + + "iform_bucket_level_access\030\001 \001(\0132<.google" + + ".storage.v2.Bucket.IamConfig.UniformBuck" + + "etLevelAccess\022 \n\030public_access_preventio" + + "n\030\003 \001(\t\032Z\n\030UniformBucketLevelAccess\022\017\n\007e" + + "nabled\030\001 \001(\010\022-\n\tlock_time\030\002 \001(\0132\032.google" + + ".protobuf.Timestamp\032\363\005\n\tLifecycle\0226\n\004rul" + + "e\030\001 \003(\0132(.google.storage.v2.Bucket.Lifec" + + "ycle.Rule\032\255\005\n\004Rule\022?\n\006action\030\001 \001(\0132/.goo" + + "gle.storage.v2.Bucket.Lifecycle.Rule.Act" + + "ion\022E\n\tcondition\030\002 \001(\01322.google.storage." + + "v2.Bucket.Lifecycle.Rule.Condition\032-\n\006Ac" + + "tion\022\014\n\004type\030\001 \001(\t\022\025\n\rstorage_class\030\002 \001(" + + "\t\032\355\003\n\tCondition\022\025\n\010age_days\030\001 \001(\005H\000\210\001\001\022)" + + "\n\016created_before\030\002 \001(\0132\021.google.type.Dat" + + "e\022\024\n\007is_live\030\003 \001(\010H\001\210\001\001\022\037\n\022num_newer_ver" + + "sions\030\004 \001(\005H\002\210\001\001\022\035\n\025matches_storage_clas" + + "s\030\005 \003(\t\022#\n\026days_since_custom_time\030\007 \001(\005H" + + "\003\210\001\001\022-\n\022custom_time_before\030\010 \001(\0132\021.googl" + + "e.type.Date\022\'\n\032days_since_noncurrent_tim" + + "e\030\t \001(\005H\004\210\001\001\0221\n\026noncurrent_time_before\030\n" + + " \001(\0132\021.google.type.Date\022\026\n\016matches_prefi" + + "x\030\013 \003(\t\022\026\n\016matches_suffix\030\014 \003(\tB\013\n\t_age_" + + "daysB\n\n\010_is_liveB\025\n\023_num_newer_versionsB" + + "\031\n\027_days_since_custom_timeB\035\n\033_days_sinc" + + "e_noncurrent_time\0328\n\007Logging\022\022\n\nlog_buck" + + "et\030\001 \001(\t\022\031\n\021log_object_prefix\030\002 \001(\t\032\217\001\n\017" + + "RetentionPolicy\0222\n\016effective_time\030\001 \001(\0132" + + "\032.google.protobuf.Timestamp\022\021\n\tis_locked" + + "\030\002 \001(\010\0225\n\022retention_duration\030\004 \001(\0132\031.goo" + + "gle.protobuf.Duration\032\261\001\n\020SoftDeletePoli" + + "cy\022:\n\022retention_duration\030\001 \001(\0132\031.google." + + "protobuf.DurationH\000\210\001\001\0227\n\016effective_time" + + "\030\002 \001(\0132\032.google.protobuf.TimestampH\001\210\001\001B" + + "\025\n\023_retention_durationB\021\n\017_effective_tim" + + "e\032\035\n\nVersioning\022\017\n\007enabled\030\001 \001(\010\032;\n\007Webs" + + "ite\022\030\n\020main_page_suffix\030\001 \001(\t\022\026\n\016not_fou" + + "nd_page\030\002 \001(\t\032/\n\025CustomPlacementConfig\022\026" + + "\n\016data_locations\030\001 \003(\t\032\213\002\n\tAutoclass\022\017\n\007" + + "enabled\030\001 \001(\010\0224\n\013toggle_time\030\002 \001(\0132\032.goo" + + "gle.protobuf.TimestampB\003\340A\003\022#\n\026terminal_" + + "storage_class\030\003 \001(\tH\000\210\001\001\022P\n\"terminal_sto" + + "rage_class_update_time\030\004 \001(\0132\032.google.pr" + + "otobuf.TimestampB\003\340A\003H\001\210\001\001B\031\n\027_terminal_" + + "storage_classB%\n#_terminal_storage_class" + + "_update_time\032-\n\025HierarchicalNamespace\022\024\n" + + "\007enabled\030\001 \001(\010B\003\340A\001\032-\n\013LabelsEntry\022\013\n\003ke" + + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:X\352AU\n\035storage" + + ".googleapis.com/Bucket\022#projects/{projec" + + "t}/buckets/{bucket}*\007buckets2\006bucket\"\316\001\n" + + "\023BucketAccessControl\022\014\n\004role\030\001 \001(\t\022\n\n\002id" + + "\030\002 \001(\t\022\016\n\006entity\030\003 \001(\t\022\027\n\nentity_alt\030\t \001" + + "(\tB\003\340A\003\022\021\n\tentity_id\030\004 \001(\t\022\014\n\004etag\030\010 \001(\t" + + "\022\r\n\005email\030\005 \001(\t\022\016\n\006domain\030\006 \001(\t\0224\n\014proje" + + "ct_team\030\007 \001(\0132\036.google.storage.v2.Projec" + + "tTeam\"I\n\017ChecksummedData\022\026\n\007content\030\001 \001(" + + "\014B\005\010\001\340A\001\022\023\n\006crc32c\030\002 \001(\007H\000\210\001\001B\t\n\007_crc32c" + + "\"C\n\017ObjectChecksums\022\023\n\006crc32c\030\001 \001(\007H\000\210\001\001" + + "\022\020\n\010md5_hash\030\002 \001(\014B\t\n\007_crc32c\"L\n\022Custome" + + "rEncryption\022\034\n\024encryption_algorithm\030\001 \001(" + + "\t\022\030\n\020key_sha256_bytes\030\003 \001(\014\"\337\n\n\006Object\022\021" + + "\n\004name\030\001 \001(\tB\003\340A\005\0225\n\006bucket\030\002 \001(\tB%\340A\005\372A" + + "\037\n\035storage.googleapis.com/Bucket\022\014\n\004etag" + + "\030\033 \001(\t\022\027\n\ngeneration\030\003 \001(\003B\003\340A\005\022\037\n\rresto" + + "re_token\030# \001(\tB\003\340A\003H\000\210\001\001\022\033\n\016metagenerati" + + "on\030\004 \001(\003B\003\340A\003\022\025\n\rstorage_class\030\005 \001(\t\022\021\n\004" + + "size\030\006 \001(\003B\003\340A\003\022\030\n\020content_encoding\030\007 \001(" + + "\t\022\033\n\023content_disposition\030\010 \001(\t\022\025\n\rcache_" + + "control\030\t \001(\t\0223\n\003acl\030\n \003(\0132&.google.stor" + + "age.v2.ObjectAccessControl\022\030\n\020content_la" + + "nguage\030\013 \001(\t\0224\n\013delete_time\030\014 \001(\0132\032.goog" + + "le.protobuf.TimestampB\003\340A\003\022\024\n\014content_ty" + + "pe\030\r \001(\t\0224\n\013create_time\030\016 \001(\0132\032.google.p" + + "rotobuf.TimestampB\003\340A\003\022\034\n\017component_coun" + + "t\030\017 \001(\005B\003\340A\003\022:\n\tchecksums\030\020 \001(\0132\".google" + + ".storage.v2.ObjectChecksumsB\003\340A\003\0224\n\013upda" + + "te_time\030\021 \001(\0132\032.google.protobuf.Timestam" + + "pB\003\340A\003\0227\n\007kms_key\030\022 \001(\tB&\372A#\n!cloudkms.g" + + "oogleapis.com/CryptoKey\022B\n\031update_storag" + + "e_class_time\030\023 \001(\0132\032.google.protobuf.Tim" + + "estampB\003\340A\003\022\026\n\016temporary_hold\030\024 \001(\010\0229\n\025r" + + "etention_expire_time\030\025 \001(\0132\032.google.prot" + + "obuf.Timestamp\0229\n\010metadata\030\026 \003(\0132\'.googl" + + "e.storage.v2.Object.MetadataEntry\022\035\n\020eve" + + "nt_based_hold\030\027 \001(\010H\001\210\001\001\022,\n\005owner\030\030 \001(\0132" + + "\030.google.storage.v2.OwnerB\003\340A\003\022B\n\023custom" + + "er_encryption\030\031 \001(\0132%.google.storage.v2." + + "CustomerEncryption\022/\n\013custom_time\030\032 \001(\0132" + + "\032.google.protobuf.Timestamp\022>\n\020soft_dele" + + "te_time\030\034 \001(\0132\032.google.protobuf.Timestam" + + "pB\003\340A\003H\002\210\001\001\022>\n\020hard_delete_time\030\035 \001(\0132\032." + + "google.protobuf.TimestampB\003\340A\003H\003\210\001\001\032/\n\rM" + + "etadataEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t" + + ":\0028\001B\020\n\016_restore_tokenB\023\n\021_event_based_h" + + "oldB\023\n\021_soft_delete_timeB\023\n\021_hard_delete" + + "_time\"\316\001\n\023ObjectAccessControl\022\014\n\004role\030\001 " + + "\001(\t\022\n\n\002id\030\002 \001(\t\022\016\n\006entity\030\003 \001(\t\022\027\n\nentit" + + "y_alt\030\t \001(\tB\003\340A\003\022\021\n\tentity_id\030\004 \001(\t\022\014\n\004e" + + "tag\030\010 \001(\t\022\r\n\005email\030\005 \001(\t\022\016\n\006domain\030\006 \001(\t" + + "\0224\n\014project_team\030\007 \001(\0132\036.google.storage.", + "v2.ProjectTeam\"l\n\023ListObjectsResponse\022*\n" + + "\007objects\030\001 \003(\0132\031.google.storage.v2.Objec" + + "t\022\020\n\010prefixes\030\002 \003(\t\022\027\n\017next_page_token\030\003" + + " \001(\t\"3\n\013ProjectTeam\022\026\n\016project_number\030\001 " + + "\001(\t\022\014\n\004team\030\002 \001(\t\"*\n\005Owner\022\016\n\006entity\030\001 \001" + + "(\t\022\021\n\tentity_id\030\002 \001(\t\"C\n\014ContentRange\022\r\n" + + "\005start\030\001 \001(\003\022\013\n\003end\030\002 \001(\003\022\027\n\017complete_le" + + "ngth\030\003 \001(\0032\214\034\n\007Storage\022r\n\014DeleteBucket\022&" + + ".google.storage.v2.DeleteBucketRequest\032\026" + + ".google.protobuf.Empty\"\"\332A\004name\212\323\344\223\002\025\022\023\n" + + "\004name\022\013{bucket=**}\022o\n\tGetBucket\022#.google" + + ".storage.v2.GetBucketRequest\032\031.google.st" + + "orage.v2.Bucket\"\"\332A\004name\212\323\344\223\002\025\022\023\n\004name\022\013" + + "{bucket=**}\022\253\001\n\014CreateBucket\022&.google.st" + + "orage.v2.CreateBucketRequest\032\031.google.st" + + "orage.v2.Bucket\"X\332A\027parent,bucket,bucket" + + "_id\212\323\344\223\0028\022\026\n\006parent\022\014{project=**}\022\036\n\016buc" + + "ket.project\022\014{project=**}\022\205\001\n\013ListBucket" + + "s\022%.google.storage.v2.ListBucketsRequest" + + "\032&.google.storage.v2.ListBucketsResponse" + + "\"\'\332A\006parent\212\323\344\223\002\030\022\026\n\006parent\022\014{project=**" + + "}\022\223\001\n\031LockBucketRetentionPolicy\0223.google" + + ".storage.v2.LockBucketRetentionPolicyReq" + + "uest\032\031.google.storage.v2.Bucket\"&\332A\006buck" + + "et\212\323\344\223\002\027\022\025\n\006bucket\022\013{bucket=**}\022u\n\014GetIa" + + "mPolicy\022\".google.iam.v1.GetIamPolicyRequ" + + "est\032\025.google.iam.v1.Policy\"*\332A\010resource\212" + + "\323\344\223\002\031\022\027\n\010resource\022\013{bucket=**}\022|\n\014SetIam" + + "Policy\022\".google.iam.v1.SetIamPolicyReque" + + "st\032\025.google.iam.v1.Policy\"1\332A\017resource,p" + + "olicy\212\323\344\223\002\031\022\027\n\010resource\022\013{bucket=**}\022\226\002\n" + + "\022TestIamPermissions\022(.google.iam.v1.Test" + + "IamPermissionsRequest\032).google.iam.v1.Te" + + "stIamPermissionsResponse\"\252\001\332A\024resource,p" + + "ermissions\212\323\344\223\002\214\001\022\027\n\010resource\022\013{bucket=*" + + "*}\0224\n\010resource\022({bucket=projects/*/bucke" + + "ts/*}/objects/**\022;\n\010resource\022/{bucket=pr" + + "ojects/*/buckets/*}/managedFolders/**\022\212\001" + + "\n\014UpdateBucket\022&.google.storage.v2.Updat" + + "eBucketRequest\032\031.google.storage.v2.Bucke" + + "t\"7\332A\022bucket,update_mask\212\323\344\223\002\034\022\032\n\013bucket" + + ".name\022\013{bucket=**}\022~\n\rComposeObject\022\'.go" + + "ogle.storage.v2.ComposeObjectRequest\032\031.g" + + "oogle.storage.v2.Object\")\212\323\344\223\002#\022!\n\022desti" + + "nation.bucket\022\013{bucket=**}\022\230\001\n\014DeleteObj" + + "ect\022&.google.storage.v2.DeleteObjectRequ" + + "est\032\026.google.protobuf.Empty\"H\332A\rbucket,o" + + "bject\332A\030bucket,object,generation\212\323\344\223\002\027\022\025" + + "\n\006bucket\022\013{bucket=**}\022\215\001\n\rRestoreObject\022" + + "\'.google.storage.v2.RestoreObjectRequest" + + "\032\031.google.storage.v2.Object\"8\332A\030bucket,o" + + "bject,generation\212\323\344\223\002\027\022\025\n\006bucket\022\013{bucke" + + "t=**}\022\272\001\n\024CancelResumableWrite\022..google." + + "storage.v2.CancelResumableWriteRequest\032/" + + ".google.storage.v2.CancelResumableWriteR" + + "esponse\"A\332A\tupload_id\212\323\344\223\002/\022-\n\tupload_id" + + "\022 {bucket=projects/*/buckets/*}/**\022\225\001\n\tG" + + "etObject\022#.google.storage.v2.GetObjectRe" + + "quest\032\031.google.storage.v2.Object\"H\332A\rbuc" + + "ket,object\332A\030bucket,object,generation\212\323\344" + + "\223\002\027\022\025\n\006bucket\022\013{bucket=**}\022\245\001\n\nReadObjec" + + "t\022$.google.storage.v2.ReadObjectRequest\032" + + "%.google.storage.v2.ReadObjectResponse\"H" + + "\332A\rbucket,object\332A\030bucket,object,generat" + + "ion\212\323\344\223\002\027\022\025\n\006bucket\022\013{bucket=**}0\001\022\214\001\n\014U" + + "pdateObject\022&.google.storage.v2.UpdateOb" + + "jectRequest\032\031.google.storage.v2.Object\"9" + + "\332A\022object,update_mask\212\323\344\223\002\036\022\034\n\robject.bu" + + "cket\022\013{bucket=**}\022`\n\013WriteObject\022%.googl" + + "e.storage.v2.WriteObjectRequest\032&.google" + + ".storage.v2.WriteObjectResponse\"\000(\001\022n\n\017B" + + "idiWriteObject\022).google.storage.v2.BidiW" + + "riteObjectRequest\032*.google.storage.v2.Bi" + + "diWriteObjectResponse\"\000(\0010\001\022\204\001\n\013ListObje" + + "cts\022%.google.storage.v2.ListObjectsReque" + + "st\032&.google.storage.v2.ListObjectsRespon" + + "se\"&\332A\006parent\212\323\344\223\002\027\022\025\n\006parent\022\013{bucket=*" + + "*}\022\230\001\n\rRewriteObject\022\'.google.storage.v2" + + ".RewriteObjectRequest\032\".google.storage.v" + + "2.RewriteResponse\":\212\323\344\223\0024\022\017\n\rsource_buck" + + "et\022!\n\022destination_bucket\022\013{bucket=**}\022\256\001" + + "\n\023StartResumableWrite\022-.google.storage.v" + + "2.StartResumableWriteRequest\032..google.st" + + "orage.v2.StartResumableWriteResponse\"8\212\323" + + "\344\223\0022\0220\n!write_object_spec.resource.bucke" + + "t\022\013{bucket=**}\022\256\001\n\020QueryWriteStatus\022*.go" + + "ogle.storage.v2.QueryWriteStatusRequest\032" + + "+.google.storage.v2.QueryWriteStatusResp" + + "onse\"A\332A\tupload_id\212\323\344\223\002/\022-\n\tupload_id\022 {" + + "bucket=projects/*/buckets/*}/**\032\247\002\312A\026sto" + + "rage.googleapis.com\322A\212\002https://www.googl" + + "eapis.com/auth/cloud-platform,https://ww" + + "w.googleapis.com/auth/cloud-platform.rea" + + "d-only,https://www.googleapis.com/auth/d" + + "evstorage.full_control,https://www.googl" + + "eapis.com/auth/devstorage.read_only,http" + + "s://www.googleapis.com/auth/devstorage.r" + + "ead_writeB\342\001\n\025com.google.storage.v2B\014Sto" + + "rageProtoP\001Z>cloud.google.com/go/storage" + + "/internal/apiv2/storagepb;storagepb\352Ax\n!" + + "cloudkms.googleapis.com/CryptoKey\022Sproje" + + "cts/{project}/locations/{location}/keyRi" + + "ngs/{key_ring}/cryptoKeys/{crypto_key}b\006" + + "proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -1326,95 +1159,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "UpdateMask", "CommonObjectRequestParams", }); - internal_static_google_storage_v2_GetServiceAccountRequest_descriptor = - getDescriptor().getMessageTypes().get(28); - internal_static_google_storage_v2_GetServiceAccountRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_GetServiceAccountRequest_descriptor, - new java.lang.String[] { - "Project", - }); - internal_static_google_storage_v2_ServiceAccount_descriptor = - getDescriptor().getMessageTypes().get(29); - internal_static_google_storage_v2_ServiceAccount_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_ServiceAccount_descriptor, - new java.lang.String[] { - "EmailAddress", - }); - internal_static_google_storage_v2_CreateHmacKeyRequest_descriptor = - getDescriptor().getMessageTypes().get(30); - internal_static_google_storage_v2_CreateHmacKeyRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_CreateHmacKeyRequest_descriptor, - new java.lang.String[] { - "Project", "ServiceAccountEmail", - }); - internal_static_google_storage_v2_CreateHmacKeyResponse_descriptor = - getDescriptor().getMessageTypes().get(31); - internal_static_google_storage_v2_CreateHmacKeyResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_CreateHmacKeyResponse_descriptor, - new java.lang.String[] { - "Metadata", "SecretKeyBytes", - }); - internal_static_google_storage_v2_DeleteHmacKeyRequest_descriptor = - getDescriptor().getMessageTypes().get(32); - internal_static_google_storage_v2_DeleteHmacKeyRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_DeleteHmacKeyRequest_descriptor, - new java.lang.String[] { - "AccessId", "Project", - }); - internal_static_google_storage_v2_GetHmacKeyRequest_descriptor = - getDescriptor().getMessageTypes().get(33); - internal_static_google_storage_v2_GetHmacKeyRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_GetHmacKeyRequest_descriptor, - new java.lang.String[] { - "AccessId", "Project", - }); - internal_static_google_storage_v2_ListHmacKeysRequest_descriptor = - getDescriptor().getMessageTypes().get(34); - internal_static_google_storage_v2_ListHmacKeysRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_ListHmacKeysRequest_descriptor, - new java.lang.String[] { - "Project", "PageSize", "PageToken", "ServiceAccountEmail", "ShowDeletedKeys", - }); - internal_static_google_storage_v2_ListHmacKeysResponse_descriptor = - getDescriptor().getMessageTypes().get(35); - internal_static_google_storage_v2_ListHmacKeysResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_ListHmacKeysResponse_descriptor, - new java.lang.String[] { - "HmacKeys", "NextPageToken", - }); - internal_static_google_storage_v2_UpdateHmacKeyRequest_descriptor = - getDescriptor().getMessageTypes().get(36); - internal_static_google_storage_v2_UpdateHmacKeyRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_UpdateHmacKeyRequest_descriptor, - new java.lang.String[] { - "HmacKey", "UpdateMask", - }); - internal_static_google_storage_v2_HmacKeyMetadata_descriptor = - getDescriptor().getMessageTypes().get(37); - internal_static_google_storage_v2_HmacKeyMetadata_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_HmacKeyMetadata_descriptor, - new java.lang.String[] { - "Id", - "AccessId", - "Project", - "ServiceAccountEmail", - "State", - "CreateTime", - "UpdateTime", - "Etag", - }); internal_static_google_storage_v2_CommonObjectRequestParams_descriptor = - getDescriptor().getMessageTypes().get(38); + getDescriptor().getMessageTypes().get(28); internal_static_google_storage_v2_CommonObjectRequestParams_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_CommonObjectRequestParams_descriptor, @@ -1422,12 +1168,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EncryptionAlgorithm", "EncryptionKeyBytes", "EncryptionKeySha256Bytes", }); internal_static_google_storage_v2_ServiceConstants_descriptor = - getDescriptor().getMessageTypes().get(39); + getDescriptor().getMessageTypes().get(29); internal_static_google_storage_v2_ServiceConstants_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_ServiceConstants_descriptor, new java.lang.String[] {}); - internal_static_google_storage_v2_Bucket_descriptor = getDescriptor().getMessageTypes().get(40); + internal_static_google_storage_v2_Bucket_descriptor = getDescriptor().getMessageTypes().get(30); internal_static_google_storage_v2_Bucket_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_Bucket_descriptor, @@ -1618,7 +1364,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_storage_v2_BucketAccessControl_descriptor = - getDescriptor().getMessageTypes().get(41); + getDescriptor().getMessageTypes().get(31); internal_static_google_storage_v2_BucketAccessControl_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_BucketAccessControl_descriptor, @@ -1634,7 +1380,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProjectTeam", }); internal_static_google_storage_v2_ChecksummedData_descriptor = - getDescriptor().getMessageTypes().get(42); + getDescriptor().getMessageTypes().get(32); internal_static_google_storage_v2_ChecksummedData_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_ChecksummedData_descriptor, @@ -1642,7 +1388,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Content", "Crc32C", }); internal_static_google_storage_v2_ObjectChecksums_descriptor = - getDescriptor().getMessageTypes().get(43); + getDescriptor().getMessageTypes().get(33); internal_static_google_storage_v2_ObjectChecksums_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_ObjectChecksums_descriptor, @@ -1650,14 +1396,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Crc32C", "Md5Hash", }); internal_static_google_storage_v2_CustomerEncryption_descriptor = - getDescriptor().getMessageTypes().get(44); + getDescriptor().getMessageTypes().get(34); internal_static_google_storage_v2_CustomerEncryption_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_CustomerEncryption_descriptor, new java.lang.String[] { "EncryptionAlgorithm", "KeySha256Bytes", }); - internal_static_google_storage_v2_Object_descriptor = getDescriptor().getMessageTypes().get(45); + internal_static_google_storage_v2_Object_descriptor = getDescriptor().getMessageTypes().get(35); internal_static_google_storage_v2_Object_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_Object_descriptor, @@ -1702,7 +1448,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_storage_v2_ObjectAccessControl_descriptor = - getDescriptor().getMessageTypes().get(46); + getDescriptor().getMessageTypes().get(36); internal_static_google_storage_v2_ObjectAccessControl_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_ObjectAccessControl_descriptor, @@ -1718,7 +1464,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ProjectTeam", }); internal_static_google_storage_v2_ListObjectsResponse_descriptor = - getDescriptor().getMessageTypes().get(47); + getDescriptor().getMessageTypes().get(37); internal_static_google_storage_v2_ListObjectsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_ListObjectsResponse_descriptor, @@ -1726,14 +1472,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Objects", "Prefixes", "NextPageToken", }); internal_static_google_storage_v2_ProjectTeam_descriptor = - getDescriptor().getMessageTypes().get(48); + getDescriptor().getMessageTypes().get(38); internal_static_google_storage_v2_ProjectTeam_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_ProjectTeam_descriptor, new java.lang.String[] { "ProjectNumber", "Team", }); - internal_static_google_storage_v2_Owner_descriptor = getDescriptor().getMessageTypes().get(49); + internal_static_google_storage_v2_Owner_descriptor = getDescriptor().getMessageTypes().get(39); internal_static_google_storage_v2_Owner_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_Owner_descriptor, @@ -1741,75 +1487,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Entity", "EntityId", }); internal_static_google_storage_v2_ContentRange_descriptor = - getDescriptor().getMessageTypes().get(50); + getDescriptor().getMessageTypes().get(40); internal_static_google_storage_v2_ContentRange_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_ContentRange_descriptor, new java.lang.String[] { "Start", "End", "CompleteLength", }); - internal_static_google_storage_v2_DeleteNotificationConfigRequest_descriptor = - getDescriptor().getMessageTypes().get(51); - internal_static_google_storage_v2_DeleteNotificationConfigRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_DeleteNotificationConfigRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_storage_v2_GetNotificationConfigRequest_descriptor = - getDescriptor().getMessageTypes().get(52); - internal_static_google_storage_v2_GetNotificationConfigRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_GetNotificationConfigRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_storage_v2_CreateNotificationConfigRequest_descriptor = - getDescriptor().getMessageTypes().get(53); - internal_static_google_storage_v2_CreateNotificationConfigRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_CreateNotificationConfigRequest_descriptor, - new java.lang.String[] { - "Parent", "NotificationConfig", - }); - internal_static_google_storage_v2_ListNotificationConfigsRequest_descriptor = - getDescriptor().getMessageTypes().get(54); - internal_static_google_storage_v2_ListNotificationConfigsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_ListNotificationConfigsRequest_descriptor, - new java.lang.String[] { - "Parent", "PageSize", "PageToken", - }); - internal_static_google_storage_v2_ListNotificationConfigsResponse_descriptor = - getDescriptor().getMessageTypes().get(55); - internal_static_google_storage_v2_ListNotificationConfigsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_ListNotificationConfigsResponse_descriptor, - new java.lang.String[] { - "NotificationConfigs", "NextPageToken", - }); - internal_static_google_storage_v2_NotificationConfig_descriptor = - getDescriptor().getMessageTypes().get(56); - internal_static_google_storage_v2_NotificationConfig_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_NotificationConfig_descriptor, - new java.lang.String[] { - "Name", - "Topic", - "Etag", - "EventTypes", - "CustomAttributes", - "ObjectNamePrefix", - "PayloadFormat", - }); - internal_static_google_storage_v2_NotificationConfig_CustomAttributesEntry_descriptor = - internal_static_google_storage_v2_NotificationConfig_descriptor.getNestedTypes().get(0); - internal_static_google_storage_v2_NotificationConfig_CustomAttributesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_storage_v2_NotificationConfig_CustomAttributesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateHmacKeyRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateHmacKeyRequest.java deleted file mode 100644 index 0786c72c4e..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateHmacKeyRequest.java +++ /dev/null @@ -1,1070 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -/** - * - * - *
- * Request object to update an HMAC key state.
- * HmacKeyMetadata.state is required and the only writable field in
- * UpdateHmacKey operation. Specifying fields other than state will result in an
- * error.
- * 
- * - * Protobuf type {@code google.storage.v2.UpdateHmacKeyRequest} - */ -public final class UpdateHmacKeyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.UpdateHmacKeyRequest) - UpdateHmacKeyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use UpdateHmacKeyRequest.newBuilder() to construct. - private UpdateHmacKeyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UpdateHmacKeyRequest() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateHmacKeyRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_UpdateHmacKeyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_UpdateHmacKeyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.UpdateHmacKeyRequest.class, - com.google.storage.v2.UpdateHmacKeyRequest.Builder.class); - } - - private int bitField0_; - public static final int HMAC_KEY_FIELD_NUMBER = 1; - private com.google.storage.v2.HmacKeyMetadata hmacKey_; - /** - * - * - *
-   * Required. The HMAC key to update.
-   * If present, the hmac_key's `id` field will be used to identify the key.
-   * Otherwise, the hmac_key's access_id and project fields will be used to
-   * identify the key.
-   * 
- * - * - * .google.storage.v2.HmacKeyMetadata hmac_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the hmacKey field is set. - */ - @java.lang.Override - public boolean hasHmacKey() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-   * Required. The HMAC key to update.
-   * If present, the hmac_key's `id` field will be used to identify the key.
-   * Otherwise, the hmac_key's access_id and project fields will be used to
-   * identify the key.
-   * 
- * - * - * .google.storage.v2.HmacKeyMetadata hmac_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The hmacKey. - */ - @java.lang.Override - public com.google.storage.v2.HmacKeyMetadata getHmacKey() { - return hmacKey_ == null ? com.google.storage.v2.HmacKeyMetadata.getDefaultInstance() : hmacKey_; - } - /** - * - * - *
-   * Required. The HMAC key to update.
-   * If present, the hmac_key's `id` field will be used to identify the key.
-   * Otherwise, the hmac_key's access_id and project fields will be used to
-   * identify the key.
-   * 
- * - * - * .google.storage.v2.HmacKeyMetadata hmac_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.storage.v2.HmacKeyMetadataOrBuilder getHmacKeyOrBuilder() { - return hmacKey_ == null ? com.google.storage.v2.HmacKeyMetadata.getDefaultInstance() : hmacKey_; - } - - public static final int UPDATE_MASK_FIELD_NUMBER = 3; - private com.google.protobuf.FieldMask updateMask_; - /** - * - * - *
-   * Update mask for hmac_key.
-   * Not specifying any fields will mean only the `state` field is updated to
-   * the value specified in `hmac_key`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * - * @return Whether the updateMask field is set. - */ - @java.lang.Override - public boolean hasUpdateMask() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-   * Update mask for hmac_key.
-   * Not specifying any fields will mean only the `state` field is updated to
-   * the value specified in `hmac_key`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * - * @return The updateMask. - */ - @java.lang.Override - public com.google.protobuf.FieldMask getUpdateMask() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - /** - * - * - *
-   * Update mask for hmac_key.
-   * Not specifying any fields will mean only the `state` field is updated to
-   * the value specified in `hmac_key`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - @java.lang.Override - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; - } - - 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 (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getHmacKey()); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(3, getUpdateMask()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getHmacKey()); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateMask()); - } - size += getUnknownFields().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.storage.v2.UpdateHmacKeyRequest)) { - return super.equals(obj); - } - com.google.storage.v2.UpdateHmacKeyRequest other = - (com.google.storage.v2.UpdateHmacKeyRequest) obj; - - if (hasHmacKey() != other.hasHmacKey()) return false; - if (hasHmacKey()) { - if (!getHmacKey().equals(other.getHmacKey())) return false; - } - if (hasUpdateMask() != other.hasUpdateMask()) return false; - if (hasUpdateMask()) { - if (!getUpdateMask().equals(other.getUpdateMask())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasHmacKey()) { - hash = (37 * hash) + HMAC_KEY_FIELD_NUMBER; - hash = (53 * hash) + getHmacKey().hashCode(); - } - if (hasUpdateMask()) { - hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMask().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.storage.v2.UpdateHmacKeyRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.UpdateHmacKeyRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.UpdateHmacKeyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.UpdateHmacKeyRequest 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.storage.v2.UpdateHmacKeyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.storage.v2.UpdateHmacKeyRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.storage.v2.UpdateHmacKeyRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.UpdateHmacKeyRequest 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.storage.v2.UpdateHmacKeyRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.storage.v2.UpdateHmacKeyRequest 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.storage.v2.UpdateHmacKeyRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.storage.v2.UpdateHmacKeyRequest 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.storage.v2.UpdateHmacKeyRequest 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 object to update an HMAC key state.
-   * HmacKeyMetadata.state is required and the only writable field in
-   * UpdateHmacKey operation. Specifying fields other than state will result in an
-   * error.
-   * 
- * - * Protobuf type {@code google.storage.v2.UpdateHmacKeyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.storage.v2.UpdateHmacKeyRequest) - com.google.storage.v2.UpdateHmacKeyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_UpdateHmacKeyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_UpdateHmacKeyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.UpdateHmacKeyRequest.class, - com.google.storage.v2.UpdateHmacKeyRequest.Builder.class); - } - - // Construct using com.google.storage.v2.UpdateHmacKeyRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getHmacKeyFieldBuilder(); - getUpdateMaskFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - hmacKey_ = null; - if (hmacKeyBuilder_ != null) { - hmacKeyBuilder_.dispose(); - hmacKeyBuilder_ = null; - } - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_UpdateHmacKeyRequest_descriptor; - } - - @java.lang.Override - public com.google.storage.v2.UpdateHmacKeyRequest getDefaultInstanceForType() { - return com.google.storage.v2.UpdateHmacKeyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.storage.v2.UpdateHmacKeyRequest build() { - com.google.storage.v2.UpdateHmacKeyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.storage.v2.UpdateHmacKeyRequest buildPartial() { - com.google.storage.v2.UpdateHmacKeyRequest result = - new com.google.storage.v2.UpdateHmacKeyRequest(this); - if (bitField0_ != 0) { - buildPartial0(result); - } - onBuilt(); - return result; - } - - private void buildPartial0(com.google.storage.v2.UpdateHmacKeyRequest result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.hmacKey_ = hmacKeyBuilder_ == null ? hmacKey_ : hmacKeyBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.storage.v2.UpdateHmacKeyRequest) { - return mergeFrom((com.google.storage.v2.UpdateHmacKeyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.storage.v2.UpdateHmacKeyRequest other) { - if (other == com.google.storage.v2.UpdateHmacKeyRequest.getDefaultInstance()) return this; - if (other.hasHmacKey()) { - mergeHmacKey(other.getHmacKey()); - } - if (other.hasUpdateMask()) { - mergeUpdateMask(other.getUpdateMask()); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getHmacKeyFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 26: - { - input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private com.google.storage.v2.HmacKeyMetadata hmacKey_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.storage.v2.HmacKeyMetadata, - com.google.storage.v2.HmacKeyMetadata.Builder, - com.google.storage.v2.HmacKeyMetadataOrBuilder> - hmacKeyBuilder_; - /** - * - * - *
-     * Required. The HMAC key to update.
-     * If present, the hmac_key's `id` field will be used to identify the key.
-     * Otherwise, the hmac_key's access_id and project fields will be used to
-     * identify the key.
-     * 
- * - * - * .google.storage.v2.HmacKeyMetadata hmac_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the hmacKey field is set. - */ - public boolean hasHmacKey() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * - * - *
-     * Required. The HMAC key to update.
-     * If present, the hmac_key's `id` field will be used to identify the key.
-     * Otherwise, the hmac_key's access_id and project fields will be used to
-     * identify the key.
-     * 
- * - * - * .google.storage.v2.HmacKeyMetadata hmac_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The hmacKey. - */ - public com.google.storage.v2.HmacKeyMetadata getHmacKey() { - if (hmacKeyBuilder_ == null) { - return hmacKey_ == null - ? com.google.storage.v2.HmacKeyMetadata.getDefaultInstance() - : hmacKey_; - } else { - return hmacKeyBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The HMAC key to update.
-     * If present, the hmac_key's `id` field will be used to identify the key.
-     * Otherwise, the hmac_key's access_id and project fields will be used to
-     * identify the key.
-     * 
- * - * - * .google.storage.v2.HmacKeyMetadata hmac_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setHmacKey(com.google.storage.v2.HmacKeyMetadata value) { - if (hmacKeyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - hmacKey_ = value; - } else { - hmacKeyBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The HMAC key to update.
-     * If present, the hmac_key's `id` field will be used to identify the key.
-     * Otherwise, the hmac_key's access_id and project fields will be used to
-     * identify the key.
-     * 
- * - * - * .google.storage.v2.HmacKeyMetadata hmac_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setHmacKey(com.google.storage.v2.HmacKeyMetadata.Builder builderForValue) { - if (hmacKeyBuilder_ == null) { - hmacKey_ = builderForValue.build(); - } else { - hmacKeyBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The HMAC key to update.
-     * If present, the hmac_key's `id` field will be used to identify the key.
-     * Otherwise, the hmac_key's access_id and project fields will be used to
-     * identify the key.
-     * 
- * - * - * .google.storage.v2.HmacKeyMetadata hmac_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeHmacKey(com.google.storage.v2.HmacKeyMetadata value) { - if (hmacKeyBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) - && hmacKey_ != null - && hmacKey_ != com.google.storage.v2.HmacKeyMetadata.getDefaultInstance()) { - getHmacKeyBuilder().mergeFrom(value); - } else { - hmacKey_ = value; - } - } else { - hmacKeyBuilder_.mergeFrom(value); - } - if (hmacKey_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * - * - *
-     * Required. The HMAC key to update.
-     * If present, the hmac_key's `id` field will be used to identify the key.
-     * Otherwise, the hmac_key's access_id and project fields will be used to
-     * identify the key.
-     * 
- * - * - * .google.storage.v2.HmacKeyMetadata hmac_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearHmacKey() { - bitField0_ = (bitField0_ & ~0x00000001); - hmacKey_ = null; - if (hmacKeyBuilder_ != null) { - hmacKeyBuilder_.dispose(); - hmacKeyBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The HMAC key to update.
-     * If present, the hmac_key's `id` field will be used to identify the key.
-     * Otherwise, the hmac_key's access_id and project fields will be used to
-     * identify the key.
-     * 
- * - * - * .google.storage.v2.HmacKeyMetadata hmac_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.storage.v2.HmacKeyMetadata.Builder getHmacKeyBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getHmacKeyFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The HMAC key to update.
-     * If present, the hmac_key's `id` field will be used to identify the key.
-     * Otherwise, the hmac_key's access_id and project fields will be used to
-     * identify the key.
-     * 
- * - * - * .google.storage.v2.HmacKeyMetadata hmac_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.storage.v2.HmacKeyMetadataOrBuilder getHmacKeyOrBuilder() { - if (hmacKeyBuilder_ != null) { - return hmacKeyBuilder_.getMessageOrBuilder(); - } else { - return hmacKey_ == null - ? com.google.storage.v2.HmacKeyMetadata.getDefaultInstance() - : hmacKey_; - } - } - /** - * - * - *
-     * Required. The HMAC key to update.
-     * If present, the hmac_key's `id` field will be used to identify the key.
-     * Otherwise, the hmac_key's access_id and project fields will be used to
-     * identify the key.
-     * 
- * - * - * .google.storage.v2.HmacKeyMetadata hmac_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.storage.v2.HmacKeyMetadata, - com.google.storage.v2.HmacKeyMetadata.Builder, - com.google.storage.v2.HmacKeyMetadataOrBuilder> - getHmacKeyFieldBuilder() { - if (hmacKeyBuilder_ == null) { - hmacKeyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.storage.v2.HmacKeyMetadata, - com.google.storage.v2.HmacKeyMetadata.Builder, - com.google.storage.v2.HmacKeyMetadataOrBuilder>( - getHmacKey(), getParentForChildren(), isClean()); - hmacKey_ = null; - } - return hmacKeyBuilder_; - } - - private com.google.protobuf.FieldMask updateMask_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - updateMaskBuilder_; - /** - * - * - *
-     * Update mask for hmac_key.
-     * Not specifying any fields will mean only the `state` field is updated to
-     * the value specified in `hmac_key`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * - * @return Whether the updateMask field is set. - */ - public boolean hasUpdateMask() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * - * - *
-     * Update mask for hmac_key.
-     * Not specifying any fields will mean only the `state` field is updated to
-     * the value specified in `hmac_key`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * - * @return The updateMask. - */ - public com.google.protobuf.FieldMask getUpdateMask() { - if (updateMaskBuilder_ == null) { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : updateMask_; - } else { - return updateMaskBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Update mask for hmac_key.
-     * Not specifying any fields will mean only the `state` field is updated to
-     * the value specified in `hmac_key`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMask_ = value; - } else { - updateMaskBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Update mask for hmac_key.
-     * Not specifying any fields will mean only the `state` field is updated to
-     * the value specified in `hmac_key`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { - if (updateMaskBuilder_ == null) { - updateMask_ = builderForValue.build(); - } else { - updateMaskBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * - * - *
-     * Update mask for hmac_key.
-     * Not specifying any fields will mean only the `state` field is updated to
-     * the value specified in `hmac_key`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { - if (updateMaskBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) - && updateMask_ != null - && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { - getUpdateMaskBuilder().mergeFrom(value); - } else { - updateMask_ = value; - } - } else { - updateMaskBuilder_.mergeFrom(value); - } - if (updateMask_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - * - * - *
-     * Update mask for hmac_key.
-     * Not specifying any fields will mean only the `state` field is updated to
-     * the value specified in `hmac_key`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public Builder clearUpdateMask() { - bitField0_ = (bitField0_ & ~0x00000002); - updateMask_ = null; - if (updateMaskBuilder_ != null) { - updateMaskBuilder_.dispose(); - updateMaskBuilder_ = null; - } - onChanged(); - return this; - } - /** - * - * - *
-     * Update mask for hmac_key.
-     * Not specifying any fields will mean only the `state` field is updated to
-     * the value specified in `hmac_key`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getUpdateMaskFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Update mask for hmac_key.
-     * Not specifying any fields will mean only the `state` field is updated to
-     * the value specified in `hmac_key`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { - if (updateMaskBuilder_ != null) { - return updateMaskBuilder_.getMessageOrBuilder(); - } else { - return updateMask_ == null - ? com.google.protobuf.FieldMask.getDefaultInstance() - : updateMask_; - } - } - /** - * - * - *
-     * Update mask for hmac_key.
-     * Not specifying any fields will mean only the `state` field is updated to
-     * the value specified in `hmac_key`.
-     * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder> - getUpdateMaskFieldBuilder() { - if (updateMaskBuilder_ == null) { - updateMaskBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.FieldMask, - com.google.protobuf.FieldMask.Builder, - com.google.protobuf.FieldMaskOrBuilder>( - getUpdateMask(), getParentForChildren(), isClean()); - updateMask_ = null; - } - return updateMaskBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.storage.v2.UpdateHmacKeyRequest) - } - - // @@protoc_insertion_point(class_scope:google.storage.v2.UpdateHmacKeyRequest) - private static final com.google.storage.v2.UpdateHmacKeyRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.storage.v2.UpdateHmacKeyRequest(); - } - - public static com.google.storage.v2.UpdateHmacKeyRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateHmacKeyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.storage.v2.UpdateHmacKeyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateHmacKeyRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateHmacKeyRequestOrBuilder.java deleted file mode 100644 index a754f0fc27..0000000000 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateHmacKeyRequestOrBuilder.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/storage/v2/storage.proto - -// Protobuf Java Version: 3.25.5 -package com.google.storage.v2; - -public interface UpdateHmacKeyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.UpdateHmacKeyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The HMAC key to update.
-   * If present, the hmac_key's `id` field will be used to identify the key.
-   * Otherwise, the hmac_key's access_id and project fields will be used to
-   * identify the key.
-   * 
- * - * - * .google.storage.v2.HmacKeyMetadata hmac_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the hmacKey field is set. - */ - boolean hasHmacKey(); - /** - * - * - *
-   * Required. The HMAC key to update.
-   * If present, the hmac_key's `id` field will be used to identify the key.
-   * Otherwise, the hmac_key's access_id and project fields will be used to
-   * identify the key.
-   * 
- * - * - * .google.storage.v2.HmacKeyMetadata hmac_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The hmacKey. - */ - com.google.storage.v2.HmacKeyMetadata getHmacKey(); - /** - * - * - *
-   * Required. The HMAC key to update.
-   * If present, the hmac_key's `id` field will be used to identify the key.
-   * Otherwise, the hmac_key's access_id and project fields will be used to
-   * identify the key.
-   * 
- * - * - * .google.storage.v2.HmacKeyMetadata hmac_key = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.storage.v2.HmacKeyMetadataOrBuilder getHmacKeyOrBuilder(); - - /** - * - * - *
-   * Update mask for hmac_key.
-   * Not specifying any fields will mean only the `state` field is updated to
-   * the value specified in `hmac_key`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * - * @return Whether the updateMask field is set. - */ - boolean hasUpdateMask(); - /** - * - * - *
-   * Update mask for hmac_key.
-   * Not specifying any fields will mean only the `state` field is updated to
-   * the value specified in `hmac_key`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - * - * @return The updateMask. - */ - com.google.protobuf.FieldMask getUpdateMask(); - /** - * - * - *
-   * Update mask for hmac_key.
-   * Not specifying any fields will mean only the `state` field is updated to
-   * the value specified in `hmac_key`.
-   * 
- * - * .google.protobuf.FieldMask update_mask = 3; - */ - com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); -} diff --git a/proto-google-cloud-storage-v2/src/main/proto/google/storage/v2/storage.proto b/proto-google-cloud-storage-v2/src/main/proto/google/storage/v2/storage.proto index 31a7164386..c7229d4e96 100644 --- a/proto-google-cloud-storage-v2/src/main/proto/google/storage/v2/storage.proto +++ b/proto-google-cloud-storage-v2/src/main/proto/google/storage/v2/storage.proto @@ -379,112 +379,6 @@ service Storage { }; option (google.api.method_signature) = "upload_id"; } - - // Retrieves the name of a project's Google Cloud Storage service account. - rpc GetServiceAccount(GetServiceAccountRequest) returns (ServiceAccount) { - option deprecated = true; - option (google.api.routing) = { - routing_parameters { field: "project" } - }; - option (google.api.method_signature) = "project"; - } - - // Creates a new HMAC key for the given service account. - rpc CreateHmacKey(CreateHmacKeyRequest) returns (CreateHmacKeyResponse) { - option deprecated = true; - option (google.api.routing) = { - routing_parameters { field: "project" } - }; - option (google.api.method_signature) = "project,service_account_email"; - } - - // Deletes a given HMAC key. Key must be in an INACTIVE state. - rpc DeleteHmacKey(DeleteHmacKeyRequest) returns (google.protobuf.Empty) { - option deprecated = true; - option (google.api.routing) = { - routing_parameters { field: "project" } - }; - option (google.api.method_signature) = "access_id,project"; - } - - // Gets an existing HMAC key metadata for the given id. - rpc GetHmacKey(GetHmacKeyRequest) returns (HmacKeyMetadata) { - option deprecated = true; - option (google.api.routing) = { - routing_parameters { field: "project" } - }; - option (google.api.method_signature) = "access_id,project"; - } - - // Lists HMAC keys under a given project with the additional filters provided. - rpc ListHmacKeys(ListHmacKeysRequest) returns (ListHmacKeysResponse) { - option deprecated = true; - option (google.api.routing) = { - routing_parameters { field: "project" } - }; - option (google.api.method_signature) = "project"; - } - - // Updates a given HMAC key state between ACTIVE and INACTIVE. - rpc UpdateHmacKey(UpdateHmacKeyRequest) returns (HmacKeyMetadata) { - option deprecated = true; - option (google.api.routing) = { - routing_parameters { - field: "hmac_key.project" - path_template: "{project=**}" - } - }; - option (google.api.method_signature) = "hmac_key,update_mask"; - } - - // Permanently deletes a NotificationConfig. - rpc DeleteNotificationConfig(DeleteNotificationConfigRequest) - returns (google.protobuf.Empty) { - option deprecated = true; - option (google.api.routing) = { - routing_parameters { - field: "name" - path_template: "{bucket=projects/*/buckets/*}/**" - } - }; - option (google.api.method_signature) = "name"; - } - - // View a NotificationConfig. - rpc GetNotificationConfig(GetNotificationConfigRequest) - returns (NotificationConfig) { - option deprecated = true; - option (google.api.routing) = { - routing_parameters { - field: "name" - path_template: "{bucket=projects/*/buckets/*}/**" - } - }; - option (google.api.method_signature) = "name"; - } - - // Creates a NotificationConfig for a given bucket. - // These NotificationConfigs, when triggered, publish messages to the - // specified Pub/Sub topics. See - // https://cloud.google.com/storage/docs/pubsub-notifications. - rpc CreateNotificationConfig(CreateNotificationConfigRequest) - returns (NotificationConfig) { - option deprecated = true; - option (google.api.routing) = { - routing_parameters { field: "parent" path_template: "{bucket=**}" } - }; - option (google.api.method_signature) = "parent,notification_config"; - } - - // Retrieves a list of NotificationConfigs for a given bucket. - rpc ListNotificationConfigs(ListNotificationConfigsRequest) - returns (ListNotificationConfigsResponse) { - option deprecated = true; - option (google.api.routing) = { - routing_parameters { field: "parent" path_template: "{bucket=**}" } - }; - option (google.api.method_signature) = "parent"; - } } // Request message for DeleteBucket. @@ -1477,175 +1371,6 @@ message UpdateObjectRequest { CommonObjectRequestParams common_object_request_params = 8; } -// Request message for GetServiceAccount. -message GetServiceAccountRequest { - // Required. Project ID, in the format of "projects/{projectIdentifier}". - // {projectIdentifier} can be the project ID or project number. - string project = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - } - ]; -} - -// A service account, owned by Cloud Storage, which may be used when taking -// action on behalf of a given project, for example to publish Pub/Sub -// notifications or to retrieve security keys. -message ServiceAccount { - // The ID of the notification. - string email_address = 1; -} - -// Request message for CreateHmacKey. -message CreateHmacKeyRequest { - // Required. The project that the HMAC-owning service account lives in, in the - // format of "projects/{projectIdentifier}". {projectIdentifier} can be the - // project ID or project number. - string project = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - } - ]; - - // Required. The service account to create the HMAC for. - string service_account_email = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Create hmac response. The only time the secret for an HMAC will be returned. -message CreateHmacKeyResponse { - // Key metadata. - HmacKeyMetadata metadata = 1; - - // HMAC key secret material. - // In raw bytes format (not base64-encoded). - bytes secret_key_bytes = 3; -} - -// Request object to delete a given HMAC key. -message DeleteHmacKeyRequest { - // Required. The identifying key for the HMAC to delete. - string access_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The project that owns the HMAC key, in the format of - // "projects/{projectIdentifier}". - // {projectIdentifier} can be the project ID or project number. - string project = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - } - ]; -} - -// Request object to get metadata on a given HMAC key. -message GetHmacKeyRequest { - // Required. The identifying key for the HMAC to delete. - string access_id = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The project the HMAC key lies in, in the format of - // "projects/{projectIdentifier}". - // {projectIdentifier} can be the project ID or project number. - string project = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - } - ]; -} - -// Request to fetch a list of HMAC keys under a given project. -message ListHmacKeysRequest { - // Required. The project to list HMAC keys for, in the format of - // "projects/{projectIdentifier}". - // {projectIdentifier} can be the project ID or project number. - string project = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - } - ]; - - // The maximum number of keys to return. - int32 page_size = 2; - - // A previously returned token from ListHmacKeysResponse to get the next page. - string page_token = 3; - - // If set, filters to only return HMAC keys for specified service account. - string service_account_email = 4; - - // If set, return deleted keys that have not yet been wiped out. - bool show_deleted_keys = 5; -} - -// Hmac key list response with next page information. -message ListHmacKeysResponse { - // The list of items. - repeated HmacKeyMetadata hmac_keys = 1; - - // The continuation token, used to page through large result sets. Provide - // this value in a subsequent request to return the next page of results. - string next_page_token = 2; -} - -// Request object to update an HMAC key state. -// HmacKeyMetadata.state is required and the only writable field in -// UpdateHmacKey operation. Specifying fields other than state will result in an -// error. -message UpdateHmacKeyRequest { - // Required. The HMAC key to update. - // If present, the hmac_key's `id` field will be used to identify the key. - // Otherwise, the hmac_key's access_id and project fields will be used to - // identify the key. - HmacKeyMetadata hmac_key = 1 [(google.api.field_behavior) = REQUIRED]; - - // Update mask for hmac_key. - // Not specifying any fields will mean only the `state` field is updated to - // the value specified in `hmac_key`. - google.protobuf.FieldMask update_mask = 3; -} - -// Hmac Key Metadata, which includes all information other than the secret. -message HmacKeyMetadata { - // Immutable. Resource name ID of the key in the format - // {projectIdentifier}/{accessId}. - // {projectIdentifier} can be the project ID or project number. - string id = 1 [(google.api.field_behavior) = IMMUTABLE]; - - // Immutable. Globally unique id for keys. - string access_id = 2 [(google.api.field_behavior) = IMMUTABLE]; - - // Immutable. Identifies the project that owns the service account of the - // specified HMAC key, in the format "projects/{projectIdentifier}". - // {projectIdentifier} can be the project ID or project number. - string project = 3 [ - (google.api.field_behavior) = IMMUTABLE, - (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - } - ]; - - // Output only. Email of the service account the key authenticates as. - string service_account_email = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. State of the key. One of ACTIVE, INACTIVE, or DELETED. - // Writable, can be updated by UpdateHmacKey operation. - string state = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The creation time of the HMAC key. - google.protobuf.Timestamp create_time = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The last modification time of the HMAC key metadata. - google.protobuf.Timestamp update_time = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The etag of the HMAC key. - string etag = 8 [(google.api.field_behavior) = OPTIONAL]; -} - // Parameters that can be passed to any object request. message CommonObjectRequestParams { // Encryption algorithm used with the Customer-Supplied Encryption Keys @@ -2526,115 +2251,3 @@ message ContentRange { // The complete length of the object data. int64 complete_length = 3; } - -// Request message for DeleteNotificationConfig. -message DeleteNotificationConfigRequest { - // Required. The parent bucket of the NotificationConfig. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "storage.googleapis.com/NotificationConfig" - } - ]; -} - -// Request message for GetNotificationConfig. -message GetNotificationConfigRequest { - // Required. The parent bucket of the NotificationConfig. - // Format: - // `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "storage.googleapis.com/NotificationConfig" - } - ]; -} - -// Request message for CreateNotificationConfig. -message CreateNotificationConfigRequest { - // Required. The bucket to which this NotificationConfig belongs. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "storage.googleapis.com/NotificationConfig" - } - ]; - - // Required. Properties of the NotificationConfig to be inserted. - NotificationConfig notification_config = 2 - [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for ListNotifications. -message ListNotificationConfigsRequest { - // Required. Name of a Google Cloud Storage bucket. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "storage.googleapis.com/NotificationConfig" - } - ]; - - // Optional. The maximum number of NotificationConfigs to return. The service - // may return fewer than this value. The default value is 100. Specifying a - // value above 100 will result in a page_size of 100. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A page token, received from a previous `ListNotificationConfigs` - // call. Provide this to retrieve the subsequent page. - // - // When paginating, all other parameters provided to `ListNotificationConfigs` - // must match the call that provided the page token. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// The result of a call to ListNotificationConfigs -message ListNotificationConfigsResponse { - // The list of items. - repeated NotificationConfig notification_configs = 1; - - // A token, which can be sent as `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - string next_page_token = 2; -} - -// A directive to publish Pub/Sub notifications upon changes to a bucket. -message NotificationConfig { - option (google.api.resource) = { - type: "storage.googleapis.com/NotificationConfig" - pattern: "projects/{project}/buckets/{bucket}/notificationConfigs/{notification_config}" - }; - - // Required. The resource name of this NotificationConfig. - // Format: - // `projects/{project}/buckets/{bucket}/notificationConfigs/{notificationConfig}` - // The `{project}` portion may be `_` for globally unique buckets. - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The Pub/Sub topic to which this subscription publishes. Formatted - // as: - // '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}' - string topic = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The etag of the NotificationConfig. - // If included in the metadata of GetNotificationConfigRequest, the operation - // will only be performed if the etag matches that of the NotificationConfig. - string etag = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If present, only send notifications about listed event types. If - // empty, sent notifications for all event types. - repeated string event_types = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A list of additional attributes to attach to each Pub/Sub - // message published for this NotificationConfig. - map custom_attributes = 4 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If present, only apply this NotificationConfig to object names - // that begin with this prefix. - string object_name_prefix = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The desired content of the Payload. - string payload_format = 6 [(google.api.field_behavior) = REQUIRED]; -}