From b1628dddb5ba10192974487f2ee17e19a8dc40e6 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 19 May 2025 21:10:23 +0200 Subject: [PATCH 01/22] test(deps): update cross product test dependencies (#3105) --- google-cloud-storage/pom.xml | 6 +++--- pom.xml | 2 +- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/google-cloud-storage/pom.xml b/google-cloud-storage/pom.xml index 072333f422..9c37b3968a 100644 --- a/google-cloud-storage/pom.xml +++ b/google-cloud-storage/pom.xml @@ -16,7 +16,7 @@ google-cloud-storage - 1.121.3 + 1.121.4 @@ -239,14 +239,14 @@ com.google.api.grpc proto-google-cloud-kms-v1 - 0.156.0 + 0.157.0 test com.google.cloud google-cloud-kms - 2.65.0 + 2.66.0 test diff --git a/pom.xml b/pom.xml index 7f85bcb5d1..65c6685c1b 100644 --- a/pom.xml +++ b/pom.xml @@ -92,7 +92,7 @@ com.google.cloud google-cloud-pubsub - 1.139.3 + 1.139.4 test diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 0fd3d7e6de..6b971470cf 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -66,7 +66,7 @@ com.google.cloud google-cloud-pubsub - 1.139.3 + 1.139.4 test diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 20796494fb..8ad169a8ef 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -58,7 +58,7 @@ com.google.cloud google-cloud-pubsub - 1.139.3 + 1.139.4 test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 0f01a0842c..ae5d5cdf3e 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -76,7 +76,7 @@ com.google.cloud google-cloud-pubsub - 1.139.3 + 1.139.4 test From 06572b7ced2829cdc00bf648521c024a52d93b3a Mon Sep 17 00:00:00 2001 From: cloud-java-bot <122572305+cloud-java-bot@users.noreply.github.com> Date: Tue, 20 May 2025 13:04:41 -0400 Subject: [PATCH 02/22] chore: Update generation configuration at Tue May 20 02:30:21 UTC 2025 (#3110) * chore: Update generation configuration at Tue May 20 02:30:21 UTC 2025 * chore: generate libraries at Tue May 20 02:30:58 UTC 2025 * chore: update clirr-ignored-differences --------- Co-authored-by: BenWhitehead --- README.md | 12 +- generation_config.yaml | 6 +- .../control/v2/StorageControlClient.java | 1979 +++- .../control/v2/StorageControlSettings.java | 192 + .../storage/control/v2/gapic_metadata.json | 39 + .../v2/stub/GrpcStorageControlStub.java | 589 ++ .../control/v2/stub/StorageControlStub.java | 101 + .../v2/stub/StorageControlStubSettings.java | 559 +- .../reflect-config.json | 450 + .../storage/control/v2/gapic_metadata.json | 39 + .../control/v2/MockStorageControlImpl.java | 287 + .../control/v2/StorageControlClientTest.java | 1039 +++ .../OpenTelemetryBootstrappingUtils.java | 3 +- .../clirr-ignored-differences.xml | 22 +- .../control/v2/StorageControlGrpc.java | 2351 ++++- .../storage/control/v2/AnywhereCache.java | 2271 +++++ .../storage/control/v2/AnywhereCacheName.java | 227 + .../control/v2/AnywhereCacheOrBuilder.java | 286 + .../v2/CreateAnywhereCacheMetadata.java | 1757 ++++ .../CreateAnywhereCacheMetadataOrBuilder.java | 233 + .../v2/CreateAnywhereCacheRequest.java | 1226 +++ .../CreateAnywhereCacheRequestOrBuilder.java | 144 + .../v2/DisableAnywhereCacheRequest.java | 873 ++ .../DisableAnywhereCacheRequestOrBuilder.java | 92 + .../control/v2/GetAnywhereCacheRequest.java | 866 ++ .../v2/GetAnywhereCacheRequestOrBuilder.java | 90 + .../GetFolderIntelligenceConfigRequest.java | 692 ++ ...derIntelligenceConfigRequestOrBuilder.java | 62 + ...OrganizationIntelligenceConfigRequest.java | 698 ++ ...ionIntelligenceConfigRequestOrBuilder.java | 62 + .../GetProjectIntelligenceConfigRequest.java | 695 ++ ...ectIntelligenceConfigRequestOrBuilder.java | 62 + .../control/v2/IntelligenceConfig.java | 8302 +++++++++++++++++ .../control/v2/IntelligenceConfigName.java | 357 + .../v2/IntelligenceConfigOrBuilder.java | 271 + .../control/v2/ListAnywhereCachesRequest.java | 1156 +++ .../ListAnywhereCachesRequestOrBuilder.java | 130 + .../v2/ListAnywhereCachesResponse.java | 1164 +++ .../ListAnywhereCachesResponseOrBuilder.java | 110 + .../control/v2/PauseAnywhereCacheRequest.java | 873 ++ .../PauseAnywhereCacheRequestOrBuilder.java | 92 + .../v2/ResumeAnywhereCacheRequest.java | 873 ++ .../ResumeAnywhereCacheRequestOrBuilder.java | 92 + .../control/v2/StorageControlProto.java | 638 +- .../storage/control/v2/StorageLayout.java | 4 +- .../v2/UpdateAnywhereCacheMetadata.java | 1757 ++++ .../UpdateAnywhereCacheMetadataOrBuilder.java | 233 + .../v2/UpdateAnywhereCacheRequest.java | 1364 +++ .../UpdateAnywhereCacheRequestOrBuilder.java | 167 + ...UpdateFolderIntelligenceConfigRequest.java | 1318 +++ ...derIntelligenceConfigRequestOrBuilder.java | 147 + ...OrganizationIntelligenceConfigRequest.java | 1328 +++ ...ionIntelligenceConfigRequestOrBuilder.java | 147 + ...pdateProjectIntelligenceConfigRequest.java | 1318 +++ ...ectIntelligenceConfigRequestOrBuilder.java | 147 + .../storage/control/v2/storage_control.proto | 708 +- 56 files changed, 40294 insertions(+), 406 deletions(-) create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/AnywhereCache.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/AnywhereCacheName.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/AnywhereCacheOrBuilder.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/CreateAnywhereCacheMetadata.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/CreateAnywhereCacheMetadataOrBuilder.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/CreateAnywhereCacheRequest.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/CreateAnywhereCacheRequestOrBuilder.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/DisableAnywhereCacheRequest.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/DisableAnywhereCacheRequestOrBuilder.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/GetAnywhereCacheRequest.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/GetAnywhereCacheRequestOrBuilder.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/GetFolderIntelligenceConfigRequest.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/GetFolderIntelligenceConfigRequestOrBuilder.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/GetOrganizationIntelligenceConfigRequest.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/GetOrganizationIntelligenceConfigRequestOrBuilder.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/GetProjectIntelligenceConfigRequest.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/GetProjectIntelligenceConfigRequestOrBuilder.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/IntelligenceConfig.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/IntelligenceConfigName.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/IntelligenceConfigOrBuilder.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/ListAnywhereCachesRequest.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/ListAnywhereCachesRequestOrBuilder.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/ListAnywhereCachesResponse.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/ListAnywhereCachesResponseOrBuilder.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/PauseAnywhereCacheRequest.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/PauseAnywhereCacheRequestOrBuilder.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/ResumeAnywhereCacheRequest.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/ResumeAnywhereCacheRequestOrBuilder.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateAnywhereCacheMetadata.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateAnywhereCacheMetadataOrBuilder.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateAnywhereCacheRequest.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateAnywhereCacheRequestOrBuilder.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateFolderIntelligenceConfigRequest.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateFolderIntelligenceConfigRequestOrBuilder.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateOrganizationIntelligenceConfigRequest.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateOrganizationIntelligenceConfigRequestOrBuilder.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateProjectIntelligenceConfigRequest.java create mode 100644 proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateProjectIntelligenceConfigRequestOrBuilder.java diff --git a/README.md b/README.md index 5b302126b0..22c9862e8d 100644 --- a/README.md +++ b/README.md @@ -46,12 +46,12 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-storage - 2.52.1 + 2.52.2 com.google.cloud google-cloud-storage-control - 2.52.1 + 2.52.2 ``` @@ -59,20 +59,20 @@ If you are using Maven without the BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies: ```Groovy -implementation platform('com.google.cloud:libraries-bom:26.59.0') +implementation platform('com.google.cloud:libraries-bom:26.60.0') implementation 'com.google.cloud:google-cloud-storage' ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-storage:2.52.2' +implementation 'com.google.cloud:google-cloud-storage:2.52.3' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-storage" % "2.52.2" +libraryDependencies += "com.google.cloud" % "google-cloud-storage" % "2.52.3" ``` ## Authentication @@ -515,7 +515,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-storage/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-storage.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-storage/2.52.2 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-storage/2.52.3 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/generation_config.yaml b/generation_config.yaml index c6ad100e09..c94688aa2f 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,6 +1,6 @@ -gapic_generator_version: 2.56.2 -googleapis_commitish: ce291b3bc967923f89e0e54ed33d18802672b171 -libraries_bom_version: 26.59.0 +gapic_generator_version: 2.58.0 +googleapis_commitish: 7d43527b927f65a80de9f0071d0a2e1c172de849 +libraries_bom_version: 26.60.0 libraries: - api_shortname: storage name_pretty: Cloud Storage diff --git a/google-cloud-storage-control/src/main/java/com/google/storage/control/v2/StorageControlClient.java b/google-cloud-storage-control/src/main/java/com/google/storage/control/v2/StorageControlClient.java index e3417d93af..46840a92dc 100644 --- a/google-cloud-storage-control/src/main/java/com/google/storage/control/v2/StorageControlClient.java +++ b/google-cloud-storage-control/src/main/java/com/google/storage/control/v2/StorageControlClient.java @@ -30,6 +30,7 @@ import com.google.longrunning.Operation; import com.google.longrunning.OperationsClient; import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; import com.google.storage.control.v2.stub.StorageControlStub; import com.google.storage.control.v2.stub.StorageControlStubSettings; import java.io.IOException; @@ -261,6 +262,252 @@ * * * + * + *

CreateAnywhereCache + *

Creates an Anywhere Cache instance. + * + *

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

+ *
    + *
  • createAnywhereCacheAsync(CreateAnywhereCacheRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • createAnywhereCacheAsync(BucketName parent, AnywhereCache anywhereCache) + *

  • createAnywhereCacheAsync(String parent, AnywhereCache anywhereCache) + *

+ *

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

+ *
    + *
  • createAnywhereCacheOperationCallable() + *

  • createAnywhereCacheCallable() + *

+ * + * + * + *

UpdateAnywhereCache + *

Updates an Anywhere Cache instance. Mutable fields include `ttl` and `admission_policy`. + * + *

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

+ *
    + *
  • updateAnywhereCacheAsync(UpdateAnywhereCacheRequest request) + *

+ *

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

+ *
    + *
  • updateAnywhereCacheAsync(AnywhereCache anywhereCache, FieldMask updateMask) + *

+ *

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

+ *
    + *
  • updateAnywhereCacheOperationCallable() + *

  • updateAnywhereCacheCallable() + *

+ * + * + * + *

DisableAnywhereCache + *

Disables an Anywhere Cache instance. A disabled instance is read-only. The disablement could be revoked by calling ResumeAnywhereCache. The cache instance will be deleted automatically if it remains in the disabled state for at least one hour. + * + *

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

+ *
    + *
  • disableAnywhereCache(DisableAnywhereCacheRequest request) + *

+ *

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

+ *
    + *
  • disableAnywhereCache(AnywhereCacheName name) + *

  • disableAnywhereCache(String name) + *

+ *

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

+ *
    + *
  • disableAnywhereCacheCallable() + *

+ * + * + * + *

PauseAnywhereCache + *

Pauses an Anywhere Cache instance. + * + *

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

+ *
    + *
  • pauseAnywhereCache(PauseAnywhereCacheRequest request) + *

+ *

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

+ *
    + *
  • pauseAnywhereCache(AnywhereCacheName name) + *

  • pauseAnywhereCache(String name) + *

+ *

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

+ *
    + *
  • pauseAnywhereCacheCallable() + *

+ * + * + * + *

ResumeAnywhereCache + *

Resumes a disabled or paused Anywhere Cache instance. + * + *

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

+ *
    + *
  • resumeAnywhereCache(ResumeAnywhereCacheRequest request) + *

+ *

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

+ *
    + *
  • resumeAnywhereCache(AnywhereCacheName name) + *

  • resumeAnywhereCache(String name) + *

+ *

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

+ *
    + *
  • resumeAnywhereCacheCallable() + *

+ * + * + * + *

GetAnywhereCache + *

Gets an Anywhere Cache instance. + * + *

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

+ *
    + *
  • getAnywhereCache(GetAnywhereCacheRequest request) + *

+ *

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

+ *
    + *
  • getAnywhereCache(AnywhereCacheName name) + *

  • getAnywhereCache(String name) + *

+ *

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

+ *
    + *
  • getAnywhereCacheCallable() + *

+ * + * + * + *

ListAnywhereCaches + *

Lists Anywhere Cache instances for a given bucket. + * + *

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

+ *
    + *
  • listAnywhereCaches(ListAnywhereCachesRequest request) + *

+ *

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

+ *
    + *
  • listAnywhereCaches(BucketName parent) + *

  • listAnywhereCaches(String parent) + *

+ *

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

+ *
    + *
  • listAnywhereCachesPagedCallable() + *

  • listAnywhereCachesCallable() + *

+ * + * + * + *

GetProjectIntelligenceConfig + *

Returns the Project scoped singleton IntelligenceConfig resource. + * + *

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

+ *
    + *
  • getProjectIntelligenceConfig(GetProjectIntelligenceConfigRequest request) + *

+ *

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

+ *
    + *
  • getProjectIntelligenceConfig(IntelligenceConfigName name) + *

  • getProjectIntelligenceConfig(String name) + *

+ *

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

+ *
    + *
  • getProjectIntelligenceConfigCallable() + *

+ * + * + * + *

UpdateProjectIntelligenceConfig + *

Updates the Project scoped singleton IntelligenceConfig resource. + * + *

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

+ *
    + *
  • updateProjectIntelligenceConfig(UpdateProjectIntelligenceConfigRequest request) + *

+ *

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

+ *
    + *
  • updateProjectIntelligenceConfig(IntelligenceConfig intelligenceConfig, FieldMask updateMask) + *

+ *

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

+ *
    + *
  • updateProjectIntelligenceConfigCallable() + *

+ * + * + * + *

GetFolderIntelligenceConfig + *

Returns the Folder scoped singleton IntelligenceConfig resource. + * + *

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

+ *
    + *
  • getFolderIntelligenceConfig(GetFolderIntelligenceConfigRequest request) + *

+ *

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

+ *
    + *
  • getFolderIntelligenceConfig(IntelligenceConfigName name) + *

  • getFolderIntelligenceConfig(String name) + *

+ *

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

+ *
    + *
  • getFolderIntelligenceConfigCallable() + *

+ * + * + * + *

UpdateFolderIntelligenceConfig + *

Updates the Folder scoped singleton IntelligenceConfig resource. + * + *

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

+ *
    + *
  • updateFolderIntelligenceConfig(UpdateFolderIntelligenceConfigRequest request) + *

+ *

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

+ *
    + *
  • updateFolderIntelligenceConfig(IntelligenceConfig intelligenceConfig, FieldMask updateMask) + *

+ *

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

+ *
    + *
  • updateFolderIntelligenceConfigCallable() + *

+ * + * + * + *

GetOrganizationIntelligenceConfig + *

Returns the Organization scoped singleton IntelligenceConfig resource. + * + *

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

+ *
    + *
  • getOrganizationIntelligenceConfig(GetOrganizationIntelligenceConfigRequest request) + *

+ *

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

+ *
    + *
  • getOrganizationIntelligenceConfig(IntelligenceConfigName name) + *

  • getOrganizationIntelligenceConfig(String name) + *

+ *

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

+ *
    + *
  • getOrganizationIntelligenceConfigCallable() + *

+ * + * + * + *

UpdateOrganizationIntelligenceConfig + *

Updates the Organization scoped singleton IntelligenceConfig resource. + * + *

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

+ *
    + *
  • updateOrganizationIntelligenceConfig(UpdateOrganizationIntelligenceConfigRequest request) + *

+ *

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

+ *
    + *
  • updateOrganizationIntelligenceConfig(IntelligenceConfig intelligenceConfig, FieldMask updateMask) + *

+ *

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

+ *
    + *
  • updateOrganizationIntelligenceConfigCallable() + *

+ * + * * * *

See the individual methods for example code. @@ -1780,38 +2027,1638 @@ public final ListManagedFoldersPagedResponse listManagedFolders( return stub.listManagedFoldersCallable(); } - @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(); + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an Anywhere Cache instance. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   BucketName parent = BucketName.of("[PROJECT]", "[BUCKET]");
+   *   AnywhereCache anywhereCache = AnywhereCache.newBuilder().build();
+   *   AnywhereCache response =
+   *       storageControlClient.createAnywhereCacheAsync(parent, anywhereCache).get();
+   * }
+   * }
+ * + * @param parent Required. The bucket to which this cache belongs. Format: + * `projects/{project}/buckets/{bucket}` + * @param anywhereCache Required. Properties of the Anywhere Cache instance being created. The + * parent bucket name is specified in the `parent` field. Server uses the default value of + * `ttl` or `admission_policy` if not specified in request. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createAnywhereCacheAsync( + BucketName parent, AnywhereCache anywhereCache) { + CreateAnywhereCacheRequest request = + CreateAnywhereCacheRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setAnywhereCache(anywhereCache) + .build(); + return createAnywhereCacheAsync(request); } - @Override - public void shutdownNow() { - stub.shutdownNow(); + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an Anywhere Cache instance. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   String parent = BucketName.of("[PROJECT]", "[BUCKET]").toString();
+   *   AnywhereCache anywhereCache = AnywhereCache.newBuilder().build();
+   *   AnywhereCache response =
+   *       storageControlClient.createAnywhereCacheAsync(parent, anywhereCache).get();
+   * }
+   * }
+ * + * @param parent Required. The bucket to which this cache belongs. Format: + * `projects/{project}/buckets/{bucket}` + * @param anywhereCache Required. Properties of the Anywhere Cache instance being created. The + * parent bucket name is specified in the `parent` field. Server uses the default value of + * `ttl` or `admission_policy` if not specified in request. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createAnywhereCacheAsync( + String parent, AnywhereCache anywhereCache) { + CreateAnywhereCacheRequest request = + CreateAnywhereCacheRequest.newBuilder() + .setParent(parent) + .setAnywhereCache(anywhereCache) + .build(); + return createAnywhereCacheAsync(request); } - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an Anywhere Cache instance. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   CreateAnywhereCacheRequest request =
+   *       CreateAnywhereCacheRequest.newBuilder()
+   *           .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
+   *           .setAnywhereCache(AnywhereCache.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   AnywhereCache response = storageControlClient.createAnywhereCacheAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createAnywhereCacheAsync( + CreateAnywhereCacheRequest request) { + return createAnywhereCacheOperationCallable().futureCall(request); } - public static class ListFoldersPagedResponse - extends AbstractPagedListResponse< + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an Anywhere Cache instance. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   CreateAnywhereCacheRequest request =
+   *       CreateAnywhereCacheRequest.newBuilder()
+   *           .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
+   *           .setAnywhereCache(AnywhereCache.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       storageControlClient.createAnywhereCacheOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AnywhereCache response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + CreateAnywhereCacheRequest, AnywhereCache, CreateAnywhereCacheMetadata> + createAnywhereCacheOperationCallable() { + return stub.createAnywhereCacheOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an Anywhere Cache instance. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   CreateAnywhereCacheRequest request =
+   *       CreateAnywhereCacheRequest.newBuilder()
+   *           .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
+   *           .setAnywhereCache(AnywhereCache.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       storageControlClient.createAnywhereCacheCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createAnywhereCacheCallable() { + return stub.createAnywhereCacheCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an Anywhere Cache instance. Mutable fields include `ttl` and `admission_policy`. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   AnywhereCache anywhereCache = AnywhereCache.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   AnywhereCache response =
+   *       storageControlClient.updateAnywhereCacheAsync(anywhereCache, updateMask).get();
+   * }
+   * }
+ * + * @param anywhereCache Required. The Anywhere Cache instance to be updated. + * @param updateMask Required. List of fields to be updated. Mutable fields of AnywhereCache + * include `ttl` and `admission_policy`. + *

To specify ALL fields, specify a single field with the value `*`. Note: We recommend + * against doing this. If a new field is introduced at a later time, an older client updating + * with the `*` may accidentally reset the new field's value. + *

Not specifying any fields is an error. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateAnywhereCacheAsync( + AnywhereCache anywhereCache, FieldMask updateMask) { + UpdateAnywhereCacheRequest request = + UpdateAnywhereCacheRequest.newBuilder() + .setAnywhereCache(anywhereCache) + .setUpdateMask(updateMask) + .build(); + return updateAnywhereCacheAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an Anywhere Cache instance. Mutable fields include `ttl` and `admission_policy`. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   UpdateAnywhereCacheRequest request =
+   *       UpdateAnywhereCacheRequest.newBuilder()
+   *           .setAnywhereCache(AnywhereCache.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   AnywhereCache response = storageControlClient.updateAnywhereCacheAsync(request).get();
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateAnywhereCacheAsync( + UpdateAnywhereCacheRequest request) { + return updateAnywhereCacheOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an Anywhere Cache instance. Mutable fields include `ttl` and `admission_policy`. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   UpdateAnywhereCacheRequest request =
+   *       UpdateAnywhereCacheRequest.newBuilder()
+   *           .setAnywhereCache(AnywhereCache.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   OperationFuture future =
+   *       storageControlClient.updateAnywhereCacheOperationCallable().futureCall(request);
+   *   // Do something.
+   *   AnywhereCache response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + UpdateAnywhereCacheRequest, AnywhereCache, UpdateAnywhereCacheMetadata> + updateAnywhereCacheOperationCallable() { + return stub.updateAnywhereCacheOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an Anywhere Cache instance. Mutable fields include `ttl` and `admission_policy`. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   UpdateAnywhereCacheRequest request =
+   *       UpdateAnywhereCacheRequest.newBuilder()
+   *           .setAnywhereCache(AnywhereCache.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       storageControlClient.updateAnywhereCacheCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateAnywhereCacheCallable() { + return stub.updateAnywhereCacheCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Disables an Anywhere Cache instance. A disabled instance is read-only. The disablement could be + * revoked by calling ResumeAnywhereCache. The cache instance will be deleted automatically if it + * remains in the disabled state for at least one hour. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   AnywhereCacheName name = AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]");
+   *   AnywhereCache response = storageControlClient.disableAnywhereCache(name);
+   * }
+   * }
+ * + * @param name Required. The name field in the request should be: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AnywhereCache disableAnywhereCache(AnywhereCacheName name) { + DisableAnywhereCacheRequest request = + DisableAnywhereCacheRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return disableAnywhereCache(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Disables an Anywhere Cache instance. A disabled instance is read-only. The disablement could be + * revoked by calling ResumeAnywhereCache. The cache instance will be deleted automatically if it + * remains in the disabled state for at least one hour. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   String name = AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString();
+   *   AnywhereCache response = storageControlClient.disableAnywhereCache(name);
+   * }
+   * }
+ * + * @param name Required. The name field in the request should be: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AnywhereCache disableAnywhereCache(String name) { + DisableAnywhereCacheRequest request = + DisableAnywhereCacheRequest.newBuilder().setName(name).build(); + return disableAnywhereCache(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Disables an Anywhere Cache instance. A disabled instance is read-only. The disablement could be + * revoked by calling ResumeAnywhereCache. The cache instance will be deleted automatically if it + * remains in the disabled state for at least one hour. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   DisableAnywhereCacheRequest request =
+   *       DisableAnywhereCacheRequest.newBuilder()
+   *           .setName(AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   AnywhereCache response = storageControlClient.disableAnywhereCache(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 + */ + public final AnywhereCache disableAnywhereCache(DisableAnywhereCacheRequest request) { + return disableAnywhereCacheCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Disables an Anywhere Cache instance. A disabled instance is read-only. The disablement could be + * revoked by calling ResumeAnywhereCache. The cache instance will be deleted automatically if it + * remains in the disabled state for at least one hour. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   DisableAnywhereCacheRequest request =
+   *       DisableAnywhereCacheRequest.newBuilder()
+   *           .setName(AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       storageControlClient.disableAnywhereCacheCallable().futureCall(request);
+   *   // Do something.
+   *   AnywhereCache response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + disableAnywhereCacheCallable() { + return stub.disableAnywhereCacheCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Pauses an Anywhere Cache instance. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   AnywhereCacheName name = AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]");
+   *   AnywhereCache response = storageControlClient.pauseAnywhereCache(name);
+   * }
+   * }
+ * + * @param name Required. The name field in the request should be: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AnywhereCache pauseAnywhereCache(AnywhereCacheName name) { + PauseAnywhereCacheRequest request = + PauseAnywhereCacheRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return pauseAnywhereCache(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Pauses an Anywhere Cache instance. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   String name = AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString();
+   *   AnywhereCache response = storageControlClient.pauseAnywhereCache(name);
+   * }
+   * }
+ * + * @param name Required. The name field in the request should be: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AnywhereCache pauseAnywhereCache(String name) { + PauseAnywhereCacheRequest request = + PauseAnywhereCacheRequest.newBuilder().setName(name).build(); + return pauseAnywhereCache(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Pauses an Anywhere Cache instance. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   PauseAnywhereCacheRequest request =
+   *       PauseAnywhereCacheRequest.newBuilder()
+   *           .setName(AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   AnywhereCache response = storageControlClient.pauseAnywhereCache(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 + */ + public final AnywhereCache pauseAnywhereCache(PauseAnywhereCacheRequest request) { + return pauseAnywhereCacheCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Pauses an Anywhere Cache instance. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   PauseAnywhereCacheRequest request =
+   *       PauseAnywhereCacheRequest.newBuilder()
+   *           .setName(AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       storageControlClient.pauseAnywhereCacheCallable().futureCall(request);
+   *   // Do something.
+   *   AnywhereCache response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + pauseAnywhereCacheCallable() { + return stub.pauseAnywhereCacheCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Resumes a disabled or paused Anywhere Cache instance. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   AnywhereCacheName name = AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]");
+   *   AnywhereCache response = storageControlClient.resumeAnywhereCache(name);
+   * }
+   * }
+ * + * @param name Required. The name field in the request should be: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AnywhereCache resumeAnywhereCache(AnywhereCacheName name) { + ResumeAnywhereCacheRequest request = + ResumeAnywhereCacheRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return resumeAnywhereCache(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Resumes a disabled or paused Anywhere Cache instance. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   String name = AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString();
+   *   AnywhereCache response = storageControlClient.resumeAnywhereCache(name);
+   * }
+   * }
+ * + * @param name Required. The name field in the request should be: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AnywhereCache resumeAnywhereCache(String name) { + ResumeAnywhereCacheRequest request = + ResumeAnywhereCacheRequest.newBuilder().setName(name).build(); + return resumeAnywhereCache(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Resumes a disabled or paused Anywhere Cache instance. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   ResumeAnywhereCacheRequest request =
+   *       ResumeAnywhereCacheRequest.newBuilder()
+   *           .setName(AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   AnywhereCache response = storageControlClient.resumeAnywhereCache(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 + */ + public final AnywhereCache resumeAnywhereCache(ResumeAnywhereCacheRequest request) { + return resumeAnywhereCacheCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Resumes a disabled or paused Anywhere Cache instance. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   ResumeAnywhereCacheRequest request =
+   *       ResumeAnywhereCacheRequest.newBuilder()
+   *           .setName(AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       storageControlClient.resumeAnywhereCacheCallable().futureCall(request);
+   *   // Do something.
+   *   AnywhereCache response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + resumeAnywhereCacheCallable() { + return stub.resumeAnywhereCacheCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an Anywhere Cache instance. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   AnywhereCacheName name = AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]");
+   *   AnywhereCache response = storageControlClient.getAnywhereCache(name);
+   * }
+   * }
+ * + * @param name Required. The name field in the request should be: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AnywhereCache getAnywhereCache(AnywhereCacheName name) { + GetAnywhereCacheRequest request = + GetAnywhereCacheRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getAnywhereCache(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an Anywhere Cache instance. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   String name = AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString();
+   *   AnywhereCache response = storageControlClient.getAnywhereCache(name);
+   * }
+   * }
+ * + * @param name Required. The name field in the request should be: + * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AnywhereCache getAnywhereCache(String name) { + GetAnywhereCacheRequest request = GetAnywhereCacheRequest.newBuilder().setName(name).build(); + return getAnywhereCache(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an Anywhere Cache instance. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   GetAnywhereCacheRequest request =
+   *       GetAnywhereCacheRequest.newBuilder()
+   *           .setName(AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   AnywhereCache response = storageControlClient.getAnywhereCache(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 + */ + public final AnywhereCache getAnywhereCache(GetAnywhereCacheRequest request) { + return getAnywhereCacheCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an Anywhere Cache instance. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   GetAnywhereCacheRequest request =
+   *       GetAnywhereCacheRequest.newBuilder()
+   *           .setName(AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       storageControlClient.getAnywhereCacheCallable().futureCall(request);
+   *   // Do something.
+   *   AnywhereCache response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getAnywhereCacheCallable() { + return stub.getAnywhereCacheCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Anywhere Cache instances 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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   BucketName parent = BucketName.of("[PROJECT]", "[BUCKET]");
+   *   for (AnywhereCache element : storageControlClient.listAnywhereCaches(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The bucket to which this cache belongs. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAnywhereCachesPagedResponse listAnywhereCaches(BucketName parent) { + ListAnywhereCachesRequest request = + ListAnywhereCachesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAnywhereCaches(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Anywhere Cache instances 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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   String parent = BucketName.of("[PROJECT]", "[BUCKET]").toString();
+   *   for (AnywhereCache element : storageControlClient.listAnywhereCaches(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The bucket to which this cache belongs. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAnywhereCachesPagedResponse listAnywhereCaches(String parent) { + ListAnywhereCachesRequest request = + ListAnywhereCachesRequest.newBuilder().setParent(parent).build(); + return listAnywhereCaches(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Anywhere Cache instances 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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   ListAnywhereCachesRequest request =
+   *       ListAnywhereCachesRequest.newBuilder()
+   *           .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   for (AnywhereCache element : storageControlClient.listAnywhereCaches(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 + */ + public final ListAnywhereCachesPagedResponse listAnywhereCaches( + ListAnywhereCachesRequest request) { + return listAnywhereCachesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Anywhere Cache instances 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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   ListAnywhereCachesRequest request =
+   *       ListAnywhereCachesRequest.newBuilder()
+   *           .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       storageControlClient.listAnywhereCachesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (AnywhereCache element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAnywhereCachesPagedCallable() { + return stub.listAnywhereCachesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Anywhere Cache instances 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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   ListAnywhereCachesRequest request =
+   *       ListAnywhereCachesRequest.newBuilder()
+   *           .setParent(BucketName.of("[PROJECT]", "[BUCKET]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   while (true) {
+   *     ListAnywhereCachesResponse response =
+   *         storageControlClient.listAnywhereCachesCallable().call(request);
+   *     for (AnywhereCache element : response.getAnywhereCachesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAnywhereCachesCallable() { + return stub.listAnywhereCachesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the Project scoped singleton IntelligenceConfig resource. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   IntelligenceConfigName name =
+   *       IntelligenceConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]");
+   *   IntelligenceConfig response = storageControlClient.getProjectIntelligenceConfig(name);
+   * }
+   * }
+ * + * @param name Required. The name of the `IntelligenceConfig` resource associated with your + * project. + *

Format: `projects/{id}/locations/global/intelligenceConfig` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final IntelligenceConfig getProjectIntelligenceConfig(IntelligenceConfigName name) { + GetProjectIntelligenceConfigRequest request = + GetProjectIntelligenceConfigRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getProjectIntelligenceConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the Project scoped singleton IntelligenceConfig resource. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   String name =
+   *       IntelligenceConfigName.ofFolderLocationName("[FOLDER]", "[LOCATION]").toString();
+   *   IntelligenceConfig response = storageControlClient.getProjectIntelligenceConfig(name);
+   * }
+   * }
+ * + * @param name Required. The name of the `IntelligenceConfig` resource associated with your + * project. + *

Format: `projects/{id}/locations/global/intelligenceConfig` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final IntelligenceConfig getProjectIntelligenceConfig(String name) { + GetProjectIntelligenceConfigRequest request = + GetProjectIntelligenceConfigRequest.newBuilder().setName(name).build(); + return getProjectIntelligenceConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the Project scoped singleton IntelligenceConfig resource. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   GetProjectIntelligenceConfigRequest request =
+   *       GetProjectIntelligenceConfigRequest.newBuilder()
+   *           .setName(
+   *               IntelligenceConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]")
+   *                   .toString())
+   *           .build();
+   *   IntelligenceConfig response = storageControlClient.getProjectIntelligenceConfig(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 + */ + public final IntelligenceConfig getProjectIntelligenceConfig( + GetProjectIntelligenceConfigRequest request) { + return getProjectIntelligenceConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the Project scoped singleton IntelligenceConfig resource. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   GetProjectIntelligenceConfigRequest request =
+   *       GetProjectIntelligenceConfigRequest.newBuilder()
+   *           .setName(
+   *               IntelligenceConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       storageControlClient.getProjectIntelligenceConfigCallable().futureCall(request);
+   *   // Do something.
+   *   IntelligenceConfig response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getProjectIntelligenceConfigCallable() { + return stub.getProjectIntelligenceConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the Project scoped singleton IntelligenceConfig resource. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   IntelligenceConfig intelligenceConfig = IntelligenceConfig.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   IntelligenceConfig response =
+   *       storageControlClient.updateProjectIntelligenceConfig(intelligenceConfig, updateMask);
+   * }
+   * }
+ * + * @param intelligenceConfig Required. The `IntelligenceConfig` resource to be updated. + * @param updateMask Required. The `update_mask` that specifies the fields within the + * `IntelligenceConfig` resource that should be modified by this update. Only the listed + * fields are updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final IntelligenceConfig updateProjectIntelligenceConfig( + IntelligenceConfig intelligenceConfig, FieldMask updateMask) { + UpdateProjectIntelligenceConfigRequest request = + UpdateProjectIntelligenceConfigRequest.newBuilder() + .setIntelligenceConfig(intelligenceConfig) + .setUpdateMask(updateMask) + .build(); + return updateProjectIntelligenceConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the Project scoped singleton IntelligenceConfig resource. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   UpdateProjectIntelligenceConfigRequest request =
+   *       UpdateProjectIntelligenceConfigRequest.newBuilder()
+   *           .setIntelligenceConfig(IntelligenceConfig.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   IntelligenceConfig response = storageControlClient.updateProjectIntelligenceConfig(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 + */ + public final IntelligenceConfig updateProjectIntelligenceConfig( + UpdateProjectIntelligenceConfigRequest request) { + return updateProjectIntelligenceConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the Project scoped singleton IntelligenceConfig resource. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   UpdateProjectIntelligenceConfigRequest request =
+   *       UpdateProjectIntelligenceConfigRequest.newBuilder()
+   *           .setIntelligenceConfig(IntelligenceConfig.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       storageControlClient.updateProjectIntelligenceConfigCallable().futureCall(request);
+   *   // Do something.
+   *   IntelligenceConfig response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateProjectIntelligenceConfigCallable() { + return stub.updateProjectIntelligenceConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the Folder scoped singleton IntelligenceConfig resource. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   IntelligenceConfigName name =
+   *       IntelligenceConfigName.ofFolderLocationName("[FOLDER]", "[LOCATION]");
+   *   IntelligenceConfig response = storageControlClient.getFolderIntelligenceConfig(name);
+   * }
+   * }
+ * + * @param name Required. The name of the `IntelligenceConfig` resource associated with your + * folder. + *

Format: `folders/{id}/locations/global/intelligenceConfig` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final IntelligenceConfig getFolderIntelligenceConfig(IntelligenceConfigName name) { + GetFolderIntelligenceConfigRequest request = + GetFolderIntelligenceConfigRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getFolderIntelligenceConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the Folder scoped singleton IntelligenceConfig resource. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   String name =
+   *       IntelligenceConfigName.ofFolderLocationName("[FOLDER]", "[LOCATION]").toString();
+   *   IntelligenceConfig response = storageControlClient.getFolderIntelligenceConfig(name);
+   * }
+   * }
+ * + * @param name Required. The name of the `IntelligenceConfig` resource associated with your + * folder. + *

Format: `folders/{id}/locations/global/intelligenceConfig` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final IntelligenceConfig getFolderIntelligenceConfig(String name) { + GetFolderIntelligenceConfigRequest request = + GetFolderIntelligenceConfigRequest.newBuilder().setName(name).build(); + return getFolderIntelligenceConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the Folder scoped singleton IntelligenceConfig resource. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   GetFolderIntelligenceConfigRequest request =
+   *       GetFolderIntelligenceConfigRequest.newBuilder()
+   *           .setName(
+   *               IntelligenceConfigName.ofFolderLocationName("[FOLDER]", "[LOCATION]").toString())
+   *           .build();
+   *   IntelligenceConfig response = storageControlClient.getFolderIntelligenceConfig(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 + */ + public final IntelligenceConfig getFolderIntelligenceConfig( + GetFolderIntelligenceConfigRequest request) { + return getFolderIntelligenceConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the Folder scoped singleton IntelligenceConfig resource. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   GetFolderIntelligenceConfigRequest request =
+   *       GetFolderIntelligenceConfigRequest.newBuilder()
+   *           .setName(
+   *               IntelligenceConfigName.ofFolderLocationName("[FOLDER]", "[LOCATION]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       storageControlClient.getFolderIntelligenceConfigCallable().futureCall(request);
+   *   // Do something.
+   *   IntelligenceConfig response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getFolderIntelligenceConfigCallable() { + return stub.getFolderIntelligenceConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the Folder scoped singleton IntelligenceConfig resource. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   IntelligenceConfig intelligenceConfig = IntelligenceConfig.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   IntelligenceConfig response =
+   *       storageControlClient.updateFolderIntelligenceConfig(intelligenceConfig, updateMask);
+   * }
+   * }
+ * + * @param intelligenceConfig Required. The `IntelligenceConfig` resource to be updated. + * @param updateMask Required. The `update_mask` that specifies the fields within the + * `IntelligenceConfig` resource that should be modified by this update. Only the listed + * fields are updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final IntelligenceConfig updateFolderIntelligenceConfig( + IntelligenceConfig intelligenceConfig, FieldMask updateMask) { + UpdateFolderIntelligenceConfigRequest request = + UpdateFolderIntelligenceConfigRequest.newBuilder() + .setIntelligenceConfig(intelligenceConfig) + .setUpdateMask(updateMask) + .build(); + return updateFolderIntelligenceConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the Folder scoped singleton IntelligenceConfig resource. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   UpdateFolderIntelligenceConfigRequest request =
+   *       UpdateFolderIntelligenceConfigRequest.newBuilder()
+   *           .setIntelligenceConfig(IntelligenceConfig.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   IntelligenceConfig response = storageControlClient.updateFolderIntelligenceConfig(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 + */ + public final IntelligenceConfig updateFolderIntelligenceConfig( + UpdateFolderIntelligenceConfigRequest request) { + return updateFolderIntelligenceConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the Folder scoped singleton IntelligenceConfig resource. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   UpdateFolderIntelligenceConfigRequest request =
+   *       UpdateFolderIntelligenceConfigRequest.newBuilder()
+   *           .setIntelligenceConfig(IntelligenceConfig.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       storageControlClient.updateFolderIntelligenceConfigCallable().futureCall(request);
+   *   // Do something.
+   *   IntelligenceConfig response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateFolderIntelligenceConfigCallable() { + return stub.updateFolderIntelligenceConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the Organization scoped singleton IntelligenceConfig resource. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   IntelligenceConfigName name = IntelligenceConfigName.ofOrgLocationName("[ORG]", "[LOCATION]");
+   *   IntelligenceConfig response = storageControlClient.getOrganizationIntelligenceConfig(name);
+   * }
+   * }
+ * + * @param name Required. The name of the `IntelligenceConfig` resource associated with your + * organization. + *

Format: `organizations/{org_id}/locations/global/intelligenceConfig` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final IntelligenceConfig getOrganizationIntelligenceConfig(IntelligenceConfigName name) { + GetOrganizationIntelligenceConfigRequest request = + GetOrganizationIntelligenceConfigRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getOrganizationIntelligenceConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the Organization scoped singleton IntelligenceConfig resource. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   String name =
+   *       IntelligenceConfigName.ofFolderLocationName("[FOLDER]", "[LOCATION]").toString();
+   *   IntelligenceConfig response = storageControlClient.getOrganizationIntelligenceConfig(name);
+   * }
+   * }
+ * + * @param name Required. The name of the `IntelligenceConfig` resource associated with your + * organization. + *

Format: `organizations/{org_id}/locations/global/intelligenceConfig` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final IntelligenceConfig getOrganizationIntelligenceConfig(String name) { + GetOrganizationIntelligenceConfigRequest request = + GetOrganizationIntelligenceConfigRequest.newBuilder().setName(name).build(); + return getOrganizationIntelligenceConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the Organization scoped singleton IntelligenceConfig resource. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   GetOrganizationIntelligenceConfigRequest request =
+   *       GetOrganizationIntelligenceConfigRequest.newBuilder()
+   *           .setName(IntelligenceConfigName.ofOrgLocationName("[ORG]", "[LOCATION]").toString())
+   *           .build();
+   *   IntelligenceConfig response = storageControlClient.getOrganizationIntelligenceConfig(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 + */ + public final IntelligenceConfig getOrganizationIntelligenceConfig( + GetOrganizationIntelligenceConfigRequest request) { + return getOrganizationIntelligenceConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the Organization scoped singleton IntelligenceConfig resource. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   GetOrganizationIntelligenceConfigRequest request =
+   *       GetOrganizationIntelligenceConfigRequest.newBuilder()
+   *           .setName(IntelligenceConfigName.ofOrgLocationName("[ORG]", "[LOCATION]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       storageControlClient.getOrganizationIntelligenceConfigCallable().futureCall(request);
+   *   // Do something.
+   *   IntelligenceConfig response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getOrganizationIntelligenceConfigCallable() { + return stub.getOrganizationIntelligenceConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the Organization scoped singleton IntelligenceConfig resource. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   IntelligenceConfig intelligenceConfig = IntelligenceConfig.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   IntelligenceConfig response =
+   *       storageControlClient.updateOrganizationIntelligenceConfig(intelligenceConfig, updateMask);
+   * }
+   * }
+ * + * @param intelligenceConfig Required. The `IntelligenceConfig` resource to be updated. + * @param updateMask Required. The `update_mask` that specifies the fields within the + * `IntelligenceConfig` resource that should be modified by this update. Only the listed + * fields are updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final IntelligenceConfig updateOrganizationIntelligenceConfig( + IntelligenceConfig intelligenceConfig, FieldMask updateMask) { + UpdateOrganizationIntelligenceConfigRequest request = + UpdateOrganizationIntelligenceConfigRequest.newBuilder() + .setIntelligenceConfig(intelligenceConfig) + .setUpdateMask(updateMask) + .build(); + return updateOrganizationIntelligenceConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the Organization scoped singleton IntelligenceConfig resource. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   UpdateOrganizationIntelligenceConfigRequest request =
+   *       UpdateOrganizationIntelligenceConfigRequest.newBuilder()
+   *           .setIntelligenceConfig(IntelligenceConfig.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   IntelligenceConfig response =
+   *       storageControlClient.updateOrganizationIntelligenceConfig(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 + */ + public final IntelligenceConfig updateOrganizationIntelligenceConfig( + UpdateOrganizationIntelligenceConfigRequest request) { + return updateOrganizationIntelligenceConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the Organization scoped singleton IntelligenceConfig resource. + * + *

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 (StorageControlClient storageControlClient = StorageControlClient.create()) {
+   *   UpdateOrganizationIntelligenceConfigRequest request =
+   *       UpdateOrganizationIntelligenceConfigRequest.newBuilder()
+   *           .setIntelligenceConfig(IntelligenceConfig.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setRequestId("requestId693933066")
+   *           .build();
+   *   ApiFuture future =
+   *       storageControlClient.updateOrganizationIntelligenceConfigCallable().futureCall(request);
+   *   // Do something.
+   *   IntelligenceConfig response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateOrganizationIntelligenceConfigCallable() { + return stub.updateOrganizationIntelligenceConfigCallable(); + } + + @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); + } + + public static class ListFoldersPagedResponse + extends AbstractPagedListResponse< ListFoldersRequest, ListFoldersResponse, Folder, @@ -1962,4 +3809,84 @@ protected ListManagedFoldersFixedSizeCollection createCollection( return new ListManagedFoldersFixedSizeCollection(pages, collectionSize); } } + + public static class ListAnywhereCachesPagedResponse + extends AbstractPagedListResponse< + ListAnywhereCachesRequest, + ListAnywhereCachesResponse, + AnywhereCache, + ListAnywhereCachesPage, + ListAnywhereCachesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAnywhereCachesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListAnywhereCachesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListAnywhereCachesPagedResponse(ListAnywhereCachesPage page) { + super(page, ListAnywhereCachesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAnywhereCachesPage + extends AbstractPage< + ListAnywhereCachesRequest, + ListAnywhereCachesResponse, + AnywhereCache, + ListAnywhereCachesPage> { + + private ListAnywhereCachesPage( + PageContext context, + ListAnywhereCachesResponse response) { + super(context, response); + } + + private static ListAnywhereCachesPage createEmptyPage() { + return new ListAnywhereCachesPage(null, null); + } + + @Override + protected ListAnywhereCachesPage createPage( + PageContext context, + ListAnywhereCachesResponse response) { + return new ListAnywhereCachesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAnywhereCachesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAnywhereCachesRequest, + ListAnywhereCachesResponse, + AnywhereCache, + ListAnywhereCachesPage, + ListAnywhereCachesFixedSizeCollection> { + + private ListAnywhereCachesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAnywhereCachesFixedSizeCollection createEmptyCollection() { + return new ListAnywhereCachesFixedSizeCollection(null, 0); + } + + @Override + protected ListAnywhereCachesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAnywhereCachesFixedSizeCollection(pages, collectionSize); + } + } } diff --git a/google-cloud-storage-control/src/main/java/com/google/storage/control/v2/StorageControlSettings.java b/google-cloud-storage-control/src/main/java/com/google/storage/control/v2/StorageControlSettings.java index 44c6c55b94..a7bee17da5 100644 --- a/google-cloud-storage-control/src/main/java/com/google/storage/control/v2/StorageControlSettings.java +++ b/google-cloud-storage-control/src/main/java/com/google/storage/control/v2/StorageControlSettings.java @@ -16,6 +16,7 @@ package com.google.storage.control.v2; +import static com.google.storage.control.v2.StorageControlClient.ListAnywhereCachesPagedResponse; import static com.google.storage.control.v2.StorageControlClient.ListFoldersPagedResponse; import static com.google.storage.control.v2.StorageControlClient.ListManagedFoldersPagedResponse; @@ -176,6 +177,101 @@ public UnaryCallSettings getManagedFolde return ((StorageControlStubSettings) getStubSettings()).listManagedFoldersSettings(); } + /** Returns the object with the settings used for calls to createAnywhereCache. */ + public UnaryCallSettings createAnywhereCacheSettings() { + return ((StorageControlStubSettings) getStubSettings()).createAnywhereCacheSettings(); + } + + /** Returns the object with the settings used for calls to createAnywhereCache. */ + public OperationCallSettings< + CreateAnywhereCacheRequest, AnywhereCache, CreateAnywhereCacheMetadata> + createAnywhereCacheOperationSettings() { + return ((StorageControlStubSettings) getStubSettings()).createAnywhereCacheOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateAnywhereCache. */ + public UnaryCallSettings updateAnywhereCacheSettings() { + return ((StorageControlStubSettings) getStubSettings()).updateAnywhereCacheSettings(); + } + + /** Returns the object with the settings used for calls to updateAnywhereCache. */ + public OperationCallSettings< + UpdateAnywhereCacheRequest, AnywhereCache, UpdateAnywhereCacheMetadata> + updateAnywhereCacheOperationSettings() { + return ((StorageControlStubSettings) getStubSettings()).updateAnywhereCacheOperationSettings(); + } + + /** Returns the object with the settings used for calls to disableAnywhereCache. */ + public UnaryCallSettings + disableAnywhereCacheSettings() { + return ((StorageControlStubSettings) getStubSettings()).disableAnywhereCacheSettings(); + } + + /** Returns the object with the settings used for calls to pauseAnywhereCache. */ + public UnaryCallSettings pauseAnywhereCacheSettings() { + return ((StorageControlStubSettings) getStubSettings()).pauseAnywhereCacheSettings(); + } + + /** Returns the object with the settings used for calls to resumeAnywhereCache. */ + public UnaryCallSettings + resumeAnywhereCacheSettings() { + return ((StorageControlStubSettings) getStubSettings()).resumeAnywhereCacheSettings(); + } + + /** Returns the object with the settings used for calls to getAnywhereCache. */ + public UnaryCallSettings getAnywhereCacheSettings() { + return ((StorageControlStubSettings) getStubSettings()).getAnywhereCacheSettings(); + } + + /** Returns the object with the settings used for calls to listAnywhereCaches. */ + public PagedCallSettings< + ListAnywhereCachesRequest, ListAnywhereCachesResponse, ListAnywhereCachesPagedResponse> + listAnywhereCachesSettings() { + return ((StorageControlStubSettings) getStubSettings()).listAnywhereCachesSettings(); + } + + /** Returns the object with the settings used for calls to getProjectIntelligenceConfig. */ + public UnaryCallSettings + getProjectIntelligenceConfigSettings() { + return ((StorageControlStubSettings) getStubSettings()).getProjectIntelligenceConfigSettings(); + } + + /** Returns the object with the settings used for calls to updateProjectIntelligenceConfig. */ + public UnaryCallSettings + updateProjectIntelligenceConfigSettings() { + return ((StorageControlStubSettings) getStubSettings()) + .updateProjectIntelligenceConfigSettings(); + } + + /** Returns the object with the settings used for calls to getFolderIntelligenceConfig. */ + public UnaryCallSettings + getFolderIntelligenceConfigSettings() { + return ((StorageControlStubSettings) getStubSettings()).getFolderIntelligenceConfigSettings(); + } + + /** Returns the object with the settings used for calls to updateFolderIntelligenceConfig. */ + public UnaryCallSettings + updateFolderIntelligenceConfigSettings() { + return ((StorageControlStubSettings) getStubSettings()) + .updateFolderIntelligenceConfigSettings(); + } + + /** Returns the object with the settings used for calls to getOrganizationIntelligenceConfig. */ + public UnaryCallSettings + getOrganizationIntelligenceConfigSettings() { + return ((StorageControlStubSettings) getStubSettings()) + .getOrganizationIntelligenceConfigSettings(); + } + + /** + * Returns the object with the settings used for calls to updateOrganizationIntelligenceConfig. + */ + public UnaryCallSettings + updateOrganizationIntelligenceConfigSettings() { + return ((StorageControlStubSettings) getStubSettings()) + .updateOrganizationIntelligenceConfigSettings(); + } + public static final StorageControlSettings create(StorageControlStubSettings stub) throws IOException { return new StorageControlSettings.Builder(stub.toBuilder()).build(); @@ -336,6 +432,102 @@ public UnaryCallSettings.Builder renameFolderSet return getStubSettingsBuilder().listManagedFoldersSettings(); } + /** Returns the builder for the settings used for calls to createAnywhereCache. */ + public UnaryCallSettings.Builder + createAnywhereCacheSettings() { + return getStubSettingsBuilder().createAnywhereCacheSettings(); + } + + /** Returns the builder for the settings used for calls to createAnywhereCache. */ + public OperationCallSettings.Builder< + CreateAnywhereCacheRequest, AnywhereCache, CreateAnywhereCacheMetadata> + createAnywhereCacheOperationSettings() { + return getStubSettingsBuilder().createAnywhereCacheOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateAnywhereCache. */ + public UnaryCallSettings.Builder + updateAnywhereCacheSettings() { + return getStubSettingsBuilder().updateAnywhereCacheSettings(); + } + + /** Returns the builder for the settings used for calls to updateAnywhereCache. */ + public OperationCallSettings.Builder< + UpdateAnywhereCacheRequest, AnywhereCache, UpdateAnywhereCacheMetadata> + updateAnywhereCacheOperationSettings() { + return getStubSettingsBuilder().updateAnywhereCacheOperationSettings(); + } + + /** Returns the builder for the settings used for calls to disableAnywhereCache. */ + public UnaryCallSettings.Builder + disableAnywhereCacheSettings() { + return getStubSettingsBuilder().disableAnywhereCacheSettings(); + } + + /** Returns the builder for the settings used for calls to pauseAnywhereCache. */ + public UnaryCallSettings.Builder + pauseAnywhereCacheSettings() { + return getStubSettingsBuilder().pauseAnywhereCacheSettings(); + } + + /** Returns the builder for the settings used for calls to resumeAnywhereCache. */ + public UnaryCallSettings.Builder + resumeAnywhereCacheSettings() { + return getStubSettingsBuilder().resumeAnywhereCacheSettings(); + } + + /** Returns the builder for the settings used for calls to getAnywhereCache. */ + public UnaryCallSettings.Builder + getAnywhereCacheSettings() { + return getStubSettingsBuilder().getAnywhereCacheSettings(); + } + + /** Returns the builder for the settings used for calls to listAnywhereCaches. */ + public PagedCallSettings.Builder< + ListAnywhereCachesRequest, ListAnywhereCachesResponse, ListAnywhereCachesPagedResponse> + listAnywhereCachesSettings() { + return getStubSettingsBuilder().listAnywhereCachesSettings(); + } + + /** Returns the builder for the settings used for calls to getProjectIntelligenceConfig. */ + public UnaryCallSettings.Builder + getProjectIntelligenceConfigSettings() { + return getStubSettingsBuilder().getProjectIntelligenceConfigSettings(); + } + + /** Returns the builder for the settings used for calls to updateProjectIntelligenceConfig. */ + public UnaryCallSettings.Builder + updateProjectIntelligenceConfigSettings() { + return getStubSettingsBuilder().updateProjectIntelligenceConfigSettings(); + } + + /** Returns the builder for the settings used for calls to getFolderIntelligenceConfig. */ + public UnaryCallSettings.Builder + getFolderIntelligenceConfigSettings() { + return getStubSettingsBuilder().getFolderIntelligenceConfigSettings(); + } + + /** Returns the builder for the settings used for calls to updateFolderIntelligenceConfig. */ + public UnaryCallSettings.Builder + updateFolderIntelligenceConfigSettings() { + return getStubSettingsBuilder().updateFolderIntelligenceConfigSettings(); + } + + /** Returns the builder for the settings used for calls to getOrganizationIntelligenceConfig. */ + public UnaryCallSettings.Builder + getOrganizationIntelligenceConfigSettings() { + return getStubSettingsBuilder().getOrganizationIntelligenceConfigSettings(); + } + + /** + * Returns the builder for the settings used for calls to updateOrganizationIntelligenceConfig. + */ + public UnaryCallSettings.Builder< + UpdateOrganizationIntelligenceConfigRequest, IntelligenceConfig> + updateOrganizationIntelligenceConfigSettings() { + return getStubSettingsBuilder().updateOrganizationIntelligenceConfigSettings(); + } + @Override public StorageControlSettings build() throws IOException { return new StorageControlSettings(this); diff --git a/google-cloud-storage-control/src/main/java/com/google/storage/control/v2/gapic_metadata.json b/google-cloud-storage-control/src/main/java/com/google/storage/control/v2/gapic_metadata.json index d2d8f4700a..308c596131 100644 --- a/google-cloud-storage-control/src/main/java/com/google/storage/control/v2/gapic_metadata.json +++ b/google-cloud-storage-control/src/main/java/com/google/storage/control/v2/gapic_metadata.json @@ -10,6 +10,9 @@ "grpc": { "libraryClient": "StorageControlClient", "rpcs": { + "CreateAnywhereCache": { + "methods": ["createAnywhereCacheAsync", "createAnywhereCacheAsync", "createAnywhereCacheAsync", "createAnywhereCacheOperationCallable", "createAnywhereCacheCallable"] + }, "CreateFolder": { "methods": ["createFolder", "createFolder", "createFolder", "createFolderCallable"] }, @@ -22,23 +25,59 @@ "DeleteManagedFolder": { "methods": ["deleteManagedFolder", "deleteManagedFolder", "deleteManagedFolder", "deleteManagedFolderCallable"] }, + "DisableAnywhereCache": { + "methods": ["disableAnywhereCache", "disableAnywhereCache", "disableAnywhereCache", "disableAnywhereCacheCallable"] + }, + "GetAnywhereCache": { + "methods": ["getAnywhereCache", "getAnywhereCache", "getAnywhereCache", "getAnywhereCacheCallable"] + }, "GetFolder": { "methods": ["getFolder", "getFolder", "getFolder", "getFolderCallable"] }, + "GetFolderIntelligenceConfig": { + "methods": ["getFolderIntelligenceConfig", "getFolderIntelligenceConfig", "getFolderIntelligenceConfig", "getFolderIntelligenceConfigCallable"] + }, "GetManagedFolder": { "methods": ["getManagedFolder", "getManagedFolder", "getManagedFolder", "getManagedFolderCallable"] }, + "GetOrganizationIntelligenceConfig": { + "methods": ["getOrganizationIntelligenceConfig", "getOrganizationIntelligenceConfig", "getOrganizationIntelligenceConfig", "getOrganizationIntelligenceConfigCallable"] + }, + "GetProjectIntelligenceConfig": { + "methods": ["getProjectIntelligenceConfig", "getProjectIntelligenceConfig", "getProjectIntelligenceConfig", "getProjectIntelligenceConfigCallable"] + }, "GetStorageLayout": { "methods": ["getStorageLayout", "getStorageLayout", "getStorageLayout", "getStorageLayoutCallable"] }, + "ListAnywhereCaches": { + "methods": ["listAnywhereCaches", "listAnywhereCaches", "listAnywhereCaches", "listAnywhereCachesPagedCallable", "listAnywhereCachesCallable"] + }, "ListFolders": { "methods": ["listFolders", "listFolders", "listFolders", "listFoldersPagedCallable", "listFoldersCallable"] }, "ListManagedFolders": { "methods": ["listManagedFolders", "listManagedFolders", "listManagedFolders", "listManagedFoldersPagedCallable", "listManagedFoldersCallable"] }, + "PauseAnywhereCache": { + "methods": ["pauseAnywhereCache", "pauseAnywhereCache", "pauseAnywhereCache", "pauseAnywhereCacheCallable"] + }, "RenameFolder": { "methods": ["renameFolderAsync", "renameFolderAsync", "renameFolderAsync", "renameFolderOperationCallable", "renameFolderCallable"] + }, + "ResumeAnywhereCache": { + "methods": ["resumeAnywhereCache", "resumeAnywhereCache", "resumeAnywhereCache", "resumeAnywhereCacheCallable"] + }, + "UpdateAnywhereCache": { + "methods": ["updateAnywhereCacheAsync", "updateAnywhereCacheAsync", "updateAnywhereCacheOperationCallable", "updateAnywhereCacheCallable"] + }, + "UpdateFolderIntelligenceConfig": { + "methods": ["updateFolderIntelligenceConfig", "updateFolderIntelligenceConfig", "updateFolderIntelligenceConfigCallable"] + }, + "UpdateOrganizationIntelligenceConfig": { + "methods": ["updateOrganizationIntelligenceConfig", "updateOrganizationIntelligenceConfig", "updateOrganizationIntelligenceConfigCallable"] + }, + "UpdateProjectIntelligenceConfig": { + "methods": ["updateProjectIntelligenceConfig", "updateProjectIntelligenceConfig", "updateProjectIntelligenceConfigCallable"] } } } diff --git a/google-cloud-storage-control/src/main/java/com/google/storage/control/v2/stub/GrpcStorageControlStub.java b/google-cloud-storage-control/src/main/java/com/google/storage/control/v2/stub/GrpcStorageControlStub.java index fa8cfa7c44..78876be707 100644 --- a/google-cloud-storage-control/src/main/java/com/google/storage/control/v2/stub/GrpcStorageControlStub.java +++ b/google-cloud-storage-control/src/main/java/com/google/storage/control/v2/stub/GrpcStorageControlStub.java @@ -16,6 +16,7 @@ package com.google.storage.control.v2.stub; +import static com.google.storage.control.v2.StorageControlClient.ListAnywhereCachesPagedResponse; import static com.google.storage.control.v2.StorageControlClient.ListFoldersPagedResponse; import static com.google.storage.control.v2.StorageControlClient.ListManagedFoldersPagedResponse; @@ -32,22 +33,40 @@ import com.google.longrunning.Operation; import com.google.longrunning.stub.GrpcOperationsStub; import com.google.protobuf.Empty; +import com.google.storage.control.v2.AnywhereCache; +import com.google.storage.control.v2.CreateAnywhereCacheMetadata; +import com.google.storage.control.v2.CreateAnywhereCacheRequest; import com.google.storage.control.v2.CreateFolderRequest; import com.google.storage.control.v2.CreateManagedFolderRequest; import com.google.storage.control.v2.DeleteFolderRequest; import com.google.storage.control.v2.DeleteManagedFolderRequest; +import com.google.storage.control.v2.DisableAnywhereCacheRequest; import com.google.storage.control.v2.Folder; +import com.google.storage.control.v2.GetAnywhereCacheRequest; +import com.google.storage.control.v2.GetFolderIntelligenceConfigRequest; import com.google.storage.control.v2.GetFolderRequest; import com.google.storage.control.v2.GetManagedFolderRequest; +import com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest; +import com.google.storage.control.v2.GetProjectIntelligenceConfigRequest; import com.google.storage.control.v2.GetStorageLayoutRequest; +import com.google.storage.control.v2.IntelligenceConfig; +import com.google.storage.control.v2.ListAnywhereCachesRequest; +import com.google.storage.control.v2.ListAnywhereCachesResponse; import com.google.storage.control.v2.ListFoldersRequest; import com.google.storage.control.v2.ListFoldersResponse; import com.google.storage.control.v2.ListManagedFoldersRequest; import com.google.storage.control.v2.ListManagedFoldersResponse; import com.google.storage.control.v2.ManagedFolder; +import com.google.storage.control.v2.PauseAnywhereCacheRequest; import com.google.storage.control.v2.RenameFolderMetadata; import com.google.storage.control.v2.RenameFolderRequest; +import com.google.storage.control.v2.ResumeAnywhereCacheRequest; import com.google.storage.control.v2.StorageLayout; +import com.google.storage.control.v2.UpdateAnywhereCacheMetadata; +import com.google.storage.control.v2.UpdateAnywhereCacheRequest; +import com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest; +import com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest; +import com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest; import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; import java.io.IOException; @@ -157,6 +176,150 @@ public class GrpcStorageControlStub extends StorageControlStub { ProtoUtils.marshaller(ListManagedFoldersResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor + createAnywhereCacheMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.storage.control.v2.StorageControl/CreateAnywhereCache") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateAnywhereCacheRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateAnywhereCacheMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.storage.control.v2.StorageControl/UpdateAnywhereCache") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateAnywhereCacheRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + disableAnywhereCacheMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.storage.control.v2.StorageControl/DisableAnywhereCache") + .setRequestMarshaller( + ProtoUtils.marshaller(DisableAnywhereCacheRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(AnywhereCache.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + pauseAnywhereCacheMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.storage.control.v2.StorageControl/PauseAnywhereCache") + .setRequestMarshaller( + ProtoUtils.marshaller(PauseAnywhereCacheRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(AnywhereCache.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + resumeAnywhereCacheMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.storage.control.v2.StorageControl/ResumeAnywhereCache") + .setRequestMarshaller( + ProtoUtils.marshaller(ResumeAnywhereCacheRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(AnywhereCache.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getAnywhereCacheMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.storage.control.v2.StorageControl/GetAnywhereCache") + .setRequestMarshaller( + ProtoUtils.marshaller(GetAnywhereCacheRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(AnywhereCache.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listAnywhereCachesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.storage.control.v2.StorageControl/ListAnywhereCaches") + .setRequestMarshaller( + ProtoUtils.marshaller(ListAnywhereCachesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListAnywhereCachesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getProjectIntelligenceConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.storage.control.v2.StorageControl/GetProjectIntelligenceConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(GetProjectIntelligenceConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(IntelligenceConfig.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateProjectIntelligenceConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.storage.control.v2.StorageControl/UpdateProjectIntelligenceConfig") + .setRequestMarshaller( + ProtoUtils.marshaller( + UpdateProjectIntelligenceConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(IntelligenceConfig.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getFolderIntelligenceConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.storage.control.v2.StorageControl/GetFolderIntelligenceConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(GetFolderIntelligenceConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(IntelligenceConfig.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateFolderIntelligenceConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.storage.control.v2.StorageControl/UpdateFolderIntelligenceConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateFolderIntelligenceConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(IntelligenceConfig.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + GetOrganizationIntelligenceConfigRequest, IntelligenceConfig> + getOrganizationIntelligenceConfigMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.storage.control.v2.StorageControl/GetOrganizationIntelligenceConfig") + .setRequestMarshaller( + ProtoUtils.marshaller( + GetOrganizationIntelligenceConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(IntelligenceConfig.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + UpdateOrganizationIntelligenceConfigRequest, IntelligenceConfig> + updateOrganizationIntelligenceConfigMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.storage.control.v2.StorageControl/UpdateOrganizationIntelligenceConfig") + .setRequestMarshaller( + ProtoUtils.marshaller( + UpdateOrganizationIntelligenceConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(IntelligenceConfig.getDefaultInstance())) + .build(); + private final UnaryCallable createFolderCallable; private final UnaryCallable deleteFolderCallable; private final UnaryCallable getFolderCallable; @@ -175,6 +338,36 @@ public class GrpcStorageControlStub extends StorageControlStub { listManagedFoldersCallable; private final UnaryCallable listManagedFoldersPagedCallable; + private final UnaryCallable createAnywhereCacheCallable; + private final OperationCallable< + CreateAnywhereCacheRequest, AnywhereCache, CreateAnywhereCacheMetadata> + createAnywhereCacheOperationCallable; + private final UnaryCallable updateAnywhereCacheCallable; + private final OperationCallable< + UpdateAnywhereCacheRequest, AnywhereCache, UpdateAnywhereCacheMetadata> + updateAnywhereCacheOperationCallable; + private final UnaryCallable + disableAnywhereCacheCallable; + private final UnaryCallable pauseAnywhereCacheCallable; + private final UnaryCallable + resumeAnywhereCacheCallable; + private final UnaryCallable getAnywhereCacheCallable; + private final UnaryCallable + listAnywhereCachesCallable; + private final UnaryCallable + listAnywhereCachesPagedCallable; + private final UnaryCallable + getProjectIntelligenceConfigCallable; + private final UnaryCallable + updateProjectIntelligenceConfigCallable; + private final UnaryCallable + getFolderIntelligenceConfigCallable; + private final UnaryCallable + updateFolderIntelligenceConfigCallable; + private final UnaryCallable + getOrganizationIntelligenceConfigCallable; + private final UnaryCallable + updateOrganizationIntelligenceConfigCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -200,6 +393,20 @@ public class GrpcStorageControlStub extends StorageControlStub { PathTemplate.create("{bucket=projects/*/buckets/*}/**"); private static final PathTemplate LIST_MANAGED_FOLDERS_0_PATH_TEMPLATE = PathTemplate.create("{bucket=**}"); + private static final PathTemplate CREATE_ANYWHERE_CACHE_0_PATH_TEMPLATE = + PathTemplate.create("{bucket=**}"); + private static final PathTemplate UPDATE_ANYWHERE_CACHE_0_PATH_TEMPLATE = + PathTemplate.create("{bucket=projects/*/buckets/*}/**"); + private static final PathTemplate DISABLE_ANYWHERE_CACHE_0_PATH_TEMPLATE = + PathTemplate.create("{bucket=projects/*/buckets/*}/**"); + private static final PathTemplate PAUSE_ANYWHERE_CACHE_0_PATH_TEMPLATE = + PathTemplate.create("{bucket=projects/*/buckets/*}/**"); + private static final PathTemplate RESUME_ANYWHERE_CACHE_0_PATH_TEMPLATE = + PathTemplate.create("{bucket=projects/*/buckets/*}/**"); + private static final PathTemplate GET_ANYWHERE_CACHE_0_PATH_TEMPLATE = + PathTemplate.create("{bucket=projects/*/buckets/*}/**"); + private static final PathTemplate LIST_ANYWHERE_CACHES_0_PATH_TEMPLATE = + PathTemplate.create("{bucket=**}"); public static final GrpcStorageControlStub create(StorageControlStubSettings settings) throws IOException { @@ -417,6 +624,218 @@ protected GrpcStorageControlStub( return requestBuilder.build(); }) .build(); + GrpcCallSettings createAnywhereCacheTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createAnywhereCacheMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getParent(), "bucket", CREATE_ANYWHERE_CACHE_0_PATH_TEMPLATE); + return builder.build(); + }) + .setRequestMutator( + request -> { + CreateAnywhereCacheRequest.Builder requestBuilder = request.toBuilder(); + if (Strings.isNullOrEmpty(request.getRequestId())) { + requestBuilder.setRequestId(UUID.randomUUID().toString()); + } + return requestBuilder.build(); + }) + .build(); + GrpcCallSettings updateAnywhereCacheTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateAnywhereCacheMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + if (request.getAnywhereCache() != null) { + builder.add( + request.getAnywhereCache().getName(), + "bucket", + UPDATE_ANYWHERE_CACHE_0_PATH_TEMPLATE); + } + return builder.build(); + }) + .setRequestMutator( + request -> { + UpdateAnywhereCacheRequest.Builder requestBuilder = request.toBuilder(); + if (Strings.isNullOrEmpty(request.getRequestId())) { + requestBuilder.setRequestId(UUID.randomUUID().toString()); + } + return requestBuilder.build(); + }) + .build(); + GrpcCallSettings + disableAnywhereCacheTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(disableAnywhereCacheMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + request.getName(), "bucket", DISABLE_ANYWHERE_CACHE_0_PATH_TEMPLATE); + return builder.build(); + }) + .setRequestMutator( + request -> { + DisableAnywhereCacheRequest.Builder requestBuilder = request.toBuilder(); + if (Strings.isNullOrEmpty(request.getRequestId())) { + requestBuilder.setRequestId(UUID.randomUUID().toString()); + } + return requestBuilder.build(); + }) + .build(); + GrpcCallSettings pauseAnywhereCacheTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(pauseAnywhereCacheMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getName(), "bucket", PAUSE_ANYWHERE_CACHE_0_PATH_TEMPLATE); + return builder.build(); + }) + .setRequestMutator( + request -> { + PauseAnywhereCacheRequest.Builder requestBuilder = request.toBuilder(); + if (Strings.isNullOrEmpty(request.getRequestId())) { + requestBuilder.setRequestId(UUID.randomUUID().toString()); + } + return requestBuilder.build(); + }) + .build(); + GrpcCallSettings + resumeAnywhereCacheTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(resumeAnywhereCacheMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + request.getName(), "bucket", RESUME_ANYWHERE_CACHE_0_PATH_TEMPLATE); + return builder.build(); + }) + .setRequestMutator( + request -> { + ResumeAnywhereCacheRequest.Builder requestBuilder = request.toBuilder(); + if (Strings.isNullOrEmpty(request.getRequestId())) { + requestBuilder.setRequestId(UUID.randomUUID().toString()); + } + return requestBuilder.build(); + }) + .build(); + GrpcCallSettings getAnywhereCacheTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAnywhereCacheMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add(request.getName(), "bucket", GET_ANYWHERE_CACHE_0_PATH_TEMPLATE); + return builder.build(); + }) + .setRequestMutator( + request -> { + GetAnywhereCacheRequest.Builder requestBuilder = request.toBuilder(); + if (Strings.isNullOrEmpty(request.getRequestId())) { + requestBuilder.setRequestId(UUID.randomUUID().toString()); + } + return requestBuilder.build(); + }) + .build(); + GrpcCallSettings + listAnywhereCachesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listAnywhereCachesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + request.getParent(), "bucket", LIST_ANYWHERE_CACHES_0_PATH_TEMPLATE); + return builder.build(); + }) + .setRequestMutator( + request -> { + ListAnywhereCachesRequest.Builder requestBuilder = request.toBuilder(); + if (Strings.isNullOrEmpty(request.getRequestId())) { + requestBuilder.setRequestId(UUID.randomUUID().toString()); + } + return requestBuilder.build(); + }) + .build(); + GrpcCallSettings + getProjectIntelligenceConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getProjectIntelligenceConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + updateProjectIntelligenceConfigTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(updateProjectIntelligenceConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "intelligence_config.name", + String.valueOf(request.getIntelligenceConfig().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + getFolderIntelligenceConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getFolderIntelligenceConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + updateFolderIntelligenceConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateFolderIntelligenceConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "intelligence_config.name", + String.valueOf(request.getIntelligenceConfig().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + getOrganizationIntelligenceConfigTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(getOrganizationIntelligenceConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + updateOrganizationIntelligenceConfigTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(updateOrganizationIntelligenceConfigMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "intelligence_config.name", + String.valueOf(request.getIntelligenceConfig().getName())); + return builder.build(); + }) + .build(); this.createFolderCallable = callableFactory.createUnaryCallable( @@ -468,6 +887,86 @@ protected GrpcStorageControlStub( listManagedFoldersTransportSettings, settings.listManagedFoldersSettings(), clientContext); + this.createAnywhereCacheCallable = + callableFactory.createUnaryCallable( + createAnywhereCacheTransportSettings, + settings.createAnywhereCacheSettings(), + clientContext); + this.createAnywhereCacheOperationCallable = + callableFactory.createOperationCallable( + createAnywhereCacheTransportSettings, + settings.createAnywhereCacheOperationSettings(), + clientContext, + operationsStub); + this.updateAnywhereCacheCallable = + callableFactory.createUnaryCallable( + updateAnywhereCacheTransportSettings, + settings.updateAnywhereCacheSettings(), + clientContext); + this.updateAnywhereCacheOperationCallable = + callableFactory.createOperationCallable( + updateAnywhereCacheTransportSettings, + settings.updateAnywhereCacheOperationSettings(), + clientContext, + operationsStub); + this.disableAnywhereCacheCallable = + callableFactory.createUnaryCallable( + disableAnywhereCacheTransportSettings, + settings.disableAnywhereCacheSettings(), + clientContext); + this.pauseAnywhereCacheCallable = + callableFactory.createUnaryCallable( + pauseAnywhereCacheTransportSettings, + settings.pauseAnywhereCacheSettings(), + clientContext); + this.resumeAnywhereCacheCallable = + callableFactory.createUnaryCallable( + resumeAnywhereCacheTransportSettings, + settings.resumeAnywhereCacheSettings(), + clientContext); + this.getAnywhereCacheCallable = + callableFactory.createUnaryCallable( + getAnywhereCacheTransportSettings, settings.getAnywhereCacheSettings(), clientContext); + this.listAnywhereCachesCallable = + callableFactory.createUnaryCallable( + listAnywhereCachesTransportSettings, + settings.listAnywhereCachesSettings(), + clientContext); + this.listAnywhereCachesPagedCallable = + callableFactory.createPagedCallable( + listAnywhereCachesTransportSettings, + settings.listAnywhereCachesSettings(), + clientContext); + this.getProjectIntelligenceConfigCallable = + callableFactory.createUnaryCallable( + getProjectIntelligenceConfigTransportSettings, + settings.getProjectIntelligenceConfigSettings(), + clientContext); + this.updateProjectIntelligenceConfigCallable = + callableFactory.createUnaryCallable( + updateProjectIntelligenceConfigTransportSettings, + settings.updateProjectIntelligenceConfigSettings(), + clientContext); + this.getFolderIntelligenceConfigCallable = + callableFactory.createUnaryCallable( + getFolderIntelligenceConfigTransportSettings, + settings.getFolderIntelligenceConfigSettings(), + clientContext); + this.updateFolderIntelligenceConfigCallable = + callableFactory.createUnaryCallable( + updateFolderIntelligenceConfigTransportSettings, + settings.updateFolderIntelligenceConfigSettings(), + clientContext); + this.getOrganizationIntelligenceConfigCallable = + callableFactory.createUnaryCallable( + getOrganizationIntelligenceConfigTransportSettings, + settings.getOrganizationIntelligenceConfigSettings(), + clientContext); + this.updateOrganizationIntelligenceConfigCallable = + callableFactory.createUnaryCallable( + updateOrganizationIntelligenceConfigTransportSettings, + settings.updateOrganizationIntelligenceConfigSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -545,6 +1044,96 @@ public UnaryCallable getManagedFolderCal return listManagedFoldersPagedCallable; } + @Override + public UnaryCallable createAnywhereCacheCallable() { + return createAnywhereCacheCallable; + } + + @Override + public OperationCallable + createAnywhereCacheOperationCallable() { + return createAnywhereCacheOperationCallable; + } + + @Override + public UnaryCallable updateAnywhereCacheCallable() { + return updateAnywhereCacheCallable; + } + + @Override + public OperationCallable + updateAnywhereCacheOperationCallable() { + return updateAnywhereCacheOperationCallable; + } + + @Override + public UnaryCallable disableAnywhereCacheCallable() { + return disableAnywhereCacheCallable; + } + + @Override + public UnaryCallable pauseAnywhereCacheCallable() { + return pauseAnywhereCacheCallable; + } + + @Override + public UnaryCallable resumeAnywhereCacheCallable() { + return resumeAnywhereCacheCallable; + } + + @Override + public UnaryCallable getAnywhereCacheCallable() { + return getAnywhereCacheCallable; + } + + @Override + public UnaryCallable + listAnywhereCachesCallable() { + return listAnywhereCachesCallable; + } + + @Override + public UnaryCallable + listAnywhereCachesPagedCallable() { + return listAnywhereCachesPagedCallable; + } + + @Override + public UnaryCallable + getProjectIntelligenceConfigCallable() { + return getProjectIntelligenceConfigCallable; + } + + @Override + public UnaryCallable + updateProjectIntelligenceConfigCallable() { + return updateProjectIntelligenceConfigCallable; + } + + @Override + public UnaryCallable + getFolderIntelligenceConfigCallable() { + return getFolderIntelligenceConfigCallable; + } + + @Override + public UnaryCallable + updateFolderIntelligenceConfigCallable() { + return updateFolderIntelligenceConfigCallable; + } + + @Override + public UnaryCallable + getOrganizationIntelligenceConfigCallable() { + return getOrganizationIntelligenceConfigCallable; + } + + @Override + public UnaryCallable + updateOrganizationIntelligenceConfigCallable() { + return updateOrganizationIntelligenceConfigCallable; + } + @Override public final void close() { try { diff --git a/google-cloud-storage-control/src/main/java/com/google/storage/control/v2/stub/StorageControlStub.java b/google-cloud-storage-control/src/main/java/com/google/storage/control/v2/stub/StorageControlStub.java index 99c5bd0326..30efedc18b 100644 --- a/google-cloud-storage-control/src/main/java/com/google/storage/control/v2/stub/StorageControlStub.java +++ b/google-cloud-storage-control/src/main/java/com/google/storage/control/v2/stub/StorageControlStub.java @@ -16,6 +16,7 @@ package com.google.storage.control.v2.stub; +import static com.google.storage.control.v2.StorageControlClient.ListAnywhereCachesPagedResponse; import static com.google.storage.control.v2.StorageControlClient.ListFoldersPagedResponse; import static com.google.storage.control.v2.StorageControlClient.ListManagedFoldersPagedResponse; @@ -25,22 +26,40 @@ import com.google.longrunning.Operation; import com.google.longrunning.stub.OperationsStub; import com.google.protobuf.Empty; +import com.google.storage.control.v2.AnywhereCache; +import com.google.storage.control.v2.CreateAnywhereCacheMetadata; +import com.google.storage.control.v2.CreateAnywhereCacheRequest; import com.google.storage.control.v2.CreateFolderRequest; import com.google.storage.control.v2.CreateManagedFolderRequest; import com.google.storage.control.v2.DeleteFolderRequest; import com.google.storage.control.v2.DeleteManagedFolderRequest; +import com.google.storage.control.v2.DisableAnywhereCacheRequest; import com.google.storage.control.v2.Folder; +import com.google.storage.control.v2.GetAnywhereCacheRequest; +import com.google.storage.control.v2.GetFolderIntelligenceConfigRequest; import com.google.storage.control.v2.GetFolderRequest; import com.google.storage.control.v2.GetManagedFolderRequest; +import com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest; +import com.google.storage.control.v2.GetProjectIntelligenceConfigRequest; import com.google.storage.control.v2.GetStorageLayoutRequest; +import com.google.storage.control.v2.IntelligenceConfig; +import com.google.storage.control.v2.ListAnywhereCachesRequest; +import com.google.storage.control.v2.ListAnywhereCachesResponse; import com.google.storage.control.v2.ListFoldersRequest; import com.google.storage.control.v2.ListFoldersResponse; import com.google.storage.control.v2.ListManagedFoldersRequest; import com.google.storage.control.v2.ListManagedFoldersResponse; import com.google.storage.control.v2.ManagedFolder; +import com.google.storage.control.v2.PauseAnywhereCacheRequest; import com.google.storage.control.v2.RenameFolderMetadata; import com.google.storage.control.v2.RenameFolderRequest; +import com.google.storage.control.v2.ResumeAnywhereCacheRequest; import com.google.storage.control.v2.StorageLayout; +import com.google.storage.control.v2.UpdateAnywhereCacheMetadata; +import com.google.storage.control.v2.UpdateAnywhereCacheRequest; +import com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest; +import com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest; +import com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest; import javax.annotation.Generated; // AUTO-GENERATED DOCUMENTATION AND CLASS. @@ -111,6 +130,88 @@ public UnaryCallable getManagedFolderCal throw new UnsupportedOperationException("Not implemented: listManagedFoldersCallable()"); } + public OperationCallable + createAnywhereCacheOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createAnywhereCacheOperationCallable()"); + } + + public UnaryCallable createAnywhereCacheCallable() { + throw new UnsupportedOperationException("Not implemented: createAnywhereCacheCallable()"); + } + + public OperationCallable + updateAnywhereCacheOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateAnywhereCacheOperationCallable()"); + } + + public UnaryCallable updateAnywhereCacheCallable() { + throw new UnsupportedOperationException("Not implemented: updateAnywhereCacheCallable()"); + } + + public UnaryCallable disableAnywhereCacheCallable() { + throw new UnsupportedOperationException("Not implemented: disableAnywhereCacheCallable()"); + } + + public UnaryCallable pauseAnywhereCacheCallable() { + throw new UnsupportedOperationException("Not implemented: pauseAnywhereCacheCallable()"); + } + + public UnaryCallable resumeAnywhereCacheCallable() { + throw new UnsupportedOperationException("Not implemented: resumeAnywhereCacheCallable()"); + } + + public UnaryCallable getAnywhereCacheCallable() { + throw new UnsupportedOperationException("Not implemented: getAnywhereCacheCallable()"); + } + + public UnaryCallable + listAnywhereCachesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listAnywhereCachesPagedCallable()"); + } + + public UnaryCallable + listAnywhereCachesCallable() { + throw new UnsupportedOperationException("Not implemented: listAnywhereCachesCallable()"); + } + + public UnaryCallable + getProjectIntelligenceConfigCallable() { + throw new UnsupportedOperationException( + "Not implemented: getProjectIntelligenceConfigCallable()"); + } + + public UnaryCallable + updateProjectIntelligenceConfigCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateProjectIntelligenceConfigCallable()"); + } + + public UnaryCallable + getFolderIntelligenceConfigCallable() { + throw new UnsupportedOperationException( + "Not implemented: getFolderIntelligenceConfigCallable()"); + } + + public UnaryCallable + updateFolderIntelligenceConfigCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateFolderIntelligenceConfigCallable()"); + } + + public UnaryCallable + getOrganizationIntelligenceConfigCallable() { + throw new UnsupportedOperationException( + "Not implemented: getOrganizationIntelligenceConfigCallable()"); + } + + public UnaryCallable + updateOrganizationIntelligenceConfigCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateOrganizationIntelligenceConfigCallable()"); + } + @Override public abstract void close(); } diff --git a/google-cloud-storage-control/src/main/java/com/google/storage/control/v2/stub/StorageControlStubSettings.java b/google-cloud-storage-control/src/main/java/com/google/storage/control/v2/stub/StorageControlStubSettings.java index e019137a9b..629353b746 100644 --- a/google-cloud-storage-control/src/main/java/com/google/storage/control/v2/stub/StorageControlStubSettings.java +++ b/google-cloud-storage-control/src/main/java/com/google/storage/control/v2/stub/StorageControlStubSettings.java @@ -16,6 +16,7 @@ package com.google.storage.control.v2.stub; +import static com.google.storage.control.v2.StorageControlClient.ListAnywhereCachesPagedResponse; import static com.google.storage.control.v2.StorageControlClient.ListFoldersPagedResponse; import static com.google.storage.control.v2.StorageControlClient.ListManagedFoldersPagedResponse; @@ -51,22 +52,40 @@ import com.google.common.collect.Lists; import com.google.longrunning.Operation; import com.google.protobuf.Empty; +import com.google.storage.control.v2.AnywhereCache; +import com.google.storage.control.v2.CreateAnywhereCacheMetadata; +import com.google.storage.control.v2.CreateAnywhereCacheRequest; import com.google.storage.control.v2.CreateFolderRequest; import com.google.storage.control.v2.CreateManagedFolderRequest; import com.google.storage.control.v2.DeleteFolderRequest; import com.google.storage.control.v2.DeleteManagedFolderRequest; +import com.google.storage.control.v2.DisableAnywhereCacheRequest; import com.google.storage.control.v2.Folder; +import com.google.storage.control.v2.GetAnywhereCacheRequest; +import com.google.storage.control.v2.GetFolderIntelligenceConfigRequest; import com.google.storage.control.v2.GetFolderRequest; import com.google.storage.control.v2.GetManagedFolderRequest; +import com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest; +import com.google.storage.control.v2.GetProjectIntelligenceConfigRequest; import com.google.storage.control.v2.GetStorageLayoutRequest; +import com.google.storage.control.v2.IntelligenceConfig; +import com.google.storage.control.v2.ListAnywhereCachesRequest; +import com.google.storage.control.v2.ListAnywhereCachesResponse; import com.google.storage.control.v2.ListFoldersRequest; import com.google.storage.control.v2.ListFoldersResponse; import com.google.storage.control.v2.ListManagedFoldersRequest; import com.google.storage.control.v2.ListManagedFoldersResponse; import com.google.storage.control.v2.ManagedFolder; +import com.google.storage.control.v2.PauseAnywhereCacheRequest; import com.google.storage.control.v2.RenameFolderMetadata; import com.google.storage.control.v2.RenameFolderRequest; +import com.google.storage.control.v2.ResumeAnywhereCacheRequest; import com.google.storage.control.v2.StorageLayout; +import com.google.storage.control.v2.UpdateAnywhereCacheMetadata; +import com.google.storage.control.v2.UpdateAnywhereCacheRequest; +import com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest; +import com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest; +import com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest; import java.io.IOException; import java.time.Duration; import java.util.List; @@ -176,6 +195,38 @@ public class StorageControlStubSettings extends StubSettings listManagedFoldersSettings; + private final UnaryCallSettings + createAnywhereCacheSettings; + private final OperationCallSettings< + CreateAnywhereCacheRequest, AnywhereCache, CreateAnywhereCacheMetadata> + createAnywhereCacheOperationSettings; + private final UnaryCallSettings + updateAnywhereCacheSettings; + private final OperationCallSettings< + UpdateAnywhereCacheRequest, AnywhereCache, UpdateAnywhereCacheMetadata> + updateAnywhereCacheOperationSettings; + private final UnaryCallSettings + disableAnywhereCacheSettings; + private final UnaryCallSettings + pauseAnywhereCacheSettings; + private final UnaryCallSettings + resumeAnywhereCacheSettings; + private final UnaryCallSettings getAnywhereCacheSettings; + private final PagedCallSettings< + ListAnywhereCachesRequest, ListAnywhereCachesResponse, ListAnywhereCachesPagedResponse> + listAnywhereCachesSettings; + private final UnaryCallSettings + getProjectIntelligenceConfigSettings; + private final UnaryCallSettings + updateProjectIntelligenceConfigSettings; + private final UnaryCallSettings + getFolderIntelligenceConfigSettings; + private final UnaryCallSettings + updateFolderIntelligenceConfigSettings; + private final UnaryCallSettings + getOrganizationIntelligenceConfigSettings; + private final UnaryCallSettings + updateOrganizationIntelligenceConfigSettings; private static final PagedListDescriptor LIST_FOLDERS_PAGE_STR_DESC = @@ -249,6 +300,44 @@ public Iterable extractResources(ListManagedFoldersResponse paylo } }; + private static final PagedListDescriptor< + ListAnywhereCachesRequest, ListAnywhereCachesResponse, AnywhereCache> + LIST_ANYWHERE_CACHES_PAGE_STR_DESC = + new PagedListDescriptor< + ListAnywhereCachesRequest, ListAnywhereCachesResponse, AnywhereCache>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAnywhereCachesRequest injectToken( + ListAnywhereCachesRequest payload, String token) { + return ListAnywhereCachesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAnywhereCachesRequest injectPageSize( + ListAnywhereCachesRequest payload, int pageSize) { + return ListAnywhereCachesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListAnywhereCachesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAnywhereCachesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListAnywhereCachesResponse payload) { + return payload.getAnywhereCachesList(); + } + }; + private static final PagedListResponseFactory< ListFoldersRequest, ListFoldersResponse, ListFoldersPagedResponse> LIST_FOLDERS_PAGE_STR_FACT = @@ -287,6 +376,27 @@ public ApiFuture getFuturePagedResponse( } }; + private static final PagedListResponseFactory< + ListAnywhereCachesRequest, ListAnywhereCachesResponse, ListAnywhereCachesPagedResponse> + LIST_ANYWHERE_CACHES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAnywhereCachesRequest, + ListAnywhereCachesResponse, + ListAnywhereCachesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAnywhereCachesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_ANYWHERE_CACHES_PAGE_STR_DESC, request, context); + return ListAnywhereCachesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + /** Returns the object with the settings used for calls to createFolder. */ public UnaryCallSettings createFolderSettings() { return createFolderSettings; @@ -347,6 +457,97 @@ public UnaryCallSettings getManagedFolde return listManagedFoldersSettings; } + /** Returns the object with the settings used for calls to createAnywhereCache. */ + public UnaryCallSettings createAnywhereCacheSettings() { + return createAnywhereCacheSettings; + } + + /** Returns the object with the settings used for calls to createAnywhereCache. */ + public OperationCallSettings< + CreateAnywhereCacheRequest, AnywhereCache, CreateAnywhereCacheMetadata> + createAnywhereCacheOperationSettings() { + return createAnywhereCacheOperationSettings; + } + + /** Returns the object with the settings used for calls to updateAnywhereCache. */ + public UnaryCallSettings updateAnywhereCacheSettings() { + return updateAnywhereCacheSettings; + } + + /** Returns the object with the settings used for calls to updateAnywhereCache. */ + public OperationCallSettings< + UpdateAnywhereCacheRequest, AnywhereCache, UpdateAnywhereCacheMetadata> + updateAnywhereCacheOperationSettings() { + return updateAnywhereCacheOperationSettings; + } + + /** Returns the object with the settings used for calls to disableAnywhereCache. */ + public UnaryCallSettings + disableAnywhereCacheSettings() { + return disableAnywhereCacheSettings; + } + + /** Returns the object with the settings used for calls to pauseAnywhereCache. */ + public UnaryCallSettings pauseAnywhereCacheSettings() { + return pauseAnywhereCacheSettings; + } + + /** Returns the object with the settings used for calls to resumeAnywhereCache. */ + public UnaryCallSettings + resumeAnywhereCacheSettings() { + return resumeAnywhereCacheSettings; + } + + /** Returns the object with the settings used for calls to getAnywhereCache. */ + public UnaryCallSettings getAnywhereCacheSettings() { + return getAnywhereCacheSettings; + } + + /** Returns the object with the settings used for calls to listAnywhereCaches. */ + public PagedCallSettings< + ListAnywhereCachesRequest, ListAnywhereCachesResponse, ListAnywhereCachesPagedResponse> + listAnywhereCachesSettings() { + return listAnywhereCachesSettings; + } + + /** Returns the object with the settings used for calls to getProjectIntelligenceConfig. */ + public UnaryCallSettings + getProjectIntelligenceConfigSettings() { + return getProjectIntelligenceConfigSettings; + } + + /** Returns the object with the settings used for calls to updateProjectIntelligenceConfig. */ + public UnaryCallSettings + updateProjectIntelligenceConfigSettings() { + return updateProjectIntelligenceConfigSettings; + } + + /** Returns the object with the settings used for calls to getFolderIntelligenceConfig. */ + public UnaryCallSettings + getFolderIntelligenceConfigSettings() { + return getFolderIntelligenceConfigSettings; + } + + /** Returns the object with the settings used for calls to updateFolderIntelligenceConfig. */ + public UnaryCallSettings + updateFolderIntelligenceConfigSettings() { + return updateFolderIntelligenceConfigSettings; + } + + /** Returns the object with the settings used for calls to getOrganizationIntelligenceConfig. */ + public UnaryCallSettings + getOrganizationIntelligenceConfigSettings() { + return getOrganizationIntelligenceConfigSettings; + } + + /** + * Returns the object with the settings used for calls to updateOrganizationIntelligenceConfig. + */ + public UnaryCallSettings + updateOrganizationIntelligenceConfigSettings() { + return updateOrganizationIntelligenceConfigSettings; + } + public StorageControlStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -439,6 +640,29 @@ protected StorageControlStubSettings(Builder settingsBuilder) throws IOException deleteManagedFolderSettings = settingsBuilder.deleteManagedFolderSettings().build(); getManagedFolderSettings = settingsBuilder.getManagedFolderSettings().build(); listManagedFoldersSettings = settingsBuilder.listManagedFoldersSettings().build(); + createAnywhereCacheSettings = settingsBuilder.createAnywhereCacheSettings().build(); + createAnywhereCacheOperationSettings = + settingsBuilder.createAnywhereCacheOperationSettings().build(); + updateAnywhereCacheSettings = settingsBuilder.updateAnywhereCacheSettings().build(); + updateAnywhereCacheOperationSettings = + settingsBuilder.updateAnywhereCacheOperationSettings().build(); + disableAnywhereCacheSettings = settingsBuilder.disableAnywhereCacheSettings().build(); + pauseAnywhereCacheSettings = settingsBuilder.pauseAnywhereCacheSettings().build(); + resumeAnywhereCacheSettings = settingsBuilder.resumeAnywhereCacheSettings().build(); + getAnywhereCacheSettings = settingsBuilder.getAnywhereCacheSettings().build(); + listAnywhereCachesSettings = settingsBuilder.listAnywhereCachesSettings().build(); + getProjectIntelligenceConfigSettings = + settingsBuilder.getProjectIntelligenceConfigSettings().build(); + updateProjectIntelligenceConfigSettings = + settingsBuilder.updateProjectIntelligenceConfigSettings().build(); + getFolderIntelligenceConfigSettings = + settingsBuilder.getFolderIntelligenceConfigSettings().build(); + updateFolderIntelligenceConfigSettings = + settingsBuilder.updateFolderIntelligenceConfigSettings().build(); + getOrganizationIntelligenceConfigSettings = + settingsBuilder.getOrganizationIntelligenceConfigSettings().build(); + updateOrganizationIntelligenceConfigSettings = + settingsBuilder.updateOrganizationIntelligenceConfigSettings().build(); } /** Builder for StorageControlStubSettings. */ @@ -464,14 +688,49 @@ public static class Builder extends StubSettings.Builder listManagedFoldersSettings; + private final UnaryCallSettings.Builder + createAnywhereCacheSettings; + private final OperationCallSettings.Builder< + CreateAnywhereCacheRequest, AnywhereCache, CreateAnywhereCacheMetadata> + createAnywhereCacheOperationSettings; + private final UnaryCallSettings.Builder + updateAnywhereCacheSettings; + private final OperationCallSettings.Builder< + UpdateAnywhereCacheRequest, AnywhereCache, UpdateAnywhereCacheMetadata> + updateAnywhereCacheOperationSettings; + private final UnaryCallSettings.Builder + disableAnywhereCacheSettings; + private final UnaryCallSettings.Builder + pauseAnywhereCacheSettings; + private final UnaryCallSettings.Builder + resumeAnywhereCacheSettings; + private final UnaryCallSettings.Builder + getAnywhereCacheSettings; + private final PagedCallSettings.Builder< + ListAnywhereCachesRequest, ListAnywhereCachesResponse, ListAnywhereCachesPagedResponse> + listAnywhereCachesSettings; + private final UnaryCallSettings.Builder + getProjectIntelligenceConfigSettings; + private final UnaryCallSettings.Builder< + UpdateProjectIntelligenceConfigRequest, IntelligenceConfig> + updateProjectIntelligenceConfigSettings; + private final UnaryCallSettings.Builder + getFolderIntelligenceConfigSettings; + private final UnaryCallSettings.Builder< + UpdateFolderIntelligenceConfigRequest, IntelligenceConfig> + updateFolderIntelligenceConfigSettings; + private final UnaryCallSettings.Builder< + GetOrganizationIntelligenceConfigRequest, IntelligenceConfig> + getOrganizationIntelligenceConfigSettings; + private final UnaryCallSettings.Builder< + UpdateOrganizationIntelligenceConfigRequest, IntelligenceConfig> + updateOrganizationIntelligenceConfigSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; static { ImmutableMap.Builder> definitions = ImmutableMap.builder(); - definitions.put( - "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); definitions.put( "retry_policy_0_codes", ImmutableSet.copyOf( @@ -481,6 +740,8 @@ public static class Builder extends StubSettings.BuildernewArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -491,23 +752,23 @@ public static class Builder extends StubSettings.Builder>of( @@ -541,7 +818,20 @@ protected Builder(ClientContext clientContext) { createManagedFolderSettings, deleteManagedFolderSettings, getManagedFolderSettings, - listManagedFoldersSettings); + listManagedFoldersSettings, + createAnywhereCacheSettings, + updateAnywhereCacheSettings, + disableAnywhereCacheSettings, + pauseAnywhereCacheSettings, + resumeAnywhereCacheSettings, + getAnywhereCacheSettings, + listAnywhereCachesSettings, + getProjectIntelligenceConfigSettings, + updateProjectIntelligenceConfigSettings, + getFolderIntelligenceConfigSettings, + updateFolderIntelligenceConfigSettings, + getOrganizationIntelligenceConfigSettings, + updateOrganizationIntelligenceConfigSettings); initDefaults(this); } @@ -559,6 +849,29 @@ protected Builder(StorageControlStubSettings settings) { deleteManagedFolderSettings = settings.deleteManagedFolderSettings.toBuilder(); getManagedFolderSettings = settings.getManagedFolderSettings.toBuilder(); listManagedFoldersSettings = settings.listManagedFoldersSettings.toBuilder(); + createAnywhereCacheSettings = settings.createAnywhereCacheSettings.toBuilder(); + createAnywhereCacheOperationSettings = + settings.createAnywhereCacheOperationSettings.toBuilder(); + updateAnywhereCacheSettings = settings.updateAnywhereCacheSettings.toBuilder(); + updateAnywhereCacheOperationSettings = + settings.updateAnywhereCacheOperationSettings.toBuilder(); + disableAnywhereCacheSettings = settings.disableAnywhereCacheSettings.toBuilder(); + pauseAnywhereCacheSettings = settings.pauseAnywhereCacheSettings.toBuilder(); + resumeAnywhereCacheSettings = settings.resumeAnywhereCacheSettings.toBuilder(); + getAnywhereCacheSettings = settings.getAnywhereCacheSettings.toBuilder(); + listAnywhereCachesSettings = settings.listAnywhereCachesSettings.toBuilder(); + getProjectIntelligenceConfigSettings = + settings.getProjectIntelligenceConfigSettings.toBuilder(); + updateProjectIntelligenceConfigSettings = + settings.updateProjectIntelligenceConfigSettings.toBuilder(); + getFolderIntelligenceConfigSettings = + settings.getFolderIntelligenceConfigSettings.toBuilder(); + updateFolderIntelligenceConfigSettings = + settings.updateFolderIntelligenceConfigSettings.toBuilder(); + getOrganizationIntelligenceConfigSettings = + settings.getOrganizationIntelligenceConfigSettings.toBuilder(); + updateOrganizationIntelligenceConfigSettings = + settings.updateOrganizationIntelligenceConfigSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -571,7 +884,20 @@ protected Builder(StorageControlStubSettings settings) { createManagedFolderSettings, deleteManagedFolderSettings, getManagedFolderSettings, - listManagedFoldersSettings); + listManagedFoldersSettings, + createAnywhereCacheSettings, + updateAnywhereCacheSettings, + disableAnywhereCacheSettings, + pauseAnywhereCacheSettings, + resumeAnywhereCacheSettings, + getAnywhereCacheSettings, + listAnywhereCachesSettings, + getProjectIntelligenceConfigSettings, + updateProjectIntelligenceConfigSettings, + getFolderIntelligenceConfigSettings, + updateFolderIntelligenceConfigSettings, + getOrganizationIntelligenceConfigSettings, + updateOrganizationIntelligenceConfigSettings); } private static Builder createDefault() { @@ -589,8 +915,8 @@ private static Builder createDefault() { private static Builder initDefaults(Builder builder) { builder .createFolderSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); builder .deleteFolderSettings() @@ -637,6 +963,71 @@ 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 + .createAnywhereCacheSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateAnywhereCacheSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .disableAnywhereCacheSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .pauseAnywhereCacheSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .resumeAnywhereCacheSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getAnywhereCacheSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listAnywhereCachesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getProjectIntelligenceConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateProjectIntelligenceConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getFolderIntelligenceConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateFolderIntelligenceConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getOrganizationIntelligenceConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateOrganizationIntelligenceConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder .renameFolderOperationSettings() .setInitialCallSettings( @@ -661,6 +1052,56 @@ private static Builder initDefaults(Builder builder) { .setTotalTimeoutDuration(Duration.ofMillis(300000L)) .build())); + builder + .createAnywhereCacheOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(AnywhereCache.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + CreateAnywhereCacheMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + + builder + .updateAnywhereCacheOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(AnywhereCache.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + UpdateAnywhereCacheMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelayDuration(Duration.ofMillis(45000L)) + .setInitialRpcTimeoutDuration(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ZERO) + .setTotalTimeoutDuration(Duration.ofMillis(300000L)) + .build())); + return builder; } @@ -743,6 +1184,102 @@ public UnaryCallSettings.Builder renameFolderSet return listManagedFoldersSettings; } + /** Returns the builder for the settings used for calls to createAnywhereCache. */ + public UnaryCallSettings.Builder + createAnywhereCacheSettings() { + return createAnywhereCacheSettings; + } + + /** Returns the builder for the settings used for calls to createAnywhereCache. */ + public OperationCallSettings.Builder< + CreateAnywhereCacheRequest, AnywhereCache, CreateAnywhereCacheMetadata> + createAnywhereCacheOperationSettings() { + return createAnywhereCacheOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateAnywhereCache. */ + public UnaryCallSettings.Builder + updateAnywhereCacheSettings() { + return updateAnywhereCacheSettings; + } + + /** Returns the builder for the settings used for calls to updateAnywhereCache. */ + public OperationCallSettings.Builder< + UpdateAnywhereCacheRequest, AnywhereCache, UpdateAnywhereCacheMetadata> + updateAnywhereCacheOperationSettings() { + return updateAnywhereCacheOperationSettings; + } + + /** Returns the builder for the settings used for calls to disableAnywhereCache. */ + public UnaryCallSettings.Builder + disableAnywhereCacheSettings() { + return disableAnywhereCacheSettings; + } + + /** Returns the builder for the settings used for calls to pauseAnywhereCache. */ + public UnaryCallSettings.Builder + pauseAnywhereCacheSettings() { + return pauseAnywhereCacheSettings; + } + + /** Returns the builder for the settings used for calls to resumeAnywhereCache. */ + public UnaryCallSettings.Builder + resumeAnywhereCacheSettings() { + return resumeAnywhereCacheSettings; + } + + /** Returns the builder for the settings used for calls to getAnywhereCache. */ + public UnaryCallSettings.Builder + getAnywhereCacheSettings() { + return getAnywhereCacheSettings; + } + + /** Returns the builder for the settings used for calls to listAnywhereCaches. */ + public PagedCallSettings.Builder< + ListAnywhereCachesRequest, ListAnywhereCachesResponse, ListAnywhereCachesPagedResponse> + listAnywhereCachesSettings() { + return listAnywhereCachesSettings; + } + + /** Returns the builder for the settings used for calls to getProjectIntelligenceConfig. */ + public UnaryCallSettings.Builder + getProjectIntelligenceConfigSettings() { + return getProjectIntelligenceConfigSettings; + } + + /** Returns the builder for the settings used for calls to updateProjectIntelligenceConfig. */ + public UnaryCallSettings.Builder + updateProjectIntelligenceConfigSettings() { + return updateProjectIntelligenceConfigSettings; + } + + /** Returns the builder for the settings used for calls to getFolderIntelligenceConfig. */ + public UnaryCallSettings.Builder + getFolderIntelligenceConfigSettings() { + return getFolderIntelligenceConfigSettings; + } + + /** Returns the builder for the settings used for calls to updateFolderIntelligenceConfig. */ + public UnaryCallSettings.Builder + updateFolderIntelligenceConfigSettings() { + return updateFolderIntelligenceConfigSettings; + } + + /** Returns the builder for the settings used for calls to getOrganizationIntelligenceConfig. */ + public UnaryCallSettings.Builder + getOrganizationIntelligenceConfigSettings() { + return getOrganizationIntelligenceConfigSettings; + } + + /** + * Returns the builder for the settings used for calls to updateOrganizationIntelligenceConfig. + */ + public UnaryCallSettings.Builder< + UpdateOrganizationIntelligenceConfigRequest, IntelligenceConfig> + updateOrganizationIntelligenceConfigSettings() { + return updateOrganizationIntelligenceConfigSettings; + } + @Override public StorageControlStubSettings build() throws IOException { return new StorageControlStubSettings(this); diff --git a/google-cloud-storage-control/src/main/resources/META-INF/native-image/com.google.storage.control.v2/reflect-config.json b/google-cloud-storage-control/src/main/resources/META-INF/native-image/com.google.storage.control.v2/reflect-config.json index 93efae7757..fddda0a6dd 100644 --- a/google-cloud-storage-control/src/main/resources/META-INF/native-image/com.google.storage.control.v2/reflect-config.json +++ b/google-cloud-storage-control/src/main/resources/META-INF/native-image/com.google.storage.control.v2/reflect-config.json @@ -1421,6 +1421,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.protobuf.FieldMask", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.protobuf.FieldMask$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.protobuf.Timestamp", "queryAllDeclaredConstructors": true, @@ -1457,6 +1475,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.storage.control.v2.AnywhereCache", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.AnywhereCache$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.storage.control.v2.CommonLongRunningOperationMetadata", "queryAllDeclaredConstructors": true, @@ -1475,6 +1511,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.storage.control.v2.CreateAnywhereCacheMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.CreateAnywhereCacheMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.CreateAnywhereCacheRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.CreateAnywhereCacheRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.storage.control.v2.CreateFolderRequest", "queryAllDeclaredConstructors": true, @@ -1547,6 +1619,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.storage.control.v2.DisableAnywhereCacheRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.DisableAnywhereCacheRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.storage.control.v2.Folder", "queryAllDeclaredConstructors": true, @@ -1565,6 +1655,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.storage.control.v2.GetAnywhereCacheRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.GetAnywhereCacheRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.GetFolderIntelligenceConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.GetFolderIntelligenceConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.storage.control.v2.GetFolderRequest", "queryAllDeclaredConstructors": true, @@ -1601,6 +1727,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.GetProjectIntelligenceConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.GetProjectIntelligenceConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.storage.control.v2.GetStorageLayoutRequest", "queryAllDeclaredConstructors": true, @@ -1619,6 +1781,168 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.storage.control.v2.IntelligenceConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.IntelligenceConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.IntelligenceConfig$EditionConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.IntelligenceConfig$EffectiveIntelligenceConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.IntelligenceConfig$EffectiveIntelligenceConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.IntelligenceConfig$EffectiveIntelligenceConfig$EffectiveEdition", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.IntelligenceConfig$Filter", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.IntelligenceConfig$Filter$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.IntelligenceConfig$Filter$CloudStorageBuckets", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.IntelligenceConfig$Filter$CloudStorageBuckets$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.IntelligenceConfig$Filter$CloudStorageLocations", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.IntelligenceConfig$Filter$CloudStorageLocations$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.IntelligenceConfig$TrialConfig", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.IntelligenceConfig$TrialConfig$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.ListAnywhereCachesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.ListAnywhereCachesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.ListAnywhereCachesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.ListAnywhereCachesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.storage.control.v2.ListFoldersRequest", "queryAllDeclaredConstructors": true, @@ -1709,6 +2033,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.storage.control.v2.PauseAnywhereCacheRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.PauseAnywhereCacheRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.storage.control.v2.PendingRenameInfo", "queryAllDeclaredConstructors": true, @@ -1763,6 +2105,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.storage.control.v2.ResumeAnywhereCacheRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.ResumeAnywhereCacheRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.storage.control.v2.StorageLayout", "queryAllDeclaredConstructors": true, @@ -1816,5 +2176,95 @@ "allPublicMethods": true, "allDeclaredClasses": true, "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.UpdateAnywhereCacheMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.UpdateAnywhereCacheMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.UpdateAnywhereCacheRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.UpdateAnywhereCacheRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true } ] \ No newline at end of file diff --git a/google-cloud-storage-control/src/main/resources/com/google/storage/control/v2/gapic_metadata.json b/google-cloud-storage-control/src/main/resources/com/google/storage/control/v2/gapic_metadata.json index d2d8f4700a..308c596131 100644 --- a/google-cloud-storage-control/src/main/resources/com/google/storage/control/v2/gapic_metadata.json +++ b/google-cloud-storage-control/src/main/resources/com/google/storage/control/v2/gapic_metadata.json @@ -10,6 +10,9 @@ "grpc": { "libraryClient": "StorageControlClient", "rpcs": { + "CreateAnywhereCache": { + "methods": ["createAnywhereCacheAsync", "createAnywhereCacheAsync", "createAnywhereCacheAsync", "createAnywhereCacheOperationCallable", "createAnywhereCacheCallable"] + }, "CreateFolder": { "methods": ["createFolder", "createFolder", "createFolder", "createFolderCallable"] }, @@ -22,23 +25,59 @@ "DeleteManagedFolder": { "methods": ["deleteManagedFolder", "deleteManagedFolder", "deleteManagedFolder", "deleteManagedFolderCallable"] }, + "DisableAnywhereCache": { + "methods": ["disableAnywhereCache", "disableAnywhereCache", "disableAnywhereCache", "disableAnywhereCacheCallable"] + }, + "GetAnywhereCache": { + "methods": ["getAnywhereCache", "getAnywhereCache", "getAnywhereCache", "getAnywhereCacheCallable"] + }, "GetFolder": { "methods": ["getFolder", "getFolder", "getFolder", "getFolderCallable"] }, + "GetFolderIntelligenceConfig": { + "methods": ["getFolderIntelligenceConfig", "getFolderIntelligenceConfig", "getFolderIntelligenceConfig", "getFolderIntelligenceConfigCallable"] + }, "GetManagedFolder": { "methods": ["getManagedFolder", "getManagedFolder", "getManagedFolder", "getManagedFolderCallable"] }, + "GetOrganizationIntelligenceConfig": { + "methods": ["getOrganizationIntelligenceConfig", "getOrganizationIntelligenceConfig", "getOrganizationIntelligenceConfig", "getOrganizationIntelligenceConfigCallable"] + }, + "GetProjectIntelligenceConfig": { + "methods": ["getProjectIntelligenceConfig", "getProjectIntelligenceConfig", "getProjectIntelligenceConfig", "getProjectIntelligenceConfigCallable"] + }, "GetStorageLayout": { "methods": ["getStorageLayout", "getStorageLayout", "getStorageLayout", "getStorageLayoutCallable"] }, + "ListAnywhereCaches": { + "methods": ["listAnywhereCaches", "listAnywhereCaches", "listAnywhereCaches", "listAnywhereCachesPagedCallable", "listAnywhereCachesCallable"] + }, "ListFolders": { "methods": ["listFolders", "listFolders", "listFolders", "listFoldersPagedCallable", "listFoldersCallable"] }, "ListManagedFolders": { "methods": ["listManagedFolders", "listManagedFolders", "listManagedFolders", "listManagedFoldersPagedCallable", "listManagedFoldersCallable"] }, + "PauseAnywhereCache": { + "methods": ["pauseAnywhereCache", "pauseAnywhereCache", "pauseAnywhereCache", "pauseAnywhereCacheCallable"] + }, "RenameFolder": { "methods": ["renameFolderAsync", "renameFolderAsync", "renameFolderAsync", "renameFolderOperationCallable", "renameFolderCallable"] + }, + "ResumeAnywhereCache": { + "methods": ["resumeAnywhereCache", "resumeAnywhereCache", "resumeAnywhereCache", "resumeAnywhereCacheCallable"] + }, + "UpdateAnywhereCache": { + "methods": ["updateAnywhereCacheAsync", "updateAnywhereCacheAsync", "updateAnywhereCacheOperationCallable", "updateAnywhereCacheCallable"] + }, + "UpdateFolderIntelligenceConfig": { + "methods": ["updateFolderIntelligenceConfig", "updateFolderIntelligenceConfig", "updateFolderIntelligenceConfigCallable"] + }, + "UpdateOrganizationIntelligenceConfig": { + "methods": ["updateOrganizationIntelligenceConfig", "updateOrganizationIntelligenceConfig", "updateOrganizationIntelligenceConfigCallable"] + }, + "UpdateProjectIntelligenceConfig": { + "methods": ["updateProjectIntelligenceConfig", "updateProjectIntelligenceConfig", "updateProjectIntelligenceConfigCallable"] } } } diff --git a/google-cloud-storage-control/src/test/java/com/google/storage/control/v2/MockStorageControlImpl.java b/google-cloud-storage-control/src/test/java/com/google/storage/control/v2/MockStorageControlImpl.java index 00148d02e6..e98b47a499 100644 --- a/google-cloud-storage-control/src/test/java/com/google/storage/control/v2/MockStorageControlImpl.java +++ b/google-cloud-storage-control/src/test/java/com/google/storage/control/v2/MockStorageControlImpl.java @@ -267,4 +267,291 @@ public void listManagedFolders( Exception.class.getName()))); } } + + @Override + public void createAnywhereCache( + CreateAnywhereCacheRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateAnywhereCache, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateAnywhereCache( + UpdateAnywhereCacheRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UpdateAnywhereCache, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void disableAnywhereCache( + DisableAnywhereCacheRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AnywhereCache) { + requests.add(request); + responseObserver.onNext(((AnywhereCache) 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 DisableAnywhereCache, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + AnywhereCache.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void pauseAnywhereCache( + PauseAnywhereCacheRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AnywhereCache) { + requests.add(request); + responseObserver.onNext(((AnywhereCache) 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 PauseAnywhereCache, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AnywhereCache.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void resumeAnywhereCache( + ResumeAnywhereCacheRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AnywhereCache) { + requests.add(request); + responseObserver.onNext(((AnywhereCache) 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 ResumeAnywhereCache, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AnywhereCache.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getAnywhereCache( + GetAnywhereCacheRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof AnywhereCache) { + requests.add(request); + responseObserver.onNext(((AnywhereCache) 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 GetAnywhereCache, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + AnywhereCache.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listAnywhereCaches( + ListAnywhereCachesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAnywhereCachesResponse) { + requests.add(request); + responseObserver.onNext(((ListAnywhereCachesResponse) 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 ListAnywhereCaches, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListAnywhereCachesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getProjectIntelligenceConfig( + GetProjectIntelligenceConfigRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof IntelligenceConfig) { + requests.add(request); + responseObserver.onNext(((IntelligenceConfig) 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 GetProjectIntelligenceConfig, expected" + + " %s or %s", + response == null ? "null" : response.getClass().getName(), + IntelligenceConfig.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateProjectIntelligenceConfig( + UpdateProjectIntelligenceConfigRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof IntelligenceConfig) { + requests.add(request); + responseObserver.onNext(((IntelligenceConfig) 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 UpdateProjectIntelligenceConfig," + + " expected %s or %s", + response == null ? "null" : response.getClass().getName(), + IntelligenceConfig.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getFolderIntelligenceConfig( + GetFolderIntelligenceConfigRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof IntelligenceConfig) { + requests.add(request); + responseObserver.onNext(((IntelligenceConfig) 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 GetFolderIntelligenceConfig, expected" + + " %s or %s", + response == null ? "null" : response.getClass().getName(), + IntelligenceConfig.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateFolderIntelligenceConfig( + UpdateFolderIntelligenceConfigRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof IntelligenceConfig) { + requests.add(request); + responseObserver.onNext(((IntelligenceConfig) 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 UpdateFolderIntelligenceConfig," + + " expected %s or %s", + response == null ? "null" : response.getClass().getName(), + IntelligenceConfig.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getOrganizationIntelligenceConfig( + GetOrganizationIntelligenceConfigRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof IntelligenceConfig) { + requests.add(request); + responseObserver.onNext(((IntelligenceConfig) 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 GetOrganizationIntelligenceConfig," + + " expected %s or %s", + response == null ? "null" : response.getClass().getName(), + IntelligenceConfig.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateOrganizationIntelligenceConfig( + UpdateOrganizationIntelligenceConfigRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof IntelligenceConfig) { + requests.add(request); + responseObserver.onNext(((IntelligenceConfig) 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 UpdateOrganizationIntelligenceConfig," + + " expected %s or %s", + response == null ? "null" : response.getClass().getName(), + IntelligenceConfig.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/google-cloud-storage-control/src/test/java/com/google/storage/control/v2/StorageControlClientTest.java b/google-cloud-storage-control/src/test/java/com/google/storage/control/v2/StorageControlClientTest.java index 8d5b8778f0..a0ab3fe3dd 100644 --- a/google-cloud-storage-control/src/test/java/com/google/storage/control/v2/StorageControlClientTest.java +++ b/google-cloud-storage-control/src/test/java/com/google/storage/control/v2/StorageControlClientTest.java @@ -16,6 +16,7 @@ package com.google.storage.control.v2; +import static com.google.storage.control.v2.StorageControlClient.ListAnywhereCachesPagedResponse; import static com.google.storage.control.v2.StorageControlClient.ListFoldersPagedResponse; import static com.google.storage.control.v2.StorageControlClient.ListManagedFoldersPagedResponse; @@ -31,7 +32,9 @@ import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; import com.google.protobuf.Any; +import com.google.protobuf.Duration; import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; import com.google.protobuf.Timestamp; import io.grpc.StatusRuntimeException; import java.io.IOException; @@ -944,4 +947,1040 @@ public void listManagedFoldersExceptionTest2() throws Exception { // Expected exception. } } + + @Test + public void createAnywhereCacheTest() throws Exception { + AnywhereCache expectedResponse = + AnywhereCache.newBuilder() + .setName(AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString()) + .setZone("zone3744684") + .setTtl(Duration.newBuilder().build()) + .setAdmissionPolicy("admissionPolicy-1063600485") + .setState("state109757585") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setPendingUpdate(true) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAnywhereCacheTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockStorageControl.addResponse(resultOperation); + + BucketName parent = BucketName.of("[PROJECT]", "[BUCKET]"); + AnywhereCache anywhereCache = AnywhereCache.newBuilder().build(); + + AnywhereCache actualResponse = client.createAnywhereCacheAsync(parent, anywhereCache).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStorageControl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAnywhereCacheRequest actualRequest = ((CreateAnywhereCacheRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(anywhereCache, actualRequest.getAnywhereCache()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAnywhereCacheExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStorageControl.addException(exception); + + try { + BucketName parent = BucketName.of("[PROJECT]", "[BUCKET]"); + AnywhereCache anywhereCache = AnywhereCache.newBuilder().build(); + client.createAnywhereCacheAsync(parent, anywhereCache).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void createAnywhereCacheTest2() throws Exception { + AnywhereCache expectedResponse = + AnywhereCache.newBuilder() + .setName(AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString()) + .setZone("zone3744684") + .setTtl(Duration.newBuilder().build()) + .setAdmissionPolicy("admissionPolicy-1063600485") + .setState("state109757585") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setPendingUpdate(true) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createAnywhereCacheTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockStorageControl.addResponse(resultOperation); + + String parent = "parent-995424086"; + AnywhereCache anywhereCache = AnywhereCache.newBuilder().build(); + + AnywhereCache actualResponse = client.createAnywhereCacheAsync(parent, anywhereCache).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStorageControl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateAnywhereCacheRequest actualRequest = ((CreateAnywhereCacheRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(anywhereCache, actualRequest.getAnywhereCache()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAnywhereCacheExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStorageControl.addException(exception); + + try { + String parent = "parent-995424086"; + AnywhereCache anywhereCache = AnywhereCache.newBuilder().build(); + client.createAnywhereCacheAsync(parent, anywhereCache).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void updateAnywhereCacheTest() throws Exception { + AnywhereCache expectedResponse = + AnywhereCache.newBuilder() + .setName(AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString()) + .setZone("zone3744684") + .setTtl(Duration.newBuilder().build()) + .setAdmissionPolicy("admissionPolicy-1063600485") + .setState("state109757585") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setPendingUpdate(true) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateAnywhereCacheTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockStorageControl.addResponse(resultOperation); + + AnywhereCache anywhereCache = AnywhereCache.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + AnywhereCache actualResponse = client.updateAnywhereCacheAsync(anywhereCache, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStorageControl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateAnywhereCacheRequest actualRequest = ((UpdateAnywhereCacheRequest) actualRequests.get(0)); + + Assert.assertEquals(anywhereCache, actualRequest.getAnywhereCache()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateAnywhereCacheExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStorageControl.addException(exception); + + try { + AnywhereCache anywhereCache = AnywhereCache.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateAnywhereCacheAsync(anywhereCache, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void disableAnywhereCacheTest() throws Exception { + AnywhereCache expectedResponse = + AnywhereCache.newBuilder() + .setName(AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString()) + .setZone("zone3744684") + .setTtl(Duration.newBuilder().build()) + .setAdmissionPolicy("admissionPolicy-1063600485") + .setState("state109757585") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setPendingUpdate(true) + .build(); + mockStorageControl.addResponse(expectedResponse); + + AnywhereCacheName name = AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]"); + + AnywhereCache actualResponse = client.disableAnywhereCache(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStorageControl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DisableAnywhereCacheRequest actualRequest = + ((DisableAnywhereCacheRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void disableAnywhereCacheExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStorageControl.addException(exception); + + try { + AnywhereCacheName name = AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]"); + client.disableAnywhereCache(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void disableAnywhereCacheTest2() throws Exception { + AnywhereCache expectedResponse = + AnywhereCache.newBuilder() + .setName(AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString()) + .setZone("zone3744684") + .setTtl(Duration.newBuilder().build()) + .setAdmissionPolicy("admissionPolicy-1063600485") + .setState("state109757585") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setPendingUpdate(true) + .build(); + mockStorageControl.addResponse(expectedResponse); + + String name = "name3373707"; + + AnywhereCache actualResponse = client.disableAnywhereCache(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStorageControl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DisableAnywhereCacheRequest actualRequest = + ((DisableAnywhereCacheRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void disableAnywhereCacheExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStorageControl.addException(exception); + + try { + String name = "name3373707"; + client.disableAnywhereCache(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void pauseAnywhereCacheTest() throws Exception { + AnywhereCache expectedResponse = + AnywhereCache.newBuilder() + .setName(AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString()) + .setZone("zone3744684") + .setTtl(Duration.newBuilder().build()) + .setAdmissionPolicy("admissionPolicy-1063600485") + .setState("state109757585") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setPendingUpdate(true) + .build(); + mockStorageControl.addResponse(expectedResponse); + + AnywhereCacheName name = AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]"); + + AnywhereCache actualResponse = client.pauseAnywhereCache(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStorageControl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PauseAnywhereCacheRequest actualRequest = ((PauseAnywhereCacheRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void pauseAnywhereCacheExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStorageControl.addException(exception); + + try { + AnywhereCacheName name = AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]"); + client.pauseAnywhereCache(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void pauseAnywhereCacheTest2() throws Exception { + AnywhereCache expectedResponse = + AnywhereCache.newBuilder() + .setName(AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString()) + .setZone("zone3744684") + .setTtl(Duration.newBuilder().build()) + .setAdmissionPolicy("admissionPolicy-1063600485") + .setState("state109757585") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setPendingUpdate(true) + .build(); + mockStorageControl.addResponse(expectedResponse); + + String name = "name3373707"; + + AnywhereCache actualResponse = client.pauseAnywhereCache(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStorageControl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PauseAnywhereCacheRequest actualRequest = ((PauseAnywhereCacheRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void pauseAnywhereCacheExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStorageControl.addException(exception); + + try { + String name = "name3373707"; + client.pauseAnywhereCache(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void resumeAnywhereCacheTest() throws Exception { + AnywhereCache expectedResponse = + AnywhereCache.newBuilder() + .setName(AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString()) + .setZone("zone3744684") + .setTtl(Duration.newBuilder().build()) + .setAdmissionPolicy("admissionPolicy-1063600485") + .setState("state109757585") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setPendingUpdate(true) + .build(); + mockStorageControl.addResponse(expectedResponse); + + AnywhereCacheName name = AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]"); + + AnywhereCache actualResponse = client.resumeAnywhereCache(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStorageControl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ResumeAnywhereCacheRequest actualRequest = ((ResumeAnywhereCacheRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void resumeAnywhereCacheExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStorageControl.addException(exception); + + try { + AnywhereCacheName name = AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]"); + client.resumeAnywhereCache(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void resumeAnywhereCacheTest2() throws Exception { + AnywhereCache expectedResponse = + AnywhereCache.newBuilder() + .setName(AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString()) + .setZone("zone3744684") + .setTtl(Duration.newBuilder().build()) + .setAdmissionPolicy("admissionPolicy-1063600485") + .setState("state109757585") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setPendingUpdate(true) + .build(); + mockStorageControl.addResponse(expectedResponse); + + String name = "name3373707"; + + AnywhereCache actualResponse = client.resumeAnywhereCache(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStorageControl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ResumeAnywhereCacheRequest actualRequest = ((ResumeAnywhereCacheRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void resumeAnywhereCacheExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStorageControl.addException(exception); + + try { + String name = "name3373707"; + client.resumeAnywhereCache(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAnywhereCacheTest() throws Exception { + AnywhereCache expectedResponse = + AnywhereCache.newBuilder() + .setName(AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString()) + .setZone("zone3744684") + .setTtl(Duration.newBuilder().build()) + .setAdmissionPolicy("admissionPolicy-1063600485") + .setState("state109757585") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setPendingUpdate(true) + .build(); + mockStorageControl.addResponse(expectedResponse); + + AnywhereCacheName name = AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]"); + + AnywhereCache actualResponse = client.getAnywhereCache(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStorageControl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAnywhereCacheRequest actualRequest = ((GetAnywhereCacheRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAnywhereCacheExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStorageControl.addException(exception); + + try { + AnywhereCacheName name = AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]"); + client.getAnywhereCache(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAnywhereCacheTest2() throws Exception { + AnywhereCache expectedResponse = + AnywhereCache.newBuilder() + .setName(AnywhereCacheName.of("[PROJECT]", "[BUCKET]", "[ANYWHERE_CACHE]").toString()) + .setZone("zone3744684") + .setTtl(Duration.newBuilder().build()) + .setAdmissionPolicy("admissionPolicy-1063600485") + .setState("state109757585") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setPendingUpdate(true) + .build(); + mockStorageControl.addResponse(expectedResponse); + + String name = "name3373707"; + + AnywhereCache actualResponse = client.getAnywhereCache(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStorageControl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetAnywhereCacheRequest actualRequest = ((GetAnywhereCacheRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAnywhereCacheExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStorageControl.addException(exception); + + try { + String name = "name3373707"; + client.getAnywhereCache(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAnywhereCachesTest() throws Exception { + AnywhereCache responsesElement = AnywhereCache.newBuilder().build(); + ListAnywhereCachesResponse expectedResponse = + ListAnywhereCachesResponse.newBuilder() + .setNextPageToken("") + .addAllAnywhereCaches(Arrays.asList(responsesElement)) + .build(); + mockStorageControl.addResponse(expectedResponse); + + BucketName parent = BucketName.of("[PROJECT]", "[BUCKET]"); + + ListAnywhereCachesPagedResponse pagedListResponse = client.listAnywhereCaches(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAnywhereCachesList().get(0), resources.get(0)); + + List actualRequests = mockStorageControl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAnywhereCachesRequest actualRequest = ((ListAnywhereCachesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAnywhereCachesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStorageControl.addException(exception); + + try { + BucketName parent = BucketName.of("[PROJECT]", "[BUCKET]"); + client.listAnywhereCaches(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAnywhereCachesTest2() throws Exception { + AnywhereCache responsesElement = AnywhereCache.newBuilder().build(); + ListAnywhereCachesResponse expectedResponse = + ListAnywhereCachesResponse.newBuilder() + .setNextPageToken("") + .addAllAnywhereCaches(Arrays.asList(responsesElement)) + .build(); + mockStorageControl.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAnywhereCachesPagedResponse pagedListResponse = client.listAnywhereCaches(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAnywhereCachesList().get(0), resources.get(0)); + + List actualRequests = mockStorageControl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAnywhereCachesRequest actualRequest = ((ListAnywhereCachesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAnywhereCachesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStorageControl.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAnywhereCaches(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProjectIntelligenceConfigTest() throws Exception { + IntelligenceConfig expectedResponse = + IntelligenceConfig.newBuilder() + .setName( + IntelligenceConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setFilter(IntelligenceConfig.Filter.newBuilder().build()) + .setEffectiveIntelligenceConfig( + IntelligenceConfig.EffectiveIntelligenceConfig.newBuilder().build()) + .setTrialConfig(IntelligenceConfig.TrialConfig.newBuilder().build()) + .build(); + mockStorageControl.addResponse(expectedResponse); + + IntelligenceConfigName name = + IntelligenceConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]"); + + IntelligenceConfig actualResponse = client.getProjectIntelligenceConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStorageControl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProjectIntelligenceConfigRequest actualRequest = + ((GetProjectIntelligenceConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProjectIntelligenceConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStorageControl.addException(exception); + + try { + IntelligenceConfigName name = + IntelligenceConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]"); + client.getProjectIntelligenceConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getProjectIntelligenceConfigTest2() throws Exception { + IntelligenceConfig expectedResponse = + IntelligenceConfig.newBuilder() + .setName( + IntelligenceConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setFilter(IntelligenceConfig.Filter.newBuilder().build()) + .setEffectiveIntelligenceConfig( + IntelligenceConfig.EffectiveIntelligenceConfig.newBuilder().build()) + .setTrialConfig(IntelligenceConfig.TrialConfig.newBuilder().build()) + .build(); + mockStorageControl.addResponse(expectedResponse); + + String name = "name3373707"; + + IntelligenceConfig actualResponse = client.getProjectIntelligenceConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStorageControl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetProjectIntelligenceConfigRequest actualRequest = + ((GetProjectIntelligenceConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getProjectIntelligenceConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStorageControl.addException(exception); + + try { + String name = "name3373707"; + client.getProjectIntelligenceConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateProjectIntelligenceConfigTest() throws Exception { + IntelligenceConfig expectedResponse = + IntelligenceConfig.newBuilder() + .setName( + IntelligenceConfigName.ofProjectLocationName("[PROJECT]", "[LOCATION]").toString()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setFilter(IntelligenceConfig.Filter.newBuilder().build()) + .setEffectiveIntelligenceConfig( + IntelligenceConfig.EffectiveIntelligenceConfig.newBuilder().build()) + .setTrialConfig(IntelligenceConfig.TrialConfig.newBuilder().build()) + .build(); + mockStorageControl.addResponse(expectedResponse); + + IntelligenceConfig intelligenceConfig = IntelligenceConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + IntelligenceConfig actualResponse = + client.updateProjectIntelligenceConfig(intelligenceConfig, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStorageControl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateProjectIntelligenceConfigRequest actualRequest = + ((UpdateProjectIntelligenceConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(intelligenceConfig, actualRequest.getIntelligenceConfig()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateProjectIntelligenceConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStorageControl.addException(exception); + + try { + IntelligenceConfig intelligenceConfig = IntelligenceConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateProjectIntelligenceConfig(intelligenceConfig, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFolderIntelligenceConfigTest() throws Exception { + IntelligenceConfig expectedResponse = + IntelligenceConfig.newBuilder() + .setName( + IntelligenceConfigName.ofFolderLocationName("[FOLDER]", "[LOCATION]").toString()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setFilter(IntelligenceConfig.Filter.newBuilder().build()) + .setEffectiveIntelligenceConfig( + IntelligenceConfig.EffectiveIntelligenceConfig.newBuilder().build()) + .setTrialConfig(IntelligenceConfig.TrialConfig.newBuilder().build()) + .build(); + mockStorageControl.addResponse(expectedResponse); + + IntelligenceConfigName name = + IntelligenceConfigName.ofFolderLocationName("[FOLDER]", "[LOCATION]"); + + IntelligenceConfig actualResponse = client.getFolderIntelligenceConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStorageControl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetFolderIntelligenceConfigRequest actualRequest = + ((GetFolderIntelligenceConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getFolderIntelligenceConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStorageControl.addException(exception); + + try { + IntelligenceConfigName name = + IntelligenceConfigName.ofFolderLocationName("[FOLDER]", "[LOCATION]"); + client.getFolderIntelligenceConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getFolderIntelligenceConfigTest2() throws Exception { + IntelligenceConfig expectedResponse = + IntelligenceConfig.newBuilder() + .setName( + IntelligenceConfigName.ofFolderLocationName("[FOLDER]", "[LOCATION]").toString()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setFilter(IntelligenceConfig.Filter.newBuilder().build()) + .setEffectiveIntelligenceConfig( + IntelligenceConfig.EffectiveIntelligenceConfig.newBuilder().build()) + .setTrialConfig(IntelligenceConfig.TrialConfig.newBuilder().build()) + .build(); + mockStorageControl.addResponse(expectedResponse); + + String name = "name3373707"; + + IntelligenceConfig actualResponse = client.getFolderIntelligenceConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStorageControl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetFolderIntelligenceConfigRequest actualRequest = + ((GetFolderIntelligenceConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getFolderIntelligenceConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStorageControl.addException(exception); + + try { + String name = "name3373707"; + client.getFolderIntelligenceConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateFolderIntelligenceConfigTest() throws Exception { + IntelligenceConfig expectedResponse = + IntelligenceConfig.newBuilder() + .setName( + IntelligenceConfigName.ofFolderLocationName("[FOLDER]", "[LOCATION]").toString()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setFilter(IntelligenceConfig.Filter.newBuilder().build()) + .setEffectiveIntelligenceConfig( + IntelligenceConfig.EffectiveIntelligenceConfig.newBuilder().build()) + .setTrialConfig(IntelligenceConfig.TrialConfig.newBuilder().build()) + .build(); + mockStorageControl.addResponse(expectedResponse); + + IntelligenceConfig intelligenceConfig = IntelligenceConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + IntelligenceConfig actualResponse = + client.updateFolderIntelligenceConfig(intelligenceConfig, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStorageControl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateFolderIntelligenceConfigRequest actualRequest = + ((UpdateFolderIntelligenceConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(intelligenceConfig, actualRequest.getIntelligenceConfig()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateFolderIntelligenceConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStorageControl.addException(exception); + + try { + IntelligenceConfig intelligenceConfig = IntelligenceConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateFolderIntelligenceConfig(intelligenceConfig, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getOrganizationIntelligenceConfigTest() throws Exception { + IntelligenceConfig expectedResponse = + IntelligenceConfig.newBuilder() + .setName(IntelligenceConfigName.ofOrgLocationName("[ORG]", "[LOCATION]").toString()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setFilter(IntelligenceConfig.Filter.newBuilder().build()) + .setEffectiveIntelligenceConfig( + IntelligenceConfig.EffectiveIntelligenceConfig.newBuilder().build()) + .setTrialConfig(IntelligenceConfig.TrialConfig.newBuilder().build()) + .build(); + mockStorageControl.addResponse(expectedResponse); + + IntelligenceConfigName name = IntelligenceConfigName.ofOrgLocationName("[ORG]", "[LOCATION]"); + + IntelligenceConfig actualResponse = client.getOrganizationIntelligenceConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStorageControl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetOrganizationIntelligenceConfigRequest actualRequest = + ((GetOrganizationIntelligenceConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getOrganizationIntelligenceConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStorageControl.addException(exception); + + try { + IntelligenceConfigName name = IntelligenceConfigName.ofOrgLocationName("[ORG]", "[LOCATION]"); + client.getOrganizationIntelligenceConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getOrganizationIntelligenceConfigTest2() throws Exception { + IntelligenceConfig expectedResponse = + IntelligenceConfig.newBuilder() + .setName(IntelligenceConfigName.ofOrgLocationName("[ORG]", "[LOCATION]").toString()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setFilter(IntelligenceConfig.Filter.newBuilder().build()) + .setEffectiveIntelligenceConfig( + IntelligenceConfig.EffectiveIntelligenceConfig.newBuilder().build()) + .setTrialConfig(IntelligenceConfig.TrialConfig.newBuilder().build()) + .build(); + mockStorageControl.addResponse(expectedResponse); + + String name = "name3373707"; + + IntelligenceConfig actualResponse = client.getOrganizationIntelligenceConfig(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStorageControl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetOrganizationIntelligenceConfigRequest actualRequest = + ((GetOrganizationIntelligenceConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getOrganizationIntelligenceConfigExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStorageControl.addException(exception); + + try { + String name = "name3373707"; + client.getOrganizationIntelligenceConfig(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateOrganizationIntelligenceConfigTest() throws Exception { + IntelligenceConfig expectedResponse = + IntelligenceConfig.newBuilder() + .setName(IntelligenceConfigName.ofOrgLocationName("[ORG]", "[LOCATION]").toString()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setFilter(IntelligenceConfig.Filter.newBuilder().build()) + .setEffectiveIntelligenceConfig( + IntelligenceConfig.EffectiveIntelligenceConfig.newBuilder().build()) + .setTrialConfig(IntelligenceConfig.TrialConfig.newBuilder().build()) + .build(); + mockStorageControl.addResponse(expectedResponse); + + IntelligenceConfig intelligenceConfig = IntelligenceConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + IntelligenceConfig actualResponse = + client.updateOrganizationIntelligenceConfig(intelligenceConfig, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockStorageControl.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateOrganizationIntelligenceConfigRequest actualRequest = + ((UpdateOrganizationIntelligenceConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(intelligenceConfig, actualRequest.getIntelligenceConfig()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateOrganizationIntelligenceConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockStorageControl.addException(exception); + + try { + IntelligenceConfig intelligenceConfig = IntelligenceConfig.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateOrganizationIntelligenceConfig(intelligenceConfig, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/google-cloud-storage/src/main/java/com/google/cloud/storage/OpenTelemetryBootstrappingUtils.java b/google-cloud-storage/src/main/java/com/google/cloud/storage/OpenTelemetryBootstrappingUtils.java index b3eb4e90f2..53fea0b8b6 100644 --- a/google-cloud-storage/src/main/java/com/google/cloud/storage/OpenTelemetryBootstrappingUtils.java +++ b/google-cloud-storage/src/main/java/com/google/cloud/storage/OpenTelemetryBootstrappingUtils.java @@ -103,7 +103,8 @@ static ChannelConfigurator enableGrpcMetrics( detectedAttributes.get(AttributeKey.stringKey("cloud.account.id")); if (projectId == null && detectedProjectId == null) { log.warning( - "Unable to determine the Project ID in order to report metrics. No gRPC client metrics will be reported."); + "Unable to determine the Project ID in order to report metrics. No gRPC client metrics" + + " will be reported."); return channelConfigurator != null ? channelConfigurator : ChannelConfigurator.identity(); } diff --git a/grpc-google-cloud-storage-control-v2/clirr-ignored-differences.xml b/grpc-google-cloud-storage-control-v2/clirr-ignored-differences.xml index 255b634844..a38fb38be1 100644 --- a/grpc-google-cloud-storage-control-v2/clirr-ignored-differences.xml +++ b/grpc-google-cloud-storage-control-v2/clirr-ignored-differences.xml @@ -18,24 +18,10 @@ + 7012 - com/google/storage/control/v2/* - * deleteManagedFolder(*) + com/google/storage/control/v2/StorageControlGrpc$AsyncService + * *(*) - - 7012 - com/google/storage/control/v2/* - * createManagedFolder(*) - - - 7012 - com/google/storage/control/v2/* - * getManagedFolder(*) - - - 7012 - com/google/storage/control/v2/* - * listManagedFolders(*) - - \ No newline at end of file + diff --git a/grpc-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/StorageControlGrpc.java b/grpc-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/StorageControlGrpc.java index ec660b48e2..9903e7e136 100644 --- a/grpc-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/StorageControlGrpc.java +++ b/grpc-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/StorageControlGrpc.java @@ -485,6 +485,659 @@ private StorageControlGrpc() {} return getListManagedFoldersMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.storage.control.v2.CreateAnywhereCacheRequest, + com.google.longrunning.Operation> + getCreateAnywhereCacheMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateAnywhereCache", + requestType = com.google.storage.control.v2.CreateAnywhereCacheRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.storage.control.v2.CreateAnywhereCacheRequest, + com.google.longrunning.Operation> + getCreateAnywhereCacheMethod() { + io.grpc.MethodDescriptor< + com.google.storage.control.v2.CreateAnywhereCacheRequest, + com.google.longrunning.Operation> + getCreateAnywhereCacheMethod; + if ((getCreateAnywhereCacheMethod = StorageControlGrpc.getCreateAnywhereCacheMethod) == null) { + synchronized (StorageControlGrpc.class) { + if ((getCreateAnywhereCacheMethod = StorageControlGrpc.getCreateAnywhereCacheMethod) + == null) { + StorageControlGrpc.getCreateAnywhereCacheMethod = + getCreateAnywhereCacheMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateAnywhereCache")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storage.control.v2.CreateAnywhereCacheRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new StorageControlMethodDescriptorSupplier("CreateAnywhereCache")) + .build(); + } + } + } + return getCreateAnywhereCacheMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.storage.control.v2.UpdateAnywhereCacheRequest, + com.google.longrunning.Operation> + getUpdateAnywhereCacheMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateAnywhereCache", + requestType = com.google.storage.control.v2.UpdateAnywhereCacheRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.storage.control.v2.UpdateAnywhereCacheRequest, + com.google.longrunning.Operation> + getUpdateAnywhereCacheMethod() { + io.grpc.MethodDescriptor< + com.google.storage.control.v2.UpdateAnywhereCacheRequest, + com.google.longrunning.Operation> + getUpdateAnywhereCacheMethod; + if ((getUpdateAnywhereCacheMethod = StorageControlGrpc.getUpdateAnywhereCacheMethod) == null) { + synchronized (StorageControlGrpc.class) { + if ((getUpdateAnywhereCacheMethod = StorageControlGrpc.getUpdateAnywhereCacheMethod) + == null) { + StorageControlGrpc.getUpdateAnywhereCacheMethod = + getUpdateAnywhereCacheMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateAnywhereCache")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storage.control.v2.UpdateAnywhereCacheRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new StorageControlMethodDescriptorSupplier("UpdateAnywhereCache")) + .build(); + } + } + } + return getUpdateAnywhereCacheMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.storage.control.v2.DisableAnywhereCacheRequest, + com.google.storage.control.v2.AnywhereCache> + getDisableAnywhereCacheMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DisableAnywhereCache", + requestType = com.google.storage.control.v2.DisableAnywhereCacheRequest.class, + responseType = com.google.storage.control.v2.AnywhereCache.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.storage.control.v2.DisableAnywhereCacheRequest, + com.google.storage.control.v2.AnywhereCache> + getDisableAnywhereCacheMethod() { + io.grpc.MethodDescriptor< + com.google.storage.control.v2.DisableAnywhereCacheRequest, + com.google.storage.control.v2.AnywhereCache> + getDisableAnywhereCacheMethod; + if ((getDisableAnywhereCacheMethod = StorageControlGrpc.getDisableAnywhereCacheMethod) + == null) { + synchronized (StorageControlGrpc.class) { + if ((getDisableAnywhereCacheMethod = StorageControlGrpc.getDisableAnywhereCacheMethod) + == null) { + StorageControlGrpc.getDisableAnywhereCacheMethod = + getDisableAnywhereCacheMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DisableAnywhereCache")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storage.control.v2.DisableAnywhereCacheRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storage.control.v2.AnywhereCache.getDefaultInstance())) + .setSchemaDescriptor( + new StorageControlMethodDescriptorSupplier("DisableAnywhereCache")) + .build(); + } + } + } + return getDisableAnywhereCacheMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.storage.control.v2.PauseAnywhereCacheRequest, + com.google.storage.control.v2.AnywhereCache> + getPauseAnywhereCacheMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "PauseAnywhereCache", + requestType = com.google.storage.control.v2.PauseAnywhereCacheRequest.class, + responseType = com.google.storage.control.v2.AnywhereCache.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.storage.control.v2.PauseAnywhereCacheRequest, + com.google.storage.control.v2.AnywhereCache> + getPauseAnywhereCacheMethod() { + io.grpc.MethodDescriptor< + com.google.storage.control.v2.PauseAnywhereCacheRequest, + com.google.storage.control.v2.AnywhereCache> + getPauseAnywhereCacheMethod; + if ((getPauseAnywhereCacheMethod = StorageControlGrpc.getPauseAnywhereCacheMethod) == null) { + synchronized (StorageControlGrpc.class) { + if ((getPauseAnywhereCacheMethod = StorageControlGrpc.getPauseAnywhereCacheMethod) + == null) { + StorageControlGrpc.getPauseAnywhereCacheMethod = + getPauseAnywhereCacheMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PauseAnywhereCache")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storage.control.v2.PauseAnywhereCacheRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storage.control.v2.AnywhereCache.getDefaultInstance())) + .setSchemaDescriptor( + new StorageControlMethodDescriptorSupplier("PauseAnywhereCache")) + .build(); + } + } + } + return getPauseAnywhereCacheMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.storage.control.v2.ResumeAnywhereCacheRequest, + com.google.storage.control.v2.AnywhereCache> + getResumeAnywhereCacheMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ResumeAnywhereCache", + requestType = com.google.storage.control.v2.ResumeAnywhereCacheRequest.class, + responseType = com.google.storage.control.v2.AnywhereCache.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.storage.control.v2.ResumeAnywhereCacheRequest, + com.google.storage.control.v2.AnywhereCache> + getResumeAnywhereCacheMethod() { + io.grpc.MethodDescriptor< + com.google.storage.control.v2.ResumeAnywhereCacheRequest, + com.google.storage.control.v2.AnywhereCache> + getResumeAnywhereCacheMethod; + if ((getResumeAnywhereCacheMethod = StorageControlGrpc.getResumeAnywhereCacheMethod) == null) { + synchronized (StorageControlGrpc.class) { + if ((getResumeAnywhereCacheMethod = StorageControlGrpc.getResumeAnywhereCacheMethod) + == null) { + StorageControlGrpc.getResumeAnywhereCacheMethod = + getResumeAnywhereCacheMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ResumeAnywhereCache")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storage.control.v2.ResumeAnywhereCacheRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storage.control.v2.AnywhereCache.getDefaultInstance())) + .setSchemaDescriptor( + new StorageControlMethodDescriptorSupplier("ResumeAnywhereCache")) + .build(); + } + } + } + return getResumeAnywhereCacheMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.storage.control.v2.GetAnywhereCacheRequest, + com.google.storage.control.v2.AnywhereCache> + getGetAnywhereCacheMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAnywhereCache", + requestType = com.google.storage.control.v2.GetAnywhereCacheRequest.class, + responseType = com.google.storage.control.v2.AnywhereCache.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.storage.control.v2.GetAnywhereCacheRequest, + com.google.storage.control.v2.AnywhereCache> + getGetAnywhereCacheMethod() { + io.grpc.MethodDescriptor< + com.google.storage.control.v2.GetAnywhereCacheRequest, + com.google.storage.control.v2.AnywhereCache> + getGetAnywhereCacheMethod; + if ((getGetAnywhereCacheMethod = StorageControlGrpc.getGetAnywhereCacheMethod) == null) { + synchronized (StorageControlGrpc.class) { + if ((getGetAnywhereCacheMethod = StorageControlGrpc.getGetAnywhereCacheMethod) == null) { + StorageControlGrpc.getGetAnywhereCacheMethod = + getGetAnywhereCacheMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAnywhereCache")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storage.control.v2.GetAnywhereCacheRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storage.control.v2.AnywhereCache.getDefaultInstance())) + .setSchemaDescriptor( + new StorageControlMethodDescriptorSupplier("GetAnywhereCache")) + .build(); + } + } + } + return getGetAnywhereCacheMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.storage.control.v2.ListAnywhereCachesRequest, + com.google.storage.control.v2.ListAnywhereCachesResponse> + getListAnywhereCachesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAnywhereCaches", + requestType = com.google.storage.control.v2.ListAnywhereCachesRequest.class, + responseType = com.google.storage.control.v2.ListAnywhereCachesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.storage.control.v2.ListAnywhereCachesRequest, + com.google.storage.control.v2.ListAnywhereCachesResponse> + getListAnywhereCachesMethod() { + io.grpc.MethodDescriptor< + com.google.storage.control.v2.ListAnywhereCachesRequest, + com.google.storage.control.v2.ListAnywhereCachesResponse> + getListAnywhereCachesMethod; + if ((getListAnywhereCachesMethod = StorageControlGrpc.getListAnywhereCachesMethod) == null) { + synchronized (StorageControlGrpc.class) { + if ((getListAnywhereCachesMethod = StorageControlGrpc.getListAnywhereCachesMethod) + == null) { + StorageControlGrpc.getListAnywhereCachesMethod = + getListAnywhereCachesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAnywhereCaches")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storage.control.v2.ListAnywhereCachesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storage.control.v2.ListAnywhereCachesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new StorageControlMethodDescriptorSupplier("ListAnywhereCaches")) + .build(); + } + } + } + return getListAnywhereCachesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.storage.control.v2.GetProjectIntelligenceConfigRequest, + com.google.storage.control.v2.IntelligenceConfig> + getGetProjectIntelligenceConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetProjectIntelligenceConfig", + requestType = com.google.storage.control.v2.GetProjectIntelligenceConfigRequest.class, + responseType = com.google.storage.control.v2.IntelligenceConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.storage.control.v2.GetProjectIntelligenceConfigRequest, + com.google.storage.control.v2.IntelligenceConfig> + getGetProjectIntelligenceConfigMethod() { + io.grpc.MethodDescriptor< + com.google.storage.control.v2.GetProjectIntelligenceConfigRequest, + com.google.storage.control.v2.IntelligenceConfig> + getGetProjectIntelligenceConfigMethod; + if ((getGetProjectIntelligenceConfigMethod = + StorageControlGrpc.getGetProjectIntelligenceConfigMethod) + == null) { + synchronized (StorageControlGrpc.class) { + if ((getGetProjectIntelligenceConfigMethod = + StorageControlGrpc.getGetProjectIntelligenceConfigMethod) + == null) { + StorageControlGrpc.getGetProjectIntelligenceConfigMethod = + getGetProjectIntelligenceConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetProjectIntelligenceConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storage.control.v2.GetProjectIntelligenceConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storage.control.v2.IntelligenceConfig + .getDefaultInstance())) + .setSchemaDescriptor( + new StorageControlMethodDescriptorSupplier( + "GetProjectIntelligenceConfig")) + .build(); + } + } + } + return getGetProjectIntelligenceConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest, + com.google.storage.control.v2.IntelligenceConfig> + getUpdateProjectIntelligenceConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateProjectIntelligenceConfig", + requestType = com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest.class, + responseType = com.google.storage.control.v2.IntelligenceConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest, + com.google.storage.control.v2.IntelligenceConfig> + getUpdateProjectIntelligenceConfigMethod() { + io.grpc.MethodDescriptor< + com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest, + com.google.storage.control.v2.IntelligenceConfig> + getUpdateProjectIntelligenceConfigMethod; + if ((getUpdateProjectIntelligenceConfigMethod = + StorageControlGrpc.getUpdateProjectIntelligenceConfigMethod) + == null) { + synchronized (StorageControlGrpc.class) { + if ((getUpdateProjectIntelligenceConfigMethod = + StorageControlGrpc.getUpdateProjectIntelligenceConfigMethod) + == null) { + StorageControlGrpc.getUpdateProjectIntelligenceConfigMethod = + getUpdateProjectIntelligenceConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateProjectIntelligenceConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storage.control.v2.IntelligenceConfig + .getDefaultInstance())) + .setSchemaDescriptor( + new StorageControlMethodDescriptorSupplier( + "UpdateProjectIntelligenceConfig")) + .build(); + } + } + } + return getUpdateProjectIntelligenceConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.storage.control.v2.GetFolderIntelligenceConfigRequest, + com.google.storage.control.v2.IntelligenceConfig> + getGetFolderIntelligenceConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetFolderIntelligenceConfig", + requestType = com.google.storage.control.v2.GetFolderIntelligenceConfigRequest.class, + responseType = com.google.storage.control.v2.IntelligenceConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.storage.control.v2.GetFolderIntelligenceConfigRequest, + com.google.storage.control.v2.IntelligenceConfig> + getGetFolderIntelligenceConfigMethod() { + io.grpc.MethodDescriptor< + com.google.storage.control.v2.GetFolderIntelligenceConfigRequest, + com.google.storage.control.v2.IntelligenceConfig> + getGetFolderIntelligenceConfigMethod; + if ((getGetFolderIntelligenceConfigMethod = + StorageControlGrpc.getGetFolderIntelligenceConfigMethod) + == null) { + synchronized (StorageControlGrpc.class) { + if ((getGetFolderIntelligenceConfigMethod = + StorageControlGrpc.getGetFolderIntelligenceConfigMethod) + == null) { + StorageControlGrpc.getGetFolderIntelligenceConfigMethod = + getGetFolderIntelligenceConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetFolderIntelligenceConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storage.control.v2.GetFolderIntelligenceConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storage.control.v2.IntelligenceConfig + .getDefaultInstance())) + .setSchemaDescriptor( + new StorageControlMethodDescriptorSupplier("GetFolderIntelligenceConfig")) + .build(); + } + } + } + return getGetFolderIntelligenceConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest, + com.google.storage.control.v2.IntelligenceConfig> + getUpdateFolderIntelligenceConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateFolderIntelligenceConfig", + requestType = com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest.class, + responseType = com.google.storage.control.v2.IntelligenceConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest, + com.google.storage.control.v2.IntelligenceConfig> + getUpdateFolderIntelligenceConfigMethod() { + io.grpc.MethodDescriptor< + com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest, + com.google.storage.control.v2.IntelligenceConfig> + getUpdateFolderIntelligenceConfigMethod; + if ((getUpdateFolderIntelligenceConfigMethod = + StorageControlGrpc.getUpdateFolderIntelligenceConfigMethod) + == null) { + synchronized (StorageControlGrpc.class) { + if ((getUpdateFolderIntelligenceConfigMethod = + StorageControlGrpc.getUpdateFolderIntelligenceConfigMethod) + == null) { + StorageControlGrpc.getUpdateFolderIntelligenceConfigMethod = + getUpdateFolderIntelligenceConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateFolderIntelligenceConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storage.control.v2.IntelligenceConfig + .getDefaultInstance())) + .setSchemaDescriptor( + new StorageControlMethodDescriptorSupplier( + "UpdateFolderIntelligenceConfig")) + .build(); + } + } + } + return getUpdateFolderIntelligenceConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest, + com.google.storage.control.v2.IntelligenceConfig> + getGetOrganizationIntelligenceConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetOrganizationIntelligenceConfig", + requestType = com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest.class, + responseType = com.google.storage.control.v2.IntelligenceConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest, + com.google.storage.control.v2.IntelligenceConfig> + getGetOrganizationIntelligenceConfigMethod() { + io.grpc.MethodDescriptor< + com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest, + com.google.storage.control.v2.IntelligenceConfig> + getGetOrganizationIntelligenceConfigMethod; + if ((getGetOrganizationIntelligenceConfigMethod = + StorageControlGrpc.getGetOrganizationIntelligenceConfigMethod) + == null) { + synchronized (StorageControlGrpc.class) { + if ((getGetOrganizationIntelligenceConfigMethod = + StorageControlGrpc.getGetOrganizationIntelligenceConfigMethod) + == null) { + StorageControlGrpc.getGetOrganizationIntelligenceConfigMethod = + getGetOrganizationIntelligenceConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetOrganizationIntelligenceConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storage.control.v2.IntelligenceConfig + .getDefaultInstance())) + .setSchemaDescriptor( + new StorageControlMethodDescriptorSupplier( + "GetOrganizationIntelligenceConfig")) + .build(); + } + } + } + return getGetOrganizationIntelligenceConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest, + com.google.storage.control.v2.IntelligenceConfig> + getUpdateOrganizationIntelligenceConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateOrganizationIntelligenceConfig", + requestType = com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest.class, + responseType = com.google.storage.control.v2.IntelligenceConfig.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest, + com.google.storage.control.v2.IntelligenceConfig> + getUpdateOrganizationIntelligenceConfigMethod() { + io.grpc.MethodDescriptor< + com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest, + com.google.storage.control.v2.IntelligenceConfig> + getUpdateOrganizationIntelligenceConfigMethod; + if ((getUpdateOrganizationIntelligenceConfigMethod = + StorageControlGrpc.getUpdateOrganizationIntelligenceConfigMethod) + == null) { + synchronized (StorageControlGrpc.class) { + if ((getUpdateOrganizationIntelligenceConfigMethod = + StorageControlGrpc.getUpdateOrganizationIntelligenceConfigMethod) + == null) { + StorageControlGrpc.getUpdateOrganizationIntelligenceConfigMethod = + getUpdateOrganizationIntelligenceConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName( + SERVICE_NAME, "UpdateOrganizationIntelligenceConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storage.control.v2 + .UpdateOrganizationIntelligenceConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.storage.control.v2.IntelligenceConfig + .getDefaultInstance())) + .setSchemaDescriptor( + new StorageControlMethodDescriptorSupplier( + "UpdateOrganizationIntelligenceConfig")) + .build(); + } + } + } + return getUpdateOrganizationIntelligenceConfigMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static StorageControlStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -498,55 +1151,837 @@ public StorageControlStub newStub( return StorageControlStub.newStub(factory, channel); } - /** Creates a new blocking-style stub that supports all types of calls on the service */ - public static StorageControlBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public StorageControlBlockingV2Stub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new StorageControlBlockingV2Stub(channel, callOptions); - } - }; - return StorageControlBlockingV2Stub.newStub(factory, channel); - } + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static StorageControlBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public StorageControlBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new StorageControlBlockingV2Stub(channel, callOptions); + } + }; + return StorageControlBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static StorageControlBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public StorageControlBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new StorageControlBlockingStub(channel, callOptions); + } + }; + return StorageControlBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static StorageControlFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public StorageControlFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new StorageControlFutureStub(channel, callOptions); + } + }; + return StorageControlFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * StorageControl service includes selected control plane operations.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Creates a new folder. This operation is only applicable to a hierarchical
+     * namespace enabled bucket.
+     * 
+ */ + default void createFolder( + com.google.storage.control.v2.CreateFolderRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateFolderMethod(), responseObserver); + } + + /** + * + * + *
+     * Permanently deletes an empty folder. This operation is only applicable to a
+     * hierarchical namespace enabled bucket.
+     * 
+ */ + default void deleteFolder( + com.google.storage.control.v2.DeleteFolderRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteFolderMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns metadata for the specified folder. This operation is only
+     * applicable to a hierarchical namespace enabled bucket.
+     * 
+ */ + default void getFolder( + com.google.storage.control.v2.GetFolderRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetFolderMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieves a list of folders. This operation is only applicable to a
+     * hierarchical namespace enabled bucket.
+     * 
+ */ + default void listFolders( + com.google.storage.control.v2.ListFoldersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListFoldersMethod(), responseObserver); + } + + /** + * + * + *
+     * Renames a source folder to a destination folder. This operation is only
+     * applicable to a hierarchical namespace enabled bucket. During a rename, the
+     * source and destination folders are locked until the long running operation
+     * completes.
+     * 
+ */ + default void renameFolder( + com.google.storage.control.v2.RenameFolderRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getRenameFolderMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns the storage layout configuration for a given bucket.
+     * 
+ */ + default void getStorageLayout( + com.google.storage.control.v2.GetStorageLayoutRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetStorageLayoutMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new managed folder.
+     * 
+ */ + default void createManagedFolder( + com.google.storage.control.v2.CreateManagedFolderRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateManagedFolderMethod(), responseObserver); + } + + /** + * + * + *
+     * Permanently deletes an empty managed folder.
+     * 
+ */ + default void deleteManagedFolder( + com.google.storage.control.v2.DeleteManagedFolderRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteManagedFolderMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns metadata for the specified managed folder.
+     * 
+ */ + default void getManagedFolder( + com.google.storage.control.v2.GetManagedFolderRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetManagedFolderMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieves a list of managed folders for a given bucket.
+     * 
+ */ + default void listManagedFolders( + com.google.storage.control.v2.ListManagedFoldersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListManagedFoldersMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates an Anywhere Cache instance.
+     * 
+ */ + default void createAnywhereCache( + com.google.storage.control.v2.CreateAnywhereCacheRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateAnywhereCacheMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates an Anywhere Cache instance. Mutable fields include `ttl` and
+     * `admission_policy`.
+     * 
+ */ + default void updateAnywhereCache( + com.google.storage.control.v2.UpdateAnywhereCacheRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateAnywhereCacheMethod(), responseObserver); + } + + /** + * + * + *
+     * Disables an Anywhere Cache instance. A disabled instance is read-only. The
+     * disablement could be revoked by calling ResumeAnywhereCache. The cache
+     * instance will be deleted automatically if it remains in the disabled state
+     * for at least one hour.
+     * 
+ */ + default void disableAnywhereCache( + com.google.storage.control.v2.DisableAnywhereCacheRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDisableAnywhereCacheMethod(), responseObserver); + } + + /** + * + * + *
+     * Pauses an Anywhere Cache instance.
+     * 
+ */ + default void pauseAnywhereCache( + com.google.storage.control.v2.PauseAnywhereCacheRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getPauseAnywhereCacheMethod(), responseObserver); + } + + /** + * + * + *
+     * Resumes a disabled or paused Anywhere Cache instance.
+     * 
+ */ + default void resumeAnywhereCache( + com.google.storage.control.v2.ResumeAnywhereCacheRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getResumeAnywhereCacheMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets an Anywhere Cache instance.
+     * 
+ */ + default void getAnywhereCache( + com.google.storage.control.v2.GetAnywhereCacheRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetAnywhereCacheMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Anywhere Cache instances for a given bucket.
+     * 
+ */ + default void listAnywhereCaches( + com.google.storage.control.v2.ListAnywhereCachesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAnywhereCachesMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns the Project scoped singleton IntelligenceConfig resource.
+     * 
+ */ + default void getProjectIntelligenceConfig( + com.google.storage.control.v2.GetProjectIntelligenceConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetProjectIntelligenceConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the Project scoped singleton IntelligenceConfig resource.
+     * 
+ */ + default void updateProjectIntelligenceConfig( + com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateProjectIntelligenceConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns the Folder scoped singleton IntelligenceConfig resource.
+     * 
+ */ + default void getFolderIntelligenceConfig( + com.google.storage.control.v2.GetFolderIntelligenceConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetFolderIntelligenceConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the Folder scoped singleton IntelligenceConfig resource.
+     * 
+ */ + default void updateFolderIntelligenceConfig( + com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateFolderIntelligenceConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns the Organization scoped singleton IntelligenceConfig resource.
+     * 
+ */ + default void getOrganizationIntelligenceConfig( + com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetOrganizationIntelligenceConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the Organization scoped singleton IntelligenceConfig resource.
+     * 
+ */ + default void updateOrganizationIntelligenceConfig( + com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateOrganizationIntelligenceConfigMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service StorageControl. + * + *
+   * StorageControl service includes selected control plane operations.
+   * 
+ */ + public abstract static class StorageControlImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return StorageControlGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service StorageControl. + * + *
+   * StorageControl service includes selected control plane operations.
+   * 
+ */ + public static final class StorageControlStub + extends io.grpc.stub.AbstractAsyncStub { + private StorageControlStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected StorageControlStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new StorageControlStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a new folder. This operation is only applicable to a hierarchical
+     * namespace enabled bucket.
+     * 
+ */ + public void createFolder( + com.google.storage.control.v2.CreateFolderRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateFolderMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Permanently deletes an empty folder. This operation is only applicable to a
+     * hierarchical namespace enabled bucket.
+     * 
+ */ + public void deleteFolder( + com.google.storage.control.v2.DeleteFolderRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteFolderMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns metadata for the specified folder. This operation is only
+     * applicable to a hierarchical namespace enabled bucket.
+     * 
+ */ + public void getFolder( + com.google.storage.control.v2.GetFolderRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetFolderMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Retrieves a list of folders. This operation is only applicable to a
+     * hierarchical namespace enabled bucket.
+     * 
+ */ + public void listFolders( + com.google.storage.control.v2.ListFoldersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListFoldersMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Renames a source folder to a destination folder. This operation is only
+     * applicable to a hierarchical namespace enabled bucket. During a rename, the
+     * source and destination folders are locked until the long running operation
+     * completes.
+     * 
+ */ + public void renameFolder( + com.google.storage.control.v2.RenameFolderRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getRenameFolderMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns the storage layout configuration for a given bucket.
+     * 
+ */ + public void getStorageLayout( + com.google.storage.control.v2.GetStorageLayoutRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetStorageLayoutMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new managed folder.
+     * 
+ */ + public void createManagedFolder( + com.google.storage.control.v2.CreateManagedFolderRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateManagedFolderMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Permanently deletes an empty managed folder.
+     * 
+ */ + public void deleteManagedFolder( + com.google.storage.control.v2.DeleteManagedFolderRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteManagedFolderMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns metadata for the specified managed folder.
+     * 
+ */ + public void getManagedFolder( + com.google.storage.control.v2.GetManagedFolderRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetManagedFolderMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Retrieves a list of managed folders for a given bucket.
+     * 
+ */ + public void listManagedFolders( + com.google.storage.control.v2.ListManagedFoldersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListManagedFoldersMethod(), getCallOptions()), + request, + responseObserver); + } - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static StorageControlBlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public StorageControlBlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new StorageControlBlockingStub(channel, callOptions); - } - }; - return StorageControlBlockingStub.newStub(factory, channel); - } + /** + * + * + *
+     * Creates an Anywhere Cache instance.
+     * 
+ */ + public void createAnywhereCache( + com.google.storage.control.v2.CreateAnywhereCacheRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateAnywhereCacheMethod(), getCallOptions()), + request, + responseObserver); + } - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static StorageControlFutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public StorageControlFutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new StorageControlFutureStub(channel, callOptions); - } - }; - return StorageControlFutureStub.newStub(factory, channel); + /** + * + * + *
+     * Updates an Anywhere Cache instance. Mutable fields include `ttl` and
+     * `admission_policy`.
+     * 
+ */ + public void updateAnywhereCache( + com.google.storage.control.v2.UpdateAnywhereCacheRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateAnywhereCacheMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Disables an Anywhere Cache instance. A disabled instance is read-only. The
+     * disablement could be revoked by calling ResumeAnywhereCache. The cache
+     * instance will be deleted automatically if it remains in the disabled state
+     * for at least one hour.
+     * 
+ */ + public void disableAnywhereCache( + com.google.storage.control.v2.DisableAnywhereCacheRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDisableAnywhereCacheMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Pauses an Anywhere Cache instance.
+     * 
+ */ + public void pauseAnywhereCache( + com.google.storage.control.v2.PauseAnywhereCacheRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getPauseAnywhereCacheMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Resumes a disabled or paused Anywhere Cache instance.
+     * 
+ */ + public void resumeAnywhereCache( + com.google.storage.control.v2.ResumeAnywhereCacheRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getResumeAnywhereCacheMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets an Anywhere Cache instance.
+     * 
+ */ + public void getAnywhereCache( + com.google.storage.control.v2.GetAnywhereCacheRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAnywhereCacheMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Anywhere Cache instances for a given bucket.
+     * 
+ */ + public void listAnywhereCaches( + com.google.storage.control.v2.ListAnywhereCachesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAnywhereCachesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns the Project scoped singleton IntelligenceConfig resource.
+     * 
+ */ + public void getProjectIntelligenceConfig( + com.google.storage.control.v2.GetProjectIntelligenceConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetProjectIntelligenceConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the Project scoped singleton IntelligenceConfig resource.
+     * 
+ */ + public void updateProjectIntelligenceConfig( + com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateProjectIntelligenceConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns the Folder scoped singleton IntelligenceConfig resource.
+     * 
+ */ + public void getFolderIntelligenceConfig( + com.google.storage.control.v2.GetFolderIntelligenceConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetFolderIntelligenceConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the Folder scoped singleton IntelligenceConfig resource.
+     * 
+ */ + public void updateFolderIntelligenceConfig( + com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateFolderIntelligenceConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns the Organization scoped singleton IntelligenceConfig resource.
+     * 
+ */ + public void getOrganizationIntelligenceConfig( + com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetOrganizationIntelligenceConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the Organization scoped singleton IntelligenceConfig resource.
+     * 
+ */ + public void updateOrganizationIntelligenceConfig( + com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateOrganizationIntelligenceConfigMethod(), getCallOptions()), + request, + responseObserver); + } } /** - * + * A stub to allow clients to do synchronous rpc calls to service StorageControl. * *
    * StorageControl service includes selected control plane operations.
    * 
*/ - public interface AsyncService { + public static final class StorageControlBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private StorageControlBlockingV2Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected StorageControlBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new StorageControlBlockingV2Stub(channel, callOptions); + } /** * @@ -556,11 +1991,10 @@ public interface AsyncService { * namespace enabled bucket. * */ - default void createFolder( - com.google.storage.control.v2.CreateFolderRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateFolderMethod(), responseObserver); + public com.google.storage.control.v2.Folder createFolder( + com.google.storage.control.v2.CreateFolderRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateFolderMethod(), getCallOptions(), request); } /** @@ -571,11 +2005,10 @@ default void createFolder( * hierarchical namespace enabled bucket. * */ - default void deleteFolder( - com.google.storage.control.v2.DeleteFolderRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteFolderMethod(), responseObserver); + public com.google.protobuf.Empty deleteFolder( + com.google.storage.control.v2.DeleteFolderRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteFolderMethod(), getCallOptions(), request); } /** @@ -584,12 +2017,12 @@ default void deleteFolder( *
      * Returns metadata for the specified folder. This operation is only
      * applicable to a hierarchical namespace enabled bucket.
-     * 
- */ - default void getFolder( - com.google.storage.control.v2.GetFolderRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetFolderMethod(), responseObserver); + * + */ + public com.google.storage.control.v2.Folder getFolder( + com.google.storage.control.v2.GetFolderRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetFolderMethod(), getCallOptions(), request); } /** @@ -600,12 +2033,10 @@ default void getFolder( * hierarchical namespace enabled bucket. * */ - default void listFolders( - com.google.storage.control.v2.ListFoldersRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListFoldersMethod(), responseObserver); + public com.google.storage.control.v2.ListFoldersResponse listFolders( + com.google.storage.control.v2.ListFoldersRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListFoldersMethod(), getCallOptions(), request); } /** @@ -618,11 +2049,10 @@ default void listFolders( * completes. * */ - default void renameFolder( - com.google.storage.control.v2.RenameFolderRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getRenameFolderMethod(), responseObserver); + public com.google.longrunning.Operation renameFolder( + com.google.storage.control.v2.RenameFolderRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getRenameFolderMethod(), getCallOptions(), request); } /** @@ -632,11 +2062,10 @@ default void renameFolder( * Returns the storage layout configuration for a given bucket. * */ - default void getStorageLayout( - com.google.storage.control.v2.GetStorageLayoutRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetStorageLayoutMethod(), responseObserver); + public com.google.storage.control.v2.StorageLayout getStorageLayout( + com.google.storage.control.v2.GetStorageLayoutRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetStorageLayoutMethod(), getCallOptions(), request); } /** @@ -646,11 +2075,10 @@ default void getStorageLayout( * Creates a new managed folder. * */ - default void createManagedFolder( - com.google.storage.control.v2.CreateManagedFolderRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateManagedFolderMethod(), responseObserver); + public com.google.storage.control.v2.ManagedFolder createManagedFolder( + com.google.storage.control.v2.CreateManagedFolderRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateManagedFolderMethod(), getCallOptions(), request); } /** @@ -660,11 +2088,10 @@ default void createManagedFolder( * Permanently deletes an empty managed folder. * */ - default void deleteManagedFolder( - com.google.storage.control.v2.DeleteManagedFolderRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteManagedFolderMethod(), responseObserver); + public com.google.protobuf.Empty deleteManagedFolder( + com.google.storage.control.v2.DeleteManagedFolderRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteManagedFolderMethod(), getCallOptions(), request); } /** @@ -674,11 +2101,10 @@ default void deleteManagedFolder( * Returns metadata for the specified managed folder. * */ - default void getManagedFolder( - com.google.storage.control.v2.GetManagedFolderRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetManagedFolderMethod(), responseObserver); + public com.google.storage.control.v2.ManagedFolder getManagedFolder( + com.google.storage.control.v2.GetManagedFolderRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetManagedFolderMethod(), getCallOptions(), request); } /** @@ -688,234 +2114,203 @@ default void getManagedFolder( * Retrieves a list of managed folders for a given bucket. * */ - default void listManagedFolders( - com.google.storage.control.v2.ListManagedFoldersRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListManagedFoldersMethod(), responseObserver); + public com.google.storage.control.v2.ListManagedFoldersResponse listManagedFolders( + com.google.storage.control.v2.ListManagedFoldersRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListManagedFoldersMethod(), getCallOptions(), request); } - } - - /** - * Base class for the server implementation of the service StorageControl. - * - *
-   * StorageControl service includes selected control plane operations.
-   * 
- */ - public abstract static class StorageControlImplBase - implements io.grpc.BindableService, AsyncService { - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return StorageControlGrpc.bindService(this); + /** + * + * + *
+     * Creates an Anywhere Cache instance.
+     * 
+ */ + public com.google.longrunning.Operation createAnywhereCache( + com.google.storage.control.v2.CreateAnywhereCacheRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateAnywhereCacheMethod(), getCallOptions(), request); } - } - /** - * A stub to allow clients to do asynchronous rpc calls to service StorageControl. - * - *
-   * StorageControl service includes selected control plane operations.
-   * 
- */ - public static final class StorageControlStub - extends io.grpc.stub.AbstractAsyncStub { - private StorageControlStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); + /** + * + * + *
+     * Updates an Anywhere Cache instance. Mutable fields include `ttl` and
+     * `admission_policy`.
+     * 
+ */ + public com.google.longrunning.Operation updateAnywhereCache( + com.google.storage.control.v2.UpdateAnywhereCacheRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateAnywhereCacheMethod(), getCallOptions(), request); } - @java.lang.Override - protected StorageControlStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new StorageControlStub(channel, callOptions); + /** + * + * + *
+     * Disables an Anywhere Cache instance. A disabled instance is read-only. The
+     * disablement could be revoked by calling ResumeAnywhereCache. The cache
+     * instance will be deleted automatically if it remains in the disabled state
+     * for at least one hour.
+     * 
+ */ + public com.google.storage.control.v2.AnywhereCache disableAnywhereCache( + com.google.storage.control.v2.DisableAnywhereCacheRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDisableAnywhereCacheMethod(), getCallOptions(), request); } /** * * *
-     * Creates a new folder. This operation is only applicable to a hierarchical
-     * namespace enabled bucket.
+     * Pauses an Anywhere Cache instance.
      * 
*/ - public void createFolder( - com.google.storage.control.v2.CreateFolderRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateFolderMethod(), getCallOptions()), - request, - responseObserver); + public com.google.storage.control.v2.AnywhereCache pauseAnywhereCache( + com.google.storage.control.v2.PauseAnywhereCacheRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getPauseAnywhereCacheMethod(), getCallOptions(), request); } /** * * *
-     * Permanently deletes an empty folder. This operation is only applicable to a
-     * hierarchical namespace enabled bucket.
+     * Resumes a disabled or paused Anywhere Cache instance.
      * 
*/ - public void deleteFolder( - com.google.storage.control.v2.DeleteFolderRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteFolderMethod(), getCallOptions()), - request, - responseObserver); + public com.google.storage.control.v2.AnywhereCache resumeAnywhereCache( + com.google.storage.control.v2.ResumeAnywhereCacheRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getResumeAnywhereCacheMethod(), getCallOptions(), request); } /** * * *
-     * Returns metadata for the specified folder. This operation is only
-     * applicable to a hierarchical namespace enabled bucket.
+     * Gets an Anywhere Cache instance.
      * 
*/ - public void getFolder( - com.google.storage.control.v2.GetFolderRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetFolderMethod(), getCallOptions()), request, responseObserver); + public com.google.storage.control.v2.AnywhereCache getAnywhereCache( + com.google.storage.control.v2.GetAnywhereCacheRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAnywhereCacheMethod(), getCallOptions(), request); } /** * * *
-     * Retrieves a list of folders. This operation is only applicable to a
-     * hierarchical namespace enabled bucket.
+     * Lists Anywhere Cache instances for a given bucket.
      * 
*/ - public void listFolders( - com.google.storage.control.v2.ListFoldersRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListFoldersMethod(), getCallOptions()), - request, - responseObserver); + public com.google.storage.control.v2.ListAnywhereCachesResponse listAnywhereCaches( + com.google.storage.control.v2.ListAnywhereCachesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAnywhereCachesMethod(), getCallOptions(), request); } /** * * *
-     * Renames a source folder to a destination folder. This operation is only
-     * applicable to a hierarchical namespace enabled bucket. During a rename, the
-     * source and destination folders are locked until the long running operation
-     * completes.
+     * Returns the Project scoped singleton IntelligenceConfig resource.
      * 
*/ - public void renameFolder( - com.google.storage.control.v2.RenameFolderRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getRenameFolderMethod(), getCallOptions()), - request, - responseObserver); + public com.google.storage.control.v2.IntelligenceConfig getProjectIntelligenceConfig( + com.google.storage.control.v2.GetProjectIntelligenceConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetProjectIntelligenceConfigMethod(), getCallOptions(), request); } /** * * *
-     * Returns the storage layout configuration for a given bucket.
+     * Updates the Project scoped singleton IntelligenceConfig resource.
      * 
*/ - public void getStorageLayout( - com.google.storage.control.v2.GetStorageLayoutRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetStorageLayoutMethod(), getCallOptions()), - request, - responseObserver); + public com.google.storage.control.v2.IntelligenceConfig updateProjectIntelligenceConfig( + com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateProjectIntelligenceConfigMethod(), getCallOptions(), request); } /** * * *
-     * Creates a new managed folder.
+     * Returns the Folder scoped singleton IntelligenceConfig resource.
      * 
*/ - public void createManagedFolder( - com.google.storage.control.v2.CreateManagedFolderRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateManagedFolderMethod(), getCallOptions()), - request, - responseObserver); + public com.google.storage.control.v2.IntelligenceConfig getFolderIntelligenceConfig( + com.google.storage.control.v2.GetFolderIntelligenceConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetFolderIntelligenceConfigMethod(), getCallOptions(), request); } /** * * *
-     * Permanently deletes an empty managed folder.
+     * Updates the Folder scoped singleton IntelligenceConfig resource.
      * 
*/ - public void deleteManagedFolder( - com.google.storage.control.v2.DeleteManagedFolderRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteManagedFolderMethod(), getCallOptions()), - request, - responseObserver); + public com.google.storage.control.v2.IntelligenceConfig updateFolderIntelligenceConfig( + com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateFolderIntelligenceConfigMethod(), getCallOptions(), request); } /** * * *
-     * Returns metadata for the specified managed folder.
+     * Returns the Organization scoped singleton IntelligenceConfig resource.
      * 
*/ - public void getManagedFolder( - com.google.storage.control.v2.GetManagedFolderRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetManagedFolderMethod(), getCallOptions()), - request, - responseObserver); + public com.google.storage.control.v2.IntelligenceConfig getOrganizationIntelligenceConfig( + com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetOrganizationIntelligenceConfigMethod(), getCallOptions(), request); } /** * * *
-     * Retrieves a list of managed folders for a given bucket.
+     * Updates the Organization scoped singleton IntelligenceConfig resource.
      * 
*/ - public void listManagedFolders( - com.google.storage.control.v2.ListManagedFoldersRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListManagedFoldersMethod(), getCallOptions()), - request, - responseObserver); + public com.google.storage.control.v2.IntelligenceConfig updateOrganizationIntelligenceConfig( + com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateOrganizationIntelligenceConfigMethod(), getCallOptions(), request); } } /** - * A stub to allow clients to do synchronous rpc calls to service StorageControl. + * A stub to allow clients to do limited synchronous rpc calls to service StorageControl. * *
    * StorageControl service includes selected control plane operations.
    * 
*/ - public static final class StorageControlBlockingV2Stub - extends io.grpc.stub.AbstractBlockingStub { - private StorageControlBlockingV2Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + public static final class StorageControlBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private StorageControlBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override - protected StorageControlBlockingV2Stub build( + protected StorageControlBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new StorageControlBlockingV2Stub(channel, callOptions); + return new StorageControlBlockingStub(channel, callOptions); } /** @@ -1054,162 +2449,178 @@ public com.google.storage.control.v2.ListManagedFoldersResponse listManagedFolde return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getListManagedFoldersMethod(), getCallOptions(), request); } - } - /** - * A stub to allow clients to do limited synchronous rpc calls to service StorageControl. - * - *
-   * StorageControl service includes selected control plane operations.
-   * 
- */ - public static final class StorageControlBlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private StorageControlBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); + /** + * + * + *
+     * Creates an Anywhere Cache instance.
+     * 
+ */ + public com.google.longrunning.Operation createAnywhereCache( + com.google.storage.control.v2.CreateAnywhereCacheRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateAnywhereCacheMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates an Anywhere Cache instance. Mutable fields include `ttl` and
+     * `admission_policy`.
+     * 
+ */ + public com.google.longrunning.Operation updateAnywhereCache( + com.google.storage.control.v2.UpdateAnywhereCacheRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateAnywhereCacheMethod(), getCallOptions(), request); } - @java.lang.Override - protected StorageControlBlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new StorageControlBlockingStub(channel, callOptions); + /** + * + * + *
+     * Disables an Anywhere Cache instance. A disabled instance is read-only. The
+     * disablement could be revoked by calling ResumeAnywhereCache. The cache
+     * instance will be deleted automatically if it remains in the disabled state
+     * for at least one hour.
+     * 
+ */ + public com.google.storage.control.v2.AnywhereCache disableAnywhereCache( + com.google.storage.control.v2.DisableAnywhereCacheRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDisableAnywhereCacheMethod(), getCallOptions(), request); } /** * * *
-     * Creates a new folder. This operation is only applicable to a hierarchical
-     * namespace enabled bucket.
+     * Pauses an Anywhere Cache instance.
      * 
*/ - public com.google.storage.control.v2.Folder createFolder( - com.google.storage.control.v2.CreateFolderRequest request) { + public com.google.storage.control.v2.AnywhereCache pauseAnywhereCache( + com.google.storage.control.v2.PauseAnywhereCacheRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateFolderMethod(), getCallOptions(), request); + getChannel(), getPauseAnywhereCacheMethod(), getCallOptions(), request); } /** * * *
-     * Permanently deletes an empty folder. This operation is only applicable to a
-     * hierarchical namespace enabled bucket.
+     * Resumes a disabled or paused Anywhere Cache instance.
      * 
*/ - public com.google.protobuf.Empty deleteFolder( - com.google.storage.control.v2.DeleteFolderRequest request) { + public com.google.storage.control.v2.AnywhereCache resumeAnywhereCache( + com.google.storage.control.v2.ResumeAnywhereCacheRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteFolderMethod(), getCallOptions(), request); + getChannel(), getResumeAnywhereCacheMethod(), getCallOptions(), request); } /** * * *
-     * Returns metadata for the specified folder. This operation is only
-     * applicable to a hierarchical namespace enabled bucket.
+     * Gets an Anywhere Cache instance.
      * 
*/ - public com.google.storage.control.v2.Folder getFolder( - com.google.storage.control.v2.GetFolderRequest request) { + public com.google.storage.control.v2.AnywhereCache getAnywhereCache( + com.google.storage.control.v2.GetAnywhereCacheRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetFolderMethod(), getCallOptions(), request); + getChannel(), getGetAnywhereCacheMethod(), getCallOptions(), request); } /** * * *
-     * Retrieves a list of folders. This operation is only applicable to a
-     * hierarchical namespace enabled bucket.
+     * Lists Anywhere Cache instances for a given bucket.
      * 
*/ - public com.google.storage.control.v2.ListFoldersResponse listFolders( - com.google.storage.control.v2.ListFoldersRequest request) { + public com.google.storage.control.v2.ListAnywhereCachesResponse listAnywhereCaches( + com.google.storage.control.v2.ListAnywhereCachesRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListFoldersMethod(), getCallOptions(), request); + getChannel(), getListAnywhereCachesMethod(), getCallOptions(), request); } /** * * *
-     * Renames a source folder to a destination folder. This operation is only
-     * applicable to a hierarchical namespace enabled bucket. During a rename, the
-     * source and destination folders are locked until the long running operation
-     * completes.
+     * Returns the Project scoped singleton IntelligenceConfig resource.
      * 
*/ - public com.google.longrunning.Operation renameFolder( - com.google.storage.control.v2.RenameFolderRequest request) { + public com.google.storage.control.v2.IntelligenceConfig getProjectIntelligenceConfig( + com.google.storage.control.v2.GetProjectIntelligenceConfigRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getRenameFolderMethod(), getCallOptions(), request); + getChannel(), getGetProjectIntelligenceConfigMethod(), getCallOptions(), request); } /** * * *
-     * Returns the storage layout configuration for a given bucket.
+     * Updates the Project scoped singleton IntelligenceConfig resource.
      * 
*/ - public com.google.storage.control.v2.StorageLayout getStorageLayout( - com.google.storage.control.v2.GetStorageLayoutRequest request) { + public com.google.storage.control.v2.IntelligenceConfig updateProjectIntelligenceConfig( + com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetStorageLayoutMethod(), getCallOptions(), request); + getChannel(), getUpdateProjectIntelligenceConfigMethod(), getCallOptions(), request); } /** * * *
-     * Creates a new managed folder.
+     * Returns the Folder scoped singleton IntelligenceConfig resource.
      * 
*/ - public com.google.storage.control.v2.ManagedFolder createManagedFolder( - com.google.storage.control.v2.CreateManagedFolderRequest request) { + public com.google.storage.control.v2.IntelligenceConfig getFolderIntelligenceConfig( + com.google.storage.control.v2.GetFolderIntelligenceConfigRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateManagedFolderMethod(), getCallOptions(), request); + getChannel(), getGetFolderIntelligenceConfigMethod(), getCallOptions(), request); } /** * * *
-     * Permanently deletes an empty managed folder.
+     * Updates the Folder scoped singleton IntelligenceConfig resource.
      * 
*/ - public com.google.protobuf.Empty deleteManagedFolder( - com.google.storage.control.v2.DeleteManagedFolderRequest request) { + public com.google.storage.control.v2.IntelligenceConfig updateFolderIntelligenceConfig( + com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteManagedFolderMethod(), getCallOptions(), request); + getChannel(), getUpdateFolderIntelligenceConfigMethod(), getCallOptions(), request); } /** * * *
-     * Returns metadata for the specified managed folder.
+     * Returns the Organization scoped singleton IntelligenceConfig resource.
      * 
*/ - public com.google.storage.control.v2.ManagedFolder getManagedFolder( - com.google.storage.control.v2.GetManagedFolderRequest request) { + public com.google.storage.control.v2.IntelligenceConfig getOrganizationIntelligenceConfig( + com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetManagedFolderMethod(), getCallOptions(), request); + getChannel(), getGetOrganizationIntelligenceConfigMethod(), getCallOptions(), request); } /** * * *
-     * Retrieves a list of managed folders for a given bucket.
+     * Updates the Organization scoped singleton IntelligenceConfig resource.
      * 
*/ - public com.google.storage.control.v2.ListManagedFoldersResponse listManagedFolders( - com.google.storage.control.v2.ListManagedFoldersRequest request) { + public com.google.storage.control.v2.IntelligenceConfig updateOrganizationIntelligenceConfig( + com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListManagedFoldersMethod(), getCallOptions(), request); + getChannel(), getUpdateOrganizationIntelligenceConfigMethod(), getCallOptions(), request); } } @@ -1373,6 +2784,200 @@ protected StorageControlFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getListManagedFoldersMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * Creates an Anywhere Cache instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createAnywhereCache(com.google.storage.control.v2.CreateAnywhereCacheRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateAnywhereCacheMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates an Anywhere Cache instance. Mutable fields include `ttl` and
+     * `admission_policy`.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateAnywhereCache(com.google.storage.control.v2.UpdateAnywhereCacheRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateAnywhereCacheMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Disables an Anywhere Cache instance. A disabled instance is read-only. The
+     * disablement could be revoked by calling ResumeAnywhereCache. The cache
+     * instance will be deleted automatically if it remains in the disabled state
+     * for at least one hour.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.storage.control.v2.AnywhereCache> + disableAnywhereCache(com.google.storage.control.v2.DisableAnywhereCacheRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDisableAnywhereCacheMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Pauses an Anywhere Cache instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.storage.control.v2.AnywhereCache> + pauseAnywhereCache(com.google.storage.control.v2.PauseAnywhereCacheRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getPauseAnywhereCacheMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Resumes a disabled or paused Anywhere Cache instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.storage.control.v2.AnywhereCache> + resumeAnywhereCache(com.google.storage.control.v2.ResumeAnywhereCacheRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getResumeAnywhereCacheMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets an Anywhere Cache instance.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.storage.control.v2.AnywhereCache> + getAnywhereCache(com.google.storage.control.v2.GetAnywhereCacheRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAnywhereCacheMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Anywhere Cache instances for a given bucket.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.storage.control.v2.ListAnywhereCachesResponse> + listAnywhereCaches(com.google.storage.control.v2.ListAnywhereCachesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAnywhereCachesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns the Project scoped singleton IntelligenceConfig resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.storage.control.v2.IntelligenceConfig> + getProjectIntelligenceConfig( + com.google.storage.control.v2.GetProjectIntelligenceConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetProjectIntelligenceConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the Project scoped singleton IntelligenceConfig resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.storage.control.v2.IntelligenceConfig> + updateProjectIntelligenceConfig( + com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateProjectIntelligenceConfigMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Returns the Folder scoped singleton IntelligenceConfig resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.storage.control.v2.IntelligenceConfig> + getFolderIntelligenceConfig( + com.google.storage.control.v2.GetFolderIntelligenceConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetFolderIntelligenceConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the Folder scoped singleton IntelligenceConfig resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.storage.control.v2.IntelligenceConfig> + updateFolderIntelligenceConfig( + com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateFolderIntelligenceConfigMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Returns the Organization scoped singleton IntelligenceConfig resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.storage.control.v2.IntelligenceConfig> + getOrganizationIntelligenceConfig( + com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetOrganizationIntelligenceConfigMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Updates the Organization scoped singleton IntelligenceConfig resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.storage.control.v2.IntelligenceConfig> + updateOrganizationIntelligenceConfig( + com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateOrganizationIntelligenceConfigMethod(), getCallOptions()), + request); + } } private static final int METHODID_CREATE_FOLDER = 0; @@ -1385,6 +2990,19 @@ protected StorageControlFutureStub build( private static final int METHODID_DELETE_MANAGED_FOLDER = 7; private static final int METHODID_GET_MANAGED_FOLDER = 8; private static final int METHODID_LIST_MANAGED_FOLDERS = 9; + private static final int METHODID_CREATE_ANYWHERE_CACHE = 10; + private static final int METHODID_UPDATE_ANYWHERE_CACHE = 11; + private static final int METHODID_DISABLE_ANYWHERE_CACHE = 12; + private static final int METHODID_PAUSE_ANYWHERE_CACHE = 13; + private static final int METHODID_RESUME_ANYWHERE_CACHE = 14; + private static final int METHODID_GET_ANYWHERE_CACHE = 15; + private static final int METHODID_LIST_ANYWHERE_CACHES = 16; + private static final int METHODID_GET_PROJECT_INTELLIGENCE_CONFIG = 17; + private static final int METHODID_UPDATE_PROJECT_INTELLIGENCE_CONFIG = 18; + private static final int METHODID_GET_FOLDER_INTELLIGENCE_CONFIG = 19; + private static final int METHODID_UPDATE_FOLDER_INTELLIGENCE_CONFIG = 20; + private static final int METHODID_GET_ORGANIZATION_INTELLIGENCE_CONFIG = 21; + private static final int METHODID_UPDATE_ORGANIZATION_INTELLIGENCE_CONFIG = 22; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1459,6 +3077,83 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv com.google.storage.control.v2.ListManagedFoldersResponse>) responseObserver); break; + case METHODID_CREATE_ANYWHERE_CACHE: + serviceImpl.createAnywhereCache( + (com.google.storage.control.v2.CreateAnywhereCacheRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_ANYWHERE_CACHE: + serviceImpl.updateAnywhereCache( + (com.google.storage.control.v2.UpdateAnywhereCacheRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DISABLE_ANYWHERE_CACHE: + serviceImpl.disableAnywhereCache( + (com.google.storage.control.v2.DisableAnywhereCacheRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_PAUSE_ANYWHERE_CACHE: + serviceImpl.pauseAnywhereCache( + (com.google.storage.control.v2.PauseAnywhereCacheRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_RESUME_ANYWHERE_CACHE: + serviceImpl.resumeAnywhereCache( + (com.google.storage.control.v2.ResumeAnywhereCacheRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_ANYWHERE_CACHE: + serviceImpl.getAnywhereCache( + (com.google.storage.control.v2.GetAnywhereCacheRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_ANYWHERE_CACHES: + serviceImpl.listAnywhereCaches( + (com.google.storage.control.v2.ListAnywhereCachesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.storage.control.v2.ListAnywhereCachesResponse>) + responseObserver); + break; + case METHODID_GET_PROJECT_INTELLIGENCE_CONFIG: + serviceImpl.getProjectIntelligenceConfig( + (com.google.storage.control.v2.GetProjectIntelligenceConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_PROJECT_INTELLIGENCE_CONFIG: + serviceImpl.updateProjectIntelligenceConfig( + (com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_FOLDER_INTELLIGENCE_CONFIG: + serviceImpl.getFolderIntelligenceConfig( + (com.google.storage.control.v2.GetFolderIntelligenceConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_FOLDER_INTELLIGENCE_CONFIG: + serviceImpl.updateFolderIntelligenceConfig( + (com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_ORGANIZATION_INTELLIGENCE_CONFIG: + serviceImpl.getOrganizationIntelligenceConfig( + (com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_ORGANIZATION_INTELLIGENCE_CONFIG: + serviceImpl.updateOrganizationIntelligenceConfig( + (com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; default: throw new AssertionError(); } @@ -1542,6 +3237,95 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.storage.control.v2.ListManagedFoldersRequest, com.google.storage.control.v2.ListManagedFoldersResponse>( service, METHODID_LIST_MANAGED_FOLDERS))) + .addMethod( + getCreateAnywhereCacheMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.storage.control.v2.CreateAnywhereCacheRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_ANYWHERE_CACHE))) + .addMethod( + getUpdateAnywhereCacheMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.storage.control.v2.UpdateAnywhereCacheRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_ANYWHERE_CACHE))) + .addMethod( + getDisableAnywhereCacheMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.storage.control.v2.DisableAnywhereCacheRequest, + com.google.storage.control.v2.AnywhereCache>( + service, METHODID_DISABLE_ANYWHERE_CACHE))) + .addMethod( + getPauseAnywhereCacheMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.storage.control.v2.PauseAnywhereCacheRequest, + com.google.storage.control.v2.AnywhereCache>( + service, METHODID_PAUSE_ANYWHERE_CACHE))) + .addMethod( + getResumeAnywhereCacheMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.storage.control.v2.ResumeAnywhereCacheRequest, + com.google.storage.control.v2.AnywhereCache>( + service, METHODID_RESUME_ANYWHERE_CACHE))) + .addMethod( + getGetAnywhereCacheMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.storage.control.v2.GetAnywhereCacheRequest, + com.google.storage.control.v2.AnywhereCache>( + service, METHODID_GET_ANYWHERE_CACHE))) + .addMethod( + getListAnywhereCachesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.storage.control.v2.ListAnywhereCachesRequest, + com.google.storage.control.v2.ListAnywhereCachesResponse>( + service, METHODID_LIST_ANYWHERE_CACHES))) + .addMethod( + getGetProjectIntelligenceConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.storage.control.v2.GetProjectIntelligenceConfigRequest, + com.google.storage.control.v2.IntelligenceConfig>( + service, METHODID_GET_PROJECT_INTELLIGENCE_CONFIG))) + .addMethod( + getUpdateProjectIntelligenceConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest, + com.google.storage.control.v2.IntelligenceConfig>( + service, METHODID_UPDATE_PROJECT_INTELLIGENCE_CONFIG))) + .addMethod( + getGetFolderIntelligenceConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.storage.control.v2.GetFolderIntelligenceConfigRequest, + com.google.storage.control.v2.IntelligenceConfig>( + service, METHODID_GET_FOLDER_INTELLIGENCE_CONFIG))) + .addMethod( + getUpdateFolderIntelligenceConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest, + com.google.storage.control.v2.IntelligenceConfig>( + service, METHODID_UPDATE_FOLDER_INTELLIGENCE_CONFIG))) + .addMethod( + getGetOrganizationIntelligenceConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest, + com.google.storage.control.v2.IntelligenceConfig>( + service, METHODID_GET_ORGANIZATION_INTELLIGENCE_CONFIG))) + .addMethod( + getUpdateOrganizationIntelligenceConfigMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest, + com.google.storage.control.v2.IntelligenceConfig>( + service, METHODID_UPDATE_ORGANIZATION_INTELLIGENCE_CONFIG))) .build(); } @@ -1603,6 +3387,19 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getDeleteManagedFolderMethod()) .addMethod(getGetManagedFolderMethod()) .addMethod(getListManagedFoldersMethod()) + .addMethod(getCreateAnywhereCacheMethod()) + .addMethod(getUpdateAnywhereCacheMethod()) + .addMethod(getDisableAnywhereCacheMethod()) + .addMethod(getPauseAnywhereCacheMethod()) + .addMethod(getResumeAnywhereCacheMethod()) + .addMethod(getGetAnywhereCacheMethod()) + .addMethod(getListAnywhereCachesMethod()) + .addMethod(getGetProjectIntelligenceConfigMethod()) + .addMethod(getUpdateProjectIntelligenceConfigMethod()) + .addMethod(getGetFolderIntelligenceConfigMethod()) + .addMethod(getUpdateFolderIntelligenceConfigMethod()) + .addMethod(getGetOrganizationIntelligenceConfigMethod()) + .addMethod(getUpdateOrganizationIntelligenceConfigMethod()) .build(); } } diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/AnywhereCache.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/AnywhereCache.java new file mode 100644 index 0000000000..7a57ae3995 --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/AnywhereCache.java @@ -0,0 +1,2271 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +/** + * + * + *
+ * An Anywhere Cache Instance.
+ * 
+ * + * Protobuf type {@code google.storage.control.v2.AnywhereCache} + */ +public final class AnywhereCache extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storage.control.v2.AnywhereCache) + AnywhereCacheOrBuilder { + private static final long serialVersionUID = 0L; + + // Use AnywhereCache.newBuilder() to construct. + private AnywhereCache(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnywhereCache() { + name_ = ""; + zone_ = ""; + admissionPolicy_ = ""; + state_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AnywhereCache(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_AnywhereCache_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_AnywhereCache_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.AnywhereCache.class, + com.google.storage.control.v2.AnywhereCache.Builder.class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Immutable. The resource name of this AnywhereCache.
+   * Format:
+   * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + } + + /** + * + * + *
+   * Immutable. The resource name of this AnywhereCache.
+   * Format:
+   * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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 ZONE_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object zone_ = ""; + + /** + * + * + *
+   * Immutable. The zone in which the cache instance is running. For example,
+   * us-central1-a.
+   * 
+ * + * string zone = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The zone. + */ + @java.lang.Override + public java.lang.String getZone() { + java.lang.Object ref = zone_; + 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(); + zone_ = s; + return s; + } + } + + /** + * + * + *
+   * Immutable. The zone in which the cache instance is running. For example,
+   * us-central1-a.
+   * 
+ * + * string zone = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for zone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TTL_FIELD_NUMBER = 3; + private com.google.protobuf.Duration ttl_; + + /** + * + * + *
+   * Cache entry TTL (ranges between 1h to 7d). This is a cache-level config
+   * that defines how long a cache entry can live. Default ttl value (24hrs)
+   * is applied if not specified in the create request. TTL must be in whole
+   * seconds.
+   * 
+ * + * .google.protobuf.Duration ttl = 3; + * + * @return Whether the ttl field is set. + */ + @java.lang.Override + public boolean hasTtl() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Cache entry TTL (ranges between 1h to 7d). This is a cache-level config
+   * that defines how long a cache entry can live. Default ttl value (24hrs)
+   * is applied if not specified in the create request. TTL must be in whole
+   * seconds.
+   * 
+ * + * .google.protobuf.Duration ttl = 3; + * + * @return The ttl. + */ + @java.lang.Override + public com.google.protobuf.Duration getTtl() { + return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_; + } + + /** + * + * + *
+   * Cache entry TTL (ranges between 1h to 7d). This is a cache-level config
+   * that defines how long a cache entry can live. Default ttl value (24hrs)
+   * is applied if not specified in the create request. TTL must be in whole
+   * seconds.
+   * 
+ * + * .google.protobuf.Duration ttl = 3; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() { + return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_; + } + + public static final int ADMISSION_POLICY_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object admissionPolicy_ = ""; + + /** + * + * + *
+   * Cache admission policy. Valid policies includes:
+   * `admit-on-first-miss` and `admit-on-second-miss`. Defaults to
+   * `admit-on-first-miss`. Default value is applied if not specified in the
+   * create request.
+   * 
+ * + * string admission_policy = 9; + * + * @return The admissionPolicy. + */ + @java.lang.Override + public java.lang.String getAdmissionPolicy() { + java.lang.Object ref = admissionPolicy_; + 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(); + admissionPolicy_ = s; + return s; + } + } + + /** + * + * + *
+   * Cache admission policy. Valid policies includes:
+   * `admit-on-first-miss` and `admit-on-second-miss`. Defaults to
+   * `admit-on-first-miss`. Default value is applied if not specified in the
+   * create request.
+   * 
+ * + * string admission_policy = 9; + * + * @return The bytes for admissionPolicy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAdmissionPolicyBytes() { + java.lang.Object ref = admissionPolicy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + admissionPolicy_ = 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_ = ""; + + /** + * + * + *
+   * Output only. Cache state including RUNNING, CREATING, DISABLED and PAUSED.
+   * 
+ * + * string state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + + /** + * + * + *
+   * Output only. Cache state including RUNNING, CREATING, DISABLED and PAUSED.
+   * 
+ * + * string state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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. Time when Anywhere cache instance is allocated.
+   * 
+ * + * .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_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. Time when Anywhere cache instance is allocated.
+   * 
+ * + * .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. Time when Anywhere cache instance is allocated.
+   * 
+ * + * .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. Time when Anywhere cache instance is last updated, including
+   * creation.
+   * 
+ * + * .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_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. Time when Anywhere cache instance is last updated, including
+   * creation.
+   * 
+ * + * .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. Time when Anywhere cache instance is last updated, including
+   * creation.
+   * 
+ * + * .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 PENDING_UPDATE_FIELD_NUMBER = 8; + private boolean pendingUpdate_ = false; + + /** + * + * + *
+   * Output only. True if there is an active update operation against this cache
+   * instance. Subsequential update requests will be rejected if this field is
+   * true. Output only.
+   * 
+ * + * bool pending_update = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pendingUpdate. + */ + @java.lang.Override + public boolean getPendingUpdate() { + return pendingUpdate_; + } + + 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getTtl()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(state_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, state_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(6, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(7, getUpdateTime()); + } + if (pendingUpdate_ != false) { + output.writeBool(8, pendingUpdate_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(admissionPolicy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, admissionPolicy_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zone_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, zone_); + } + 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 (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTtl()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(state_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, state_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCreateTime()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getUpdateTime()); + } + if (pendingUpdate_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, pendingUpdate_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(admissionPolicy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, admissionPolicy_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zone_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, zone_); + } + 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.control.v2.AnywhereCache)) { + return super.equals(obj); + } + com.google.storage.control.v2.AnywhereCache other = + (com.google.storage.control.v2.AnywhereCache) obj; + + if (!getName().equals(other.getName())) return false; + if (!getZone().equals(other.getZone())) return false; + if (hasTtl() != other.hasTtl()) return false; + if (hasTtl()) { + if (!getTtl().equals(other.getTtl())) return false; + } + if (!getAdmissionPolicy().equals(other.getAdmissionPolicy())) 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 (getPendingUpdate() != other.getPendingUpdate()) 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) + ZONE_FIELD_NUMBER; + hash = (53 * hash) + getZone().hashCode(); + if (hasTtl()) { + hash = (37 * hash) + TTL_FIELD_NUMBER; + hash = (53 * hash) + getTtl().hashCode(); + } + hash = (37 * hash) + ADMISSION_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getAdmissionPolicy().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) + PENDING_UPDATE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPendingUpdate()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storage.control.v2.AnywhereCache parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.AnywhereCache 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.control.v2.AnywhereCache parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.AnywhereCache 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.control.v2.AnywhereCache parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.AnywhereCache parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storage.control.v2.AnywhereCache parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.AnywhereCache 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.control.v2.AnywhereCache parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.AnywhereCache 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.control.v2.AnywhereCache parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.AnywhereCache 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.control.v2.AnywhereCache 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; + } + + /** + * + * + *
+   * An Anywhere Cache Instance.
+   * 
+ * + * Protobuf type {@code google.storage.control.v2.AnywhereCache} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storage.control.v2.AnywhereCache) + com.google.storage.control.v2.AnywhereCacheOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_AnywhereCache_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_AnywhereCache_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.AnywhereCache.class, + com.google.storage.control.v2.AnywhereCache.Builder.class); + } + + // Construct using com.google.storage.control.v2.AnywhereCache.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTtlFieldBuilder(); + getCreateTimeFieldBuilder(); + getUpdateTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + zone_ = ""; + ttl_ = null; + if (ttlBuilder_ != null) { + ttlBuilder_.dispose(); + ttlBuilder_ = null; + } + admissionPolicy_ = ""; + state_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + pendingUpdate_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_AnywhereCache_descriptor; + } + + @java.lang.Override + public com.google.storage.control.v2.AnywhereCache getDefaultInstanceForType() { + return com.google.storage.control.v2.AnywhereCache.getDefaultInstance(); + } + + @java.lang.Override + public com.google.storage.control.v2.AnywhereCache build() { + com.google.storage.control.v2.AnywhereCache result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storage.control.v2.AnywhereCache buildPartial() { + com.google.storage.control.v2.AnywhereCache result = + new com.google.storage.control.v2.AnywhereCache(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.storage.control.v2.AnywhereCache result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.zone_ = zone_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.ttl_ = ttlBuilder_ == null ? ttl_ : ttlBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.admissionPolicy_ = admissionPolicy_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.pendingUpdate_ = pendingUpdate_; + } + 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.control.v2.AnywhereCache) { + return mergeFrom((com.google.storage.control.v2.AnywhereCache) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.storage.control.v2.AnywhereCache other) { + if (other == com.google.storage.control.v2.AnywhereCache.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getZone().isEmpty()) { + zone_ = other.zone_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasTtl()) { + mergeTtl(other.getTtl()); + } + if (!other.getAdmissionPolicy().isEmpty()) { + admissionPolicy_ = other.admissionPolicy_; + 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.getPendingUpdate() != false) { + setPendingUpdate(other.getPendingUpdate()); + } + 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 26: + { + input.readMessage(getTtlFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + 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 64: + { + pendingUpdate_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 74: + { + admissionPolicy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 74 + case 82: + { + zone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 82 + 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_ = ""; + + /** + * + * + *
+     * Immutable. The resource name of this AnywhereCache.
+     * Format:
+     * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + } + + /** + * + * + *
+     * Immutable. The resource name of this AnywhereCache.
+     * Format:
+     * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + } + + /** + * + * + *
+     * Immutable. The resource name of this AnywhereCache.
+     * Format:
+     * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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; + } + + /** + * + * + *
+     * Immutable. The resource name of this AnywhereCache.
+     * Format:
+     * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The resource name of this AnywhereCache.
+     * Format:
+     * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @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 zone_ = ""; + + /** + * + * + *
+     * Immutable. The zone in which the cache instance is running. For example,
+     * us-central1-a.
+     * 
+ * + * string zone = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The zone. + */ + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Immutable. The zone in which the cache instance is running. For example,
+     * us-central1-a.
+     * 
+ * + * string zone = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for zone. + */ + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Immutable. The zone in which the cache instance is running. For example,
+     * us-central1-a.
+     * 
+ * + * string zone = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The zone to set. + * @return This builder for chaining. + */ + public Builder setZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + zone_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The zone in which the cache instance is running. For example,
+     * us-central1-a.
+     * 
+ * + * string zone = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return This builder for chaining. + */ + public Builder clearZone() { + zone_ = getDefaultInstance().getZone(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Immutable. The zone in which the cache instance is running. For example,
+     * us-central1-a.
+     * 
+ * + * string zone = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @param value The bytes for zone to set. + * @return This builder for chaining. + */ + public Builder setZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + zone_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Duration ttl_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + ttlBuilder_; + + /** + * + * + *
+     * Cache entry TTL (ranges between 1h to 7d). This is a cache-level config
+     * that defines how long a cache entry can live. Default ttl value (24hrs)
+     * is applied if not specified in the create request. TTL must be in whole
+     * seconds.
+     * 
+ * + * .google.protobuf.Duration ttl = 3; + * + * @return Whether the ttl field is set. + */ + public boolean hasTtl() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Cache entry TTL (ranges between 1h to 7d). This is a cache-level config
+     * that defines how long a cache entry can live. Default ttl value (24hrs)
+     * is applied if not specified in the create request. TTL must be in whole
+     * seconds.
+     * 
+ * + * .google.protobuf.Duration ttl = 3; + * + * @return The ttl. + */ + public com.google.protobuf.Duration getTtl() { + if (ttlBuilder_ == null) { + return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_; + } else { + return ttlBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Cache entry TTL (ranges between 1h to 7d). This is a cache-level config
+     * that defines how long a cache entry can live. Default ttl value (24hrs)
+     * is applied if not specified in the create request. TTL must be in whole
+     * seconds.
+     * 
+ * + * .google.protobuf.Duration ttl = 3; + */ + public Builder setTtl(com.google.protobuf.Duration value) { + if (ttlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ttl_ = value; + } else { + ttlBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Cache entry TTL (ranges between 1h to 7d). This is a cache-level config
+     * that defines how long a cache entry can live. Default ttl value (24hrs)
+     * is applied if not specified in the create request. TTL must be in whole
+     * seconds.
+     * 
+ * + * .google.protobuf.Duration ttl = 3; + */ + public Builder setTtl(com.google.protobuf.Duration.Builder builderForValue) { + if (ttlBuilder_ == null) { + ttl_ = builderForValue.build(); + } else { + ttlBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Cache entry TTL (ranges between 1h to 7d). This is a cache-level config
+     * that defines how long a cache entry can live. Default ttl value (24hrs)
+     * is applied if not specified in the create request. TTL must be in whole
+     * seconds.
+     * 
+ * + * .google.protobuf.Duration ttl = 3; + */ + public Builder mergeTtl(com.google.protobuf.Duration value) { + if (ttlBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && ttl_ != null + && ttl_ != com.google.protobuf.Duration.getDefaultInstance()) { + getTtlBuilder().mergeFrom(value); + } else { + ttl_ = value; + } + } else { + ttlBuilder_.mergeFrom(value); + } + if (ttl_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Cache entry TTL (ranges between 1h to 7d). This is a cache-level config
+     * that defines how long a cache entry can live. Default ttl value (24hrs)
+     * is applied if not specified in the create request. TTL must be in whole
+     * seconds.
+     * 
+ * + * .google.protobuf.Duration ttl = 3; + */ + public Builder clearTtl() { + bitField0_ = (bitField0_ & ~0x00000004); + ttl_ = null; + if (ttlBuilder_ != null) { + ttlBuilder_.dispose(); + ttlBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Cache entry TTL (ranges between 1h to 7d). This is a cache-level config
+     * that defines how long a cache entry can live. Default ttl value (24hrs)
+     * is applied if not specified in the create request. TTL must be in whole
+     * seconds.
+     * 
+ * + * .google.protobuf.Duration ttl = 3; + */ + public com.google.protobuf.Duration.Builder getTtlBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getTtlFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Cache entry TTL (ranges between 1h to 7d). This is a cache-level config
+     * that defines how long a cache entry can live. Default ttl value (24hrs)
+     * is applied if not specified in the create request. TTL must be in whole
+     * seconds.
+     * 
+ * + * .google.protobuf.Duration ttl = 3; + */ + public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() { + if (ttlBuilder_ != null) { + return ttlBuilder_.getMessageOrBuilder(); + } else { + return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_; + } + } + + /** + * + * + *
+     * Cache entry TTL (ranges between 1h to 7d). This is a cache-level config
+     * that defines how long a cache entry can live. Default ttl value (24hrs)
+     * is applied if not specified in the create request. TTL must be in whole
+     * seconds.
+     * 
+ * + * .google.protobuf.Duration ttl = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTtlFieldBuilder() { + if (ttlBuilder_ == null) { + ttlBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>(getTtl(), getParentForChildren(), isClean()); + ttl_ = null; + } + return ttlBuilder_; + } + + private java.lang.Object admissionPolicy_ = ""; + + /** + * + * + *
+     * Cache admission policy. Valid policies includes:
+     * `admit-on-first-miss` and `admit-on-second-miss`. Defaults to
+     * `admit-on-first-miss`. Default value is applied if not specified in the
+     * create request.
+     * 
+ * + * string admission_policy = 9; + * + * @return The admissionPolicy. + */ + public java.lang.String getAdmissionPolicy() { + java.lang.Object ref = admissionPolicy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + admissionPolicy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Cache admission policy. Valid policies includes:
+     * `admit-on-first-miss` and `admit-on-second-miss`. Defaults to
+     * `admit-on-first-miss`. Default value is applied if not specified in the
+     * create request.
+     * 
+ * + * string admission_policy = 9; + * + * @return The bytes for admissionPolicy. + */ + public com.google.protobuf.ByteString getAdmissionPolicyBytes() { + java.lang.Object ref = admissionPolicy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + admissionPolicy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Cache admission policy. Valid policies includes:
+     * `admit-on-first-miss` and `admit-on-second-miss`. Defaults to
+     * `admit-on-first-miss`. Default value is applied if not specified in the
+     * create request.
+     * 
+ * + * string admission_policy = 9; + * + * @param value The admissionPolicy to set. + * @return This builder for chaining. + */ + public Builder setAdmissionPolicy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + admissionPolicy_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Cache admission policy. Valid policies includes:
+     * `admit-on-first-miss` and `admit-on-second-miss`. Defaults to
+     * `admit-on-first-miss`. Default value is applied if not specified in the
+     * create request.
+     * 
+ * + * string admission_policy = 9; + * + * @return This builder for chaining. + */ + public Builder clearAdmissionPolicy() { + admissionPolicy_ = getDefaultInstance().getAdmissionPolicy(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Cache admission policy. Valid policies includes:
+     * `admit-on-first-miss` and `admit-on-second-miss`. Defaults to
+     * `admit-on-first-miss`. Default value is applied if not specified in the
+     * create request.
+     * 
+ * + * string admission_policy = 9; + * + * @param value The bytes for admissionPolicy to set. + * @return This builder for chaining. + */ + public Builder setAdmissionPolicyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + admissionPolicy_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object state_ = ""; + + /** + * + * + *
+     * Output only. Cache state including RUNNING, CREATING, DISABLED and PAUSED.
+     * 
+ * + * string state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + + /** + * + * + *
+     * Output only. Cache state including RUNNING, CREATING, DISABLED and PAUSED.
+     * 
+ * + * string state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + + /** + * + * + *
+     * Output only. Cache state including RUNNING, CREATING, DISABLED and PAUSED.
+     * 
+ * + * string state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + + /** + * + * + *
+     * Output only. Cache state including RUNNING, CREATING, DISABLED and PAUSED.
+     * 
+ * + * string state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearState() { + state_ = getDefaultInstance().getState(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. Cache state including RUNNING, CREATING, DISABLED and PAUSED.
+     * 
+ * + * string state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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. Time when Anywhere cache instance is allocated.
+     * 
+ * + * + * .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. Time when Anywhere cache instance is allocated.
+     * 
+ * + * + * .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. Time when Anywhere cache instance is allocated.
+     * 
+ * + * + * .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. Time when Anywhere cache instance is allocated.
+     * 
+ * + * + * .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. Time when Anywhere cache instance is allocated.
+     * 
+ * + * + * .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. Time when Anywhere cache instance is allocated.
+     * 
+ * + * + * .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. Time when Anywhere cache instance is allocated.
+     * 
+ * + * + * .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. Time when Anywhere cache instance is allocated.
+     * 
+ * + * + * .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. Time when Anywhere cache instance is allocated.
+     * 
+ * + * + * .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. Time when Anywhere cache instance is last updated, including
+     * creation.
+     * 
+ * + * + * .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. Time when Anywhere cache instance is last updated, including
+     * creation.
+     * 
+ * + * + * .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. Time when Anywhere cache instance is last updated, including
+     * creation.
+     * 
+ * + * + * .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. Time when Anywhere cache instance is last updated, including
+     * creation.
+     * 
+ * + * + * .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. Time when Anywhere cache instance is last updated, including
+     * creation.
+     * 
+ * + * + * .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. Time when Anywhere cache instance is last updated, including
+     * creation.
+     * 
+ * + * + * .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. Time when Anywhere cache instance is last updated, including
+     * creation.
+     * 
+ * + * + * .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. Time when Anywhere cache instance is last updated, including
+     * creation.
+     * 
+ * + * + * .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. Time when Anywhere cache instance is last updated, including
+     * creation.
+     * 
+ * + * + * .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 boolean pendingUpdate_; + + /** + * + * + *
+     * Output only. True if there is an active update operation against this cache
+     * instance. Subsequential update requests will be rejected if this field is
+     * true. Output only.
+     * 
+ * + * bool pending_update = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pendingUpdate. + */ + @java.lang.Override + public boolean getPendingUpdate() { + return pendingUpdate_; + } + + /** + * + * + *
+     * Output only. True if there is an active update operation against this cache
+     * instance. Subsequential update requests will be rejected if this field is
+     * true. Output only.
+     * 
+ * + * bool pending_update = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The pendingUpdate to set. + * @return This builder for chaining. + */ + public Builder setPendingUpdate(boolean value) { + + pendingUpdate_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. True if there is an active update operation against this cache
+     * instance. Subsequential update requests will be rejected if this field is
+     * true. Output only.
+     * 
+ * + * bool pending_update = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPendingUpdate() { + bitField0_ = (bitField0_ & ~0x00000080); + pendingUpdate_ = 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.control.v2.AnywhereCache) + } + + // @@protoc_insertion_point(class_scope:google.storage.control.v2.AnywhereCache) + private static final com.google.storage.control.v2.AnywhereCache DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storage.control.v2.AnywhereCache(); + } + + public static com.google.storage.control.v2.AnywhereCache getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnywhereCache 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.control.v2.AnywhereCache getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/AnywhereCacheName.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/AnywhereCacheName.java new file mode 100644 index 0000000000..bdab5966fc --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/AnywhereCacheName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2025 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.control.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 AnywhereCacheName implements ResourceName { + private static final PathTemplate PROJECT_BUCKET_ANYWHERE_CACHE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}"); + private volatile Map fieldValuesMap; + private final String project; + private final String bucket; + private final String anywhereCache; + + @Deprecated + protected AnywhereCacheName() { + project = null; + bucket = null; + anywhereCache = null; + } + + private AnywhereCacheName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + bucket = Preconditions.checkNotNull(builder.getBucket()); + anywhereCache = Preconditions.checkNotNull(builder.getAnywhereCache()); + } + + public String getProject() { + return project; + } + + public String getBucket() { + return bucket; + } + + public String getAnywhereCache() { + return anywhereCache; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AnywhereCacheName of(String project, String bucket, String anywhereCache) { + return newBuilder() + .setProject(project) + .setBucket(bucket) + .setAnywhereCache(anywhereCache) + .build(); + } + + public static String format(String project, String bucket, String anywhereCache) { + return newBuilder() + .setProject(project) + .setBucket(bucket) + .setAnywhereCache(anywhereCache) + .build() + .toString(); + } + + public static AnywhereCacheName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_BUCKET_ANYWHERE_CACHE.validatedMatch( + formattedString, "AnywhereCacheName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("bucket"), matchMap.get("anywhere_cache")); + } + + 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 (AnywhereCacheName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_BUCKET_ANYWHERE_CACHE.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 (anywhereCache != null) { + fieldMapBuilder.put("anywhere_cache", anywhereCache); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_BUCKET_ANYWHERE_CACHE.instantiate( + "project", project, "bucket", bucket, "anywhere_cache", anywhereCache); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + AnywhereCacheName that = ((AnywhereCacheName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.bucket, that.bucket) + && Objects.equals(this.anywhereCache, that.anywhereCache); + } + 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(anywhereCache); + return h; + } + + /** Builder for projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}. */ + public static class Builder { + private String project; + private String bucket; + private String anywhereCache; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getBucket() { + return bucket; + } + + public String getAnywhereCache() { + return anywhereCache; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setBucket(String bucket) { + this.bucket = bucket; + return this; + } + + public Builder setAnywhereCache(String anywhereCache) { + this.anywhereCache = anywhereCache; + return this; + } + + private Builder(AnywhereCacheName anywhereCacheName) { + this.project = anywhereCacheName.project; + this.bucket = anywhereCacheName.bucket; + this.anywhereCache = anywhereCacheName.anywhereCache; + } + + public AnywhereCacheName build() { + return new AnywhereCacheName(this); + } + } +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/AnywhereCacheOrBuilder.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/AnywhereCacheOrBuilder.java new file mode 100644 index 0000000000..f0385fa286 --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/AnywhereCacheOrBuilder.java @@ -0,0 +1,286 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +public interface AnywhereCacheOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storage.control.v2.AnywhereCache) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Immutable. The resource name of this AnywhereCache.
+   * Format:
+   * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Immutable. The resource name of this AnywhereCache.
+   * Format:
+   * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Immutable. The zone in which the cache instance is running. For example,
+   * us-central1-a.
+   * 
+ * + * string zone = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The zone. + */ + java.lang.String getZone(); + + /** + * + * + *
+   * Immutable. The zone in which the cache instance is running. For example,
+   * us-central1-a.
+   * 
+ * + * string zone = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * + * @return The bytes for zone. + */ + com.google.protobuf.ByteString getZoneBytes(); + + /** + * + * + *
+   * Cache entry TTL (ranges between 1h to 7d). This is a cache-level config
+   * that defines how long a cache entry can live. Default ttl value (24hrs)
+   * is applied if not specified in the create request. TTL must be in whole
+   * seconds.
+   * 
+ * + * .google.protobuf.Duration ttl = 3; + * + * @return Whether the ttl field is set. + */ + boolean hasTtl(); + + /** + * + * + *
+   * Cache entry TTL (ranges between 1h to 7d). This is a cache-level config
+   * that defines how long a cache entry can live. Default ttl value (24hrs)
+   * is applied if not specified in the create request. TTL must be in whole
+   * seconds.
+   * 
+ * + * .google.protobuf.Duration ttl = 3; + * + * @return The ttl. + */ + com.google.protobuf.Duration getTtl(); + + /** + * + * + *
+   * Cache entry TTL (ranges between 1h to 7d). This is a cache-level config
+   * that defines how long a cache entry can live. Default ttl value (24hrs)
+   * is applied if not specified in the create request. TTL must be in whole
+   * seconds.
+   * 
+ * + * .google.protobuf.Duration ttl = 3; + */ + com.google.protobuf.DurationOrBuilder getTtlOrBuilder(); + + /** + * + * + *
+   * Cache admission policy. Valid policies includes:
+   * `admit-on-first-miss` and `admit-on-second-miss`. Defaults to
+   * `admit-on-first-miss`. Default value is applied if not specified in the
+   * create request.
+   * 
+ * + * string admission_policy = 9; + * + * @return The admissionPolicy. + */ + java.lang.String getAdmissionPolicy(); + + /** + * + * + *
+   * Cache admission policy. Valid policies includes:
+   * `admit-on-first-miss` and `admit-on-second-miss`. Defaults to
+   * `admit-on-first-miss`. Default value is applied if not specified in the
+   * create request.
+   * 
+ * + * string admission_policy = 9; + * + * @return The bytes for admissionPolicy. + */ + com.google.protobuf.ByteString getAdmissionPolicyBytes(); + + /** + * + * + *
+   * Output only. Cache state including RUNNING, CREATING, DISABLED and PAUSED.
+   * 
+ * + * string state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The state. + */ + java.lang.String getState(); + + /** + * + * + *
+   * Output only. Cache state including RUNNING, CREATING, DISABLED and PAUSED.
+   * 
+ * + * string state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for state. + */ + com.google.protobuf.ByteString getStateBytes(); + + /** + * + * + *
+   * Output only. Time when Anywhere cache instance is allocated.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + + /** + * + * + *
+   * Output only. Time when Anywhere cache instance is allocated.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + + /** + * + * + *
+   * Output only. Time when Anywhere cache instance is allocated.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Time when Anywhere cache instance is last updated, including
+   * creation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. Time when Anywhere cache instance is last updated, including
+   * creation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. Time when Anywhere cache instance is last updated, including
+   * creation.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. True if there is an active update operation against this cache
+   * instance. Subsequential update requests will be rejected if this field is
+   * true. Output only.
+   * 
+ * + * bool pending_update = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The pendingUpdate. + */ + boolean getPendingUpdate(); +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/CreateAnywhereCacheMetadata.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/CreateAnywhereCacheMetadata.java new file mode 100644 index 0000000000..7aa74ec265 --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/CreateAnywhereCacheMetadata.java @@ -0,0 +1,1757 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +/** + * + * + *
+ * Message returned in the metadata field of the Operation resource for
+ * CreateAnywhereCache operations.
+ * 
+ * + * Protobuf type {@code google.storage.control.v2.CreateAnywhereCacheMetadata} + */ +public final class CreateAnywhereCacheMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storage.control.v2.CreateAnywhereCacheMetadata) + CreateAnywhereCacheMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CreateAnywhereCacheMetadata.newBuilder() to construct. + private CreateAnywhereCacheMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateAnywhereCacheMetadata() { + anywhereCacheId_ = ""; + zone_ = ""; + admissionPolicy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateAnywhereCacheMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_CreateAnywhereCacheMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_CreateAnywhereCacheMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.CreateAnywhereCacheMetadata.class, + com.google.storage.control.v2.CreateAnywhereCacheMetadata.Builder.class); + } + + private int bitField0_; + public static final int COMMON_METADATA_FIELD_NUMBER = 1; + private com.google.storage.control.v2.CommonLongRunningOperationMetadata commonMetadata_; + + /** + * + * + *
+   * Generic metadata for the long running operation.
+   * 
+ * + * .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * + * @return Whether the commonMetadata field is set. + */ + @java.lang.Override + public boolean hasCommonMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Generic metadata for the long running operation.
+   * 
+ * + * .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * + * @return The commonMetadata. + */ + @java.lang.Override + public com.google.storage.control.v2.CommonLongRunningOperationMetadata getCommonMetadata() { + return commonMetadata_ == null + ? com.google.storage.control.v2.CommonLongRunningOperationMetadata.getDefaultInstance() + : commonMetadata_; + } + + /** + * + * + *
+   * Generic metadata for the long running operation.
+   * 
+ * + * .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + */ + @java.lang.Override + public com.google.storage.control.v2.CommonLongRunningOperationMetadataOrBuilder + getCommonMetadataOrBuilder() { + return commonMetadata_ == null + ? com.google.storage.control.v2.CommonLongRunningOperationMetadata.getDefaultInstance() + : commonMetadata_; + } + + public static final int ANYWHERE_CACHE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object anywhereCacheId_ = ""; + + /** + * + * + *
+   * Anywhere Cache ID.
+   * 
+ * + * optional string anywhere_cache_id = 2; + * + * @return Whether the anywhereCacheId field is set. + */ + @java.lang.Override + public boolean hasAnywhereCacheId() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Anywhere Cache ID.
+   * 
+ * + * optional string anywhere_cache_id = 2; + * + * @return The anywhereCacheId. + */ + @java.lang.Override + public java.lang.String getAnywhereCacheId() { + java.lang.Object ref = anywhereCacheId_; + 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(); + anywhereCacheId_ = s; + return s; + } + } + + /** + * + * + *
+   * Anywhere Cache ID.
+   * 
+ * + * optional string anywhere_cache_id = 2; + * + * @return The bytes for anywhereCacheId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAnywhereCacheIdBytes() { + java.lang.Object ref = anywhereCacheId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + anywhereCacheId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ZONE_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object zone_ = ""; + + /** + * + * + *
+   * The zone in which the cache instance is running. For example,
+   * us-central1-a.
+   * 
+ * + * optional string zone = 6; + * + * @return Whether the zone field is set. + */ + @java.lang.Override + public boolean hasZone() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * The zone in which the cache instance is running. For example,
+   * us-central1-a.
+   * 
+ * + * optional string zone = 6; + * + * @return The zone. + */ + @java.lang.Override + public java.lang.String getZone() { + java.lang.Object ref = zone_; + 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(); + zone_ = s; + return s; + } + } + + /** + * + * + *
+   * The zone in which the cache instance is running. For example,
+   * us-central1-a.
+   * 
+ * + * optional string zone = 6; + * + * @return The bytes for zone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TTL_FIELD_NUMBER = 3; + private com.google.protobuf.Duration ttl_; + + /** + * + * + *
+   * Anywhere Cache entry's TTL. A cache-level config that is applied to all new
+   * cache entries on admission. Default ttl value (24hrs) is applied if not
+   * specified in the create request.
+   * 
+ * + * optional .google.protobuf.Duration ttl = 3; + * + * @return Whether the ttl field is set. + */ + @java.lang.Override + public boolean hasTtl() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Anywhere Cache entry's TTL. A cache-level config that is applied to all new
+   * cache entries on admission. Default ttl value (24hrs) is applied if not
+   * specified in the create request.
+   * 
+ * + * optional .google.protobuf.Duration ttl = 3; + * + * @return The ttl. + */ + @java.lang.Override + public com.google.protobuf.Duration getTtl() { + return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_; + } + + /** + * + * + *
+   * Anywhere Cache entry's TTL. A cache-level config that is applied to all new
+   * cache entries on admission. Default ttl value (24hrs) is applied if not
+   * specified in the create request.
+   * 
+ * + * optional .google.protobuf.Duration ttl = 3; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() { + return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_; + } + + public static final int ADMISSION_POLICY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object admissionPolicy_ = ""; + + /** + * + * + *
+   * Anywhere Cache entry Admission Policy in kebab-case (e.g.,
+   * "admit-on-first-miss"). Default admission policy (admit-on-first-miss) is
+   * applied if not specified in the create request.
+   * 
+ * + * optional string admission_policy = 5; + * + * @return Whether the admissionPolicy field is set. + */ + @java.lang.Override + public boolean hasAdmissionPolicy() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * Anywhere Cache entry Admission Policy in kebab-case (e.g.,
+   * "admit-on-first-miss"). Default admission policy (admit-on-first-miss) is
+   * applied if not specified in the create request.
+   * 
+ * + * optional string admission_policy = 5; + * + * @return The admissionPolicy. + */ + @java.lang.Override + public java.lang.String getAdmissionPolicy() { + java.lang.Object ref = admissionPolicy_; + 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(); + admissionPolicy_ = s; + return s; + } + } + + /** + * + * + *
+   * Anywhere Cache entry Admission Policy in kebab-case (e.g.,
+   * "admit-on-first-miss"). Default admission policy (admit-on-first-miss) is
+   * applied if not specified in the create request.
+   * 
+ * + * optional string admission_policy = 5; + * + * @return The bytes for admissionPolicy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAdmissionPolicyBytes() { + java.lang.Object ref = admissionPolicy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + admissionPolicy_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCommonMetadata()); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, anywhereCacheId_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(3, getTtl()); + } + if (((bitField0_ & 0x00000010) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, admissionPolicy_); + } + if (((bitField0_ & 0x00000004) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, zone_); + } + 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, getCommonMetadata()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, anywhereCacheId_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTtl()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, admissionPolicy_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, zone_); + } + 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.control.v2.CreateAnywhereCacheMetadata)) { + return super.equals(obj); + } + com.google.storage.control.v2.CreateAnywhereCacheMetadata other = + (com.google.storage.control.v2.CreateAnywhereCacheMetadata) obj; + + if (hasCommonMetadata() != other.hasCommonMetadata()) return false; + if (hasCommonMetadata()) { + if (!getCommonMetadata().equals(other.getCommonMetadata())) return false; + } + if (hasAnywhereCacheId() != other.hasAnywhereCacheId()) return false; + if (hasAnywhereCacheId()) { + if (!getAnywhereCacheId().equals(other.getAnywhereCacheId())) return false; + } + if (hasZone() != other.hasZone()) return false; + if (hasZone()) { + if (!getZone().equals(other.getZone())) return false; + } + if (hasTtl() != other.hasTtl()) return false; + if (hasTtl()) { + if (!getTtl().equals(other.getTtl())) return false; + } + if (hasAdmissionPolicy() != other.hasAdmissionPolicy()) return false; + if (hasAdmissionPolicy()) { + if (!getAdmissionPolicy().equals(other.getAdmissionPolicy())) 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 (hasCommonMetadata()) { + hash = (37 * hash) + COMMON_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getCommonMetadata().hashCode(); + } + if (hasAnywhereCacheId()) { + hash = (37 * hash) + ANYWHERE_CACHE_ID_FIELD_NUMBER; + hash = (53 * hash) + getAnywhereCacheId().hashCode(); + } + if (hasZone()) { + hash = (37 * hash) + ZONE_FIELD_NUMBER; + hash = (53 * hash) + getZone().hashCode(); + } + if (hasTtl()) { + hash = (37 * hash) + TTL_FIELD_NUMBER; + hash = (53 * hash) + getTtl().hashCode(); + } + if (hasAdmissionPolicy()) { + hash = (37 * hash) + ADMISSION_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getAdmissionPolicy().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storage.control.v2.CreateAnywhereCacheMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.CreateAnywhereCacheMetadata 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.control.v2.CreateAnywhereCacheMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.CreateAnywhereCacheMetadata 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.control.v2.CreateAnywhereCacheMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.CreateAnywhereCacheMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storage.control.v2.CreateAnywhereCacheMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.CreateAnywhereCacheMetadata 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.control.v2.CreateAnywhereCacheMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.CreateAnywhereCacheMetadata 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.control.v2.CreateAnywhereCacheMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.CreateAnywhereCacheMetadata 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.control.v2.CreateAnywhereCacheMetadata 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; + } + + /** + * + * + *
+   * Message returned in the metadata field of the Operation resource for
+   * CreateAnywhereCache operations.
+   * 
+ * + * Protobuf type {@code google.storage.control.v2.CreateAnywhereCacheMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storage.control.v2.CreateAnywhereCacheMetadata) + com.google.storage.control.v2.CreateAnywhereCacheMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_CreateAnywhereCacheMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_CreateAnywhereCacheMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.CreateAnywhereCacheMetadata.class, + com.google.storage.control.v2.CreateAnywhereCacheMetadata.Builder.class); + } + + // Construct using com.google.storage.control.v2.CreateAnywhereCacheMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCommonMetadataFieldBuilder(); + getTtlFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + commonMetadata_ = null; + if (commonMetadataBuilder_ != null) { + commonMetadataBuilder_.dispose(); + commonMetadataBuilder_ = null; + } + anywhereCacheId_ = ""; + zone_ = ""; + ttl_ = null; + if (ttlBuilder_ != null) { + ttlBuilder_.dispose(); + ttlBuilder_ = null; + } + admissionPolicy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_CreateAnywhereCacheMetadata_descriptor; + } + + @java.lang.Override + public com.google.storage.control.v2.CreateAnywhereCacheMetadata getDefaultInstanceForType() { + return com.google.storage.control.v2.CreateAnywhereCacheMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.storage.control.v2.CreateAnywhereCacheMetadata build() { + com.google.storage.control.v2.CreateAnywhereCacheMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storage.control.v2.CreateAnywhereCacheMetadata buildPartial() { + com.google.storage.control.v2.CreateAnywhereCacheMetadata result = + new com.google.storage.control.v2.CreateAnywhereCacheMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.storage.control.v2.CreateAnywhereCacheMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.commonMetadata_ = + commonMetadataBuilder_ == null ? commonMetadata_ : commonMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.anywhereCacheId_ = anywhereCacheId_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.zone_ = zone_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.ttl_ = ttlBuilder_ == null ? ttl_ : ttlBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.admissionPolicy_ = admissionPolicy_; + to_bitField0_ |= 0x00000010; + } + 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.control.v2.CreateAnywhereCacheMetadata) { + return mergeFrom((com.google.storage.control.v2.CreateAnywhereCacheMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.storage.control.v2.CreateAnywhereCacheMetadata other) { + if (other == com.google.storage.control.v2.CreateAnywhereCacheMetadata.getDefaultInstance()) + return this; + if (other.hasCommonMetadata()) { + mergeCommonMetadata(other.getCommonMetadata()); + } + if (other.hasAnywhereCacheId()) { + anywhereCacheId_ = other.anywhereCacheId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasZone()) { + zone_ = other.zone_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasTtl()) { + mergeTtl(other.getTtl()); + } + if (other.hasAdmissionPolicy()) { + admissionPolicy_ = other.admissionPolicy_; + bitField0_ |= 0x00000010; + 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: + { + input.readMessage(getCommonMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + anywhereCacheId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getTtlFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 42: + { + admissionPolicy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + zone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 50 + 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.control.v2.CommonLongRunningOperationMetadata commonMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.CommonLongRunningOperationMetadata, + com.google.storage.control.v2.CommonLongRunningOperationMetadata.Builder, + com.google.storage.control.v2.CommonLongRunningOperationMetadataOrBuilder> + commonMetadataBuilder_; + + /** + * + * + *
+     * Generic metadata for the long running operation.
+     * 
+ * + * .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * + * + * @return Whether the commonMetadata field is set. + */ + public boolean hasCommonMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Generic metadata for the long running operation.
+     * 
+ * + * .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * + * + * @return The commonMetadata. + */ + public com.google.storage.control.v2.CommonLongRunningOperationMetadata getCommonMetadata() { + if (commonMetadataBuilder_ == null) { + return commonMetadata_ == null + ? com.google.storage.control.v2.CommonLongRunningOperationMetadata.getDefaultInstance() + : commonMetadata_; + } else { + return commonMetadataBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Generic metadata for the long running operation.
+     * 
+ * + * .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * + */ + public Builder setCommonMetadata( + com.google.storage.control.v2.CommonLongRunningOperationMetadata value) { + if (commonMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + commonMetadata_ = value; + } else { + commonMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Generic metadata for the long running operation.
+     * 
+ * + * .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * + */ + public Builder setCommonMetadata( + com.google.storage.control.v2.CommonLongRunningOperationMetadata.Builder builderForValue) { + if (commonMetadataBuilder_ == null) { + commonMetadata_ = builderForValue.build(); + } else { + commonMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Generic metadata for the long running operation.
+     * 
+ * + * .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * + */ + public Builder mergeCommonMetadata( + com.google.storage.control.v2.CommonLongRunningOperationMetadata value) { + if (commonMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && commonMetadata_ != null + && commonMetadata_ + != com.google.storage.control.v2.CommonLongRunningOperationMetadata + .getDefaultInstance()) { + getCommonMetadataBuilder().mergeFrom(value); + } else { + commonMetadata_ = value; + } + } else { + commonMetadataBuilder_.mergeFrom(value); + } + if (commonMetadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Generic metadata for the long running operation.
+     * 
+ * + * .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * + */ + public Builder clearCommonMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + commonMetadata_ = null; + if (commonMetadataBuilder_ != null) { + commonMetadataBuilder_.dispose(); + commonMetadataBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Generic metadata for the long running operation.
+     * 
+ * + * .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * + */ + public com.google.storage.control.v2.CommonLongRunningOperationMetadata.Builder + getCommonMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCommonMetadataFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Generic metadata for the long running operation.
+     * 
+ * + * .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * + */ + public com.google.storage.control.v2.CommonLongRunningOperationMetadataOrBuilder + getCommonMetadataOrBuilder() { + if (commonMetadataBuilder_ != null) { + return commonMetadataBuilder_.getMessageOrBuilder(); + } else { + return commonMetadata_ == null + ? com.google.storage.control.v2.CommonLongRunningOperationMetadata.getDefaultInstance() + : commonMetadata_; + } + } + + /** + * + * + *
+     * Generic metadata for the long running operation.
+     * 
+ * + * .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.CommonLongRunningOperationMetadata, + com.google.storage.control.v2.CommonLongRunningOperationMetadata.Builder, + com.google.storage.control.v2.CommonLongRunningOperationMetadataOrBuilder> + getCommonMetadataFieldBuilder() { + if (commonMetadataBuilder_ == null) { + commonMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.CommonLongRunningOperationMetadata, + com.google.storage.control.v2.CommonLongRunningOperationMetadata.Builder, + com.google.storage.control.v2.CommonLongRunningOperationMetadataOrBuilder>( + getCommonMetadata(), getParentForChildren(), isClean()); + commonMetadata_ = null; + } + return commonMetadataBuilder_; + } + + private java.lang.Object anywhereCacheId_ = ""; + + /** + * + * + *
+     * Anywhere Cache ID.
+     * 
+ * + * optional string anywhere_cache_id = 2; + * + * @return Whether the anywhereCacheId field is set. + */ + public boolean hasAnywhereCacheId() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Anywhere Cache ID.
+     * 
+ * + * optional string anywhere_cache_id = 2; + * + * @return The anywhereCacheId. + */ + public java.lang.String getAnywhereCacheId() { + java.lang.Object ref = anywhereCacheId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + anywhereCacheId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Anywhere Cache ID.
+     * 
+ * + * optional string anywhere_cache_id = 2; + * + * @return The bytes for anywhereCacheId. + */ + public com.google.protobuf.ByteString getAnywhereCacheIdBytes() { + java.lang.Object ref = anywhereCacheId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + anywhereCacheId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Anywhere Cache ID.
+     * 
+ * + * optional string anywhere_cache_id = 2; + * + * @param value The anywhereCacheId to set. + * @return This builder for chaining. + */ + public Builder setAnywhereCacheId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + anywhereCacheId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Anywhere Cache ID.
+     * 
+ * + * optional string anywhere_cache_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearAnywhereCacheId() { + anywhereCacheId_ = getDefaultInstance().getAnywhereCacheId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Anywhere Cache ID.
+     * 
+ * + * optional string anywhere_cache_id = 2; + * + * @param value The bytes for anywhereCacheId to set. + * @return This builder for chaining. + */ + public Builder setAnywhereCacheIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + anywhereCacheId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object zone_ = ""; + + /** + * + * + *
+     * The zone in which the cache instance is running. For example,
+     * us-central1-a.
+     * 
+ * + * optional string zone = 6; + * + * @return Whether the zone field is set. + */ + public boolean hasZone() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * The zone in which the cache instance is running. For example,
+     * us-central1-a.
+     * 
+ * + * optional string zone = 6; + * + * @return The zone. + */ + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The zone in which the cache instance is running. For example,
+     * us-central1-a.
+     * 
+ * + * optional string zone = 6; + * + * @return The bytes for zone. + */ + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The zone in which the cache instance is running. For example,
+     * us-central1-a.
+     * 
+ * + * optional string zone = 6; + * + * @param value The zone to set. + * @return This builder for chaining. + */ + public Builder setZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + zone_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The zone in which the cache instance is running. For example,
+     * us-central1-a.
+     * 
+ * + * optional string zone = 6; + * + * @return This builder for chaining. + */ + public Builder clearZone() { + zone_ = getDefaultInstance().getZone(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * The zone in which the cache instance is running. For example,
+     * us-central1-a.
+     * 
+ * + * optional string zone = 6; + * + * @param value The bytes for zone to set. + * @return This builder for chaining. + */ + public Builder setZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + zone_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Duration ttl_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + ttlBuilder_; + + /** + * + * + *
+     * Anywhere Cache entry's TTL. A cache-level config that is applied to all new
+     * cache entries on admission. Default ttl value (24hrs) is applied if not
+     * specified in the create request.
+     * 
+ * + * optional .google.protobuf.Duration ttl = 3; + * + * @return Whether the ttl field is set. + */ + public boolean hasTtl() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Anywhere Cache entry's TTL. A cache-level config that is applied to all new
+     * cache entries on admission. Default ttl value (24hrs) is applied if not
+     * specified in the create request.
+     * 
+ * + * optional .google.protobuf.Duration ttl = 3; + * + * @return The ttl. + */ + public com.google.protobuf.Duration getTtl() { + if (ttlBuilder_ == null) { + return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_; + } else { + return ttlBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Anywhere Cache entry's TTL. A cache-level config that is applied to all new
+     * cache entries on admission. Default ttl value (24hrs) is applied if not
+     * specified in the create request.
+     * 
+ * + * optional .google.protobuf.Duration ttl = 3; + */ + public Builder setTtl(com.google.protobuf.Duration value) { + if (ttlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ttl_ = value; + } else { + ttlBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Anywhere Cache entry's TTL. A cache-level config that is applied to all new
+     * cache entries on admission. Default ttl value (24hrs) is applied if not
+     * specified in the create request.
+     * 
+ * + * optional .google.protobuf.Duration ttl = 3; + */ + public Builder setTtl(com.google.protobuf.Duration.Builder builderForValue) { + if (ttlBuilder_ == null) { + ttl_ = builderForValue.build(); + } else { + ttlBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Anywhere Cache entry's TTL. A cache-level config that is applied to all new
+     * cache entries on admission. Default ttl value (24hrs) is applied if not
+     * specified in the create request.
+     * 
+ * + * optional .google.protobuf.Duration ttl = 3; + */ + public Builder mergeTtl(com.google.protobuf.Duration value) { + if (ttlBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && ttl_ != null + && ttl_ != com.google.protobuf.Duration.getDefaultInstance()) { + getTtlBuilder().mergeFrom(value); + } else { + ttl_ = value; + } + } else { + ttlBuilder_.mergeFrom(value); + } + if (ttl_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Anywhere Cache entry's TTL. A cache-level config that is applied to all new
+     * cache entries on admission. Default ttl value (24hrs) is applied if not
+     * specified in the create request.
+     * 
+ * + * optional .google.protobuf.Duration ttl = 3; + */ + public Builder clearTtl() { + bitField0_ = (bitField0_ & ~0x00000008); + ttl_ = null; + if (ttlBuilder_ != null) { + ttlBuilder_.dispose(); + ttlBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Anywhere Cache entry's TTL. A cache-level config that is applied to all new
+     * cache entries on admission. Default ttl value (24hrs) is applied if not
+     * specified in the create request.
+     * 
+ * + * optional .google.protobuf.Duration ttl = 3; + */ + public com.google.protobuf.Duration.Builder getTtlBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getTtlFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Anywhere Cache entry's TTL. A cache-level config that is applied to all new
+     * cache entries on admission. Default ttl value (24hrs) is applied if not
+     * specified in the create request.
+     * 
+ * + * optional .google.protobuf.Duration ttl = 3; + */ + public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() { + if (ttlBuilder_ != null) { + return ttlBuilder_.getMessageOrBuilder(); + } else { + return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_; + } + } + + /** + * + * + *
+     * Anywhere Cache entry's TTL. A cache-level config that is applied to all new
+     * cache entries on admission. Default ttl value (24hrs) is applied if not
+     * specified in the create request.
+     * 
+ * + * optional .google.protobuf.Duration ttl = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTtlFieldBuilder() { + if (ttlBuilder_ == null) { + ttlBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>(getTtl(), getParentForChildren(), isClean()); + ttl_ = null; + } + return ttlBuilder_; + } + + private java.lang.Object admissionPolicy_ = ""; + + /** + * + * + *
+     * Anywhere Cache entry Admission Policy in kebab-case (e.g.,
+     * "admit-on-first-miss"). Default admission policy (admit-on-first-miss) is
+     * applied if not specified in the create request.
+     * 
+ * + * optional string admission_policy = 5; + * + * @return Whether the admissionPolicy field is set. + */ + public boolean hasAdmissionPolicy() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Anywhere Cache entry Admission Policy in kebab-case (e.g.,
+     * "admit-on-first-miss"). Default admission policy (admit-on-first-miss) is
+     * applied if not specified in the create request.
+     * 
+ * + * optional string admission_policy = 5; + * + * @return The admissionPolicy. + */ + public java.lang.String getAdmissionPolicy() { + java.lang.Object ref = admissionPolicy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + admissionPolicy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Anywhere Cache entry Admission Policy in kebab-case (e.g.,
+     * "admit-on-first-miss"). Default admission policy (admit-on-first-miss) is
+     * applied if not specified in the create request.
+     * 
+ * + * optional string admission_policy = 5; + * + * @return The bytes for admissionPolicy. + */ + public com.google.protobuf.ByteString getAdmissionPolicyBytes() { + java.lang.Object ref = admissionPolicy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + admissionPolicy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Anywhere Cache entry Admission Policy in kebab-case (e.g.,
+     * "admit-on-first-miss"). Default admission policy (admit-on-first-miss) is
+     * applied if not specified in the create request.
+     * 
+ * + * optional string admission_policy = 5; + * + * @param value The admissionPolicy to set. + * @return This builder for chaining. + */ + public Builder setAdmissionPolicy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + admissionPolicy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Anywhere Cache entry Admission Policy in kebab-case (e.g.,
+     * "admit-on-first-miss"). Default admission policy (admit-on-first-miss) is
+     * applied if not specified in the create request.
+     * 
+ * + * optional string admission_policy = 5; + * + * @return This builder for chaining. + */ + public Builder clearAdmissionPolicy() { + admissionPolicy_ = getDefaultInstance().getAdmissionPolicy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * Anywhere Cache entry Admission Policy in kebab-case (e.g.,
+     * "admit-on-first-miss"). Default admission policy (admit-on-first-miss) is
+     * applied if not specified in the create request.
+     * 
+ * + * optional string admission_policy = 5; + * + * @param value The bytes for admissionPolicy to set. + * @return This builder for chaining. + */ + public Builder setAdmissionPolicyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + admissionPolicy_ = value; + bitField0_ |= 0x00000010; + 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.control.v2.CreateAnywhereCacheMetadata) + } + + // @@protoc_insertion_point(class_scope:google.storage.control.v2.CreateAnywhereCacheMetadata) + private static final com.google.storage.control.v2.CreateAnywhereCacheMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storage.control.v2.CreateAnywhereCacheMetadata(); + } + + public static com.google.storage.control.v2.CreateAnywhereCacheMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateAnywhereCacheMetadata 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.control.v2.CreateAnywhereCacheMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/CreateAnywhereCacheMetadataOrBuilder.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/CreateAnywhereCacheMetadataOrBuilder.java new file mode 100644 index 0000000000..342ee71ae2 --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/CreateAnywhereCacheMetadataOrBuilder.java @@ -0,0 +1,233 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +public interface CreateAnywhereCacheMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storage.control.v2.CreateAnywhereCacheMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Generic metadata for the long running operation.
+   * 
+ * + * .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * + * @return Whether the commonMetadata field is set. + */ + boolean hasCommonMetadata(); + + /** + * + * + *
+   * Generic metadata for the long running operation.
+   * 
+ * + * .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * + * @return The commonMetadata. + */ + com.google.storage.control.v2.CommonLongRunningOperationMetadata getCommonMetadata(); + + /** + * + * + *
+   * Generic metadata for the long running operation.
+   * 
+ * + * .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + */ + com.google.storage.control.v2.CommonLongRunningOperationMetadataOrBuilder + getCommonMetadataOrBuilder(); + + /** + * + * + *
+   * Anywhere Cache ID.
+   * 
+ * + * optional string anywhere_cache_id = 2; + * + * @return Whether the anywhereCacheId field is set. + */ + boolean hasAnywhereCacheId(); + + /** + * + * + *
+   * Anywhere Cache ID.
+   * 
+ * + * optional string anywhere_cache_id = 2; + * + * @return The anywhereCacheId. + */ + java.lang.String getAnywhereCacheId(); + + /** + * + * + *
+   * Anywhere Cache ID.
+   * 
+ * + * optional string anywhere_cache_id = 2; + * + * @return The bytes for anywhereCacheId. + */ + com.google.protobuf.ByteString getAnywhereCacheIdBytes(); + + /** + * + * + *
+   * The zone in which the cache instance is running. For example,
+   * us-central1-a.
+   * 
+ * + * optional string zone = 6; + * + * @return Whether the zone field is set. + */ + boolean hasZone(); + + /** + * + * + *
+   * The zone in which the cache instance is running. For example,
+   * us-central1-a.
+   * 
+ * + * optional string zone = 6; + * + * @return The zone. + */ + java.lang.String getZone(); + + /** + * + * + *
+   * The zone in which the cache instance is running. For example,
+   * us-central1-a.
+   * 
+ * + * optional string zone = 6; + * + * @return The bytes for zone. + */ + com.google.protobuf.ByteString getZoneBytes(); + + /** + * + * + *
+   * Anywhere Cache entry's TTL. A cache-level config that is applied to all new
+   * cache entries on admission. Default ttl value (24hrs) is applied if not
+   * specified in the create request.
+   * 
+ * + * optional .google.protobuf.Duration ttl = 3; + * + * @return Whether the ttl field is set. + */ + boolean hasTtl(); + + /** + * + * + *
+   * Anywhere Cache entry's TTL. A cache-level config that is applied to all new
+   * cache entries on admission. Default ttl value (24hrs) is applied if not
+   * specified in the create request.
+   * 
+ * + * optional .google.protobuf.Duration ttl = 3; + * + * @return The ttl. + */ + com.google.protobuf.Duration getTtl(); + + /** + * + * + *
+   * Anywhere Cache entry's TTL. A cache-level config that is applied to all new
+   * cache entries on admission. Default ttl value (24hrs) is applied if not
+   * specified in the create request.
+   * 
+ * + * optional .google.protobuf.Duration ttl = 3; + */ + com.google.protobuf.DurationOrBuilder getTtlOrBuilder(); + + /** + * + * + *
+   * Anywhere Cache entry Admission Policy in kebab-case (e.g.,
+   * "admit-on-first-miss"). Default admission policy (admit-on-first-miss) is
+   * applied if not specified in the create request.
+   * 
+ * + * optional string admission_policy = 5; + * + * @return Whether the admissionPolicy field is set. + */ + boolean hasAdmissionPolicy(); + + /** + * + * + *
+   * Anywhere Cache entry Admission Policy in kebab-case (e.g.,
+   * "admit-on-first-miss"). Default admission policy (admit-on-first-miss) is
+   * applied if not specified in the create request.
+   * 
+ * + * optional string admission_policy = 5; + * + * @return The admissionPolicy. + */ + java.lang.String getAdmissionPolicy(); + + /** + * + * + *
+   * Anywhere Cache entry Admission Policy in kebab-case (e.g.,
+   * "admit-on-first-miss"). Default admission policy (admit-on-first-miss) is
+   * applied if not specified in the create request.
+   * 
+ * + * optional string admission_policy = 5; + * + * @return The bytes for admissionPolicy. + */ + com.google.protobuf.ByteString getAdmissionPolicyBytes(); +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/CreateAnywhereCacheRequest.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/CreateAnywhereCacheRequest.java new file mode 100644 index 0000000000..25014e725c --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/CreateAnywhereCacheRequest.java @@ -0,0 +1,1226 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +/** + * + * + *
+ * Request message for CreateAnywhereCache.
+ * 
+ * + * Protobuf type {@code google.storage.control.v2.CreateAnywhereCacheRequest} + */ +public final class CreateAnywhereCacheRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storage.control.v2.CreateAnywhereCacheRequest) + CreateAnywhereCacheRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CreateAnywhereCacheRequest.newBuilder() to construct. + private CreateAnywhereCacheRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateAnywhereCacheRequest() { + parent_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateAnywhereCacheRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_CreateAnywhereCacheRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_CreateAnywhereCacheRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.CreateAnywhereCacheRequest.class, + com.google.storage.control.v2.CreateAnywhereCacheRequest.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 cache belongs.
+   * Format: `projects/{project}/buckets/{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. The bucket to which this cache belongs.
+   * Format: `projects/{project}/buckets/{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 ANYWHERE_CACHE_FIELD_NUMBER = 3; + private com.google.storage.control.v2.AnywhereCache anywhereCache_; + + /** + * + * + *
+   * Required. Properties of the Anywhere Cache instance being created.
+   * The parent bucket name is specified in the `parent` field. Server uses the
+   * default value of `ttl` or `admission_policy` if not specified in
+   * request.
+   * 
+ * + * + * .google.storage.control.v2.AnywhereCache anywhere_cache = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the anywhereCache field is set. + */ + @java.lang.Override + public boolean hasAnywhereCache() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. Properties of the Anywhere Cache instance being created.
+   * The parent bucket name is specified in the `parent` field. Server uses the
+   * default value of `ttl` or `admission_policy` if not specified in
+   * request.
+   * 
+ * + * + * .google.storage.control.v2.AnywhereCache anywhere_cache = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The anywhereCache. + */ + @java.lang.Override + public com.google.storage.control.v2.AnywhereCache getAnywhereCache() { + return anywhereCache_ == null + ? com.google.storage.control.v2.AnywhereCache.getDefaultInstance() + : anywhereCache_; + } + + /** + * + * + *
+   * Required. Properties of the Anywhere Cache instance being created.
+   * The parent bucket name is specified in the `parent` field. Server uses the
+   * default value of `ttl` or `admission_policy` if not specified in
+   * request.
+   * 
+ * + * + * .google.storage.control.v2.AnywhereCache anywhere_cache = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.storage.control.v2.AnywhereCacheOrBuilder getAnywhereCacheOrBuilder() { + return anywhereCache_ == null + ? com.google.storage.control.v2.AnywhereCache.getDefaultInstance() + : anywhereCache_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. A unique identifier for this request. UUID is the recommended
+   * format, but other formats are still accepted. This request is only
+   * idempotent if a `request_id` is provided.
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A unique identifier for this request. UUID is the recommended
+   * format, but other formats are still accepted. This request is only
+   * idempotent if a `request_id` is provided.
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getAnywhereCache()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + 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(3, getAnywhereCache()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + 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.control.v2.CreateAnywhereCacheRequest)) { + return super.equals(obj); + } + com.google.storage.control.v2.CreateAnywhereCacheRequest other = + (com.google.storage.control.v2.CreateAnywhereCacheRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasAnywhereCache() != other.hasAnywhereCache()) return false; + if (hasAnywhereCache()) { + if (!getAnywhereCache().equals(other.getAnywhereCache())) return false; + } + if (!getRequestId().equals(other.getRequestId())) 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 (hasAnywhereCache()) { + hash = (37 * hash) + ANYWHERE_CACHE_FIELD_NUMBER; + hash = (53 * hash) + getAnywhereCache().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storage.control.v2.CreateAnywhereCacheRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.CreateAnywhereCacheRequest 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.control.v2.CreateAnywhereCacheRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.CreateAnywhereCacheRequest 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.control.v2.CreateAnywhereCacheRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.CreateAnywhereCacheRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storage.control.v2.CreateAnywhereCacheRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.CreateAnywhereCacheRequest 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.control.v2.CreateAnywhereCacheRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.CreateAnywhereCacheRequest 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.control.v2.CreateAnywhereCacheRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.CreateAnywhereCacheRequest 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.control.v2.CreateAnywhereCacheRequest 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 CreateAnywhereCache.
+   * 
+ * + * Protobuf type {@code google.storage.control.v2.CreateAnywhereCacheRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storage.control.v2.CreateAnywhereCacheRequest) + com.google.storage.control.v2.CreateAnywhereCacheRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_CreateAnywhereCacheRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_CreateAnywhereCacheRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.CreateAnywhereCacheRequest.class, + com.google.storage.control.v2.CreateAnywhereCacheRequest.Builder.class); + } + + // Construct using com.google.storage.control.v2.CreateAnywhereCacheRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAnywhereCacheFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + anywhereCache_ = null; + if (anywhereCacheBuilder_ != null) { + anywhereCacheBuilder_.dispose(); + anywhereCacheBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_CreateAnywhereCacheRequest_descriptor; + } + + @java.lang.Override + public com.google.storage.control.v2.CreateAnywhereCacheRequest getDefaultInstanceForType() { + return com.google.storage.control.v2.CreateAnywhereCacheRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.storage.control.v2.CreateAnywhereCacheRequest build() { + com.google.storage.control.v2.CreateAnywhereCacheRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storage.control.v2.CreateAnywhereCacheRequest buildPartial() { + com.google.storage.control.v2.CreateAnywhereCacheRequest result = + new com.google.storage.control.v2.CreateAnywhereCacheRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.storage.control.v2.CreateAnywhereCacheRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.anywhereCache_ = + anywhereCacheBuilder_ == null ? anywhereCache_ : anywhereCacheBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + 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.control.v2.CreateAnywhereCacheRequest) { + return mergeFrom((com.google.storage.control.v2.CreateAnywhereCacheRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.storage.control.v2.CreateAnywhereCacheRequest other) { + if (other == com.google.storage.control.v2.CreateAnywhereCacheRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasAnywhereCache()) { + mergeAnywhereCache(other.getAnywhereCache()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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 26: + { + input.readMessage(getAnywhereCacheFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 34 + 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 cache belongs.
+     * Format: `projects/{project}/buckets/{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. The bucket to which this cache belongs.
+     * Format: `projects/{project}/buckets/{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. The bucket to which this cache belongs.
+     * Format: `projects/{project}/buckets/{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. The bucket to which this cache belongs.
+     * Format: `projects/{project}/buckets/{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. The bucket to which this cache belongs.
+     * Format: `projects/{project}/buckets/{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 com.google.storage.control.v2.AnywhereCache anywhereCache_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.AnywhereCache, + com.google.storage.control.v2.AnywhereCache.Builder, + com.google.storage.control.v2.AnywhereCacheOrBuilder> + anywhereCacheBuilder_; + + /** + * + * + *
+     * Required. Properties of the Anywhere Cache instance being created.
+     * The parent bucket name is specified in the `parent` field. Server uses the
+     * default value of `ttl` or `admission_policy` if not specified in
+     * request.
+     * 
+ * + * + * .google.storage.control.v2.AnywhereCache anywhere_cache = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the anywhereCache field is set. + */ + public boolean hasAnywhereCache() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. Properties of the Anywhere Cache instance being created.
+     * The parent bucket name is specified in the `parent` field. Server uses the
+     * default value of `ttl` or `admission_policy` if not specified in
+     * request.
+     * 
+ * + * + * .google.storage.control.v2.AnywhereCache anywhere_cache = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The anywhereCache. + */ + public com.google.storage.control.v2.AnywhereCache getAnywhereCache() { + if (anywhereCacheBuilder_ == null) { + return anywhereCache_ == null + ? com.google.storage.control.v2.AnywhereCache.getDefaultInstance() + : anywhereCache_; + } else { + return anywhereCacheBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. Properties of the Anywhere Cache instance being created.
+     * The parent bucket name is specified in the `parent` field. Server uses the
+     * default value of `ttl` or `admission_policy` if not specified in
+     * request.
+     * 
+ * + * + * .google.storage.control.v2.AnywhereCache anywhere_cache = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAnywhereCache(com.google.storage.control.v2.AnywhereCache value) { + if (anywhereCacheBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + anywhereCache_ = value; + } else { + anywhereCacheBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Properties of the Anywhere Cache instance being created.
+     * The parent bucket name is specified in the `parent` field. Server uses the
+     * default value of `ttl` or `admission_policy` if not specified in
+     * request.
+     * 
+ * + * + * .google.storage.control.v2.AnywhereCache anywhere_cache = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAnywhereCache( + com.google.storage.control.v2.AnywhereCache.Builder builderForValue) { + if (anywhereCacheBuilder_ == null) { + anywhereCache_ = builderForValue.build(); + } else { + anywhereCacheBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Properties of the Anywhere Cache instance being created.
+     * The parent bucket name is specified in the `parent` field. Server uses the
+     * default value of `ttl` or `admission_policy` if not specified in
+     * request.
+     * 
+ * + * + * .google.storage.control.v2.AnywhereCache anywhere_cache = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAnywhereCache(com.google.storage.control.v2.AnywhereCache value) { + if (anywhereCacheBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && anywhereCache_ != null + && anywhereCache_ != com.google.storage.control.v2.AnywhereCache.getDefaultInstance()) { + getAnywhereCacheBuilder().mergeFrom(value); + } else { + anywhereCache_ = value; + } + } else { + anywhereCacheBuilder_.mergeFrom(value); + } + if (anywhereCache_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. Properties of the Anywhere Cache instance being created.
+     * The parent bucket name is specified in the `parent` field. Server uses the
+     * default value of `ttl` or `admission_policy` if not specified in
+     * request.
+     * 
+ * + * + * .google.storage.control.v2.AnywhereCache anywhere_cache = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAnywhereCache() { + bitField0_ = (bitField0_ & ~0x00000002); + anywhereCache_ = null; + if (anywhereCacheBuilder_ != null) { + anywhereCacheBuilder_.dispose(); + anywhereCacheBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Properties of the Anywhere Cache instance being created.
+     * The parent bucket name is specified in the `parent` field. Server uses the
+     * default value of `ttl` or `admission_policy` if not specified in
+     * request.
+     * 
+ * + * + * .google.storage.control.v2.AnywhereCache anywhere_cache = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.storage.control.v2.AnywhereCache.Builder getAnywhereCacheBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getAnywhereCacheFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. Properties of the Anywhere Cache instance being created.
+     * The parent bucket name is specified in the `parent` field. Server uses the
+     * default value of `ttl` or `admission_policy` if not specified in
+     * request.
+     * 
+ * + * + * .google.storage.control.v2.AnywhereCache anywhere_cache = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.storage.control.v2.AnywhereCacheOrBuilder getAnywhereCacheOrBuilder() { + if (anywhereCacheBuilder_ != null) { + return anywhereCacheBuilder_.getMessageOrBuilder(); + } else { + return anywhereCache_ == null + ? com.google.storage.control.v2.AnywhereCache.getDefaultInstance() + : anywhereCache_; + } + } + + /** + * + * + *
+     * Required. Properties of the Anywhere Cache instance being created.
+     * The parent bucket name is specified in the `parent` field. Server uses the
+     * default value of `ttl` or `admission_policy` if not specified in
+     * request.
+     * 
+ * + * + * .google.storage.control.v2.AnywhereCache anywhere_cache = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.AnywhereCache, + com.google.storage.control.v2.AnywhereCache.Builder, + com.google.storage.control.v2.AnywhereCacheOrBuilder> + getAnywhereCacheFieldBuilder() { + if (anywhereCacheBuilder_ == null) { + anywhereCacheBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.AnywhereCache, + com.google.storage.control.v2.AnywhereCache.Builder, + com.google.storage.control.v2.AnywhereCacheOrBuilder>( + getAnywhereCache(), getParentForChildren(), isClean()); + anywhereCache_ = null; + } + return anywhereCacheBuilder_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted. This request is only
+     * idempotent if a `request_id` is provided.
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted. This request is only
+     * idempotent if a `request_id` is provided.
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted. This request is only
+     * idempotent if a `request_id` is provided.
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted. This request is only
+     * idempotent if a `request_id` is provided.
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted. This request is only
+     * idempotent if a `request_id` is provided.
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = 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.control.v2.CreateAnywhereCacheRequest) + } + + // @@protoc_insertion_point(class_scope:google.storage.control.v2.CreateAnywhereCacheRequest) + private static final com.google.storage.control.v2.CreateAnywhereCacheRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storage.control.v2.CreateAnywhereCacheRequest(); + } + + public static com.google.storage.control.v2.CreateAnywhereCacheRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateAnywhereCacheRequest 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.control.v2.CreateAnywhereCacheRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/CreateAnywhereCacheRequestOrBuilder.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/CreateAnywhereCacheRequestOrBuilder.java new file mode 100644 index 0000000000..d6b3f4832b --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/CreateAnywhereCacheRequestOrBuilder.java @@ -0,0 +1,144 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +public interface CreateAnywhereCacheRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storage.control.v2.CreateAnywhereCacheRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The bucket to which this cache belongs.
+   * Format: `projects/{project}/buckets/{bucket}`
+   * 
+ * + * + * 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 cache belongs.
+   * Format: `projects/{project}/buckets/{bucket}`
+   * 
+ * + * + * 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 Anywhere Cache instance being created.
+   * The parent bucket name is specified in the `parent` field. Server uses the
+   * default value of `ttl` or `admission_policy` if not specified in
+   * request.
+   * 
+ * + * + * .google.storage.control.v2.AnywhereCache anywhere_cache = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the anywhereCache field is set. + */ + boolean hasAnywhereCache(); + + /** + * + * + *
+   * Required. Properties of the Anywhere Cache instance being created.
+   * The parent bucket name is specified in the `parent` field. Server uses the
+   * default value of `ttl` or `admission_policy` if not specified in
+   * request.
+   * 
+ * + * + * .google.storage.control.v2.AnywhereCache anywhere_cache = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The anywhereCache. + */ + com.google.storage.control.v2.AnywhereCache getAnywhereCache(); + + /** + * + * + *
+   * Required. Properties of the Anywhere Cache instance being created.
+   * The parent bucket name is specified in the `parent` field. Server uses the
+   * default value of `ttl` or `admission_policy` if not specified in
+   * request.
+   * 
+ * + * + * .google.storage.control.v2.AnywhereCache anywhere_cache = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.storage.control.v2.AnywhereCacheOrBuilder getAnywhereCacheOrBuilder(); + + /** + * + * + *
+   * Optional. A unique identifier for this request. UUID is the recommended
+   * format, but other formats are still accepted. This request is only
+   * idempotent if a `request_id` is provided.
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. A unique identifier for this request. UUID is the recommended
+   * format, but other formats are still accepted. This request is only
+   * idempotent if a `request_id` is provided.
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/DisableAnywhereCacheRequest.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/DisableAnywhereCacheRequest.java new file mode 100644 index 0000000000..f7d36ae2cd --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/DisableAnywhereCacheRequest.java @@ -0,0 +1,873 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +/** + * + * + *
+ * Request message for DisableAnywhereCache.
+ * 
+ * + * Protobuf type {@code google.storage.control.v2.DisableAnywhereCacheRequest} + */ +public final class DisableAnywhereCacheRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storage.control.v2.DisableAnywhereCacheRequest) + DisableAnywhereCacheRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DisableAnywhereCacheRequest.newBuilder() to construct. + private DisableAnywhereCacheRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DisableAnywhereCacheRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DisableAnywhereCacheRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_DisableAnywhereCacheRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_DisableAnywhereCacheRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.DisableAnywhereCacheRequest.class, + com.google.storage.control.v2.DisableAnywhereCacheRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name field in the request should be:
+   * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+   * 
+ * + * + * 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 name field in the request should be:
+   * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+   * 
+ * + * + * 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; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. A unique identifier for this request. UUID is the recommended
+   * format, but other formats are still accepted. This request is only
+   * idempotent if a `request_id` is provided.
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A unique identifier for this request. UUID is the recommended
+   * format, but other formats are still accepted. This request is only
+   * idempotent if a `request_id` is provided.
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + 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(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + 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.control.v2.DisableAnywhereCacheRequest)) { + return super.equals(obj); + } + com.google.storage.control.v2.DisableAnywhereCacheRequest other = + (com.google.storage.control.v2.DisableAnywhereCacheRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) 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) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storage.control.v2.DisableAnywhereCacheRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.DisableAnywhereCacheRequest 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.control.v2.DisableAnywhereCacheRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.DisableAnywhereCacheRequest 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.control.v2.DisableAnywhereCacheRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.DisableAnywhereCacheRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storage.control.v2.DisableAnywhereCacheRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.DisableAnywhereCacheRequest 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.control.v2.DisableAnywhereCacheRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.DisableAnywhereCacheRequest 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.control.v2.DisableAnywhereCacheRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.DisableAnywhereCacheRequest 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.control.v2.DisableAnywhereCacheRequest 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 DisableAnywhereCache.
+   * 
+ * + * Protobuf type {@code google.storage.control.v2.DisableAnywhereCacheRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storage.control.v2.DisableAnywhereCacheRequest) + com.google.storage.control.v2.DisableAnywhereCacheRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_DisableAnywhereCacheRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_DisableAnywhereCacheRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.DisableAnywhereCacheRequest.class, + com.google.storage.control.v2.DisableAnywhereCacheRequest.Builder.class); + } + + // Construct using com.google.storage.control.v2.DisableAnywhereCacheRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_DisableAnywhereCacheRequest_descriptor; + } + + @java.lang.Override + public com.google.storage.control.v2.DisableAnywhereCacheRequest getDefaultInstanceForType() { + return com.google.storage.control.v2.DisableAnywhereCacheRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.storage.control.v2.DisableAnywhereCacheRequest build() { + com.google.storage.control.v2.DisableAnywhereCacheRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storage.control.v2.DisableAnywhereCacheRequest buildPartial() { + com.google.storage.control.v2.DisableAnywhereCacheRequest result = + new com.google.storage.control.v2.DisableAnywhereCacheRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.storage.control.v2.DisableAnywhereCacheRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @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.control.v2.DisableAnywhereCacheRequest) { + return mergeFrom((com.google.storage.control.v2.DisableAnywhereCacheRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.storage.control.v2.DisableAnywhereCacheRequest other) { + if (other == com.google.storage.control.v2.DisableAnywhereCacheRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = 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 name_ = ""; + + /** + * + * + *
+     * Required. The name field in the request should be:
+     * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+     * 
+ * + * + * 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 name field in the request should be:
+     * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+     * 
+ * + * + * 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 name field in the request should be:
+     * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+     * 
+ * + * + * 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 name field in the request should be:
+     * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+     * 
+ * + * + * 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 name field in the request should be:
+     * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+     * 
+ * + * + * 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; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted. This request is only
+     * idempotent if a `request_id` is provided.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted. This request is only
+     * idempotent if a `request_id` is provided.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted. This request is only
+     * idempotent if a `request_id` is provided.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted. This request is only
+     * idempotent if a `request_id` is provided.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted. This request is only
+     * idempotent if a `request_id` is provided.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = 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.control.v2.DisableAnywhereCacheRequest) + } + + // @@protoc_insertion_point(class_scope:google.storage.control.v2.DisableAnywhereCacheRequest) + private static final com.google.storage.control.v2.DisableAnywhereCacheRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storage.control.v2.DisableAnywhereCacheRequest(); + } + + public static com.google.storage.control.v2.DisableAnywhereCacheRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DisableAnywhereCacheRequest 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.control.v2.DisableAnywhereCacheRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/DisableAnywhereCacheRequestOrBuilder.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/DisableAnywhereCacheRequestOrBuilder.java new file mode 100644 index 0000000000..d7746f10b7 --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/DisableAnywhereCacheRequestOrBuilder.java @@ -0,0 +1,92 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +public interface DisableAnywhereCacheRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storage.control.v2.DisableAnywhereCacheRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name field in the request should be:
+   * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name field in the request should be:
+   * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. A unique identifier for this request. UUID is the recommended
+   * format, but other formats are still accepted. This request is only
+   * idempotent if a `request_id` is provided.
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. A unique identifier for this request. UUID is the recommended
+   * format, but other formats are still accepted. This request is only
+   * idempotent if a `request_id` is provided.
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/GetAnywhereCacheRequest.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/GetAnywhereCacheRequest.java new file mode 100644 index 0000000000..5841491b7b --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/GetAnywhereCacheRequest.java @@ -0,0 +1,866 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +/** + * + * + *
+ * Request message for GetAnywhereCache.
+ * 
+ * + * Protobuf type {@code google.storage.control.v2.GetAnywhereCacheRequest} + */ +public final class GetAnywhereCacheRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storage.control.v2.GetAnywhereCacheRequest) + GetAnywhereCacheRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use GetAnywhereCacheRequest.newBuilder() to construct. + private GetAnywhereCacheRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetAnywhereCacheRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetAnywhereCacheRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_GetAnywhereCacheRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_GetAnywhereCacheRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.GetAnywhereCacheRequest.class, + com.google.storage.control.v2.GetAnywhereCacheRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name field in the request should be:
+   * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+   * 
+ * + * + * 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 name field in the request should be:
+   * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+   * 
+ * + * + * 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; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. A unique identifier for this request. UUID is the recommended
+   * format, but other formats are still accepted.
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A unique identifier for this request. UUID is the recommended
+   * format, but other formats are still accepted.
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + 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(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + 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.control.v2.GetAnywhereCacheRequest)) { + return super.equals(obj); + } + com.google.storage.control.v2.GetAnywhereCacheRequest other = + (com.google.storage.control.v2.GetAnywhereCacheRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) 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) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storage.control.v2.GetAnywhereCacheRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.GetAnywhereCacheRequest 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.control.v2.GetAnywhereCacheRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.GetAnywhereCacheRequest 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.control.v2.GetAnywhereCacheRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.GetAnywhereCacheRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storage.control.v2.GetAnywhereCacheRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.GetAnywhereCacheRequest 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.control.v2.GetAnywhereCacheRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.GetAnywhereCacheRequest 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.control.v2.GetAnywhereCacheRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.GetAnywhereCacheRequest 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.control.v2.GetAnywhereCacheRequest 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 GetAnywhereCache.
+   * 
+ * + * Protobuf type {@code google.storage.control.v2.GetAnywhereCacheRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storage.control.v2.GetAnywhereCacheRequest) + com.google.storage.control.v2.GetAnywhereCacheRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_GetAnywhereCacheRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_GetAnywhereCacheRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.GetAnywhereCacheRequest.class, + com.google.storage.control.v2.GetAnywhereCacheRequest.Builder.class); + } + + // Construct using com.google.storage.control.v2.GetAnywhereCacheRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_GetAnywhereCacheRequest_descriptor; + } + + @java.lang.Override + public com.google.storage.control.v2.GetAnywhereCacheRequest getDefaultInstanceForType() { + return com.google.storage.control.v2.GetAnywhereCacheRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.storage.control.v2.GetAnywhereCacheRequest build() { + com.google.storage.control.v2.GetAnywhereCacheRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storage.control.v2.GetAnywhereCacheRequest buildPartial() { + com.google.storage.control.v2.GetAnywhereCacheRequest result = + new com.google.storage.control.v2.GetAnywhereCacheRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.storage.control.v2.GetAnywhereCacheRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @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.control.v2.GetAnywhereCacheRequest) { + return mergeFrom((com.google.storage.control.v2.GetAnywhereCacheRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.storage.control.v2.GetAnywhereCacheRequest other) { + if (other == com.google.storage.control.v2.GetAnywhereCacheRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = 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 name_ = ""; + + /** + * + * + *
+     * Required. The name field in the request should be:
+     * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+     * 
+ * + * + * 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 name field in the request should be:
+     * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+     * 
+ * + * + * 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 name field in the request should be:
+     * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+     * 
+ * + * + * 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 name field in the request should be:
+     * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+     * 
+ * + * + * 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 name field in the request should be:
+     * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+     * 
+ * + * + * 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; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = 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.control.v2.GetAnywhereCacheRequest) + } + + // @@protoc_insertion_point(class_scope:google.storage.control.v2.GetAnywhereCacheRequest) + private static final com.google.storage.control.v2.GetAnywhereCacheRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storage.control.v2.GetAnywhereCacheRequest(); + } + + public static com.google.storage.control.v2.GetAnywhereCacheRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAnywhereCacheRequest 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.control.v2.GetAnywhereCacheRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/GetAnywhereCacheRequestOrBuilder.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/GetAnywhereCacheRequestOrBuilder.java new file mode 100644 index 0000000000..2355b2d250 --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/GetAnywhereCacheRequestOrBuilder.java @@ -0,0 +1,90 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +public interface GetAnywhereCacheRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storage.control.v2.GetAnywhereCacheRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name field in the request should be:
+   * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name field in the request should be:
+   * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. A unique identifier for this request. UUID is the recommended
+   * format, but other formats are still accepted.
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. A unique identifier for this request. UUID is the recommended
+   * format, but other formats are still accepted.
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/GetFolderIntelligenceConfigRequest.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/GetFolderIntelligenceConfigRequest.java new file mode 100644 index 0000000000..637a918088 --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/GetFolderIntelligenceConfigRequest.java @@ -0,0 +1,692 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +/** + * + * + *
+ * Request message to get the `IntelligenceConfig` resource associated with your
+ * folder.
+ *
+ * **IAM Permissions**
+ *
+ * Requires `storage.intelligenceConfigs.get`
+ * [IAM](https://cloud.google.com/iam/docs/overview#permissions) permission on
+ * the folder.
+ * 
+ * + * Protobuf type {@code google.storage.control.v2.GetFolderIntelligenceConfigRequest} + */ +public final class GetFolderIntelligenceConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storage.control.v2.GetFolderIntelligenceConfigRequest) + GetFolderIntelligenceConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use GetFolderIntelligenceConfigRequest.newBuilder() to construct. + private GetFolderIntelligenceConfigRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetFolderIntelligenceConfigRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetFolderIntelligenceConfigRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_GetFolderIntelligenceConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_GetFolderIntelligenceConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.GetFolderIntelligenceConfigRequest.class, + com.google.storage.control.v2.GetFolderIntelligenceConfigRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the `IntelligenceConfig` resource associated with
+   * your folder.
+   *
+   * Format: `folders/{id}/locations/global/intelligenceConfig`
+   * 
+ * + * + * 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 name of the `IntelligenceConfig` resource associated with
+   * your folder.
+   *
+   * Format: `folders/{id}/locations/global/intelligenceConfig`
+   * 
+ * + * + * 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.control.v2.GetFolderIntelligenceConfigRequest)) { + return super.equals(obj); + } + com.google.storage.control.v2.GetFolderIntelligenceConfigRequest other = + (com.google.storage.control.v2.GetFolderIntelligenceConfigRequest) 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.control.v2.GetFolderIntelligenceConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.GetFolderIntelligenceConfigRequest 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.control.v2.GetFolderIntelligenceConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.GetFolderIntelligenceConfigRequest 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.control.v2.GetFolderIntelligenceConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.GetFolderIntelligenceConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storage.control.v2.GetFolderIntelligenceConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.GetFolderIntelligenceConfigRequest 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.control.v2.GetFolderIntelligenceConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.GetFolderIntelligenceConfigRequest 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.control.v2.GetFolderIntelligenceConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.GetFolderIntelligenceConfigRequest 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.control.v2.GetFolderIntelligenceConfigRequest 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 to get the `IntelligenceConfig` resource associated with your
+   * folder.
+   *
+   * **IAM Permissions**
+   *
+   * Requires `storage.intelligenceConfigs.get`
+   * [IAM](https://cloud.google.com/iam/docs/overview#permissions) permission on
+   * the folder.
+   * 
+ * + * Protobuf type {@code google.storage.control.v2.GetFolderIntelligenceConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storage.control.v2.GetFolderIntelligenceConfigRequest) + com.google.storage.control.v2.GetFolderIntelligenceConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_GetFolderIntelligenceConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_GetFolderIntelligenceConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.GetFolderIntelligenceConfigRequest.class, + com.google.storage.control.v2.GetFolderIntelligenceConfigRequest.Builder.class); + } + + // Construct using com.google.storage.control.v2.GetFolderIntelligenceConfigRequest.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.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_GetFolderIntelligenceConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.storage.control.v2.GetFolderIntelligenceConfigRequest + getDefaultInstanceForType() { + return com.google.storage.control.v2.GetFolderIntelligenceConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.storage.control.v2.GetFolderIntelligenceConfigRequest build() { + com.google.storage.control.v2.GetFolderIntelligenceConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storage.control.v2.GetFolderIntelligenceConfigRequest buildPartial() { + com.google.storage.control.v2.GetFolderIntelligenceConfigRequest result = + new com.google.storage.control.v2.GetFolderIntelligenceConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.storage.control.v2.GetFolderIntelligenceConfigRequest 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.control.v2.GetFolderIntelligenceConfigRequest) { + return mergeFrom((com.google.storage.control.v2.GetFolderIntelligenceConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storage.control.v2.GetFolderIntelligenceConfigRequest other) { + if (other + == com.google.storage.control.v2.GetFolderIntelligenceConfigRequest.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 name of the `IntelligenceConfig` resource associated with
+     * your folder.
+     *
+     * Format: `folders/{id}/locations/global/intelligenceConfig`
+     * 
+ * + * + * 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 name of the `IntelligenceConfig` resource associated with
+     * your folder.
+     *
+     * Format: `folders/{id}/locations/global/intelligenceConfig`
+     * 
+ * + * + * 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 name of the `IntelligenceConfig` resource associated with
+     * your folder.
+     *
+     * Format: `folders/{id}/locations/global/intelligenceConfig`
+     * 
+ * + * + * 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 name of the `IntelligenceConfig` resource associated with
+     * your folder.
+     *
+     * Format: `folders/{id}/locations/global/intelligenceConfig`
+     * 
+ * + * + * 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 name of the `IntelligenceConfig` resource associated with
+     * your folder.
+     *
+     * Format: `folders/{id}/locations/global/intelligenceConfig`
+     * 
+ * + * + * 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.control.v2.GetFolderIntelligenceConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.storage.control.v2.GetFolderIntelligenceConfigRequest) + private static final com.google.storage.control.v2.GetFolderIntelligenceConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storage.control.v2.GetFolderIntelligenceConfigRequest(); + } + + public static com.google.storage.control.v2.GetFolderIntelligenceConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetFolderIntelligenceConfigRequest 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.control.v2.GetFolderIntelligenceConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/GetFolderIntelligenceConfigRequestOrBuilder.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/GetFolderIntelligenceConfigRequestOrBuilder.java new file mode 100644 index 0000000000..3e3e6668c6 --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/GetFolderIntelligenceConfigRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +public interface GetFolderIntelligenceConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storage.control.v2.GetFolderIntelligenceConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the `IntelligenceConfig` resource associated with
+   * your folder.
+   *
+   * Format: `folders/{id}/locations/global/intelligenceConfig`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the `IntelligenceConfig` resource associated with
+   * your folder.
+   *
+   * Format: `folders/{id}/locations/global/intelligenceConfig`
+   * 
+ * + * + * 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-control-v2/src/main/java/com/google/storage/control/v2/GetOrganizationIntelligenceConfigRequest.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/GetOrganizationIntelligenceConfigRequest.java new file mode 100644 index 0000000000..4bcb754bea --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/GetOrganizationIntelligenceConfigRequest.java @@ -0,0 +1,698 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +/** + * + * + *
+ * Request message to get the `IntelligenceConfig` resource associated with your
+ * organization.
+ *
+ * **IAM Permissions**
+ *
+ * Requires `storage.intelligenceConfigs.get`
+ * [IAM](https://cloud.google.com/iam/docs/overview#permissions) permission on
+ * the organization.
+ * 
+ * + * Protobuf type {@code google.storage.control.v2.GetOrganizationIntelligenceConfigRequest} + */ +public final class GetOrganizationIntelligenceConfigRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storage.control.v2.GetOrganizationIntelligenceConfigRequest) + GetOrganizationIntelligenceConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use GetOrganizationIntelligenceConfigRequest.newBuilder() to construct. + private GetOrganizationIntelligenceConfigRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetOrganizationIntelligenceConfigRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetOrganizationIntelligenceConfigRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_GetOrganizationIntelligenceConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_GetOrganizationIntelligenceConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest.class, + com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the `IntelligenceConfig` resource associated with
+   * your organization.
+   *
+   * Format: `organizations/{org_id}/locations/global/intelligenceConfig`
+   * 
+ * + * + * 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 name of the `IntelligenceConfig` resource associated with
+   * your organization.
+   *
+   * Format: `organizations/{org_id}/locations/global/intelligenceConfig`
+   * 
+ * + * + * 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.control.v2.GetOrganizationIntelligenceConfigRequest)) { + return super.equals(obj); + } + com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest other = + (com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest) 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.control.v2.GetOrganizationIntelligenceConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest 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.control.v2.GetOrganizationIntelligenceConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest 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.control.v2.GetOrganizationIntelligenceConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest 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.control.v2.GetOrganizationIntelligenceConfigRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest + 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.control.v2.GetOrganizationIntelligenceConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest 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.control.v2.GetOrganizationIntelligenceConfigRequest 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 to get the `IntelligenceConfig` resource associated with your
+   * organization.
+   *
+   * **IAM Permissions**
+   *
+   * Requires `storage.intelligenceConfigs.get`
+   * [IAM](https://cloud.google.com/iam/docs/overview#permissions) permission on
+   * the organization.
+   * 
+ * + * Protobuf type {@code google.storage.control.v2.GetOrganizationIntelligenceConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storage.control.v2.GetOrganizationIntelligenceConfigRequest) + com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_GetOrganizationIntelligenceConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_GetOrganizationIntelligenceConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest.class, + com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest.Builder.class); + } + + // Construct using + // com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest.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.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_GetOrganizationIntelligenceConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest + getDefaultInstanceForType() { + return com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest build() { + com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest buildPartial() { + com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest result = + new com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest 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.control.v2.GetOrganizationIntelligenceConfigRequest) { + return mergeFrom( + (com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest other) { + if (other + == com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest + .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 name of the `IntelligenceConfig` resource associated with
+     * your organization.
+     *
+     * Format: `organizations/{org_id}/locations/global/intelligenceConfig`
+     * 
+ * + * + * 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 name of the `IntelligenceConfig` resource associated with
+     * your organization.
+     *
+     * Format: `organizations/{org_id}/locations/global/intelligenceConfig`
+     * 
+ * + * + * 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 name of the `IntelligenceConfig` resource associated with
+     * your organization.
+     *
+     * Format: `organizations/{org_id}/locations/global/intelligenceConfig`
+     * 
+ * + * + * 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 name of the `IntelligenceConfig` resource associated with
+     * your organization.
+     *
+     * Format: `organizations/{org_id}/locations/global/intelligenceConfig`
+     * 
+ * + * + * 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 name of the `IntelligenceConfig` resource associated with
+     * your organization.
+     *
+     * Format: `organizations/{org_id}/locations/global/intelligenceConfig`
+     * 
+ * + * + * 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.control.v2.GetOrganizationIntelligenceConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.storage.control.v2.GetOrganizationIntelligenceConfigRequest) + private static final com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest(); + } + + public static com.google.storage.control.v2.GetOrganizationIntelligenceConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetOrganizationIntelligenceConfigRequest 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.control.v2.GetOrganizationIntelligenceConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/GetOrganizationIntelligenceConfigRequestOrBuilder.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/GetOrganizationIntelligenceConfigRequestOrBuilder.java new file mode 100644 index 0000000000..022de0ee56 --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/GetOrganizationIntelligenceConfigRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +public interface GetOrganizationIntelligenceConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storage.control.v2.GetOrganizationIntelligenceConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the `IntelligenceConfig` resource associated with
+   * your organization.
+   *
+   * Format: `organizations/{org_id}/locations/global/intelligenceConfig`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the `IntelligenceConfig` resource associated with
+   * your organization.
+   *
+   * Format: `organizations/{org_id}/locations/global/intelligenceConfig`
+   * 
+ * + * + * 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-control-v2/src/main/java/com/google/storage/control/v2/GetProjectIntelligenceConfigRequest.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/GetProjectIntelligenceConfigRequest.java new file mode 100644 index 0000000000..77acd59f10 --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/GetProjectIntelligenceConfigRequest.java @@ -0,0 +1,695 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +/** + * + * + *
+ * Request message to get the `IntelligenceConfig` resource associated with your
+ * project.
+ *
+ * **IAM Permissions**:
+ *
+ * Requires `storage.intelligenceConfigs.get`
+ * [IAM](https://cloud.google.com/iam/docs/overview#permissions) permission
+ * on the project.
+ * 
+ * + * Protobuf type {@code google.storage.control.v2.GetProjectIntelligenceConfigRequest} + */ +public final class GetProjectIntelligenceConfigRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storage.control.v2.GetProjectIntelligenceConfigRequest) + GetProjectIntelligenceConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use GetProjectIntelligenceConfigRequest.newBuilder() to construct. + private GetProjectIntelligenceConfigRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetProjectIntelligenceConfigRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetProjectIntelligenceConfigRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_GetProjectIntelligenceConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_GetProjectIntelligenceConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.GetProjectIntelligenceConfigRequest.class, + com.google.storage.control.v2.GetProjectIntelligenceConfigRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name of the `IntelligenceConfig` resource associated with
+   * your project.
+   *
+   * Format: `projects/{id}/locations/global/intelligenceConfig`
+   * 
+ * + * + * 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 name of the `IntelligenceConfig` resource associated with
+   * your project.
+   *
+   * Format: `projects/{id}/locations/global/intelligenceConfig`
+   * 
+ * + * + * 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.control.v2.GetProjectIntelligenceConfigRequest)) { + return super.equals(obj); + } + com.google.storage.control.v2.GetProjectIntelligenceConfigRequest other = + (com.google.storage.control.v2.GetProjectIntelligenceConfigRequest) 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.control.v2.GetProjectIntelligenceConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.GetProjectIntelligenceConfigRequest 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.control.v2.GetProjectIntelligenceConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.GetProjectIntelligenceConfigRequest 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.control.v2.GetProjectIntelligenceConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.GetProjectIntelligenceConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storage.control.v2.GetProjectIntelligenceConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.GetProjectIntelligenceConfigRequest 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.control.v2.GetProjectIntelligenceConfigRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.GetProjectIntelligenceConfigRequest + 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.control.v2.GetProjectIntelligenceConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.GetProjectIntelligenceConfigRequest 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.control.v2.GetProjectIntelligenceConfigRequest 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 to get the `IntelligenceConfig` resource associated with your
+   * project.
+   *
+   * **IAM Permissions**:
+   *
+   * Requires `storage.intelligenceConfigs.get`
+   * [IAM](https://cloud.google.com/iam/docs/overview#permissions) permission
+   * on the project.
+   * 
+ * + * Protobuf type {@code google.storage.control.v2.GetProjectIntelligenceConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storage.control.v2.GetProjectIntelligenceConfigRequest) + com.google.storage.control.v2.GetProjectIntelligenceConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_GetProjectIntelligenceConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_GetProjectIntelligenceConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.GetProjectIntelligenceConfigRequest.class, + com.google.storage.control.v2.GetProjectIntelligenceConfigRequest.Builder.class); + } + + // Construct using + // com.google.storage.control.v2.GetProjectIntelligenceConfigRequest.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.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_GetProjectIntelligenceConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.storage.control.v2.GetProjectIntelligenceConfigRequest + getDefaultInstanceForType() { + return com.google.storage.control.v2.GetProjectIntelligenceConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.storage.control.v2.GetProjectIntelligenceConfigRequest build() { + com.google.storage.control.v2.GetProjectIntelligenceConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storage.control.v2.GetProjectIntelligenceConfigRequest buildPartial() { + com.google.storage.control.v2.GetProjectIntelligenceConfigRequest result = + new com.google.storage.control.v2.GetProjectIntelligenceConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.storage.control.v2.GetProjectIntelligenceConfigRequest 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.control.v2.GetProjectIntelligenceConfigRequest) { + return mergeFrom((com.google.storage.control.v2.GetProjectIntelligenceConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storage.control.v2.GetProjectIntelligenceConfigRequest other) { + if (other + == com.google.storage.control.v2.GetProjectIntelligenceConfigRequest.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 name of the `IntelligenceConfig` resource associated with
+     * your project.
+     *
+     * Format: `projects/{id}/locations/global/intelligenceConfig`
+     * 
+ * + * + * 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 name of the `IntelligenceConfig` resource associated with
+     * your project.
+     *
+     * Format: `projects/{id}/locations/global/intelligenceConfig`
+     * 
+ * + * + * 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 name of the `IntelligenceConfig` resource associated with
+     * your project.
+     *
+     * Format: `projects/{id}/locations/global/intelligenceConfig`
+     * 
+ * + * + * 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 name of the `IntelligenceConfig` resource associated with
+     * your project.
+     *
+     * Format: `projects/{id}/locations/global/intelligenceConfig`
+     * 
+ * + * + * 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 name of the `IntelligenceConfig` resource associated with
+     * your project.
+     *
+     * Format: `projects/{id}/locations/global/intelligenceConfig`
+     * 
+ * + * + * 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.control.v2.GetProjectIntelligenceConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.storage.control.v2.GetProjectIntelligenceConfigRequest) + private static final com.google.storage.control.v2.GetProjectIntelligenceConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storage.control.v2.GetProjectIntelligenceConfigRequest(); + } + + public static com.google.storage.control.v2.GetProjectIntelligenceConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetProjectIntelligenceConfigRequest 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.control.v2.GetProjectIntelligenceConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/GetProjectIntelligenceConfigRequestOrBuilder.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/GetProjectIntelligenceConfigRequestOrBuilder.java new file mode 100644 index 0000000000..b0ea721aff --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/GetProjectIntelligenceConfigRequestOrBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +public interface GetProjectIntelligenceConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storage.control.v2.GetProjectIntelligenceConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the `IntelligenceConfig` resource associated with
+   * your project.
+   *
+   * Format: `projects/{id}/locations/global/intelligenceConfig`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name of the `IntelligenceConfig` resource associated with
+   * your project.
+   *
+   * Format: `projects/{id}/locations/global/intelligenceConfig`
+   * 
+ * + * + * 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-control-v2/src/main/java/com/google/storage/control/v2/IntelligenceConfig.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/IntelligenceConfig.java new file mode 100644 index 0000000000..5d6f991b4e --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/IntelligenceConfig.java @@ -0,0 +1,8302 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +/** + * + * + *
+ * The `IntelligenceConfig` resource associated with your organization, folder,
+ * or project.
+ * 
+ * + * Protobuf type {@code google.storage.control.v2.IntelligenceConfig} + */ +public final class IntelligenceConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storage.control.v2.IntelligenceConfig) + IntelligenceConfigOrBuilder { + private static final long serialVersionUID = 0L; + + // Use IntelligenceConfig.newBuilder() to construct. + private IntelligenceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IntelligenceConfig() { + name_ = ""; + editionConfig_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IntelligenceConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_IntelligenceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_IntelligenceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.IntelligenceConfig.class, + com.google.storage.control.v2.IntelligenceConfig.Builder.class); + } + + /** + * + * + *
+   * The edition configuration of the `IntelligenceConfig` resource. This
+   * signifies the edition used for configuring the `IntelligenceConfig`
+   * resource and can only take the following values:
+   * `EDITION_CONFIG_UNSPECIFIED`, `INHERIT`, `DISABLED`, `STANDARD` and
+   * `TRIAL`.
+   * 
+ * + * Protobuf enum {@code google.storage.control.v2.IntelligenceConfig.EditionConfig} + */ + public enum EditionConfig implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * This is an unknown edition of the resource.
+     * 
+ * + * EDITION_CONFIG_UNSPECIFIED = 0; + */ + EDITION_CONFIG_UNSPECIFIED(0), + /** + * + * + *
+     * The inherited edition from the parent and filters. This is the default
+     * edition when there is no `IntelligenceConfig` setup for a GCP resource.
+     * 
+ * + * INHERIT = 1; + */ + INHERIT(1), + /** + * + * + *
+     * The edition configuration is disabled for the `IntelligenceConfig`
+     * resource and its children. Filters are not applicable.
+     * 
+ * + * DISABLED = 2; + */ + DISABLED(2), + /** + * + * + *
+     * The `IntelligenceConfig` resource is of STANDARD edition.
+     * 
+ * + * STANDARD = 3; + */ + STANDARD(3), + /** + * + * + *
+     * The `IntelligenceConfig` resource is available in `TRIAL` edition. During
+     * the trial period, Cloud Storage does not charge for Storage Intelligence
+     * usage. You can specify the buckets to include in the trial period by
+     * using filters. At the end of the trial period, the `IntelligenceConfig`
+     * resource is upgraded to `STANDARD` edition.
+     * 
+ * + * TRIAL = 5; + */ + TRIAL(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * This is an unknown edition of the resource.
+     * 
+ * + * EDITION_CONFIG_UNSPECIFIED = 0; + */ + public static final int EDITION_CONFIG_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+     * The inherited edition from the parent and filters. This is the default
+     * edition when there is no `IntelligenceConfig` setup for a GCP resource.
+     * 
+ * + * INHERIT = 1; + */ + public static final int INHERIT_VALUE = 1; + + /** + * + * + *
+     * The edition configuration is disabled for the `IntelligenceConfig`
+     * resource and its children. Filters are not applicable.
+     * 
+ * + * DISABLED = 2; + */ + public static final int DISABLED_VALUE = 2; + + /** + * + * + *
+     * The `IntelligenceConfig` resource is of STANDARD edition.
+     * 
+ * + * STANDARD = 3; + */ + public static final int STANDARD_VALUE = 3; + + /** + * + * + *
+     * The `IntelligenceConfig` resource is available in `TRIAL` edition. During
+     * the trial period, Cloud Storage does not charge for Storage Intelligence
+     * usage. You can specify the buckets to include in the trial period by
+     * using filters. At the end of the trial period, the `IntelligenceConfig`
+     * resource is upgraded to `STANDARD` edition.
+     * 
+ * + * TRIAL = 5; + */ + public static final int TRIAL_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static EditionConfig valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static EditionConfig forNumber(int value) { + switch (value) { + case 0: + return EDITION_CONFIG_UNSPECIFIED; + case 1: + return INHERIT; + case 2: + return DISABLED; + case 3: + return STANDARD; + case 5: + return TRIAL; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public EditionConfig findValueByNumber(int number) { + return EditionConfig.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.storage.control.v2.IntelligenceConfig.getDescriptor().getEnumTypes().get(0); + } + + private static final EditionConfig[] VALUES = values(); + + public static EditionConfig valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private EditionConfig(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.storage.control.v2.IntelligenceConfig.EditionConfig) + } + + public interface FilterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storage.control.v2.IntelligenceConfig.Filter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Bucket locations to include.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations included_cloud_storage_locations = 1; + * + * + * @return Whether the includedCloudStorageLocations field is set. + */ + boolean hasIncludedCloudStorageLocations(); + + /** + * + * + *
+     * Bucket locations to include.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations included_cloud_storage_locations = 1; + * + * + * @return The includedCloudStorageLocations. + */ + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + getIncludedCloudStorageLocations(); + + /** + * + * + *
+     * Bucket locations to include.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations included_cloud_storage_locations = 1; + * + */ + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocationsOrBuilder + getIncludedCloudStorageLocationsOrBuilder(); + + /** + * + * + *
+     * Bucket locations to exclude.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations excluded_cloud_storage_locations = 2; + * + * + * @return Whether the excludedCloudStorageLocations field is set. + */ + boolean hasExcludedCloudStorageLocations(); + + /** + * + * + *
+     * Bucket locations to exclude.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations excluded_cloud_storage_locations = 2; + * + * + * @return The excludedCloudStorageLocations. + */ + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + getExcludedCloudStorageLocations(); + + /** + * + * + *
+     * Bucket locations to exclude.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations excluded_cloud_storage_locations = 2; + * + */ + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocationsOrBuilder + getExcludedCloudStorageLocationsOrBuilder(); + + /** + * + * + *
+     * Buckets to include.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets included_cloud_storage_buckets = 3; + * + * + * @return Whether the includedCloudStorageBuckets field is set. + */ + boolean hasIncludedCloudStorageBuckets(); + + /** + * + * + *
+     * Buckets to include.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets included_cloud_storage_buckets = 3; + * + * + * @return The includedCloudStorageBuckets. + */ + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + getIncludedCloudStorageBuckets(); + + /** + * + * + *
+     * Buckets to include.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets included_cloud_storage_buckets = 3; + * + */ + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBucketsOrBuilder + getIncludedCloudStorageBucketsOrBuilder(); + + /** + * + * + *
+     * Buckets to exclude.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets excluded_cloud_storage_buckets = 4; + * + * + * @return Whether the excludedCloudStorageBuckets field is set. + */ + boolean hasExcludedCloudStorageBuckets(); + + /** + * + * + *
+     * Buckets to exclude.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets excluded_cloud_storage_buckets = 4; + * + * + * @return The excludedCloudStorageBuckets. + */ + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + getExcludedCloudStorageBuckets(); + + /** + * + * + *
+     * Buckets to exclude.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets excluded_cloud_storage_buckets = 4; + * + */ + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBucketsOrBuilder + getExcludedCloudStorageBucketsOrBuilder(); + + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocationsCase + getCloudStorageLocationsCase(); + + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBucketsCase + getCloudStorageBucketsCase(); + } + + /** + * + * + *
+   * Filter over location and bucket using include or exclude semantics.
+   * Resources that match the include or exclude filter are exclusively included
+   * or excluded from the Storage Intelligence plan.
+   * 
+ * + * Protobuf type {@code google.storage.control.v2.IntelligenceConfig.Filter} + */ + public static final class Filter extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storage.control.v2.IntelligenceConfig.Filter) + FilterOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Filter.newBuilder() to construct. + private Filter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Filter() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Filter(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_IntelligenceConfig_Filter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_IntelligenceConfig_Filter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.IntelligenceConfig.Filter.class, + com.google.storage.control.v2.IntelligenceConfig.Filter.Builder.class); + } + + public interface CloudStorageLocationsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Optional. Bucket locations. Location can be any of the Cloud Storage
+       * regions specified in lower case format. For example, `us-east1`,
+       * `us-west1`.
+       * 
+ * + * repeated string locations = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the locations. + */ + java.util.List getLocationsList(); + + /** + * + * + *
+       * Optional. Bucket locations. Location can be any of the Cloud Storage
+       * regions specified in lower case format. For example, `us-east1`,
+       * `us-west1`.
+       * 
+ * + * repeated string locations = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of locations. + */ + int getLocationsCount(); + + /** + * + * + *
+       * Optional. Bucket locations. Location can be any of the Cloud Storage
+       * regions specified in lower case format. For example, `us-east1`,
+       * `us-west1`.
+       * 
+ * + * repeated string locations = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The locations at the given index. + */ + java.lang.String getLocations(int index); + + /** + * + * + *
+       * Optional. Bucket locations. Location can be any of the Cloud Storage
+       * regions specified in lower case format. For example, `us-east1`,
+       * `us-west1`.
+       * 
+ * + * repeated string locations = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the locations at the given index. + */ + com.google.protobuf.ByteString getLocationsBytes(int index); + } + + /** + * + * + *
+     * Collection of bucket locations.
+     * 
+ * + * Protobuf type {@code + * google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations} + */ + public static final class CloudStorageLocations extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations) + CloudStorageLocationsOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CloudStorageLocations.newBuilder() to construct. + private CloudStorageLocations(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CloudStorageLocations() { + locations_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CloudStorageLocations(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_IntelligenceConfig_Filter_CloudStorageLocations_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_IntelligenceConfig_Filter_CloudStorageLocations_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations.class, + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + .Builder.class); + } + + public static final int LOCATIONS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList locations_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+       * Optional. Bucket locations. Location can be any of the Cloud Storage
+       * regions specified in lower case format. For example, `us-east1`,
+       * `us-west1`.
+       * 
+ * + * repeated string locations = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the locations. + */ + public com.google.protobuf.ProtocolStringList getLocationsList() { + return locations_; + } + + /** + * + * + *
+       * Optional. Bucket locations. Location can be any of the Cloud Storage
+       * regions specified in lower case format. For example, `us-east1`,
+       * `us-west1`.
+       * 
+ * + * repeated string locations = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of locations. + */ + public int getLocationsCount() { + return locations_.size(); + } + + /** + * + * + *
+       * Optional. Bucket locations. Location can be any of the Cloud Storage
+       * regions specified in lower case format. For example, `us-east1`,
+       * `us-west1`.
+       * 
+ * + * repeated string locations = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The locations at the given index. + */ + public java.lang.String getLocations(int index) { + return locations_.get(index); + } + + /** + * + * + *
+       * Optional. Bucket locations. Location can be any of the Cloud Storage
+       * regions specified in lower case format. For example, `us-east1`,
+       * `us-west1`.
+       * 
+ * + * repeated string locations = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the locations at the given index. + */ + public com.google.protobuf.ByteString getLocationsBytes(int index) { + return locations_.getByteString(index); + } + + 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 < locations_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, locations_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < locations_.size(); i++) { + dataSize += computeStringSizeNoTag(locations_.getRaw(i)); + } + size += dataSize; + size += 1 * getLocationsList().size(); + } + 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.control.v2.IntelligenceConfig.Filter.CloudStorageLocations)) { + return super.equals(obj); + } + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations other = + (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations) obj; + + if (!getLocationsList().equals(other.getLocationsList())) 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 (getLocationsCount() > 0) { + hash = (37 * hash) + LOCATIONS_FIELD_NUMBER; + hash = (53 * hash) + getLocationsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + 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.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + 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.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + 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.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + 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.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + 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.control.v2.IntelligenceConfig.Filter.CloudStorageLocations 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; + } + + /** + * + * + *
+       * Collection of bucket locations.
+       * 
+ * + * Protobuf type {@code + * google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations) + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocationsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_IntelligenceConfig_Filter_CloudStorageLocations_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_IntelligenceConfig_Filter_CloudStorageLocations_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + .class, + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + .Builder.class); + } + + // Construct using + // com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + locations_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_IntelligenceConfig_Filter_CloudStorageLocations_descriptor; + } + + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + getDefaultInstanceForType() { + return com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + build() { + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + buildPartial() { + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations result = + new com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations( + this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + locations_.makeImmutable(); + result.locations_ = locations_; + } + } + + @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.control.v2.IntelligenceConfig.Filter.CloudStorageLocations) { + return mergeFrom( + (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations other) { + if (other + == com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + .getDefaultInstance()) return this; + if (!other.locations_.isEmpty()) { + if (locations_.isEmpty()) { + locations_ = other.locations_; + bitField0_ |= 0x00000001; + } else { + ensureLocationsIsMutable(); + locations_.addAll(other.locations_); + } + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureLocationsIsMutable(); + locations_.add(s); + 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 com.google.protobuf.LazyStringArrayList locations_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureLocationsIsMutable() { + if (!locations_.isModifiable()) { + locations_ = new com.google.protobuf.LazyStringArrayList(locations_); + } + bitField0_ |= 0x00000001; + } + + /** + * + * + *
+         * Optional. Bucket locations. Location can be any of the Cloud Storage
+         * regions specified in lower case format. For example, `us-east1`,
+         * `us-west1`.
+         * 
+ * + * repeated string locations = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the locations. + */ + public com.google.protobuf.ProtocolStringList getLocationsList() { + locations_.makeImmutable(); + return locations_; + } + + /** + * + * + *
+         * Optional. Bucket locations. Location can be any of the Cloud Storage
+         * regions specified in lower case format. For example, `us-east1`,
+         * `us-west1`.
+         * 
+ * + * repeated string locations = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of locations. + */ + public int getLocationsCount() { + return locations_.size(); + } + + /** + * + * + *
+         * Optional. Bucket locations. Location can be any of the Cloud Storage
+         * regions specified in lower case format. For example, `us-east1`,
+         * `us-west1`.
+         * 
+ * + * repeated string locations = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The locations at the given index. + */ + public java.lang.String getLocations(int index) { + return locations_.get(index); + } + + /** + * + * + *
+         * Optional. Bucket locations. Location can be any of the Cloud Storage
+         * regions specified in lower case format. For example, `us-east1`,
+         * `us-west1`.
+         * 
+ * + * repeated string locations = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the locations at the given index. + */ + public com.google.protobuf.ByteString getLocationsBytes(int index) { + return locations_.getByteString(index); + } + + /** + * + * + *
+         * Optional. Bucket locations. Location can be any of the Cloud Storage
+         * regions specified in lower case format. For example, `us-east1`,
+         * `us-west1`.
+         * 
+ * + * repeated string locations = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The locations to set. + * @return This builder for chaining. + */ + public Builder setLocations(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationsIsMutable(); + locations_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. Bucket locations. Location can be any of the Cloud Storage
+         * regions specified in lower case format. For example, `us-east1`,
+         * `us-west1`.
+         * 
+ * + * repeated string locations = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The locations to add. + * @return This builder for chaining. + */ + public Builder addLocations(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocationsIsMutable(); + locations_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. Bucket locations. Location can be any of the Cloud Storage
+         * regions specified in lower case format. For example, `us-east1`,
+         * `us-west1`.
+         * 
+ * + * repeated string locations = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The locations to add. + * @return This builder for chaining. + */ + public Builder addAllLocations(java.lang.Iterable values) { + ensureLocationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, locations_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. Bucket locations. Location can be any of the Cloud Storage
+         * regions specified in lower case format. For example, `us-east1`,
+         * `us-west1`.
+         * 
+ * + * repeated string locations = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLocations() { + locations_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. Bucket locations. Location can be any of the Cloud Storage
+         * regions specified in lower case format. For example, `us-east1`,
+         * `us-west1`.
+         * 
+ * + * repeated string locations = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the locations to add. + * @return This builder for chaining. + */ + public Builder addLocationsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureLocationsIsMutable(); + locations_.add(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.control.v2.IntelligenceConfig.Filter.CloudStorageLocations) + } + + // @@protoc_insertion_point(class_scope:google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations) + private static final com.google.storage.control.v2.IntelligenceConfig.Filter + .CloudStorageLocations + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations(); + } + + public static com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudStorageLocations 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.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CloudStorageBucketsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Optional. A regex pattern for matching bucket names. Regex should
+       * follow the syntax specified in
+       * [google/re2](https://github.com/google/re2). For example,
+       * `^sample_.*` matches all buckets of the form
+       * `gs://sample_bucket-1`, `gs://sample_bucket-2`,
+       * `gs://sample_bucket-n` but not `gs://test_sample_bucket`.
+       * If you want to match a single bucket, say `gs://sample_bucket`,
+       * use `sample_bucket`.
+       * 
+ * + * repeated string bucket_id_regexes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the bucketIdRegexes. + */ + java.util.List getBucketIdRegexesList(); + + /** + * + * + *
+       * Optional. A regex pattern for matching bucket names. Regex should
+       * follow the syntax specified in
+       * [google/re2](https://github.com/google/re2). For example,
+       * `^sample_.*` matches all buckets of the form
+       * `gs://sample_bucket-1`, `gs://sample_bucket-2`,
+       * `gs://sample_bucket-n` but not `gs://test_sample_bucket`.
+       * If you want to match a single bucket, say `gs://sample_bucket`,
+       * use `sample_bucket`.
+       * 
+ * + * repeated string bucket_id_regexes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of bucketIdRegexes. + */ + int getBucketIdRegexesCount(); + + /** + * + * + *
+       * Optional. A regex pattern for matching bucket names. Regex should
+       * follow the syntax specified in
+       * [google/re2](https://github.com/google/re2). For example,
+       * `^sample_.*` matches all buckets of the form
+       * `gs://sample_bucket-1`, `gs://sample_bucket-2`,
+       * `gs://sample_bucket-n` but not `gs://test_sample_bucket`.
+       * If you want to match a single bucket, say `gs://sample_bucket`,
+       * use `sample_bucket`.
+       * 
+ * + * repeated string bucket_id_regexes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The bucketIdRegexes at the given index. + */ + java.lang.String getBucketIdRegexes(int index); + + /** + * + * + *
+       * Optional. A regex pattern for matching bucket names. Regex should
+       * follow the syntax specified in
+       * [google/re2](https://github.com/google/re2). For example,
+       * `^sample_.*` matches all buckets of the form
+       * `gs://sample_bucket-1`, `gs://sample_bucket-2`,
+       * `gs://sample_bucket-n` but not `gs://test_sample_bucket`.
+       * If you want to match a single bucket, say `gs://sample_bucket`,
+       * use `sample_bucket`.
+       * 
+ * + * repeated string bucket_id_regexes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the bucketIdRegexes at the given index. + */ + com.google.protobuf.ByteString getBucketIdRegexesBytes(int index); + } + + /** + * + * + *
+     * Collection of buckets.
+     * 
+ * + * Protobuf type {@code google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets} + */ + public static final class CloudStorageBuckets extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets) + CloudStorageBucketsOrBuilder { + private static final long serialVersionUID = 0L; + + // Use CloudStorageBuckets.newBuilder() to construct. + private CloudStorageBuckets(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CloudStorageBuckets() { + bucketIdRegexes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CloudStorageBuckets(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_IntelligenceConfig_Filter_CloudStorageBuckets_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_IntelligenceConfig_Filter_CloudStorageBuckets_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets.class, + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets.Builder + .class); + } + + public static final int BUCKET_ID_REGEXES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList bucketIdRegexes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
+       * Optional. A regex pattern for matching bucket names. Regex should
+       * follow the syntax specified in
+       * [google/re2](https://github.com/google/re2). For example,
+       * `^sample_.*` matches all buckets of the form
+       * `gs://sample_bucket-1`, `gs://sample_bucket-2`,
+       * `gs://sample_bucket-n` but not `gs://test_sample_bucket`.
+       * If you want to match a single bucket, say `gs://sample_bucket`,
+       * use `sample_bucket`.
+       * 
+ * + * repeated string bucket_id_regexes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the bucketIdRegexes. + */ + public com.google.protobuf.ProtocolStringList getBucketIdRegexesList() { + return bucketIdRegexes_; + } + + /** + * + * + *
+       * Optional. A regex pattern for matching bucket names. Regex should
+       * follow the syntax specified in
+       * [google/re2](https://github.com/google/re2). For example,
+       * `^sample_.*` matches all buckets of the form
+       * `gs://sample_bucket-1`, `gs://sample_bucket-2`,
+       * `gs://sample_bucket-n` but not `gs://test_sample_bucket`.
+       * If you want to match a single bucket, say `gs://sample_bucket`,
+       * use `sample_bucket`.
+       * 
+ * + * repeated string bucket_id_regexes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of bucketIdRegexes. + */ + public int getBucketIdRegexesCount() { + return bucketIdRegexes_.size(); + } + + /** + * + * + *
+       * Optional. A regex pattern for matching bucket names. Regex should
+       * follow the syntax specified in
+       * [google/re2](https://github.com/google/re2). For example,
+       * `^sample_.*` matches all buckets of the form
+       * `gs://sample_bucket-1`, `gs://sample_bucket-2`,
+       * `gs://sample_bucket-n` but not `gs://test_sample_bucket`.
+       * If you want to match a single bucket, say `gs://sample_bucket`,
+       * use `sample_bucket`.
+       * 
+ * + * repeated string bucket_id_regexes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The bucketIdRegexes at the given index. + */ + public java.lang.String getBucketIdRegexes(int index) { + return bucketIdRegexes_.get(index); + } + + /** + * + * + *
+       * Optional. A regex pattern for matching bucket names. Regex should
+       * follow the syntax specified in
+       * [google/re2](https://github.com/google/re2). For example,
+       * `^sample_.*` matches all buckets of the form
+       * `gs://sample_bucket-1`, `gs://sample_bucket-2`,
+       * `gs://sample_bucket-n` but not `gs://test_sample_bucket`.
+       * If you want to match a single bucket, say `gs://sample_bucket`,
+       * use `sample_bucket`.
+       * 
+ * + * repeated string bucket_id_regexes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the bucketIdRegexes at the given index. + */ + public com.google.protobuf.ByteString getBucketIdRegexesBytes(int index) { + return bucketIdRegexes_.getByteString(index); + } + + 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 < bucketIdRegexes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, bucketIdRegexes_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < bucketIdRegexes_.size(); i++) { + dataSize += computeStringSizeNoTag(bucketIdRegexes_.getRaw(i)); + } + size += dataSize; + size += 1 * getBucketIdRegexesList().size(); + } + 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.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets)) { + return super.equals(obj); + } + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets other = + (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets) obj; + + if (!getBucketIdRegexesList().equals(other.getBucketIdRegexesList())) 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 (getBucketIdRegexesCount() > 0) { + hash = (37 * hash) + BUCKET_ID_REGEXES_FIELD_NUMBER; + hash = (53 * hash) + getBucketIdRegexesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + 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.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + 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.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + 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.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + 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.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + 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.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets 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; + } + + /** + * + * + *
+       * Collection of buckets.
+       * 
+ * + * Protobuf type {@code + * google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets) + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBucketsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_IntelligenceConfig_Filter_CloudStorageBuckets_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_IntelligenceConfig_Filter_CloudStorageBuckets_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets.class, + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + .Builder.class); + } + + // Construct using + // com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bucketIdRegexes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_IntelligenceConfig_Filter_CloudStorageBuckets_descriptor; + } + + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + getDefaultInstanceForType() { + return com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets build() { + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + buildPartial() { + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets result = + new com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + bucketIdRegexes_.makeImmutable(); + result.bucketIdRegexes_ = bucketIdRegexes_; + } + } + + @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.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets) { + return mergeFrom( + (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets other) { + if (other + == com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + .getDefaultInstance()) return this; + if (!other.bucketIdRegexes_.isEmpty()) { + if (bucketIdRegexes_.isEmpty()) { + bucketIdRegexes_ = other.bucketIdRegexes_; + bitField0_ |= 0x00000001; + } else { + ensureBucketIdRegexesIsMutable(); + bucketIdRegexes_.addAll(other.bucketIdRegexes_); + } + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureBucketIdRegexesIsMutable(); + bucketIdRegexes_.add(s); + 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 com.google.protobuf.LazyStringArrayList bucketIdRegexes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureBucketIdRegexesIsMutable() { + if (!bucketIdRegexes_.isModifiable()) { + bucketIdRegexes_ = new com.google.protobuf.LazyStringArrayList(bucketIdRegexes_); + } + bitField0_ |= 0x00000001; + } + + /** + * + * + *
+         * Optional. A regex pattern for matching bucket names. Regex should
+         * follow the syntax specified in
+         * [google/re2](https://github.com/google/re2). For example,
+         * `^sample_.*` matches all buckets of the form
+         * `gs://sample_bucket-1`, `gs://sample_bucket-2`,
+         * `gs://sample_bucket-n` but not `gs://test_sample_bucket`.
+         * If you want to match a single bucket, say `gs://sample_bucket`,
+         * use `sample_bucket`.
+         * 
+ * + * repeated string bucket_id_regexes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the bucketIdRegexes. + */ + public com.google.protobuf.ProtocolStringList getBucketIdRegexesList() { + bucketIdRegexes_.makeImmutable(); + return bucketIdRegexes_; + } + + /** + * + * + *
+         * Optional. A regex pattern for matching bucket names. Regex should
+         * follow the syntax specified in
+         * [google/re2](https://github.com/google/re2). For example,
+         * `^sample_.*` matches all buckets of the form
+         * `gs://sample_bucket-1`, `gs://sample_bucket-2`,
+         * `gs://sample_bucket-n` but not `gs://test_sample_bucket`.
+         * If you want to match a single bucket, say `gs://sample_bucket`,
+         * use `sample_bucket`.
+         * 
+ * + * repeated string bucket_id_regexes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of bucketIdRegexes. + */ + public int getBucketIdRegexesCount() { + return bucketIdRegexes_.size(); + } + + /** + * + * + *
+         * Optional. A regex pattern for matching bucket names. Regex should
+         * follow the syntax specified in
+         * [google/re2](https://github.com/google/re2). For example,
+         * `^sample_.*` matches all buckets of the form
+         * `gs://sample_bucket-1`, `gs://sample_bucket-2`,
+         * `gs://sample_bucket-n` but not `gs://test_sample_bucket`.
+         * If you want to match a single bucket, say `gs://sample_bucket`,
+         * use `sample_bucket`.
+         * 
+ * + * repeated string bucket_id_regexes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The bucketIdRegexes at the given index. + */ + public java.lang.String getBucketIdRegexes(int index) { + return bucketIdRegexes_.get(index); + } + + /** + * + * + *
+         * Optional. A regex pattern for matching bucket names. Regex should
+         * follow the syntax specified in
+         * [google/re2](https://github.com/google/re2). For example,
+         * `^sample_.*` matches all buckets of the form
+         * `gs://sample_bucket-1`, `gs://sample_bucket-2`,
+         * `gs://sample_bucket-n` but not `gs://test_sample_bucket`.
+         * If you want to match a single bucket, say `gs://sample_bucket`,
+         * use `sample_bucket`.
+         * 
+ * + * repeated string bucket_id_regexes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the bucketIdRegexes at the given index. + */ + public com.google.protobuf.ByteString getBucketIdRegexesBytes(int index) { + return bucketIdRegexes_.getByteString(index); + } + + /** + * + * + *
+         * Optional. A regex pattern for matching bucket names. Regex should
+         * follow the syntax specified in
+         * [google/re2](https://github.com/google/re2). For example,
+         * `^sample_.*` matches all buckets of the form
+         * `gs://sample_bucket-1`, `gs://sample_bucket-2`,
+         * `gs://sample_bucket-n` but not `gs://test_sample_bucket`.
+         * If you want to match a single bucket, say `gs://sample_bucket`,
+         * use `sample_bucket`.
+         * 
+ * + * repeated string bucket_id_regexes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The bucketIdRegexes to set. + * @return This builder for chaining. + */ + public Builder setBucketIdRegexes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketIdRegexesIsMutable(); + bucketIdRegexes_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. A regex pattern for matching bucket names. Regex should
+         * follow the syntax specified in
+         * [google/re2](https://github.com/google/re2). For example,
+         * `^sample_.*` matches all buckets of the form
+         * `gs://sample_bucket-1`, `gs://sample_bucket-2`,
+         * `gs://sample_bucket-n` but not `gs://test_sample_bucket`.
+         * If you want to match a single bucket, say `gs://sample_bucket`,
+         * use `sample_bucket`.
+         * 
+ * + * repeated string bucket_id_regexes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bucketIdRegexes to add. + * @return This builder for chaining. + */ + public Builder addBucketIdRegexes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketIdRegexesIsMutable(); + bucketIdRegexes_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. A regex pattern for matching bucket names. Regex should
+         * follow the syntax specified in
+         * [google/re2](https://github.com/google/re2). For example,
+         * `^sample_.*` matches all buckets of the form
+         * `gs://sample_bucket-1`, `gs://sample_bucket-2`,
+         * `gs://sample_bucket-n` but not `gs://test_sample_bucket`.
+         * If you want to match a single bucket, say `gs://sample_bucket`,
+         * use `sample_bucket`.
+         * 
+ * + * repeated string bucket_id_regexes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The bucketIdRegexes to add. + * @return This builder for chaining. + */ + public Builder addAllBucketIdRegexes(java.lang.Iterable values) { + ensureBucketIdRegexesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bucketIdRegexes_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. A regex pattern for matching bucket names. Regex should
+         * follow the syntax specified in
+         * [google/re2](https://github.com/google/re2). For example,
+         * `^sample_.*` matches all buckets of the form
+         * `gs://sample_bucket-1`, `gs://sample_bucket-2`,
+         * `gs://sample_bucket-n` but not `gs://test_sample_bucket`.
+         * If you want to match a single bucket, say `gs://sample_bucket`,
+         * use `sample_bucket`.
+         * 
+ * + * repeated string bucket_id_regexes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearBucketIdRegexes() { + bucketIdRegexes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + + /** + * + * + *
+         * Optional. A regex pattern for matching bucket names. Regex should
+         * follow the syntax specified in
+         * [google/re2](https://github.com/google/re2). For example,
+         * `^sample_.*` matches all buckets of the form
+         * `gs://sample_bucket-1`, `gs://sample_bucket-2`,
+         * `gs://sample_bucket-n` but not `gs://test_sample_bucket`.
+         * If you want to match a single bucket, say `gs://sample_bucket`,
+         * use `sample_bucket`.
+         * 
+ * + * repeated string bucket_id_regexes = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the bucketIdRegexes to add. + * @return This builder for chaining. + */ + public Builder addBucketIdRegexesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureBucketIdRegexesIsMutable(); + bucketIdRegexes_.add(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.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets) + } + + // @@protoc_insertion_point(class_scope:google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets) + private static final com.google.storage.control.v2.IntelligenceConfig.Filter + .CloudStorageBuckets + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets(); + } + + public static com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudStorageBuckets 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.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int cloudStorageLocationsCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object cloudStorageLocations_; + + public enum CloudStorageLocationsCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INCLUDED_CLOUD_STORAGE_LOCATIONS(1), + EXCLUDED_CLOUD_STORAGE_LOCATIONS(2), + CLOUDSTORAGELOCATIONS_NOT_SET(0); + private final int value; + + private CloudStorageLocationsCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CloudStorageLocationsCase valueOf(int value) { + return forNumber(value); + } + + public static CloudStorageLocationsCase forNumber(int value) { + switch (value) { + case 1: + return INCLUDED_CLOUD_STORAGE_LOCATIONS; + case 2: + return EXCLUDED_CLOUD_STORAGE_LOCATIONS; + case 0: + return CLOUDSTORAGELOCATIONS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public CloudStorageLocationsCase getCloudStorageLocationsCase() { + return CloudStorageLocationsCase.forNumber(cloudStorageLocationsCase_); + } + + private int cloudStorageBucketsCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object cloudStorageBuckets_; + + public enum CloudStorageBucketsCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INCLUDED_CLOUD_STORAGE_BUCKETS(3), + EXCLUDED_CLOUD_STORAGE_BUCKETS(4), + CLOUDSTORAGEBUCKETS_NOT_SET(0); + private final int value; + + private CloudStorageBucketsCase(int value) { + this.value = value; + } + + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CloudStorageBucketsCase valueOf(int value) { + return forNumber(value); + } + + public static CloudStorageBucketsCase forNumber(int value) { + switch (value) { + case 3: + return INCLUDED_CLOUD_STORAGE_BUCKETS; + case 4: + return EXCLUDED_CLOUD_STORAGE_BUCKETS; + case 0: + return CLOUDSTORAGEBUCKETS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public CloudStorageBucketsCase getCloudStorageBucketsCase() { + return CloudStorageBucketsCase.forNumber(cloudStorageBucketsCase_); + } + + public static final int INCLUDED_CLOUD_STORAGE_LOCATIONS_FIELD_NUMBER = 1; + + /** + * + * + *
+     * Bucket locations to include.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations included_cloud_storage_locations = 1; + * + * + * @return Whether the includedCloudStorageLocations field is set. + */ + @java.lang.Override + public boolean hasIncludedCloudStorageLocations() { + return cloudStorageLocationsCase_ == 1; + } + + /** + * + * + *
+     * Bucket locations to include.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations included_cloud_storage_locations = 1; + * + * + * @return The includedCloudStorageLocations. + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + getIncludedCloudStorageLocations() { + if (cloudStorageLocationsCase_ == 1) { + return (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations) + cloudStorageLocations_; + } + return com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + .getDefaultInstance(); + } + + /** + * + * + *
+     * Bucket locations to include.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations included_cloud_storage_locations = 1; + * + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocationsOrBuilder + getIncludedCloudStorageLocationsOrBuilder() { + if (cloudStorageLocationsCase_ == 1) { + return (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations) + cloudStorageLocations_; + } + return com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + .getDefaultInstance(); + } + + public static final int EXCLUDED_CLOUD_STORAGE_LOCATIONS_FIELD_NUMBER = 2; + + /** + * + * + *
+     * Bucket locations to exclude.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations excluded_cloud_storage_locations = 2; + * + * + * @return Whether the excludedCloudStorageLocations field is set. + */ + @java.lang.Override + public boolean hasExcludedCloudStorageLocations() { + return cloudStorageLocationsCase_ == 2; + } + + /** + * + * + *
+     * Bucket locations to exclude.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations excluded_cloud_storage_locations = 2; + * + * + * @return The excludedCloudStorageLocations. + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + getExcludedCloudStorageLocations() { + if (cloudStorageLocationsCase_ == 2) { + return (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations) + cloudStorageLocations_; + } + return com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + .getDefaultInstance(); + } + + /** + * + * + *
+     * Bucket locations to exclude.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations excluded_cloud_storage_locations = 2; + * + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocationsOrBuilder + getExcludedCloudStorageLocationsOrBuilder() { + if (cloudStorageLocationsCase_ == 2) { + return (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations) + cloudStorageLocations_; + } + return com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + .getDefaultInstance(); + } + + public static final int INCLUDED_CLOUD_STORAGE_BUCKETS_FIELD_NUMBER = 3; + + /** + * + * + *
+     * Buckets to include.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets included_cloud_storage_buckets = 3; + * + * + * @return Whether the includedCloudStorageBuckets field is set. + */ + @java.lang.Override + public boolean hasIncludedCloudStorageBuckets() { + return cloudStorageBucketsCase_ == 3; + } + + /** + * + * + *
+     * Buckets to include.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets included_cloud_storage_buckets = 3; + * + * + * @return The includedCloudStorageBuckets. + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + getIncludedCloudStorageBuckets() { + if (cloudStorageBucketsCase_ == 3) { + return (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets) + cloudStorageBuckets_; + } + return com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + .getDefaultInstance(); + } + + /** + * + * + *
+     * Buckets to include.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets included_cloud_storage_buckets = 3; + * + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBucketsOrBuilder + getIncludedCloudStorageBucketsOrBuilder() { + if (cloudStorageBucketsCase_ == 3) { + return (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets) + cloudStorageBuckets_; + } + return com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + .getDefaultInstance(); + } + + public static final int EXCLUDED_CLOUD_STORAGE_BUCKETS_FIELD_NUMBER = 4; + + /** + * + * + *
+     * Buckets to exclude.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets excluded_cloud_storage_buckets = 4; + * + * + * @return Whether the excludedCloudStorageBuckets field is set. + */ + @java.lang.Override + public boolean hasExcludedCloudStorageBuckets() { + return cloudStorageBucketsCase_ == 4; + } + + /** + * + * + *
+     * Buckets to exclude.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets excluded_cloud_storage_buckets = 4; + * + * + * @return The excludedCloudStorageBuckets. + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + getExcludedCloudStorageBuckets() { + if (cloudStorageBucketsCase_ == 4) { + return (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets) + cloudStorageBuckets_; + } + return com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + .getDefaultInstance(); + } + + /** + * + * + *
+     * Buckets to exclude.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets excluded_cloud_storage_buckets = 4; + * + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBucketsOrBuilder + getExcludedCloudStorageBucketsOrBuilder() { + if (cloudStorageBucketsCase_ == 4) { + return (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets) + cloudStorageBuckets_; + } + return com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + .getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (cloudStorageLocationsCase_ == 1) { + output.writeMessage( + 1, + (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations) + cloudStorageLocations_); + } + if (cloudStorageLocationsCase_ == 2) { + output.writeMessage( + 2, + (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations) + cloudStorageLocations_); + } + if (cloudStorageBucketsCase_ == 3) { + output.writeMessage( + 3, + (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets) + cloudStorageBuckets_); + } + if (cloudStorageBucketsCase_ == 4) { + output.writeMessage( + 4, + (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets) + cloudStorageBuckets_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (cloudStorageLocationsCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations) + cloudStorageLocations_); + } + if (cloudStorageLocationsCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations) + cloudStorageLocations_); + } + if (cloudStorageBucketsCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets) + cloudStorageBuckets_); + } + if (cloudStorageBucketsCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, + (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets) + cloudStorageBuckets_); + } + 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.control.v2.IntelligenceConfig.Filter)) { + return super.equals(obj); + } + com.google.storage.control.v2.IntelligenceConfig.Filter other = + (com.google.storage.control.v2.IntelligenceConfig.Filter) obj; + + if (!getCloudStorageLocationsCase().equals(other.getCloudStorageLocationsCase())) + return false; + switch (cloudStorageLocationsCase_) { + case 1: + if (!getIncludedCloudStorageLocations().equals(other.getIncludedCloudStorageLocations())) + return false; + break; + case 2: + if (!getExcludedCloudStorageLocations().equals(other.getExcludedCloudStorageLocations())) + return false; + break; + case 0: + default: + } + if (!getCloudStorageBucketsCase().equals(other.getCloudStorageBucketsCase())) return false; + switch (cloudStorageBucketsCase_) { + case 3: + if (!getIncludedCloudStorageBuckets().equals(other.getIncludedCloudStorageBuckets())) + return false; + break; + case 4: + if (!getExcludedCloudStorageBuckets().equals(other.getExcludedCloudStorageBuckets())) + return false; + break; + case 0: + default: + } + 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(); + switch (cloudStorageLocationsCase_) { + case 1: + hash = (37 * hash) + INCLUDED_CLOUD_STORAGE_LOCATIONS_FIELD_NUMBER; + hash = (53 * hash) + getIncludedCloudStorageLocations().hashCode(); + break; + case 2: + hash = (37 * hash) + EXCLUDED_CLOUD_STORAGE_LOCATIONS_FIELD_NUMBER; + hash = (53 * hash) + getExcludedCloudStorageLocations().hashCode(); + break; + case 0: + default: + } + switch (cloudStorageBucketsCase_) { + case 3: + hash = (37 * hash) + INCLUDED_CLOUD_STORAGE_BUCKETS_FIELD_NUMBER; + hash = (53 * hash) + getIncludedCloudStorageBuckets().hashCode(); + break; + case 4: + hash = (37 * hash) + EXCLUDED_CLOUD_STORAGE_BUCKETS_FIELD_NUMBER; + hash = (53 * hash) + getExcludedCloudStorageBuckets().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storage.control.v2.IntelligenceConfig.Filter parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.IntelligenceConfig.Filter 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.control.v2.IntelligenceConfig.Filter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.IntelligenceConfig.Filter 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.control.v2.IntelligenceConfig.Filter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.IntelligenceConfig.Filter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storage.control.v2.IntelligenceConfig.Filter parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.IntelligenceConfig.Filter 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.control.v2.IntelligenceConfig.Filter parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.IntelligenceConfig.Filter 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.control.v2.IntelligenceConfig.Filter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.IntelligenceConfig.Filter 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.control.v2.IntelligenceConfig.Filter 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; + } + + /** + * + * + *
+     * Filter over location and bucket using include or exclude semantics.
+     * Resources that match the include or exclude filter are exclusively included
+     * or excluded from the Storage Intelligence plan.
+     * 
+ * + * Protobuf type {@code google.storage.control.v2.IntelligenceConfig.Filter} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storage.control.v2.IntelligenceConfig.Filter) + com.google.storage.control.v2.IntelligenceConfig.FilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_IntelligenceConfig_Filter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_IntelligenceConfig_Filter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.IntelligenceConfig.Filter.class, + com.google.storage.control.v2.IntelligenceConfig.Filter.Builder.class); + } + + // Construct using com.google.storage.control.v2.IntelligenceConfig.Filter.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (includedCloudStorageLocationsBuilder_ != null) { + includedCloudStorageLocationsBuilder_.clear(); + } + if (excludedCloudStorageLocationsBuilder_ != null) { + excludedCloudStorageLocationsBuilder_.clear(); + } + if (includedCloudStorageBucketsBuilder_ != null) { + includedCloudStorageBucketsBuilder_.clear(); + } + if (excludedCloudStorageBucketsBuilder_ != null) { + excludedCloudStorageBucketsBuilder_.clear(); + } + cloudStorageLocationsCase_ = 0; + cloudStorageLocations_ = null; + cloudStorageBucketsCase_ = 0; + cloudStorageBuckets_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_IntelligenceConfig_Filter_descriptor; + } + + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.Filter getDefaultInstanceForType() { + return com.google.storage.control.v2.IntelligenceConfig.Filter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.Filter build() { + com.google.storage.control.v2.IntelligenceConfig.Filter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.Filter buildPartial() { + com.google.storage.control.v2.IntelligenceConfig.Filter result = + new com.google.storage.control.v2.IntelligenceConfig.Filter(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.storage.control.v2.IntelligenceConfig.Filter result) { + int from_bitField0_ = bitField0_; + } + + private void buildPartialOneofs( + com.google.storage.control.v2.IntelligenceConfig.Filter result) { + result.cloudStorageLocationsCase_ = cloudStorageLocationsCase_; + result.cloudStorageLocations_ = this.cloudStorageLocations_; + if (cloudStorageLocationsCase_ == 1 && includedCloudStorageLocationsBuilder_ != null) { + result.cloudStorageLocations_ = includedCloudStorageLocationsBuilder_.build(); + } + if (cloudStorageLocationsCase_ == 2 && excludedCloudStorageLocationsBuilder_ != null) { + result.cloudStorageLocations_ = excludedCloudStorageLocationsBuilder_.build(); + } + result.cloudStorageBucketsCase_ = cloudStorageBucketsCase_; + result.cloudStorageBuckets_ = this.cloudStorageBuckets_; + if (cloudStorageBucketsCase_ == 3 && includedCloudStorageBucketsBuilder_ != null) { + result.cloudStorageBuckets_ = includedCloudStorageBucketsBuilder_.build(); + } + if (cloudStorageBucketsCase_ == 4 && excludedCloudStorageBucketsBuilder_ != null) { + result.cloudStorageBuckets_ = excludedCloudStorageBucketsBuilder_.build(); + } + } + + @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.control.v2.IntelligenceConfig.Filter) { + return mergeFrom((com.google.storage.control.v2.IntelligenceConfig.Filter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.storage.control.v2.IntelligenceConfig.Filter other) { + if (other == com.google.storage.control.v2.IntelligenceConfig.Filter.getDefaultInstance()) + return this; + switch (other.getCloudStorageLocationsCase()) { + case INCLUDED_CLOUD_STORAGE_LOCATIONS: + { + mergeIncludedCloudStorageLocations(other.getIncludedCloudStorageLocations()); + break; + } + case EXCLUDED_CLOUD_STORAGE_LOCATIONS: + { + mergeExcludedCloudStorageLocations(other.getExcludedCloudStorageLocations()); + break; + } + case CLOUDSTORAGELOCATIONS_NOT_SET: + { + break; + } + } + switch (other.getCloudStorageBucketsCase()) { + case INCLUDED_CLOUD_STORAGE_BUCKETS: + { + mergeIncludedCloudStorageBuckets(other.getIncludedCloudStorageBuckets()); + break; + } + case EXCLUDED_CLOUD_STORAGE_BUCKETS: + { + mergeExcludedCloudStorageBuckets(other.getExcludedCloudStorageBuckets()); + break; + } + case CLOUDSTORAGEBUCKETS_NOT_SET: + { + break; + } + } + 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( + getIncludedCloudStorageLocationsFieldBuilder().getBuilder(), + extensionRegistry); + cloudStorageLocationsCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + getExcludedCloudStorageLocationsFieldBuilder().getBuilder(), + extensionRegistry); + cloudStorageLocationsCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage( + getIncludedCloudStorageBucketsFieldBuilder().getBuilder(), extensionRegistry); + cloudStorageBucketsCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage( + getExcludedCloudStorageBucketsFieldBuilder().getBuilder(), extensionRegistry); + cloudStorageBucketsCase_ = 4; + break; + } // case 34 + 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 cloudStorageLocationsCase_ = 0; + private java.lang.Object cloudStorageLocations_; + + public CloudStorageLocationsCase getCloudStorageLocationsCase() { + return CloudStorageLocationsCase.forNumber(cloudStorageLocationsCase_); + } + + public Builder clearCloudStorageLocations() { + cloudStorageLocationsCase_ = 0; + cloudStorageLocations_ = null; + onChanged(); + return this; + } + + private int cloudStorageBucketsCase_ = 0; + private java.lang.Object cloudStorageBuckets_; + + public CloudStorageBucketsCase getCloudStorageBucketsCase() { + return CloudStorageBucketsCase.forNumber(cloudStorageBucketsCase_); + } + + public Builder clearCloudStorageBuckets() { + cloudStorageBucketsCase_ = 0; + cloudStorageBuckets_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations, + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations.Builder, + com.google.storage.control.v2.IntelligenceConfig.Filter + .CloudStorageLocationsOrBuilder> + includedCloudStorageLocationsBuilder_; + + /** + * + * + *
+       * Bucket locations to include.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations included_cloud_storage_locations = 1; + * + * + * @return Whether the includedCloudStorageLocations field is set. + */ + @java.lang.Override + public boolean hasIncludedCloudStorageLocations() { + return cloudStorageLocationsCase_ == 1; + } + + /** + * + * + *
+       * Bucket locations to include.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations included_cloud_storage_locations = 1; + * + * + * @return The includedCloudStorageLocations. + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + getIncludedCloudStorageLocations() { + if (includedCloudStorageLocationsBuilder_ == null) { + if (cloudStorageLocationsCase_ == 1) { + return (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations) + cloudStorageLocations_; + } + return com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + .getDefaultInstance(); + } else { + if (cloudStorageLocationsCase_ == 1) { + return includedCloudStorageLocationsBuilder_.getMessage(); + } + return com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + .getDefaultInstance(); + } + } + + /** + * + * + *
+       * Bucket locations to include.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations included_cloud_storage_locations = 1; + * + */ + public Builder setIncludedCloudStorageLocations( + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations value) { + if (includedCloudStorageLocationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cloudStorageLocations_ = value; + onChanged(); + } else { + includedCloudStorageLocationsBuilder_.setMessage(value); + } + cloudStorageLocationsCase_ = 1; + return this; + } + + /** + * + * + *
+       * Bucket locations to include.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations included_cloud_storage_locations = 1; + * + */ + public Builder setIncludedCloudStorageLocations( + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations.Builder + builderForValue) { + if (includedCloudStorageLocationsBuilder_ == null) { + cloudStorageLocations_ = builderForValue.build(); + onChanged(); + } else { + includedCloudStorageLocationsBuilder_.setMessage(builderForValue.build()); + } + cloudStorageLocationsCase_ = 1; + return this; + } + + /** + * + * + *
+       * Bucket locations to include.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations included_cloud_storage_locations = 1; + * + */ + public Builder mergeIncludedCloudStorageLocations( + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations value) { + if (includedCloudStorageLocationsBuilder_ == null) { + if (cloudStorageLocationsCase_ == 1 + && cloudStorageLocations_ + != com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + .getDefaultInstance()) { + cloudStorageLocations_ = + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + .newBuilder( + (com.google.storage.control.v2.IntelligenceConfig.Filter + .CloudStorageLocations) + cloudStorageLocations_) + .mergeFrom(value) + .buildPartial(); + } else { + cloudStorageLocations_ = value; + } + onChanged(); + } else { + if (cloudStorageLocationsCase_ == 1) { + includedCloudStorageLocationsBuilder_.mergeFrom(value); + } else { + includedCloudStorageLocationsBuilder_.setMessage(value); + } + } + cloudStorageLocationsCase_ = 1; + return this; + } + + /** + * + * + *
+       * Bucket locations to include.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations included_cloud_storage_locations = 1; + * + */ + public Builder clearIncludedCloudStorageLocations() { + if (includedCloudStorageLocationsBuilder_ == null) { + if (cloudStorageLocationsCase_ == 1) { + cloudStorageLocationsCase_ = 0; + cloudStorageLocations_ = null; + onChanged(); + } + } else { + if (cloudStorageLocationsCase_ == 1) { + cloudStorageLocationsCase_ = 0; + cloudStorageLocations_ = null; + } + includedCloudStorageLocationsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * Bucket locations to include.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations included_cloud_storage_locations = 1; + * + */ + public com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations.Builder + getIncludedCloudStorageLocationsBuilder() { + return getIncludedCloudStorageLocationsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Bucket locations to include.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations included_cloud_storage_locations = 1; + * + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocationsOrBuilder + getIncludedCloudStorageLocationsOrBuilder() { + if ((cloudStorageLocationsCase_ == 1) && (includedCloudStorageLocationsBuilder_ != null)) { + return includedCloudStorageLocationsBuilder_.getMessageOrBuilder(); + } else { + if (cloudStorageLocationsCase_ == 1) { + return (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations) + cloudStorageLocations_; + } + return com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + .getDefaultInstance(); + } + } + + /** + * + * + *
+       * Bucket locations to include.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations included_cloud_storage_locations = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations, + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations.Builder, + com.google.storage.control.v2.IntelligenceConfig.Filter + .CloudStorageLocationsOrBuilder> + getIncludedCloudStorageLocationsFieldBuilder() { + if (includedCloudStorageLocationsBuilder_ == null) { + if (!(cloudStorageLocationsCase_ == 1)) { + cloudStorageLocations_ = + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + .getDefaultInstance(); + } + includedCloudStorageLocationsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations, + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + .Builder, + com.google.storage.control.v2.IntelligenceConfig.Filter + .CloudStorageLocationsOrBuilder>( + (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations) + cloudStorageLocations_, + getParentForChildren(), + isClean()); + cloudStorageLocations_ = null; + } + cloudStorageLocationsCase_ = 1; + onChanged(); + return includedCloudStorageLocationsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations, + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations.Builder, + com.google.storage.control.v2.IntelligenceConfig.Filter + .CloudStorageLocationsOrBuilder> + excludedCloudStorageLocationsBuilder_; + + /** + * + * + *
+       * Bucket locations to exclude.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations excluded_cloud_storage_locations = 2; + * + * + * @return Whether the excludedCloudStorageLocations field is set. + */ + @java.lang.Override + public boolean hasExcludedCloudStorageLocations() { + return cloudStorageLocationsCase_ == 2; + } + + /** + * + * + *
+       * Bucket locations to exclude.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations excluded_cloud_storage_locations = 2; + * + * + * @return The excludedCloudStorageLocations. + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + getExcludedCloudStorageLocations() { + if (excludedCloudStorageLocationsBuilder_ == null) { + if (cloudStorageLocationsCase_ == 2) { + return (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations) + cloudStorageLocations_; + } + return com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + .getDefaultInstance(); + } else { + if (cloudStorageLocationsCase_ == 2) { + return excludedCloudStorageLocationsBuilder_.getMessage(); + } + return com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + .getDefaultInstance(); + } + } + + /** + * + * + *
+       * Bucket locations to exclude.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations excluded_cloud_storage_locations = 2; + * + */ + public Builder setExcludedCloudStorageLocations( + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations value) { + if (excludedCloudStorageLocationsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cloudStorageLocations_ = value; + onChanged(); + } else { + excludedCloudStorageLocationsBuilder_.setMessage(value); + } + cloudStorageLocationsCase_ = 2; + return this; + } + + /** + * + * + *
+       * Bucket locations to exclude.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations excluded_cloud_storage_locations = 2; + * + */ + public Builder setExcludedCloudStorageLocations( + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations.Builder + builderForValue) { + if (excludedCloudStorageLocationsBuilder_ == null) { + cloudStorageLocations_ = builderForValue.build(); + onChanged(); + } else { + excludedCloudStorageLocationsBuilder_.setMessage(builderForValue.build()); + } + cloudStorageLocationsCase_ = 2; + return this; + } + + /** + * + * + *
+       * Bucket locations to exclude.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations excluded_cloud_storage_locations = 2; + * + */ + public Builder mergeExcludedCloudStorageLocations( + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations value) { + if (excludedCloudStorageLocationsBuilder_ == null) { + if (cloudStorageLocationsCase_ == 2 + && cloudStorageLocations_ + != com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + .getDefaultInstance()) { + cloudStorageLocations_ = + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + .newBuilder( + (com.google.storage.control.v2.IntelligenceConfig.Filter + .CloudStorageLocations) + cloudStorageLocations_) + .mergeFrom(value) + .buildPartial(); + } else { + cloudStorageLocations_ = value; + } + onChanged(); + } else { + if (cloudStorageLocationsCase_ == 2) { + excludedCloudStorageLocationsBuilder_.mergeFrom(value); + } else { + excludedCloudStorageLocationsBuilder_.setMessage(value); + } + } + cloudStorageLocationsCase_ = 2; + return this; + } + + /** + * + * + *
+       * Bucket locations to exclude.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations excluded_cloud_storage_locations = 2; + * + */ + public Builder clearExcludedCloudStorageLocations() { + if (excludedCloudStorageLocationsBuilder_ == null) { + if (cloudStorageLocationsCase_ == 2) { + cloudStorageLocationsCase_ = 0; + cloudStorageLocations_ = null; + onChanged(); + } + } else { + if (cloudStorageLocationsCase_ == 2) { + cloudStorageLocationsCase_ = 0; + cloudStorageLocations_ = null; + } + excludedCloudStorageLocationsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * Bucket locations to exclude.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations excluded_cloud_storage_locations = 2; + * + */ + public com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations.Builder + getExcludedCloudStorageLocationsBuilder() { + return getExcludedCloudStorageLocationsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Bucket locations to exclude.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations excluded_cloud_storage_locations = 2; + * + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocationsOrBuilder + getExcludedCloudStorageLocationsOrBuilder() { + if ((cloudStorageLocationsCase_ == 2) && (excludedCloudStorageLocationsBuilder_ != null)) { + return excludedCloudStorageLocationsBuilder_.getMessageOrBuilder(); + } else { + if (cloudStorageLocationsCase_ == 2) { + return (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations) + cloudStorageLocations_; + } + return com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + .getDefaultInstance(); + } + } + + /** + * + * + *
+       * Bucket locations to exclude.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations excluded_cloud_storage_locations = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations, + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations.Builder, + com.google.storage.control.v2.IntelligenceConfig.Filter + .CloudStorageLocationsOrBuilder> + getExcludedCloudStorageLocationsFieldBuilder() { + if (excludedCloudStorageLocationsBuilder_ == null) { + if (!(cloudStorageLocationsCase_ == 2)) { + cloudStorageLocations_ = + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + .getDefaultInstance(); + } + excludedCloudStorageLocationsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations, + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations + .Builder, + com.google.storage.control.v2.IntelligenceConfig.Filter + .CloudStorageLocationsOrBuilder>( + (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageLocations) + cloudStorageLocations_, + getParentForChildren(), + isClean()); + cloudStorageLocations_ = null; + } + cloudStorageLocationsCase_ = 2; + onChanged(); + return excludedCloudStorageLocationsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets, + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets.Builder, + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBucketsOrBuilder> + includedCloudStorageBucketsBuilder_; + + /** + * + * + *
+       * Buckets to include.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets included_cloud_storage_buckets = 3; + * + * + * @return Whether the includedCloudStorageBuckets field is set. + */ + @java.lang.Override + public boolean hasIncludedCloudStorageBuckets() { + return cloudStorageBucketsCase_ == 3; + } + + /** + * + * + *
+       * Buckets to include.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets included_cloud_storage_buckets = 3; + * + * + * @return The includedCloudStorageBuckets. + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + getIncludedCloudStorageBuckets() { + if (includedCloudStorageBucketsBuilder_ == null) { + if (cloudStorageBucketsCase_ == 3) { + return (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets) + cloudStorageBuckets_; + } + return com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + .getDefaultInstance(); + } else { + if (cloudStorageBucketsCase_ == 3) { + return includedCloudStorageBucketsBuilder_.getMessage(); + } + return com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + .getDefaultInstance(); + } + } + + /** + * + * + *
+       * Buckets to include.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets included_cloud_storage_buckets = 3; + * + */ + public Builder setIncludedCloudStorageBuckets( + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets value) { + if (includedCloudStorageBucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cloudStorageBuckets_ = value; + onChanged(); + } else { + includedCloudStorageBucketsBuilder_.setMessage(value); + } + cloudStorageBucketsCase_ = 3; + return this; + } + + /** + * + * + *
+       * Buckets to include.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets included_cloud_storage_buckets = 3; + * + */ + public Builder setIncludedCloudStorageBuckets( + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets.Builder + builderForValue) { + if (includedCloudStorageBucketsBuilder_ == null) { + cloudStorageBuckets_ = builderForValue.build(); + onChanged(); + } else { + includedCloudStorageBucketsBuilder_.setMessage(builderForValue.build()); + } + cloudStorageBucketsCase_ = 3; + return this; + } + + /** + * + * + *
+       * Buckets to include.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets included_cloud_storage_buckets = 3; + * + */ + public Builder mergeIncludedCloudStorageBuckets( + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets value) { + if (includedCloudStorageBucketsBuilder_ == null) { + if (cloudStorageBucketsCase_ == 3 + && cloudStorageBuckets_ + != com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + .getDefaultInstance()) { + cloudStorageBuckets_ = + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + .newBuilder( + (com.google.storage.control.v2.IntelligenceConfig.Filter + .CloudStorageBuckets) + cloudStorageBuckets_) + .mergeFrom(value) + .buildPartial(); + } else { + cloudStorageBuckets_ = value; + } + onChanged(); + } else { + if (cloudStorageBucketsCase_ == 3) { + includedCloudStorageBucketsBuilder_.mergeFrom(value); + } else { + includedCloudStorageBucketsBuilder_.setMessage(value); + } + } + cloudStorageBucketsCase_ = 3; + return this; + } + + /** + * + * + *
+       * Buckets to include.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets included_cloud_storage_buckets = 3; + * + */ + public Builder clearIncludedCloudStorageBuckets() { + if (includedCloudStorageBucketsBuilder_ == null) { + if (cloudStorageBucketsCase_ == 3) { + cloudStorageBucketsCase_ = 0; + cloudStorageBuckets_ = null; + onChanged(); + } + } else { + if (cloudStorageBucketsCase_ == 3) { + cloudStorageBucketsCase_ = 0; + cloudStorageBuckets_ = null; + } + includedCloudStorageBucketsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * Buckets to include.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets included_cloud_storage_buckets = 3; + * + */ + public com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets.Builder + getIncludedCloudStorageBucketsBuilder() { + return getIncludedCloudStorageBucketsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Buckets to include.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets included_cloud_storage_buckets = 3; + * + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBucketsOrBuilder + getIncludedCloudStorageBucketsOrBuilder() { + if ((cloudStorageBucketsCase_ == 3) && (includedCloudStorageBucketsBuilder_ != null)) { + return includedCloudStorageBucketsBuilder_.getMessageOrBuilder(); + } else { + if (cloudStorageBucketsCase_ == 3) { + return (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets) + cloudStorageBuckets_; + } + return com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + .getDefaultInstance(); + } + } + + /** + * + * + *
+       * Buckets to include.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets included_cloud_storage_buckets = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets, + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets.Builder, + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBucketsOrBuilder> + getIncludedCloudStorageBucketsFieldBuilder() { + if (includedCloudStorageBucketsBuilder_ == null) { + if (!(cloudStorageBucketsCase_ == 3)) { + cloudStorageBuckets_ = + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + .getDefaultInstance(); + } + includedCloudStorageBucketsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets, + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + .Builder, + com.google.storage.control.v2.IntelligenceConfig.Filter + .CloudStorageBucketsOrBuilder>( + (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets) + cloudStorageBuckets_, + getParentForChildren(), + isClean()); + cloudStorageBuckets_ = null; + } + cloudStorageBucketsCase_ = 3; + onChanged(); + return includedCloudStorageBucketsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets, + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets.Builder, + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBucketsOrBuilder> + excludedCloudStorageBucketsBuilder_; + + /** + * + * + *
+       * Buckets to exclude.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets excluded_cloud_storage_buckets = 4; + * + * + * @return Whether the excludedCloudStorageBuckets field is set. + */ + @java.lang.Override + public boolean hasExcludedCloudStorageBuckets() { + return cloudStorageBucketsCase_ == 4; + } + + /** + * + * + *
+       * Buckets to exclude.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets excluded_cloud_storage_buckets = 4; + * + * + * @return The excludedCloudStorageBuckets. + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + getExcludedCloudStorageBuckets() { + if (excludedCloudStorageBucketsBuilder_ == null) { + if (cloudStorageBucketsCase_ == 4) { + return (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets) + cloudStorageBuckets_; + } + return com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + .getDefaultInstance(); + } else { + if (cloudStorageBucketsCase_ == 4) { + return excludedCloudStorageBucketsBuilder_.getMessage(); + } + return com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + .getDefaultInstance(); + } + } + + /** + * + * + *
+       * Buckets to exclude.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets excluded_cloud_storage_buckets = 4; + * + */ + public Builder setExcludedCloudStorageBuckets( + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets value) { + if (excludedCloudStorageBucketsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cloudStorageBuckets_ = value; + onChanged(); + } else { + excludedCloudStorageBucketsBuilder_.setMessage(value); + } + cloudStorageBucketsCase_ = 4; + return this; + } + + /** + * + * + *
+       * Buckets to exclude.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets excluded_cloud_storage_buckets = 4; + * + */ + public Builder setExcludedCloudStorageBuckets( + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets.Builder + builderForValue) { + if (excludedCloudStorageBucketsBuilder_ == null) { + cloudStorageBuckets_ = builderForValue.build(); + onChanged(); + } else { + excludedCloudStorageBucketsBuilder_.setMessage(builderForValue.build()); + } + cloudStorageBucketsCase_ = 4; + return this; + } + + /** + * + * + *
+       * Buckets to exclude.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets excluded_cloud_storage_buckets = 4; + * + */ + public Builder mergeExcludedCloudStorageBuckets( + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets value) { + if (excludedCloudStorageBucketsBuilder_ == null) { + if (cloudStorageBucketsCase_ == 4 + && cloudStorageBuckets_ + != com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + .getDefaultInstance()) { + cloudStorageBuckets_ = + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + .newBuilder( + (com.google.storage.control.v2.IntelligenceConfig.Filter + .CloudStorageBuckets) + cloudStorageBuckets_) + .mergeFrom(value) + .buildPartial(); + } else { + cloudStorageBuckets_ = value; + } + onChanged(); + } else { + if (cloudStorageBucketsCase_ == 4) { + excludedCloudStorageBucketsBuilder_.mergeFrom(value); + } else { + excludedCloudStorageBucketsBuilder_.setMessage(value); + } + } + cloudStorageBucketsCase_ = 4; + return this; + } + + /** + * + * + *
+       * Buckets to exclude.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets excluded_cloud_storage_buckets = 4; + * + */ + public Builder clearExcludedCloudStorageBuckets() { + if (excludedCloudStorageBucketsBuilder_ == null) { + if (cloudStorageBucketsCase_ == 4) { + cloudStorageBucketsCase_ = 0; + cloudStorageBuckets_ = null; + onChanged(); + } + } else { + if (cloudStorageBucketsCase_ == 4) { + cloudStorageBucketsCase_ = 0; + cloudStorageBuckets_ = null; + } + excludedCloudStorageBucketsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+       * Buckets to exclude.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets excluded_cloud_storage_buckets = 4; + * + */ + public com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets.Builder + getExcludedCloudStorageBucketsBuilder() { + return getExcludedCloudStorageBucketsFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Buckets to exclude.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets excluded_cloud_storage_buckets = 4; + * + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBucketsOrBuilder + getExcludedCloudStorageBucketsOrBuilder() { + if ((cloudStorageBucketsCase_ == 4) && (excludedCloudStorageBucketsBuilder_ != null)) { + return excludedCloudStorageBucketsBuilder_.getMessageOrBuilder(); + } else { + if (cloudStorageBucketsCase_ == 4) { + return (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets) + cloudStorageBuckets_; + } + return com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + .getDefaultInstance(); + } + } + + /** + * + * + *
+       * Buckets to exclude.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets excluded_cloud_storage_buckets = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets, + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets.Builder, + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBucketsOrBuilder> + getExcludedCloudStorageBucketsFieldBuilder() { + if (excludedCloudStorageBucketsBuilder_ == null) { + if (!(cloudStorageBucketsCase_ == 4)) { + cloudStorageBuckets_ = + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + .getDefaultInstance(); + } + excludedCloudStorageBucketsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets, + com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets + .Builder, + com.google.storage.control.v2.IntelligenceConfig.Filter + .CloudStorageBucketsOrBuilder>( + (com.google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets) + cloudStorageBuckets_, + getParentForChildren(), + isClean()); + cloudStorageBuckets_ = null; + } + cloudStorageBucketsCase_ = 4; + onChanged(); + return excludedCloudStorageBucketsBuilder_; + } + + @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.control.v2.IntelligenceConfig.Filter) + } + + // @@protoc_insertion_point(class_scope:google.storage.control.v2.IntelligenceConfig.Filter) + private static final com.google.storage.control.v2.IntelligenceConfig.Filter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storage.control.v2.IntelligenceConfig.Filter(); + } + + public static com.google.storage.control.v2.IntelligenceConfig.Filter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Filter 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.control.v2.IntelligenceConfig.Filter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface EffectiveIntelligenceConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. The `IntelligenceConfig` edition that is applicable for the
+     * resource.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig.EffectiveEdition effective_edition = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for effectiveEdition. + */ + int getEffectiveEditionValue(); + + /** + * + * + *
+     * Output only. The `IntelligenceConfig` edition that is applicable for the
+     * resource.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig.EffectiveEdition effective_edition = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The effectiveEdition. + */ + com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig.EffectiveEdition + getEffectiveEdition(); + + /** + * + * + *
+     * Output only. The `IntelligenceConfig` resource that is applied for the
+     * target resource. Format:
+     * `{organizations|folders|projects}/{id}/locations/{location}/intelligenceConfig`
+     * 
+ * + * string intelligence_config = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The intelligenceConfig. + */ + java.lang.String getIntelligenceConfig(); + + /** + * + * + *
+     * Output only. The `IntelligenceConfig` resource that is applied for the
+     * target resource. Format:
+     * `{organizations|folders|projects}/{id}/locations/{location}/intelligenceConfig`
+     * 
+ * + * string intelligence_config = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for intelligenceConfig. + */ + com.google.protobuf.ByteString getIntelligenceConfigBytes(); + } + + /** + * + * + *
+   * The effective `IntelligenceConfig` for the resource.
+   * 
+ * + * Protobuf type {@code google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig} + */ + public static final class EffectiveIntelligenceConfig + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig) + EffectiveIntelligenceConfigOrBuilder { + private static final long serialVersionUID = 0L; + + // Use EffectiveIntelligenceConfig.newBuilder() to construct. + private EffectiveIntelligenceConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EffectiveIntelligenceConfig() { + effectiveEdition_ = 0; + intelligenceConfig_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EffectiveIntelligenceConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_IntelligenceConfig_EffectiveIntelligenceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_IntelligenceConfig_EffectiveIntelligenceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig.class, + com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig.Builder + .class); + } + + /** + * + * + *
+     * The effective edition of the `IntelligenceConfig` resource.
+     * 
+ * + * Protobuf enum {@code + * google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig.EffectiveEdition} + */ + public enum EffectiveEdition implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * This is an unknown edition of the resource.
+       * 
+ * + * EFFECTIVE_EDITION_UNSPECIFIED = 0; + */ + EFFECTIVE_EDITION_UNSPECIFIED(0), + /** + * + * + *
+       * No edition.
+       * 
+ * + * NONE = 1; + */ + NONE(1), + /** + * + * + *
+       * The `IntelligenceConfig` resource is of STANDARD edition.
+       * 
+ * + * STANDARD = 2; + */ + STANDARD(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * This is an unknown edition of the resource.
+       * 
+ * + * EFFECTIVE_EDITION_UNSPECIFIED = 0; + */ + public static final int EFFECTIVE_EDITION_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
+       * No edition.
+       * 
+ * + * NONE = 1; + */ + public static final int NONE_VALUE = 1; + + /** + * + * + *
+       * The `IntelligenceConfig` resource is of STANDARD edition.
+       * 
+ * + * STANDARD = 2; + */ + public static final int STANDARD_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static EffectiveEdition valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static EffectiveEdition forNumber(int value) { + switch (value) { + case 0: + return EFFECTIVE_EDITION_UNSPECIFIED; + case 1: + return NONE; + case 2: + return STANDARD; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public EffectiveEdition findValueByNumber(int number) { + return EffectiveEdition.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final EffectiveEdition[] VALUES = values(); + + public static EffectiveEdition valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private EffectiveEdition(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig.EffectiveEdition) + } + + public static final int EFFECTIVE_EDITION_FIELD_NUMBER = 1; + private int effectiveEdition_ = 0; + + /** + * + * + *
+     * Output only. The `IntelligenceConfig` edition that is applicable for the
+     * resource.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig.EffectiveEdition effective_edition = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for effectiveEdition. + */ + @java.lang.Override + public int getEffectiveEditionValue() { + return effectiveEdition_; + } + + /** + * + * + *
+     * Output only. The `IntelligenceConfig` edition that is applicable for the
+     * resource.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig.EffectiveEdition effective_edition = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The effectiveEdition. + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + .EffectiveEdition + getEffectiveEdition() { + com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig.EffectiveEdition + result = + com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + .EffectiveEdition.forNumber(effectiveEdition_); + return result == null + ? com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + .EffectiveEdition.UNRECOGNIZED + : result; + } + + public static final int INTELLIGENCE_CONFIG_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object intelligenceConfig_ = ""; + + /** + * + * + *
+     * Output only. The `IntelligenceConfig` resource that is applied for the
+     * target resource. Format:
+     * `{organizations|folders|projects}/{id}/locations/{location}/intelligenceConfig`
+     * 
+ * + * string intelligence_config = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The intelligenceConfig. + */ + @java.lang.Override + public java.lang.String getIntelligenceConfig() { + java.lang.Object ref = intelligenceConfig_; + 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(); + intelligenceConfig_ = s; + return s; + } + } + + /** + * + * + *
+     * Output only. The `IntelligenceConfig` resource that is applied for the
+     * target resource. Format:
+     * `{organizations|folders|projects}/{id}/locations/{location}/intelligenceConfig`
+     * 
+ * + * string intelligence_config = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for intelligenceConfig. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIntelligenceConfigBytes() { + java.lang.Object ref = intelligenceConfig_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + intelligenceConfig_ = 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 (effectiveEdition_ + != com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + .EffectiveEdition.EFFECTIVE_EDITION_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, effectiveEdition_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(intelligenceConfig_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, intelligenceConfig_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (effectiveEdition_ + != com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + .EffectiveEdition.EFFECTIVE_EDITION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, effectiveEdition_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(intelligenceConfig_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, intelligenceConfig_); + } + 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.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig)) { + return super.equals(obj); + } + com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig other = + (com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig) obj; + + if (effectiveEdition_ != other.effectiveEdition_) return false; + if (!getIntelligenceConfig().equals(other.getIntelligenceConfig())) 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) + EFFECTIVE_EDITION_FIELD_NUMBER; + hash = (53 * hash) + effectiveEdition_; + hash = (37 * hash) + INTELLIGENCE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getIntelligenceConfig().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + 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.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + 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.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + 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.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + 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.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + 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.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig 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 effective `IntelligenceConfig` for the resource.
+     * 
+ * + * Protobuf type {@code + * google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig) + com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_IntelligenceConfig_EffectiveIntelligenceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_IntelligenceConfig_EffectiveIntelligenceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig.class, + com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig.Builder + .class); + } + + // Construct using + // com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + effectiveEdition_ = 0; + intelligenceConfig_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_IntelligenceConfig_EffectiveIntelligenceConfig_descriptor; + } + + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + getDefaultInstanceForType() { + return com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig build() { + com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + buildPartial() { + com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig result = + new com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.effectiveEdition_ = effectiveEdition_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.intelligenceConfig_ = intelligenceConfig_; + } + } + + @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.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig) { + return mergeFrom( + (com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig other) { + if (other + == com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + .getDefaultInstance()) return this; + if (other.effectiveEdition_ != 0) { + setEffectiveEditionValue(other.getEffectiveEditionValue()); + } + if (!other.getIntelligenceConfig().isEmpty()) { + intelligenceConfig_ = other.intelligenceConfig_; + 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 8: + { + effectiveEdition_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + intelligenceConfig_ = 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 int effectiveEdition_ = 0; + + /** + * + * + *
+       * Output only. The `IntelligenceConfig` edition that is applicable for the
+       * resource.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig.EffectiveEdition effective_edition = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for effectiveEdition. + */ + @java.lang.Override + public int getEffectiveEditionValue() { + return effectiveEdition_; + } + + /** + * + * + *
+       * Output only. The `IntelligenceConfig` edition that is applicable for the
+       * resource.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig.EffectiveEdition effective_edition = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for effectiveEdition to set. + * @return This builder for chaining. + */ + public Builder setEffectiveEditionValue(int value) { + effectiveEdition_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The `IntelligenceConfig` edition that is applicable for the
+       * resource.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig.EffectiveEdition effective_edition = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The effectiveEdition. + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + .EffectiveEdition + getEffectiveEdition() { + com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + .EffectiveEdition + result = + com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + .EffectiveEdition.forNumber(effectiveEdition_); + return result == null + ? com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + .EffectiveEdition.UNRECOGNIZED + : result; + } + + /** + * + * + *
+       * Output only. The `IntelligenceConfig` edition that is applicable for the
+       * resource.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig.EffectiveEdition effective_edition = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The effectiveEdition to set. + * @return This builder for chaining. + */ + public Builder setEffectiveEdition( + com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + .EffectiveEdition + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + effectiveEdition_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The `IntelligenceConfig` edition that is applicable for the
+       * resource.
+       * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig.EffectiveEdition effective_edition = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearEffectiveEdition() { + bitField0_ = (bitField0_ & ~0x00000001); + effectiveEdition_ = 0; + onChanged(); + return this; + } + + private java.lang.Object intelligenceConfig_ = ""; + + /** + * + * + *
+       * Output only. The `IntelligenceConfig` resource that is applied for the
+       * target resource. Format:
+       * `{organizations|folders|projects}/{id}/locations/{location}/intelligenceConfig`
+       * 
+ * + * string intelligence_config = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The intelligenceConfig. + */ + public java.lang.String getIntelligenceConfig() { + java.lang.Object ref = intelligenceConfig_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + intelligenceConfig_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+       * Output only. The `IntelligenceConfig` resource that is applied for the
+       * target resource. Format:
+       * `{organizations|folders|projects}/{id}/locations/{location}/intelligenceConfig`
+       * 
+ * + * string intelligence_config = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for intelligenceConfig. + */ + public com.google.protobuf.ByteString getIntelligenceConfigBytes() { + java.lang.Object ref = intelligenceConfig_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + intelligenceConfig_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+       * Output only. The `IntelligenceConfig` resource that is applied for the
+       * target resource. Format:
+       * `{organizations|folders|projects}/{id}/locations/{location}/intelligenceConfig`
+       * 
+ * + * string intelligence_config = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The intelligenceConfig to set. + * @return This builder for chaining. + */ + public Builder setIntelligenceConfig(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + intelligenceConfig_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The `IntelligenceConfig` resource that is applied for the
+       * target resource. Format:
+       * `{organizations|folders|projects}/{id}/locations/{location}/intelligenceConfig`
+       * 
+ * + * string intelligence_config = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearIntelligenceConfig() { + intelligenceConfig_ = getDefaultInstance().getIntelligenceConfig(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The `IntelligenceConfig` resource that is applied for the
+       * target resource. Format:
+       * `{organizations|folders|projects}/{id}/locations/{location}/intelligenceConfig`
+       * 
+ * + * string intelligence_config = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for intelligenceConfig to set. + * @return This builder for chaining. + */ + public Builder setIntelligenceConfigBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + intelligenceConfig_ = 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.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig) + } + + // @@protoc_insertion_point(class_scope:google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig) + private static final com.google.storage.control.v2.IntelligenceConfig + .EffectiveIntelligenceConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig(); + } + + public static com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EffectiveIntelligenceConfig 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.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TrialConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storage.control.v2.IntelligenceConfig.TrialConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. The time at which the trial expires.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expireTime field is set. + */ + boolean hasExpireTime(); + + /** + * + * + *
+     * Output only. The time at which the trial expires.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expireTime. + */ + com.google.protobuf.Timestamp getExpireTime(); + + /** + * + * + *
+     * Output only. The time at which the trial expires.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder(); + } + + /** + * + * + *
+   * The trial configuration of the `IntelligenceConfig` resource.
+   * 
+ * + * Protobuf type {@code google.storage.control.v2.IntelligenceConfig.TrialConfig} + */ + public static final class TrialConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storage.control.v2.IntelligenceConfig.TrialConfig) + TrialConfigOrBuilder { + private static final long serialVersionUID = 0L; + + // Use TrialConfig.newBuilder() to construct. + private TrialConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TrialConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TrialConfig(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_IntelligenceConfig_TrialConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_IntelligenceConfig_TrialConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.IntelligenceConfig.TrialConfig.class, + com.google.storage.control.v2.IntelligenceConfig.TrialConfig.Builder.class); + } + + private int bitField0_; + public static final int EXPIRE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp expireTime_; + + /** + * + * + *
+     * Output only. The time at which the trial expires.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expireTime field is set. + */ + @java.lang.Override + public boolean hasExpireTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Output only. The time at which the trial expires.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expireTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getExpireTime() { + return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; + } + + /** + * + * + *
+     * Output only. The time at which the trial expires.
+     * 
+ * + * + * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + return expireTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireTime_; + } + + 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(3, getExpireTime()); + } + 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(3, getExpireTime()); + } + 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.control.v2.IntelligenceConfig.TrialConfig)) { + return super.equals(obj); + } + com.google.storage.control.v2.IntelligenceConfig.TrialConfig other = + (com.google.storage.control.v2.IntelligenceConfig.TrialConfig) obj; + + if (hasExpireTime() != other.hasExpireTime()) return false; + if (hasExpireTime()) { + if (!getExpireTime().equals(other.getExpireTime())) 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 (hasExpireTime()) { + hash = (37 * hash) + EXPIRE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getExpireTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storage.control.v2.IntelligenceConfig.TrialConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.IntelligenceConfig.TrialConfig 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.control.v2.IntelligenceConfig.TrialConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.IntelligenceConfig.TrialConfig 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.control.v2.IntelligenceConfig.TrialConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.IntelligenceConfig.TrialConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storage.control.v2.IntelligenceConfig.TrialConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.IntelligenceConfig.TrialConfig 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.control.v2.IntelligenceConfig.TrialConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.IntelligenceConfig.TrialConfig 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.control.v2.IntelligenceConfig.TrialConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.IntelligenceConfig.TrialConfig 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.control.v2.IntelligenceConfig.TrialConfig 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 trial configuration of the `IntelligenceConfig` resource.
+     * 
+ * + * Protobuf type {@code google.storage.control.v2.IntelligenceConfig.TrialConfig} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storage.control.v2.IntelligenceConfig.TrialConfig) + com.google.storage.control.v2.IntelligenceConfig.TrialConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_IntelligenceConfig_TrialConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_IntelligenceConfig_TrialConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.IntelligenceConfig.TrialConfig.class, + com.google.storage.control.v2.IntelligenceConfig.TrialConfig.Builder.class); + } + + // Construct using com.google.storage.control.v2.IntelligenceConfig.TrialConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getExpireTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + expireTime_ = null; + if (expireTimeBuilder_ != null) { + expireTimeBuilder_.dispose(); + expireTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_IntelligenceConfig_TrialConfig_descriptor; + } + + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.TrialConfig + getDefaultInstanceForType() { + return com.google.storage.control.v2.IntelligenceConfig.TrialConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.TrialConfig build() { + com.google.storage.control.v2.IntelligenceConfig.TrialConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.TrialConfig buildPartial() { + com.google.storage.control.v2.IntelligenceConfig.TrialConfig result = + new com.google.storage.control.v2.IntelligenceConfig.TrialConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.storage.control.v2.IntelligenceConfig.TrialConfig result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.expireTime_ = + expireTimeBuilder_ == null ? expireTime_ : expireTimeBuilder_.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.control.v2.IntelligenceConfig.TrialConfig) { + return mergeFrom((com.google.storage.control.v2.IntelligenceConfig.TrialConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.storage.control.v2.IntelligenceConfig.TrialConfig other) { + if (other + == com.google.storage.control.v2.IntelligenceConfig.TrialConfig.getDefaultInstance()) + return this; + if (other.hasExpireTime()) { + mergeExpireTime(other.getExpireTime()); + } + 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 26: + { + input.readMessage(getExpireTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + 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.protobuf.Timestamp expireTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + expireTimeBuilder_; + + /** + * + * + *
+       * Output only. The time at which the trial expires.
+       * 
+ * + * + * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the expireTime field is set. + */ + public boolean hasExpireTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+       * Output only. The time at which the trial expires.
+       * 
+ * + * + * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The expireTime. + */ + public com.google.protobuf.Timestamp getExpireTime() { + if (expireTimeBuilder_ == null) { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } else { + return expireTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
+       * Output only. The time at which the trial expires.
+       * 
+ * + * + * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + expireTime_ = value; + } else { + expireTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The time at which the trial expires.
+       * 
+ * + * + * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (expireTimeBuilder_ == null) { + expireTime_ = builderForValue.build(); + } else { + expireTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The time at which the trial expires.
+       * 
+ * + * + * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeExpireTime(com.google.protobuf.Timestamp value) { + if (expireTimeBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && expireTime_ != null + && expireTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getExpireTimeBuilder().mergeFrom(value); + } else { + expireTime_ = value; + } + } else { + expireTimeBuilder_.mergeFrom(value); + } + if (expireTime_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+       * Output only. The time at which the trial expires.
+       * 
+ * + * + * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearExpireTime() { + bitField0_ = (bitField0_ & ~0x00000001); + expireTime_ = null; + if (expireTimeBuilder_ != null) { + expireTimeBuilder_.dispose(); + expireTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+       * Output only. The time at which the trial expires.
+       * 
+ * + * + * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getExpireTimeBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getExpireTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+       * Output only. The time at which the trial expires.
+       * 
+ * + * + * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getExpireTimeOrBuilder() { + if (expireTimeBuilder_ != null) { + return expireTimeBuilder_.getMessageOrBuilder(); + } else { + return expireTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : expireTime_; + } + } + + /** + * + * + *
+       * Output only. The time at which the trial expires.
+       * 
+ * + * + * .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getExpireTimeFieldBuilder() { + if (expireTimeBuilder_ == null) { + expireTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getExpireTime(), getParentForChildren(), isClean()); + expireTime_ = null; + } + return expireTimeBuilder_; + } + + @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.control.v2.IntelligenceConfig.TrialConfig) + } + + // @@protoc_insertion_point(class_scope:google.storage.control.v2.IntelligenceConfig.TrialConfig) + private static final com.google.storage.control.v2.IntelligenceConfig.TrialConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storage.control.v2.IntelligenceConfig.TrialConfig(); + } + + public static com.google.storage.control.v2.IntelligenceConfig.TrialConfig + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TrialConfig 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.control.v2.IntelligenceConfig.TrialConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Identifier. The name of the `IntelligenceConfig` resource associated with
+   * your organization, folder, or project.
+   *
+   * The name format varies based on the GCP resource hierarchy as follows:
+   *
+   * * For project:
+   * `projects/{project_number}/locations/global/intelligenceConfig`
+   * * For organization:
+   * `organizations/{org_id}/locations/global/intelligenceConfig`
+   * * For folder: `folders/{folder_id}/locations/global/intelligenceConfig`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + } + + /** + * + * + *
+   * Identifier. The name of the `IntelligenceConfig` resource associated with
+   * your organization, folder, or project.
+   *
+   * The name format varies based on the GCP resource hierarchy as follows:
+   *
+   * * For project:
+   * `projects/{project_number}/locations/global/intelligenceConfig`
+   * * For organization:
+   * `organizations/{org_id}/locations/global/intelligenceConfig`
+   * * For folder: `folders/{folder_id}/locations/global/intelligenceConfig`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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 EDITION_CONFIG_FIELD_NUMBER = 2; + private int editionConfig_ = 0; + + /** + * + * + *
+   * Optional. The edition configuration of the `IntelligenceConfig` resource.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EditionConfig edition_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for editionConfig. + */ + @java.lang.Override + public int getEditionConfigValue() { + return editionConfig_; + } + + /** + * + * + *
+   * Optional. The edition configuration of the `IntelligenceConfig` resource.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EditionConfig edition_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The editionConfig. + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.EditionConfig getEditionConfig() { + com.google.storage.control.v2.IntelligenceConfig.EditionConfig result = + com.google.storage.control.v2.IntelligenceConfig.EditionConfig.forNumber(editionConfig_); + return result == null + ? com.google.storage.control.v2.IntelligenceConfig.EditionConfig.UNRECOGNIZED + : result; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp updateTime_; + + /** + * + * + *
+   * Output only. The time at which the `IntelligenceConfig` resource is last
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The time at which the `IntelligenceConfig` resource is last
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.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 time at which the `IntelligenceConfig` resource is last
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.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 FILTER_FIELD_NUMBER = 4; + private com.google.storage.control.v2.IntelligenceConfig.Filter filter_; + + /** + * + * + *
+   * Optional. Filter over location and bucket.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the filter field is set. + */ + @java.lang.Override + public boolean hasFilter() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Optional. Filter over location and bucket.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The filter. + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.Filter getFilter() { + return filter_ == null + ? com.google.storage.control.v2.IntelligenceConfig.Filter.getDefaultInstance() + : filter_; + } + + /** + * + * + *
+   * Optional. Filter over location and bucket.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.FilterOrBuilder getFilterOrBuilder() { + return filter_ == null + ? com.google.storage.control.v2.IntelligenceConfig.Filter.getDefaultInstance() + : filter_; + } + + public static final int EFFECTIVE_INTELLIGENCE_CONFIG_FIELD_NUMBER = 5; + private com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + effectiveIntelligenceConfig_; + + /** + * + * + *
+   * Output only. The `IntelligenceConfig` resource that is applicable for the
+   * resource.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig effective_intelligence_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the effectiveIntelligenceConfig field is set. + */ + @java.lang.Override + public boolean hasEffectiveIntelligenceConfig() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * Output only. The `IntelligenceConfig` resource that is applicable for the
+   * resource.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig effective_intelligence_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The effectiveIntelligenceConfig. + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + getEffectiveIntelligenceConfig() { + return effectiveIntelligenceConfig_ == null + ? com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + .getDefaultInstance() + : effectiveIntelligenceConfig_; + } + + /** + * + * + *
+   * Output only. The `IntelligenceConfig` resource that is applicable for the
+   * resource.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig effective_intelligence_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfigOrBuilder + getEffectiveIntelligenceConfigOrBuilder() { + return effectiveIntelligenceConfig_ == null + ? com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + .getDefaultInstance() + : effectiveIntelligenceConfig_; + } + + public static final int TRIAL_CONFIG_FIELD_NUMBER = 7; + private com.google.storage.control.v2.IntelligenceConfig.TrialConfig trialConfig_; + + /** + * + * + *
+   * The trial configuration of the `IntelligenceConfig` resource.
+   * 
+ * + * .google.storage.control.v2.IntelligenceConfig.TrialConfig trial_config = 7; + * + * @return Whether the trialConfig field is set. + */ + @java.lang.Override + public boolean hasTrialConfig() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * The trial configuration of the `IntelligenceConfig` resource.
+   * 
+ * + * .google.storage.control.v2.IntelligenceConfig.TrialConfig trial_config = 7; + * + * @return The trialConfig. + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.TrialConfig getTrialConfig() { + return trialConfig_ == null + ? com.google.storage.control.v2.IntelligenceConfig.TrialConfig.getDefaultInstance() + : trialConfig_; + } + + /** + * + * + *
+   * The trial configuration of the `IntelligenceConfig` resource.
+   * 
+ * + * .google.storage.control.v2.IntelligenceConfig.TrialConfig trial_config = 7; + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.TrialConfigOrBuilder + getTrialConfigOrBuilder() { + return trialConfig_ == null + ? com.google.storage.control.v2.IntelligenceConfig.TrialConfig.getDefaultInstance() + : trialConfig_; + } + + 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 (editionConfig_ + != com.google.storage.control.v2.IntelligenceConfig.EditionConfig.EDITION_CONFIG_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, editionConfig_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getUpdateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getFilter()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(5, getEffectiveIntelligenceConfig()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(7, getTrialConfig()); + } + 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 (editionConfig_ + != com.google.storage.control.v2.IntelligenceConfig.EditionConfig.EDITION_CONFIG_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, editionConfig_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getFilter()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, getEffectiveIntelligenceConfig()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getTrialConfig()); + } + 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.control.v2.IntelligenceConfig)) { + return super.equals(obj); + } + com.google.storage.control.v2.IntelligenceConfig other = + (com.google.storage.control.v2.IntelligenceConfig) obj; + + if (!getName().equals(other.getName())) return false; + if (editionConfig_ != other.editionConfig_) return false; + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (hasFilter() != other.hasFilter()) return false; + if (hasFilter()) { + if (!getFilter().equals(other.getFilter())) return false; + } + if (hasEffectiveIntelligenceConfig() != other.hasEffectiveIntelligenceConfig()) return false; + if (hasEffectiveIntelligenceConfig()) { + if (!getEffectiveIntelligenceConfig().equals(other.getEffectiveIntelligenceConfig())) + return false; + } + if (hasTrialConfig() != other.hasTrialConfig()) return false; + if (hasTrialConfig()) { + if (!getTrialConfig().equals(other.getTrialConfig())) 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) + EDITION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + editionConfig_; + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + if (hasFilter()) { + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + } + if (hasEffectiveIntelligenceConfig()) { + hash = (37 * hash) + EFFECTIVE_INTELLIGENCE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getEffectiveIntelligenceConfig().hashCode(); + } + if (hasTrialConfig()) { + hash = (37 * hash) + TRIAL_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getTrialConfig().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storage.control.v2.IntelligenceConfig parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.IntelligenceConfig 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.control.v2.IntelligenceConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.IntelligenceConfig 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.control.v2.IntelligenceConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.IntelligenceConfig parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storage.control.v2.IntelligenceConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.IntelligenceConfig 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.control.v2.IntelligenceConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.IntelligenceConfig 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.control.v2.IntelligenceConfig parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.IntelligenceConfig 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.control.v2.IntelligenceConfig 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 `IntelligenceConfig` resource associated with your organization, folder,
+   * or project.
+   * 
+ * + * Protobuf type {@code google.storage.control.v2.IntelligenceConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storage.control.v2.IntelligenceConfig) + com.google.storage.control.v2.IntelligenceConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_IntelligenceConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_IntelligenceConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.IntelligenceConfig.class, + com.google.storage.control.v2.IntelligenceConfig.Builder.class); + } + + // Construct using com.google.storage.control.v2.IntelligenceConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getUpdateTimeFieldBuilder(); + getFilterFieldBuilder(); + getEffectiveIntelligenceConfigFieldBuilder(); + getTrialConfigFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + editionConfig_ = 0; + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + filter_ = null; + if (filterBuilder_ != null) { + filterBuilder_.dispose(); + filterBuilder_ = null; + } + effectiveIntelligenceConfig_ = null; + if (effectiveIntelligenceConfigBuilder_ != null) { + effectiveIntelligenceConfigBuilder_.dispose(); + effectiveIntelligenceConfigBuilder_ = null; + } + trialConfig_ = null; + if (trialConfigBuilder_ != null) { + trialConfigBuilder_.dispose(); + trialConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_IntelligenceConfig_descriptor; + } + + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig getDefaultInstanceForType() { + return com.google.storage.control.v2.IntelligenceConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig build() { + com.google.storage.control.v2.IntelligenceConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig buildPartial() { + com.google.storage.control.v2.IntelligenceConfig result = + new com.google.storage.control.v2.IntelligenceConfig(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.storage.control.v2.IntelligenceConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.editionConfig_ = editionConfig_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filterBuilder_ == null ? filter_ : filterBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.effectiveIntelligenceConfig_ = + effectiveIntelligenceConfigBuilder_ == null + ? effectiveIntelligenceConfig_ + : effectiveIntelligenceConfigBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.trialConfig_ = + trialConfigBuilder_ == null ? trialConfig_ : trialConfigBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + 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.control.v2.IntelligenceConfig) { + return mergeFrom((com.google.storage.control.v2.IntelligenceConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.storage.control.v2.IntelligenceConfig other) { + if (other == com.google.storage.control.v2.IntelligenceConfig.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.editionConfig_ != 0) { + setEditionConfigValue(other.getEditionConfigValue()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (other.hasFilter()) { + mergeFilter(other.getFilter()); + } + if (other.hasEffectiveIntelligenceConfig()) { + mergeEffectiveIntelligenceConfig(other.getEffectiveIntelligenceConfig()); + } + if (other.hasTrialConfig()) { + mergeTrialConfig(other.getTrialConfig()); + } + 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 16: + { + editionConfig_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getFilterFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + input.readMessage( + getEffectiveIntelligenceConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 58: + { + input.readMessage(getTrialConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + 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_ = ""; + + /** + * + * + *
+     * Identifier. The name of the `IntelligenceConfig` resource associated with
+     * your organization, folder, or project.
+     *
+     * The name format varies based on the GCP resource hierarchy as follows:
+     *
+     * * For project:
+     * `projects/{project_number}/locations/global/intelligenceConfig`
+     * * For organization:
+     * `organizations/{org_id}/locations/global/intelligenceConfig`
+     * * For folder: `folders/{folder_id}/locations/global/intelligenceConfig`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + } + + /** + * + * + *
+     * Identifier. The name of the `IntelligenceConfig` resource associated with
+     * your organization, folder, or project.
+     *
+     * The name format varies based on the GCP resource hierarchy as follows:
+     *
+     * * For project:
+     * `projects/{project_number}/locations/global/intelligenceConfig`
+     * * For organization:
+     * `organizations/{org_id}/locations/global/intelligenceConfig`
+     * * For folder: `folders/{folder_id}/locations/global/intelligenceConfig`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + } + + /** + * + * + *
+     * Identifier. The name of the `IntelligenceConfig` resource associated with
+     * your organization, folder, or project.
+     *
+     * The name format varies based on the GCP resource hierarchy as follows:
+     *
+     * * For project:
+     * `projects/{project_number}/locations/global/intelligenceConfig`
+     * * For organization:
+     * `organizations/{org_id}/locations/global/intelligenceConfig`
+     * * For folder: `folders/{folder_id}/locations/global/intelligenceConfig`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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; + } + + /** + * + * + *
+     * Identifier. The name of the `IntelligenceConfig` resource associated with
+     * your organization, folder, or project.
+     *
+     * The name format varies based on the GCP resource hierarchy as follows:
+     *
+     * * For project:
+     * `projects/{project_number}/locations/global/intelligenceConfig`
+     * * For organization:
+     * `organizations/{org_id}/locations/global/intelligenceConfig`
+     * * For folder: `folders/{folder_id}/locations/global/intelligenceConfig`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Identifier. The name of the `IntelligenceConfig` resource associated with
+     * your organization, folder, or project.
+     *
+     * The name format varies based on the GCP resource hierarchy as follows:
+     *
+     * * For project:
+     * `projects/{project_number}/locations/global/intelligenceConfig`
+     * * For organization:
+     * `organizations/{org_id}/locations/global/intelligenceConfig`
+     * * For folder: `folders/{folder_id}/locations/global/intelligenceConfig`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @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 int editionConfig_ = 0; + + /** + * + * + *
+     * Optional. The edition configuration of the `IntelligenceConfig` resource.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EditionConfig edition_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for editionConfig. + */ + @java.lang.Override + public int getEditionConfigValue() { + return editionConfig_; + } + + /** + * + * + *
+     * Optional. The edition configuration of the `IntelligenceConfig` resource.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EditionConfig edition_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for editionConfig to set. + * @return This builder for chaining. + */ + public Builder setEditionConfigValue(int value) { + editionConfig_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The edition configuration of the `IntelligenceConfig` resource.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EditionConfig edition_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The editionConfig. + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig.EditionConfig getEditionConfig() { + com.google.storage.control.v2.IntelligenceConfig.EditionConfig result = + com.google.storage.control.v2.IntelligenceConfig.EditionConfig.forNumber(editionConfig_); + return result == null + ? com.google.storage.control.v2.IntelligenceConfig.EditionConfig.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Optional. The edition configuration of the `IntelligenceConfig` resource.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EditionConfig edition_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The editionConfig to set. + * @return This builder for chaining. + */ + public Builder setEditionConfig( + com.google.storage.control.v2.IntelligenceConfig.EditionConfig value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + editionConfig_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The edition configuration of the `IntelligenceConfig` resource.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EditionConfig edition_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearEditionConfig() { + bitField0_ = (bitField0_ & ~0x00000002); + editionConfig_ = 0; + onChanged(); + return this; + } + + 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 time at which the `IntelligenceConfig` resource is last
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * Output only. The time at which the `IntelligenceConfig` resource is last
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.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 time at which the `IntelligenceConfig` resource is last
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time at which the `IntelligenceConfig` resource is last
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time at which the `IntelligenceConfig` resource is last
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + if (updateTime_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The time at which the `IntelligenceConfig` resource is last
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The time at which the `IntelligenceConfig` resource is last
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The time at which the `IntelligenceConfig` resource is last
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.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 time at which the `IntelligenceConfig` resource is last
+     * updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 3 [(.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 com.google.storage.control.v2.IntelligenceConfig.Filter filter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.IntelligenceConfig.Filter, + com.google.storage.control.v2.IntelligenceConfig.Filter.Builder, + com.google.storage.control.v2.IntelligenceConfig.FilterOrBuilder> + filterBuilder_; + + /** + * + * + *
+     * Optional. Filter over location and bucket.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the filter field is set. + */ + public boolean hasFilter() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Optional. Filter over location and bucket.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The filter. + */ + public com.google.storage.control.v2.IntelligenceConfig.Filter getFilter() { + if (filterBuilder_ == null) { + return filter_ == null + ? com.google.storage.control.v2.IntelligenceConfig.Filter.getDefaultInstance() + : filter_; + } else { + return filterBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Optional. Filter over location and bucket.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFilter(com.google.storage.control.v2.IntelligenceConfig.Filter value) { + if (filterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + } else { + filterBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filter over location and bucket.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setFilter( + com.google.storage.control.v2.IntelligenceConfig.Filter.Builder builderForValue) { + if (filterBuilder_ == null) { + filter_ = builderForValue.build(); + } else { + filterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filter over location and bucket.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeFilter(com.google.storage.control.v2.IntelligenceConfig.Filter value) { + if (filterBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && filter_ != null + && filter_ + != com.google.storage.control.v2.IntelligenceConfig.Filter.getDefaultInstance()) { + getFilterBuilder().mergeFrom(value); + } else { + filter_ = value; + } + } else { + filterBuilder_.mergeFrom(value); + } + if (filter_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Optional. Filter over location and bucket.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearFilter() { + bitField0_ = (bitField0_ & ~0x00000008); + filter_ = null; + if (filterBuilder_ != null) { + filterBuilder_.dispose(); + filterBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Filter over location and bucket.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.storage.control.v2.IntelligenceConfig.Filter.Builder getFilterBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getFilterFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Optional. Filter over location and bucket.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.storage.control.v2.IntelligenceConfig.FilterOrBuilder getFilterOrBuilder() { + if (filterBuilder_ != null) { + return filterBuilder_.getMessageOrBuilder(); + } else { + return filter_ == null + ? com.google.storage.control.v2.IntelligenceConfig.Filter.getDefaultInstance() + : filter_; + } + } + + /** + * + * + *
+     * Optional. Filter over location and bucket.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.IntelligenceConfig.Filter, + com.google.storage.control.v2.IntelligenceConfig.Filter.Builder, + com.google.storage.control.v2.IntelligenceConfig.FilterOrBuilder> + getFilterFieldBuilder() { + if (filterBuilder_ == null) { + filterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.IntelligenceConfig.Filter, + com.google.storage.control.v2.IntelligenceConfig.Filter.Builder, + com.google.storage.control.v2.IntelligenceConfig.FilterOrBuilder>( + getFilter(), getParentForChildren(), isClean()); + filter_ = null; + } + return filterBuilder_; + } + + private com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + effectiveIntelligenceConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig, + com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig.Builder, + com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfigOrBuilder> + effectiveIntelligenceConfigBuilder_; + + /** + * + * + *
+     * Output only. The `IntelligenceConfig` resource that is applicable for the
+     * resource.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig effective_intelligence_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the effectiveIntelligenceConfig field is set. + */ + public boolean hasEffectiveIntelligenceConfig() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Output only. The `IntelligenceConfig` resource that is applicable for the
+     * resource.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig effective_intelligence_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The effectiveIntelligenceConfig. + */ + public com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + getEffectiveIntelligenceConfig() { + if (effectiveIntelligenceConfigBuilder_ == null) { + return effectiveIntelligenceConfig_ == null + ? com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + .getDefaultInstance() + : effectiveIntelligenceConfig_; + } else { + return effectiveIntelligenceConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The `IntelligenceConfig` resource that is applicable for the
+     * resource.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig effective_intelligence_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEffectiveIntelligenceConfig( + com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig value) { + if (effectiveIntelligenceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + effectiveIntelligenceConfig_ = value; + } else { + effectiveIntelligenceConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The `IntelligenceConfig` resource that is applicable for the
+     * resource.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig effective_intelligence_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEffectiveIntelligenceConfig( + com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig.Builder + builderForValue) { + if (effectiveIntelligenceConfigBuilder_ == null) { + effectiveIntelligenceConfig_ = builderForValue.build(); + } else { + effectiveIntelligenceConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The `IntelligenceConfig` resource that is applicable for the
+     * resource.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig effective_intelligence_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEffectiveIntelligenceConfig( + com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig value) { + if (effectiveIntelligenceConfigBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && effectiveIntelligenceConfig_ != null + && effectiveIntelligenceConfig_ + != com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + .getDefaultInstance()) { + getEffectiveIntelligenceConfigBuilder().mergeFrom(value); + } else { + effectiveIntelligenceConfig_ = value; + } + } else { + effectiveIntelligenceConfigBuilder_.mergeFrom(value); + } + if (effectiveIntelligenceConfig_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The `IntelligenceConfig` resource that is applicable for the
+     * resource.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig effective_intelligence_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEffectiveIntelligenceConfig() { + bitField0_ = (bitField0_ & ~0x00000010); + effectiveIntelligenceConfig_ = null; + if (effectiveIntelligenceConfigBuilder_ != null) { + effectiveIntelligenceConfigBuilder_.dispose(); + effectiveIntelligenceConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The `IntelligenceConfig` resource that is applicable for the
+     * resource.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig effective_intelligence_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig.Builder + getEffectiveIntelligenceConfigBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getEffectiveIntelligenceConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The `IntelligenceConfig` resource that is applicable for the
+     * resource.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig effective_intelligence_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfigOrBuilder + getEffectiveIntelligenceConfigOrBuilder() { + if (effectiveIntelligenceConfigBuilder_ != null) { + return effectiveIntelligenceConfigBuilder_.getMessageOrBuilder(); + } else { + return effectiveIntelligenceConfig_ == null + ? com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + .getDefaultInstance() + : effectiveIntelligenceConfig_; + } + } + + /** + * + * + *
+     * Output only. The `IntelligenceConfig` resource that is applicable for the
+     * resource.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig effective_intelligence_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig, + com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig.Builder, + com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfigOrBuilder> + getEffectiveIntelligenceConfigFieldBuilder() { + if (effectiveIntelligenceConfigBuilder_ == null) { + effectiveIntelligenceConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig, + com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + .Builder, + com.google.storage.control.v2.IntelligenceConfig + .EffectiveIntelligenceConfigOrBuilder>( + getEffectiveIntelligenceConfig(), getParentForChildren(), isClean()); + effectiveIntelligenceConfig_ = null; + } + return effectiveIntelligenceConfigBuilder_; + } + + private com.google.storage.control.v2.IntelligenceConfig.TrialConfig trialConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.IntelligenceConfig.TrialConfig, + com.google.storage.control.v2.IntelligenceConfig.TrialConfig.Builder, + com.google.storage.control.v2.IntelligenceConfig.TrialConfigOrBuilder> + trialConfigBuilder_; + + /** + * + * + *
+     * The trial configuration of the `IntelligenceConfig` resource.
+     * 
+ * + * .google.storage.control.v2.IntelligenceConfig.TrialConfig trial_config = 7; + * + * @return Whether the trialConfig field is set. + */ + public boolean hasTrialConfig() { + return ((bitField0_ & 0x00000020) != 0); + } + + /** + * + * + *
+     * The trial configuration of the `IntelligenceConfig` resource.
+     * 
+ * + * .google.storage.control.v2.IntelligenceConfig.TrialConfig trial_config = 7; + * + * @return The trialConfig. + */ + public com.google.storage.control.v2.IntelligenceConfig.TrialConfig getTrialConfig() { + if (trialConfigBuilder_ == null) { + return trialConfig_ == null + ? com.google.storage.control.v2.IntelligenceConfig.TrialConfig.getDefaultInstance() + : trialConfig_; + } else { + return trialConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * The trial configuration of the `IntelligenceConfig` resource.
+     * 
+ * + * .google.storage.control.v2.IntelligenceConfig.TrialConfig trial_config = 7; + */ + public Builder setTrialConfig( + com.google.storage.control.v2.IntelligenceConfig.TrialConfig value) { + if (trialConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + trialConfig_ = value; + } else { + trialConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * The trial configuration of the `IntelligenceConfig` resource.
+     * 
+ * + * .google.storage.control.v2.IntelligenceConfig.TrialConfig trial_config = 7; + */ + public Builder setTrialConfig( + com.google.storage.control.v2.IntelligenceConfig.TrialConfig.Builder builderForValue) { + if (trialConfigBuilder_ == null) { + trialConfig_ = builderForValue.build(); + } else { + trialConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + /** + * + * + *
+     * The trial configuration of the `IntelligenceConfig` resource.
+     * 
+ * + * .google.storage.control.v2.IntelligenceConfig.TrialConfig trial_config = 7; + */ + public Builder mergeTrialConfig( + com.google.storage.control.v2.IntelligenceConfig.TrialConfig value) { + if (trialConfigBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && trialConfig_ != null + && trialConfig_ + != com.google.storage.control.v2.IntelligenceConfig.TrialConfig + .getDefaultInstance()) { + getTrialConfigBuilder().mergeFrom(value); + } else { + trialConfig_ = value; + } + } else { + trialConfigBuilder_.mergeFrom(value); + } + if (trialConfig_ != null) { + bitField0_ |= 0x00000020; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * The trial configuration of the `IntelligenceConfig` resource.
+     * 
+ * + * .google.storage.control.v2.IntelligenceConfig.TrialConfig trial_config = 7; + */ + public Builder clearTrialConfig() { + bitField0_ = (bitField0_ & ~0x00000020); + trialConfig_ = null; + if (trialConfigBuilder_ != null) { + trialConfigBuilder_.dispose(); + trialConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * The trial configuration of the `IntelligenceConfig` resource.
+     * 
+ * + * .google.storage.control.v2.IntelligenceConfig.TrialConfig trial_config = 7; + */ + public com.google.storage.control.v2.IntelligenceConfig.TrialConfig.Builder + getTrialConfigBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getTrialConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * The trial configuration of the `IntelligenceConfig` resource.
+     * 
+ * + * .google.storage.control.v2.IntelligenceConfig.TrialConfig trial_config = 7; + */ + public com.google.storage.control.v2.IntelligenceConfig.TrialConfigOrBuilder + getTrialConfigOrBuilder() { + if (trialConfigBuilder_ != null) { + return trialConfigBuilder_.getMessageOrBuilder(); + } else { + return trialConfig_ == null + ? com.google.storage.control.v2.IntelligenceConfig.TrialConfig.getDefaultInstance() + : trialConfig_; + } + } + + /** + * + * + *
+     * The trial configuration of the `IntelligenceConfig` resource.
+     * 
+ * + * .google.storage.control.v2.IntelligenceConfig.TrialConfig trial_config = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.IntelligenceConfig.TrialConfig, + com.google.storage.control.v2.IntelligenceConfig.TrialConfig.Builder, + com.google.storage.control.v2.IntelligenceConfig.TrialConfigOrBuilder> + getTrialConfigFieldBuilder() { + if (trialConfigBuilder_ == null) { + trialConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.IntelligenceConfig.TrialConfig, + com.google.storage.control.v2.IntelligenceConfig.TrialConfig.Builder, + com.google.storage.control.v2.IntelligenceConfig.TrialConfigOrBuilder>( + getTrialConfig(), getParentForChildren(), isClean()); + trialConfig_ = null; + } + return trialConfigBuilder_; + } + + @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.control.v2.IntelligenceConfig) + } + + // @@protoc_insertion_point(class_scope:google.storage.control.v2.IntelligenceConfig) + private static final com.google.storage.control.v2.IntelligenceConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storage.control.v2.IntelligenceConfig(); + } + + public static com.google.storage.control.v2.IntelligenceConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IntelligenceConfig 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.control.v2.IntelligenceConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/IntelligenceConfigName.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/IntelligenceConfigName.java new file mode 100644 index 0000000000..98412887ad --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/IntelligenceConfigName.java @@ -0,0 +1,357 @@ +/* + * Copyright 2025 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.control.v2; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; +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 IntelligenceConfigName implements ResourceName { + private static final PathTemplate FOLDER_LOCATION = + PathTemplate.createWithoutUrlEncoding( + "folders/{folder}/locations/{location}/intelligenceConfig"); + private static final PathTemplate ORG_LOCATION = + PathTemplate.createWithoutUrlEncoding( + "organizations/{org}/locations/{location}/intelligenceConfig"); + private static final PathTemplate PROJECT_LOCATION = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/intelligenceConfig"); + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + private final String folder; + private final String location; + private final String org; + private final String project; + + @Deprecated + protected IntelligenceConfigName() { + folder = null; + location = null; + org = null; + project = null; + } + + private IntelligenceConfigName(Builder builder) { + folder = Preconditions.checkNotNull(builder.getFolder()); + location = Preconditions.checkNotNull(builder.getLocation()); + org = null; + project = null; + pathTemplate = FOLDER_LOCATION; + } + + private IntelligenceConfigName(OrgLocationBuilder builder) { + org = Preconditions.checkNotNull(builder.getOrg()); + location = Preconditions.checkNotNull(builder.getLocation()); + folder = null; + project = null; + pathTemplate = ORG_LOCATION; + } + + private IntelligenceConfigName(ProjectLocationBuilder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + folder = null; + org = null; + pathTemplate = PROJECT_LOCATION; + } + + public String getFolder() { + return folder; + } + + public String getLocation() { + return location; + } + + public String getOrg() { + return org; + } + + public String getProject() { + return project; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public static Builder newFolderLocationBuilder() { + return new Builder(); + } + + public static OrgLocationBuilder newOrgLocationBuilder() { + return new OrgLocationBuilder(); + } + + public static ProjectLocationBuilder newProjectLocationBuilder() { + return new ProjectLocationBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static IntelligenceConfigName of(String folder, String location) { + return newBuilder().setFolder(folder).setLocation(location).build(); + } + + public static IntelligenceConfigName ofFolderLocationName(String folder, String location) { + return newBuilder().setFolder(folder).setLocation(location).build(); + } + + public static IntelligenceConfigName ofOrgLocationName(String org, String location) { + return newOrgLocationBuilder().setOrg(org).setLocation(location).build(); + } + + public static IntelligenceConfigName ofProjectLocationName(String project, String location) { + return newProjectLocationBuilder().setProject(project).setLocation(location).build(); + } + + public static String format(String folder, String location) { + return newBuilder().setFolder(folder).setLocation(location).build().toString(); + } + + public static String formatFolderLocationName(String folder, String location) { + return newBuilder().setFolder(folder).setLocation(location).build().toString(); + } + + public static String formatOrgLocationName(String org, String location) { + return newOrgLocationBuilder().setOrg(org).setLocation(location).build().toString(); + } + + public static String formatProjectLocationName(String project, String location) { + return newProjectLocationBuilder().setProject(project).setLocation(location).build().toString(); + } + + public static IntelligenceConfigName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (FOLDER_LOCATION.matches(formattedString)) { + Map matchMap = FOLDER_LOCATION.match(formattedString); + return ofFolderLocationName(matchMap.get("folder"), matchMap.get("location")); + } else if (ORG_LOCATION.matches(formattedString)) { + Map matchMap = ORG_LOCATION.match(formattedString); + return ofOrgLocationName(matchMap.get("org"), matchMap.get("location")); + } else if (PROJECT_LOCATION.matches(formattedString)) { + Map matchMap = PROJECT_LOCATION.match(formattedString); + return ofProjectLocationName(matchMap.get("project"), matchMap.get("location")); + } + throw new ValidationException( + "IntelligenceConfigName.parse: formattedString not in valid format"); + } + + 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 (IntelligenceConfigName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return FOLDER_LOCATION.matches(formattedString) + || ORG_LOCATION.matches(formattedString) + || PROJECT_LOCATION.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (folder != null) { + fieldMapBuilder.put("folder", folder); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (org != null) { + fieldMapBuilder.put("org", org); + } + if (project != null) { + fieldMapBuilder.put("project", project); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + IntelligenceConfigName that = ((IntelligenceConfigName) o); + return Objects.equals(this.folder, that.folder) + && Objects.equals(this.location, that.location) + && Objects.equals(this.org, that.org) + && Objects.equals(this.project, that.project); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(folder); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(org); + h *= 1000003; + h ^= Objects.hashCode(project); + return h; + } + + /** Builder for folders/{folder}/locations/{location}/intelligenceConfig. */ + public static class Builder { + private String folder; + private String location; + + protected Builder() {} + + public String getFolder() { + return folder; + } + + public String getLocation() { + return location; + } + + public Builder setFolder(String folder) { + this.folder = folder; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + private Builder(IntelligenceConfigName intelligenceConfigName) { + Preconditions.checkArgument( + Objects.equals(intelligenceConfigName.pathTemplate, FOLDER_LOCATION), + "toBuilder is only supported when IntelligenceConfigName has the pattern of" + + " folders/{folder}/locations/{location}/intelligenceConfig"); + this.folder = intelligenceConfigName.folder; + this.location = intelligenceConfigName.location; + } + + public IntelligenceConfigName build() { + return new IntelligenceConfigName(this); + } + } + + /** Builder for organizations/{org}/locations/{location}/intelligenceConfig. */ + public static class OrgLocationBuilder { + private String org; + private String location; + + protected OrgLocationBuilder() {} + + public String getOrg() { + return org; + } + + public String getLocation() { + return location; + } + + public OrgLocationBuilder setOrg(String org) { + this.org = org; + return this; + } + + public OrgLocationBuilder setLocation(String location) { + this.location = location; + return this; + } + + public IntelligenceConfigName build() { + return new IntelligenceConfigName(this); + } + } + + /** Builder for projects/{project}/locations/{location}/intelligenceConfig. */ + public static class ProjectLocationBuilder { + private String project; + private String location; + + protected ProjectLocationBuilder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public ProjectLocationBuilder setProject(String project) { + this.project = project; + return this; + } + + public ProjectLocationBuilder setLocation(String location) { + this.location = location; + return this; + } + + public IntelligenceConfigName build() { + return new IntelligenceConfigName(this); + } + } +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/IntelligenceConfigOrBuilder.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/IntelligenceConfigOrBuilder.java new file mode 100644 index 0000000000..f957effc63 --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/IntelligenceConfigOrBuilder.java @@ -0,0 +1,271 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +public interface IntelligenceConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storage.control.v2.IntelligenceConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier. The name of the `IntelligenceConfig` resource associated with
+   * your organization, folder, or project.
+   *
+   * The name format varies based on the GCP resource hierarchy as follows:
+   *
+   * * For project:
+   * `projects/{project_number}/locations/global/intelligenceConfig`
+   * * For organization:
+   * `organizations/{org_id}/locations/global/intelligenceConfig`
+   * * For folder: `folders/{folder_id}/locations/global/intelligenceConfig`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Identifier. The name of the `IntelligenceConfig` resource associated with
+   * your organization, folder, or project.
+   *
+   * The name format varies based on the GCP resource hierarchy as follows:
+   *
+   * * For project:
+   * `projects/{project_number}/locations/global/intelligenceConfig`
+   * * For organization:
+   * `organizations/{org_id}/locations/global/intelligenceConfig`
+   * * For folder: `folders/{folder_id}/locations/global/intelligenceConfig`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The edition configuration of the `IntelligenceConfig` resource.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EditionConfig edition_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for editionConfig. + */ + int getEditionConfigValue(); + + /** + * + * + *
+   * Optional. The edition configuration of the `IntelligenceConfig` resource.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EditionConfig edition_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The editionConfig. + */ + com.google.storage.control.v2.IntelligenceConfig.EditionConfig getEditionConfig(); + + /** + * + * + *
+   * Output only. The time at which the `IntelligenceConfig` resource is last
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + + /** + * + * + *
+   * Output only. The time at which the `IntelligenceConfig` resource is last
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + + /** + * + * + *
+   * Output only. The time at which the `IntelligenceConfig` resource is last
+   * updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Filter over location and bucket.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the filter field is set. + */ + boolean hasFilter(); + + /** + * + * + *
+   * Optional. Filter over location and bucket.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The filter. + */ + com.google.storage.control.v2.IntelligenceConfig.Filter getFilter(); + + /** + * + * + *
+   * Optional. Filter over location and bucket.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.Filter filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.storage.control.v2.IntelligenceConfig.FilterOrBuilder getFilterOrBuilder(); + + /** + * + * + *
+   * Output only. The `IntelligenceConfig` resource that is applicable for the
+   * resource.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig effective_intelligence_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the effectiveIntelligenceConfig field is set. + */ + boolean hasEffectiveIntelligenceConfig(); + + /** + * + * + *
+   * Output only. The `IntelligenceConfig` resource that is applicable for the
+   * resource.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig effective_intelligence_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The effectiveIntelligenceConfig. + */ + com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig + getEffectiveIntelligenceConfig(); + + /** + * + * + *
+   * Output only. The `IntelligenceConfig` resource that is applicable for the
+   * resource.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfig effective_intelligence_config = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.storage.control.v2.IntelligenceConfig.EffectiveIntelligenceConfigOrBuilder + getEffectiveIntelligenceConfigOrBuilder(); + + /** + * + * + *
+   * The trial configuration of the `IntelligenceConfig` resource.
+   * 
+ * + * .google.storage.control.v2.IntelligenceConfig.TrialConfig trial_config = 7; + * + * @return Whether the trialConfig field is set. + */ + boolean hasTrialConfig(); + + /** + * + * + *
+   * The trial configuration of the `IntelligenceConfig` resource.
+   * 
+ * + * .google.storage.control.v2.IntelligenceConfig.TrialConfig trial_config = 7; + * + * @return The trialConfig. + */ + com.google.storage.control.v2.IntelligenceConfig.TrialConfig getTrialConfig(); + + /** + * + * + *
+   * The trial configuration of the `IntelligenceConfig` resource.
+   * 
+ * + * .google.storage.control.v2.IntelligenceConfig.TrialConfig trial_config = 7; + */ + com.google.storage.control.v2.IntelligenceConfig.TrialConfigOrBuilder getTrialConfigOrBuilder(); +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/ListAnywhereCachesRequest.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/ListAnywhereCachesRequest.java new file mode 100644 index 0000000000..b28702f198 --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/ListAnywhereCachesRequest.java @@ -0,0 +1,1156 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +/** + * + * + *
+ * Request message for ListAnywhereCaches.
+ * 
+ * + * Protobuf type {@code google.storage.control.v2.ListAnywhereCachesRequest} + */ +public final class ListAnywhereCachesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storage.control.v2.ListAnywhereCachesRequest) + ListAnywhereCachesRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListAnywhereCachesRequest.newBuilder() to construct. + private ListAnywhereCachesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAnywhereCachesRequest() { + parent_ = ""; + pageToken_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAnywhereCachesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_ListAnywhereCachesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_ListAnywhereCachesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.ListAnywhereCachesRequest.class, + com.google.storage.control.v2.ListAnywhereCachesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The bucket to which this cache 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 cache 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 PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * Maximum number of caches to return in a single response.
+   * The service will use this parameter or 1,000 items, whichever is smaller.
+   * 
+ * + * 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 page token representing part of the larger set of
+   * results to view.
+   * 
+ * + * 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 page token representing part of the larger set of
+   * results to view.
+   * 
+ * + * 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 REQUEST_ID_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. A unique identifier for this request. UUID is the recommended
+   * format, but other formats are still accepted.
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A unique identifier for this request. UUID is the recommended
+   * format, but other formats are still accepted.
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + 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_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + 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.control.v2.ListAnywhereCachesRequest)) { + return super.equals(obj); + } + com.google.storage.control.v2.ListAnywhereCachesRequest other = + (com.google.storage.control.v2.ListAnywhereCachesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getRequestId().equals(other.getRequestId())) 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 = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storage.control.v2.ListAnywhereCachesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.ListAnywhereCachesRequest 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.control.v2.ListAnywhereCachesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.ListAnywhereCachesRequest 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.control.v2.ListAnywhereCachesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.ListAnywhereCachesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storage.control.v2.ListAnywhereCachesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.ListAnywhereCachesRequest 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.control.v2.ListAnywhereCachesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.ListAnywhereCachesRequest 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.control.v2.ListAnywhereCachesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.ListAnywhereCachesRequest 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.control.v2.ListAnywhereCachesRequest 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 ListAnywhereCaches.
+   * 
+ * + * Protobuf type {@code google.storage.control.v2.ListAnywhereCachesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storage.control.v2.ListAnywhereCachesRequest) + com.google.storage.control.v2.ListAnywhereCachesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_ListAnywhereCachesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_ListAnywhereCachesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.ListAnywhereCachesRequest.class, + com.google.storage.control.v2.ListAnywhereCachesRequest.Builder.class); + } + + // Construct using com.google.storage.control.v2.ListAnywhereCachesRequest.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_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_ListAnywhereCachesRequest_descriptor; + } + + @java.lang.Override + public com.google.storage.control.v2.ListAnywhereCachesRequest getDefaultInstanceForType() { + return com.google.storage.control.v2.ListAnywhereCachesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.storage.control.v2.ListAnywhereCachesRequest build() { + com.google.storage.control.v2.ListAnywhereCachesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storage.control.v2.ListAnywhereCachesRequest buildPartial() { + com.google.storage.control.v2.ListAnywhereCachesRequest result = + new com.google.storage.control.v2.ListAnywhereCachesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.storage.control.v2.ListAnywhereCachesRequest 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_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.requestId_ = requestId_; + } + } + + @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.control.v2.ListAnywhereCachesRequest) { + return mergeFrom((com.google.storage.control.v2.ListAnywhereCachesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.storage.control.v2.ListAnywhereCachesRequest other) { + if (other == com.google.storage.control.v2.ListAnywhereCachesRequest.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(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + bitField0_ |= 0x00000008; + 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 + case 34: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + 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 cache 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 cache 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 cache 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 cache 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 cache 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 int pageSize_; + + /** + * + * + *
+     * Maximum number of caches to return in a single response.
+     * The service will use this parameter or 1,000 items, whichever is smaller.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * Maximum number of caches to return in a single response.
+     * The service will use this parameter or 1,000 items, whichever is smaller.
+     * 
+ * + * 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; + } + + /** + * + * + *
+     * Maximum number of caches to return in a single response.
+     * The service will use this parameter or 1,000 items, whichever is smaller.
+     * 
+ * + * 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 page token representing part of the larger set of
+     * results to view.
+     * 
+ * + * 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 page token representing part of the larger set of
+     * results to view.
+     * 
+ * + * 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 page token representing part of the larger set of
+     * results to view.
+     * 
+ * + * 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 page token representing part of the larger set of
+     * results to view.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * A previously-returned page token representing part of the larger set of
+     * results to view.
+     * 
+ * + * 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 requestId_ = ""; + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted.
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted.
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted.
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted.
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted.
+     * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = value; + bitField0_ |= 0x00000008; + 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.control.v2.ListAnywhereCachesRequest) + } + + // @@protoc_insertion_point(class_scope:google.storage.control.v2.ListAnywhereCachesRequest) + private static final com.google.storage.control.v2.ListAnywhereCachesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storage.control.v2.ListAnywhereCachesRequest(); + } + + public static com.google.storage.control.v2.ListAnywhereCachesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAnywhereCachesRequest 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.control.v2.ListAnywhereCachesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/ListAnywhereCachesRequestOrBuilder.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/ListAnywhereCachesRequestOrBuilder.java new file mode 100644 index 0000000000..33ca6415b4 --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/ListAnywhereCachesRequestOrBuilder.java @@ -0,0 +1,130 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +public interface ListAnywhereCachesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storage.control.v2.ListAnywhereCachesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The bucket to which this cache 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 cache belongs.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Maximum number of caches to return in a single response.
+   * The service will use this parameter or 1,000 items, whichever is smaller.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A previously-returned page token representing part of the larger set of
+   * results to view.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * A previously-returned page token representing part of the larger set of
+   * results to view.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. A unique identifier for this request. UUID is the recommended
+   * format, but other formats are still accepted.
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. A unique identifier for this request. UUID is the recommended
+   * format, but other formats are still accepted.
+   * 
+ * + * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/ListAnywhereCachesResponse.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/ListAnywhereCachesResponse.java new file mode 100644 index 0000000000..6e39b62203 --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/ListAnywhereCachesResponse.java @@ -0,0 +1,1164 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +/** + * + * + *
+ * Response message for ListAnywhereCaches.
+ * 
+ * + * Protobuf type {@code google.storage.control.v2.ListAnywhereCachesResponse} + */ +public final class ListAnywhereCachesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storage.control.v2.ListAnywhereCachesResponse) + ListAnywhereCachesResponseOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ListAnywhereCachesResponse.newBuilder() to construct. + private ListAnywhereCachesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAnywhereCachesResponse() { + anywhereCaches_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAnywhereCachesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_ListAnywhereCachesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_ListAnywhereCachesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.ListAnywhereCachesResponse.class, + com.google.storage.control.v2.ListAnywhereCachesResponse.Builder.class); + } + + public static final int ANYWHERE_CACHES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List anywhereCaches_; + + /** + * + * + *
+   * The list of items.
+   * 
+ * + * repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + */ + @java.lang.Override + public java.util.List getAnywhereCachesList() { + return anywhereCaches_; + } + + /** + * + * + *
+   * The list of items.
+   * 
+ * + * repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + */ + @java.lang.Override + public java.util.List + getAnywhereCachesOrBuilderList() { + return anywhereCaches_; + } + + /** + * + * + *
+   * The list of items.
+   * 
+ * + * repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + */ + @java.lang.Override + public int getAnywhereCachesCount() { + return anywhereCaches_.size(); + } + + /** + * + * + *
+   * The list of items.
+   * 
+ * + * repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + */ + @java.lang.Override + public com.google.storage.control.v2.AnywhereCache getAnywhereCaches(int index) { + return anywhereCaches_.get(index); + } + + /** + * + * + *
+   * The list of items.
+   * 
+ * + * repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + */ + @java.lang.Override + public com.google.storage.control.v2.AnywhereCacheOrBuilder getAnywhereCachesOrBuilder( + int index) { + return anywhereCaches_.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 < anywhereCaches_.size(); i++) { + output.writeMessage(1, anywhereCaches_.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 < anywhereCaches_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, anywhereCaches_.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.control.v2.ListAnywhereCachesResponse)) { + return super.equals(obj); + } + com.google.storage.control.v2.ListAnywhereCachesResponse other = + (com.google.storage.control.v2.ListAnywhereCachesResponse) obj; + + if (!getAnywhereCachesList().equals(other.getAnywhereCachesList())) 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 (getAnywhereCachesCount() > 0) { + hash = (37 * hash) + ANYWHERE_CACHES_FIELD_NUMBER; + hash = (53 * hash) + getAnywhereCachesList().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.control.v2.ListAnywhereCachesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.ListAnywhereCachesResponse 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.control.v2.ListAnywhereCachesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.ListAnywhereCachesResponse 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.control.v2.ListAnywhereCachesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.ListAnywhereCachesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storage.control.v2.ListAnywhereCachesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.ListAnywhereCachesResponse 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.control.v2.ListAnywhereCachesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.ListAnywhereCachesResponse 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.control.v2.ListAnywhereCachesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.ListAnywhereCachesResponse 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.control.v2.ListAnywhereCachesResponse 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; + } + + /** + * + * + *
+   * Response message for ListAnywhereCaches.
+   * 
+ * + * Protobuf type {@code google.storage.control.v2.ListAnywhereCachesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storage.control.v2.ListAnywhereCachesResponse) + com.google.storage.control.v2.ListAnywhereCachesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_ListAnywhereCachesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_ListAnywhereCachesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.ListAnywhereCachesResponse.class, + com.google.storage.control.v2.ListAnywhereCachesResponse.Builder.class); + } + + // Construct using com.google.storage.control.v2.ListAnywhereCachesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (anywhereCachesBuilder_ == null) { + anywhereCaches_ = java.util.Collections.emptyList(); + } else { + anywhereCaches_ = null; + anywhereCachesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_ListAnywhereCachesResponse_descriptor; + } + + @java.lang.Override + public com.google.storage.control.v2.ListAnywhereCachesResponse getDefaultInstanceForType() { + return com.google.storage.control.v2.ListAnywhereCachesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.storage.control.v2.ListAnywhereCachesResponse build() { + com.google.storage.control.v2.ListAnywhereCachesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storage.control.v2.ListAnywhereCachesResponse buildPartial() { + com.google.storage.control.v2.ListAnywhereCachesResponse result = + new com.google.storage.control.v2.ListAnywhereCachesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.storage.control.v2.ListAnywhereCachesResponse result) { + if (anywhereCachesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + anywhereCaches_ = java.util.Collections.unmodifiableList(anywhereCaches_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.anywhereCaches_ = anywhereCaches_; + } else { + result.anywhereCaches_ = anywhereCachesBuilder_.build(); + } + } + + private void buildPartial0(com.google.storage.control.v2.ListAnywhereCachesResponse 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.control.v2.ListAnywhereCachesResponse) { + return mergeFrom((com.google.storage.control.v2.ListAnywhereCachesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.storage.control.v2.ListAnywhereCachesResponse other) { + if (other == com.google.storage.control.v2.ListAnywhereCachesResponse.getDefaultInstance()) + return this; + if (anywhereCachesBuilder_ == null) { + if (!other.anywhereCaches_.isEmpty()) { + if (anywhereCaches_.isEmpty()) { + anywhereCaches_ = other.anywhereCaches_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAnywhereCachesIsMutable(); + anywhereCaches_.addAll(other.anywhereCaches_); + } + onChanged(); + } + } else { + if (!other.anywhereCaches_.isEmpty()) { + if (anywhereCachesBuilder_.isEmpty()) { + anywhereCachesBuilder_.dispose(); + anywhereCachesBuilder_ = null; + anywhereCaches_ = other.anywhereCaches_; + bitField0_ = (bitField0_ & ~0x00000001); + anywhereCachesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAnywhereCachesFieldBuilder() + : null; + } else { + anywhereCachesBuilder_.addAllMessages(other.anywhereCaches_); + } + } + } + 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.control.v2.AnywhereCache m = + input.readMessage( + com.google.storage.control.v2.AnywhereCache.parser(), extensionRegistry); + if (anywhereCachesBuilder_ == null) { + ensureAnywhereCachesIsMutable(); + anywhereCaches_.add(m); + } else { + anywhereCachesBuilder_.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 anywhereCaches_ = + java.util.Collections.emptyList(); + + private void ensureAnywhereCachesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + anywhereCaches_ = + new java.util.ArrayList(anywhereCaches_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.storage.control.v2.AnywhereCache, + com.google.storage.control.v2.AnywhereCache.Builder, + com.google.storage.control.v2.AnywhereCacheOrBuilder> + anywhereCachesBuilder_; + + /** + * + * + *
+     * The list of items.
+     * 
+ * + * repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + */ + public java.util.List getAnywhereCachesList() { + if (anywhereCachesBuilder_ == null) { + return java.util.Collections.unmodifiableList(anywhereCaches_); + } else { + return anywhereCachesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * The list of items.
+     * 
+ * + * repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + */ + public int getAnywhereCachesCount() { + if (anywhereCachesBuilder_ == null) { + return anywhereCaches_.size(); + } else { + return anywhereCachesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * The list of items.
+     * 
+ * + * repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + */ + public com.google.storage.control.v2.AnywhereCache getAnywhereCaches(int index) { + if (anywhereCachesBuilder_ == null) { + return anywhereCaches_.get(index); + } else { + return anywhereCachesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * The list of items.
+     * 
+ * + * repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + */ + public Builder setAnywhereCaches(int index, com.google.storage.control.v2.AnywhereCache value) { + if (anywhereCachesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnywhereCachesIsMutable(); + anywhereCaches_.set(index, value); + onChanged(); + } else { + anywhereCachesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of items.
+     * 
+ * + * repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + */ + public Builder setAnywhereCaches( + int index, com.google.storage.control.v2.AnywhereCache.Builder builderForValue) { + if (anywhereCachesBuilder_ == null) { + ensureAnywhereCachesIsMutable(); + anywhereCaches_.set(index, builderForValue.build()); + onChanged(); + } else { + anywhereCachesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of items.
+     * 
+ * + * repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + */ + public Builder addAnywhereCaches(com.google.storage.control.v2.AnywhereCache value) { + if (anywhereCachesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnywhereCachesIsMutable(); + anywhereCaches_.add(value); + onChanged(); + } else { + anywhereCachesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * The list of items.
+     * 
+ * + * repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + */ + public Builder addAnywhereCaches(int index, com.google.storage.control.v2.AnywhereCache value) { + if (anywhereCachesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnywhereCachesIsMutable(); + anywhereCaches_.add(index, value); + onChanged(); + } else { + anywhereCachesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * The list of items.
+     * 
+ * + * repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + */ + public Builder addAnywhereCaches( + com.google.storage.control.v2.AnywhereCache.Builder builderForValue) { + if (anywhereCachesBuilder_ == null) { + ensureAnywhereCachesIsMutable(); + anywhereCaches_.add(builderForValue.build()); + onChanged(); + } else { + anywhereCachesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of items.
+     * 
+ * + * repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + */ + public Builder addAnywhereCaches( + int index, com.google.storage.control.v2.AnywhereCache.Builder builderForValue) { + if (anywhereCachesBuilder_ == null) { + ensureAnywhereCachesIsMutable(); + anywhereCaches_.add(index, builderForValue.build()); + onChanged(); + } else { + anywhereCachesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * The list of items.
+     * 
+ * + * repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + */ + public Builder addAllAnywhereCaches( + java.lang.Iterable values) { + if (anywhereCachesBuilder_ == null) { + ensureAnywhereCachesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, anywhereCaches_); + onChanged(); + } else { + anywhereCachesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * The list of items.
+     * 
+ * + * repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + */ + public Builder clearAnywhereCaches() { + if (anywhereCachesBuilder_ == null) { + anywhereCaches_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + anywhereCachesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * The list of items.
+     * 
+ * + * repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + */ + public Builder removeAnywhereCaches(int index) { + if (anywhereCachesBuilder_ == null) { + ensureAnywhereCachesIsMutable(); + anywhereCaches_.remove(index); + onChanged(); + } else { + anywhereCachesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * The list of items.
+     * 
+ * + * repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + */ + public com.google.storage.control.v2.AnywhereCache.Builder getAnywhereCachesBuilder(int index) { + return getAnywhereCachesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * The list of items.
+     * 
+ * + * repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + */ + public com.google.storage.control.v2.AnywhereCacheOrBuilder getAnywhereCachesOrBuilder( + int index) { + if (anywhereCachesBuilder_ == null) { + return anywhereCaches_.get(index); + } else { + return anywhereCachesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * The list of items.
+     * 
+ * + * repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + */ + public java.util.List + getAnywhereCachesOrBuilderList() { + if (anywhereCachesBuilder_ != null) { + return anywhereCachesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(anywhereCaches_); + } + } + + /** + * + * + *
+     * The list of items.
+     * 
+ * + * repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + */ + public com.google.storage.control.v2.AnywhereCache.Builder addAnywhereCachesBuilder() { + return getAnywhereCachesFieldBuilder() + .addBuilder(com.google.storage.control.v2.AnywhereCache.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of items.
+     * 
+ * + * repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + */ + public com.google.storage.control.v2.AnywhereCache.Builder addAnywhereCachesBuilder(int index) { + return getAnywhereCachesFieldBuilder() + .addBuilder(index, com.google.storage.control.v2.AnywhereCache.getDefaultInstance()); + } + + /** + * + * + *
+     * The list of items.
+     * 
+ * + * repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + */ + public java.util.List + getAnywhereCachesBuilderList() { + return getAnywhereCachesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.storage.control.v2.AnywhereCache, + com.google.storage.control.v2.AnywhereCache.Builder, + com.google.storage.control.v2.AnywhereCacheOrBuilder> + getAnywhereCachesFieldBuilder() { + if (anywhereCachesBuilder_ == null) { + anywhereCachesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.storage.control.v2.AnywhereCache, + com.google.storage.control.v2.AnywhereCache.Builder, + com.google.storage.control.v2.AnywhereCacheOrBuilder>( + anywhereCaches_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + anywhereCaches_ = null; + } + return anywhereCachesBuilder_; + } + + 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.control.v2.ListAnywhereCachesResponse) + } + + // @@protoc_insertion_point(class_scope:google.storage.control.v2.ListAnywhereCachesResponse) + private static final com.google.storage.control.v2.ListAnywhereCachesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storage.control.v2.ListAnywhereCachesResponse(); + } + + public static com.google.storage.control.v2.ListAnywhereCachesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAnywhereCachesResponse 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.control.v2.ListAnywhereCachesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/ListAnywhereCachesResponseOrBuilder.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/ListAnywhereCachesResponseOrBuilder.java new file mode 100644 index 0000000000..a5d47960c8 --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/ListAnywhereCachesResponseOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +public interface ListAnywhereCachesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storage.control.v2.ListAnywhereCachesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of items.
+   * 
+ * + * repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + */ + java.util.List getAnywhereCachesList(); + + /** + * + * + *
+   * The list of items.
+   * 
+ * + * repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + */ + com.google.storage.control.v2.AnywhereCache getAnywhereCaches(int index); + + /** + * + * + *
+   * The list of items.
+   * 
+ * + * repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + */ + int getAnywhereCachesCount(); + + /** + * + * + *
+   * The list of items.
+   * 
+ * + * repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + */ + java.util.List + getAnywhereCachesOrBuilderList(); + + /** + * + * + *
+   * The list of items.
+   * 
+ * + * repeated .google.storage.control.v2.AnywhereCache anywhere_caches = 1; + */ + com.google.storage.control.v2.AnywhereCacheOrBuilder getAnywhereCachesOrBuilder(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-control-v2/src/main/java/com/google/storage/control/v2/PauseAnywhereCacheRequest.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/PauseAnywhereCacheRequest.java new file mode 100644 index 0000000000..603217b5e6 --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/PauseAnywhereCacheRequest.java @@ -0,0 +1,873 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +/** + * + * + *
+ * Request message for PauseAnywhereCache.
+ * 
+ * + * Protobuf type {@code google.storage.control.v2.PauseAnywhereCacheRequest} + */ +public final class PauseAnywhereCacheRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storage.control.v2.PauseAnywhereCacheRequest) + PauseAnywhereCacheRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use PauseAnywhereCacheRequest.newBuilder() to construct. + private PauseAnywhereCacheRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PauseAnywhereCacheRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PauseAnywhereCacheRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_PauseAnywhereCacheRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_PauseAnywhereCacheRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.PauseAnywhereCacheRequest.class, + com.google.storage.control.v2.PauseAnywhereCacheRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name field in the request should be:
+   * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+   * 
+ * + * + * 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 name field in the request should be:
+   * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+   * 
+ * + * + * 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; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. A unique identifier for this request. UUID is the recommended
+   * format, but other formats are still accepted. This request is only
+   * idempotent if a `request_id` is provided.
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A unique identifier for this request. UUID is the recommended
+   * format, but other formats are still accepted. This request is only
+   * idempotent if a `request_id` is provided.
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + 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(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + 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.control.v2.PauseAnywhereCacheRequest)) { + return super.equals(obj); + } + com.google.storage.control.v2.PauseAnywhereCacheRequest other = + (com.google.storage.control.v2.PauseAnywhereCacheRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) 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) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storage.control.v2.PauseAnywhereCacheRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.PauseAnywhereCacheRequest 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.control.v2.PauseAnywhereCacheRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.PauseAnywhereCacheRequest 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.control.v2.PauseAnywhereCacheRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.PauseAnywhereCacheRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storage.control.v2.PauseAnywhereCacheRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.PauseAnywhereCacheRequest 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.control.v2.PauseAnywhereCacheRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.PauseAnywhereCacheRequest 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.control.v2.PauseAnywhereCacheRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.PauseAnywhereCacheRequest 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.control.v2.PauseAnywhereCacheRequest 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 PauseAnywhereCache.
+   * 
+ * + * Protobuf type {@code google.storage.control.v2.PauseAnywhereCacheRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storage.control.v2.PauseAnywhereCacheRequest) + com.google.storage.control.v2.PauseAnywhereCacheRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_PauseAnywhereCacheRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_PauseAnywhereCacheRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.PauseAnywhereCacheRequest.class, + com.google.storage.control.v2.PauseAnywhereCacheRequest.Builder.class); + } + + // Construct using com.google.storage.control.v2.PauseAnywhereCacheRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_PauseAnywhereCacheRequest_descriptor; + } + + @java.lang.Override + public com.google.storage.control.v2.PauseAnywhereCacheRequest getDefaultInstanceForType() { + return com.google.storage.control.v2.PauseAnywhereCacheRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.storage.control.v2.PauseAnywhereCacheRequest build() { + com.google.storage.control.v2.PauseAnywhereCacheRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storage.control.v2.PauseAnywhereCacheRequest buildPartial() { + com.google.storage.control.v2.PauseAnywhereCacheRequest result = + new com.google.storage.control.v2.PauseAnywhereCacheRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.storage.control.v2.PauseAnywhereCacheRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @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.control.v2.PauseAnywhereCacheRequest) { + return mergeFrom((com.google.storage.control.v2.PauseAnywhereCacheRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.storage.control.v2.PauseAnywhereCacheRequest other) { + if (other == com.google.storage.control.v2.PauseAnywhereCacheRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = 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 name_ = ""; + + /** + * + * + *
+     * Required. The name field in the request should be:
+     * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+     * 
+ * + * + * 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 name field in the request should be:
+     * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+     * 
+ * + * + * 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 name field in the request should be:
+     * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+     * 
+ * + * + * 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 name field in the request should be:
+     * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+     * 
+ * + * + * 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 name field in the request should be:
+     * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+     * 
+ * + * + * 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; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted. This request is only
+     * idempotent if a `request_id` is provided.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted. This request is only
+     * idempotent if a `request_id` is provided.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted. This request is only
+     * idempotent if a `request_id` is provided.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted. This request is only
+     * idempotent if a `request_id` is provided.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted. This request is only
+     * idempotent if a `request_id` is provided.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = 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.control.v2.PauseAnywhereCacheRequest) + } + + // @@protoc_insertion_point(class_scope:google.storage.control.v2.PauseAnywhereCacheRequest) + private static final com.google.storage.control.v2.PauseAnywhereCacheRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storage.control.v2.PauseAnywhereCacheRequest(); + } + + public static com.google.storage.control.v2.PauseAnywhereCacheRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PauseAnywhereCacheRequest 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.control.v2.PauseAnywhereCacheRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/PauseAnywhereCacheRequestOrBuilder.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/PauseAnywhereCacheRequestOrBuilder.java new file mode 100644 index 0000000000..3e8d5f0ed1 --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/PauseAnywhereCacheRequestOrBuilder.java @@ -0,0 +1,92 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +public interface PauseAnywhereCacheRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storage.control.v2.PauseAnywhereCacheRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name field in the request should be:
+   * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name field in the request should be:
+   * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. A unique identifier for this request. UUID is the recommended
+   * format, but other formats are still accepted. This request is only
+   * idempotent if a `request_id` is provided.
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. A unique identifier for this request. UUID is the recommended
+   * format, but other formats are still accepted. This request is only
+   * idempotent if a `request_id` is provided.
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/ResumeAnywhereCacheRequest.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/ResumeAnywhereCacheRequest.java new file mode 100644 index 0000000000..20d9f3a117 --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/ResumeAnywhereCacheRequest.java @@ -0,0 +1,873 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +/** + * + * + *
+ * Request message for ResumeAnywhereCache.
+ * 
+ * + * Protobuf type {@code google.storage.control.v2.ResumeAnywhereCacheRequest} + */ +public final class ResumeAnywhereCacheRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storage.control.v2.ResumeAnywhereCacheRequest) + ResumeAnywhereCacheRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ResumeAnywhereCacheRequest.newBuilder() to construct. + private ResumeAnywhereCacheRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResumeAnywhereCacheRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResumeAnywhereCacheRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_ResumeAnywhereCacheRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_ResumeAnywhereCacheRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.ResumeAnywhereCacheRequest.class, + com.google.storage.control.v2.ResumeAnywhereCacheRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Required. The name field in the request should be:
+   * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+   * 
+ * + * + * 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 name field in the request should be:
+   * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+   * 
+ * + * + * 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; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. A unique identifier for this request. UUID is the recommended
+   * format, but other formats are still accepted. This request is only
+   * idempotent if a `request_id` is provided.
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A unique identifier for this request. UUID is the recommended
+   * format, but other formats are still accepted. This request is only
+   * idempotent if a `request_id` is provided.
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, requestId_); + } + 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(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, requestId_); + } + 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.control.v2.ResumeAnywhereCacheRequest)) { + return super.equals(obj); + } + com.google.storage.control.v2.ResumeAnywhereCacheRequest other = + (com.google.storage.control.v2.ResumeAnywhereCacheRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) 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) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storage.control.v2.ResumeAnywhereCacheRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.ResumeAnywhereCacheRequest 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.control.v2.ResumeAnywhereCacheRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.ResumeAnywhereCacheRequest 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.control.v2.ResumeAnywhereCacheRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.ResumeAnywhereCacheRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storage.control.v2.ResumeAnywhereCacheRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.ResumeAnywhereCacheRequest 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.control.v2.ResumeAnywhereCacheRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.ResumeAnywhereCacheRequest 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.control.v2.ResumeAnywhereCacheRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.ResumeAnywhereCacheRequest 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.control.v2.ResumeAnywhereCacheRequest 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 ResumeAnywhereCache.
+   * 
+ * + * Protobuf type {@code google.storage.control.v2.ResumeAnywhereCacheRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storage.control.v2.ResumeAnywhereCacheRequest) + com.google.storage.control.v2.ResumeAnywhereCacheRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_ResumeAnywhereCacheRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_ResumeAnywhereCacheRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.ResumeAnywhereCacheRequest.class, + com.google.storage.control.v2.ResumeAnywhereCacheRequest.Builder.class); + } + + // Construct using com.google.storage.control.v2.ResumeAnywhereCacheRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_ResumeAnywhereCacheRequest_descriptor; + } + + @java.lang.Override + public com.google.storage.control.v2.ResumeAnywhereCacheRequest getDefaultInstanceForType() { + return com.google.storage.control.v2.ResumeAnywhereCacheRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.storage.control.v2.ResumeAnywhereCacheRequest build() { + com.google.storage.control.v2.ResumeAnywhereCacheRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storage.control.v2.ResumeAnywhereCacheRequest buildPartial() { + com.google.storage.control.v2.ResumeAnywhereCacheRequest result = + new com.google.storage.control.v2.ResumeAnywhereCacheRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.storage.control.v2.ResumeAnywhereCacheRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.requestId_ = requestId_; + } + } + + @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.control.v2.ResumeAnywhereCacheRequest) { + return mergeFrom((com.google.storage.control.v2.ResumeAnywhereCacheRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.storage.control.v2.ResumeAnywhereCacheRequest other) { + if (other == com.google.storage.control.v2.ResumeAnywhereCacheRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + requestId_ = 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 name_ = ""; + + /** + * + * + *
+     * Required. The name field in the request should be:
+     * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+     * 
+ * + * + * 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 name field in the request should be:
+     * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+     * 
+ * + * + * 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 name field in the request should be:
+     * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+     * 
+ * + * + * 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 name field in the request should be:
+     * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+     * 
+ * + * + * 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 name field in the request should be:
+     * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+     * 
+ * + * + * 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; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted. This request is only
+     * idempotent if a `request_id` is provided.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted. This request is only
+     * idempotent if a `request_id` is provided.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted. This request is only
+     * idempotent if a `request_id` is provided.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted. This request is only
+     * idempotent if a `request_id` is provided.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted. This request is only
+     * idempotent if a `request_id` is provided.
+     * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = 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.control.v2.ResumeAnywhereCacheRequest) + } + + // @@protoc_insertion_point(class_scope:google.storage.control.v2.ResumeAnywhereCacheRequest) + private static final com.google.storage.control.v2.ResumeAnywhereCacheRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storage.control.v2.ResumeAnywhereCacheRequest(); + } + + public static com.google.storage.control.v2.ResumeAnywhereCacheRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResumeAnywhereCacheRequest 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.control.v2.ResumeAnywhereCacheRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/ResumeAnywhereCacheRequestOrBuilder.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/ResumeAnywhereCacheRequestOrBuilder.java new file mode 100644 index 0000000000..445ad3e714 --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/ResumeAnywhereCacheRequestOrBuilder.java @@ -0,0 +1,92 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +public interface ResumeAnywhereCacheRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storage.control.v2.ResumeAnywhereCacheRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name field in the request should be:
+   * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Required. The name field in the request should be:
+   * `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. A unique identifier for this request. UUID is the recommended
+   * format, but other formats are still accepted. This request is only
+   * idempotent if a `request_id` is provided.
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. A unique identifier for this request. UUID is the recommended
+   * format, but other formats are still accepted. This request is only
+   * idempotent if a `request_id` is provided.
+   * 
+ * + * + * string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/StorageControlProto.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/StorageControlProto.java index e5097b9550..c9f6ecb527 100644 --- a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/StorageControlProto.java +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/StorageControlProto.java @@ -108,6 +108,98 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_storage_control_v2_ListManagedFoldersResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_storage_control_v2_ListManagedFoldersResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storage_control_v2_CreateAnywhereCacheMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storage_control_v2_CreateAnywhereCacheMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storage_control_v2_UpdateAnywhereCacheMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storage_control_v2_UpdateAnywhereCacheMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storage_control_v2_AnywhereCache_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storage_control_v2_AnywhereCache_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storage_control_v2_CreateAnywhereCacheRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storage_control_v2_CreateAnywhereCacheRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storage_control_v2_UpdateAnywhereCacheRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storage_control_v2_UpdateAnywhereCacheRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storage_control_v2_DisableAnywhereCacheRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storage_control_v2_DisableAnywhereCacheRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storage_control_v2_PauseAnywhereCacheRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storage_control_v2_PauseAnywhereCacheRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storage_control_v2_ResumeAnywhereCacheRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storage_control_v2_ResumeAnywhereCacheRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storage_control_v2_GetAnywhereCacheRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storage_control_v2_GetAnywhereCacheRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storage_control_v2_ListAnywhereCachesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storage_control_v2_ListAnywhereCachesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storage_control_v2_ListAnywhereCachesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storage_control_v2_ListAnywhereCachesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storage_control_v2_IntelligenceConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storage_control_v2_IntelligenceConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storage_control_v2_IntelligenceConfig_Filter_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storage_control_v2_IntelligenceConfig_Filter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storage_control_v2_IntelligenceConfig_Filter_CloudStorageLocations_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storage_control_v2_IntelligenceConfig_Filter_CloudStorageLocations_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storage_control_v2_IntelligenceConfig_Filter_CloudStorageBuckets_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storage_control_v2_IntelligenceConfig_Filter_CloudStorageBuckets_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storage_control_v2_IntelligenceConfig_EffectiveIntelligenceConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storage_control_v2_IntelligenceConfig_EffectiveIntelligenceConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storage_control_v2_IntelligenceConfig_TrialConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storage_control_v2_IntelligenceConfig_TrialConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storage_control_v2_UpdateOrganizationIntelligenceConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storage_control_v2_UpdateOrganizationIntelligenceConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storage_control_v2_UpdateFolderIntelligenceConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storage_control_v2_UpdateFolderIntelligenceConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storage_control_v2_UpdateProjectIntelligenceConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storage_control_v2_UpdateProjectIntelligenceConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storage_control_v2_GetOrganizationIntelligenceConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storage_control_v2_GetOrganizationIntelligenceConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storage_control_v2_GetFolderIntelligenceConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storage_control_v2_GetFolderIntelligenceConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storage_control_v2_GetProjectIntelligenceConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storage_control_v2_GetProjectIntelligenceConfigRequest_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -119,12 +211,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n" + "/google/storage/control/v2/storage_cont" - + "rol.proto\022\031google.storage.control.v2\032\027go" - + "ogle/api/client.proto\032\037google/api/field_" - + "behavior.proto\032\033google/api/field_info.pr" - + "oto\032\031google/api/resource.proto\032\030google/a" - + "pi/routing.proto\032#google/longrunning/ope" - + "rations.proto\032\033google/protobuf/empty.proto\032\037google/protobuf/timestamp.proto\"+\n" + + "rol.proto\022\031google.storage.control.v2\032\034go" + + "ogle/api/annotations.proto\032\027google/api/c" + + "lient.proto\032\037google/api/field_behavior.p" + + "roto\032\033google/api/field_info.proto\032\031googl" + + "e/api/resource.proto\032\030google/api/routing" + + ".proto\032#google/longrunning/operations.pr" + + "oto\032\036google/protobuf/duration.proto\032\033google/protobuf/empty.proto\032" + + " google/protobuf/field_mask.proto\032\037google/protobuf/timestamp.proto\"+\n" + "\021PendingRenameInfo\022\026\n" + "\toperation\030\001 \001(\tB\003\340A\003\"\342\002\n" + "\006Folder\022\021\n" @@ -132,10 +226,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\016metageneration\030\003 \001(\003B\003\340A\003\0224\n" + "\013create_time\030\004 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + "\013update_time\030\005 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022N\n" - + "\023pending_rename_info\030\007 \001(\0132,.g" - + "oogle.storage.control.v2.PendingRenameInfoB\003\340A\003:l\352Ai\n" - + "\035storage.googleapis.com/Folder\0227projects/{project}/buckets/{bucket}" - + "/folders/{folder=**}*\007folders2\006folder\"\364\001\n" + + "\023pending_rename_info\030\007" + + " \001(\0132,.google.storage.control.v2.PendingRenameInfoB\003\340A\003:l\352Ai\n" + + "\035storage.googleapis.com/Folder\0227projects/{project}/" + + "buckets/{bucket}/folders/{folder=**}*\007folders2\006folder\"\364\001\n" + "\020GetFolderRequest\0223\n" + "\004name\030\006 \001(\tB%\340A\002\372A\037\n" + "\035storage.googleapis.com/Folder\022$\n" @@ -191,24 +285,25 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\026requested_cancellation\030\005 \001(\010B\003\340A\003\022\035\n" + "\020progress_percent\030\006 \001(\005B\003\340A\003\"\247\001\n" + "\024RenameFolderMetadata\022V\n" - + "\017common_metadata\030\001 \001(\0132=.google.storage." - + "control.v2.CommonLongRunningOperationMetadata\022\030\n" + + "\017common_metadata\030\001 \001(\0132=" + + ".google.storage.control.v2.CommonLongRunningOperationMetadata\022\030\n" + "\020source_folder_id\030\002 \001(\t\022\035\n" - + "\025destination_folder_id\030\003 \001(\t\"\331\003\n\r" + + "\025destination_folder_id\030\003 \001(\t\"\370\003\n\r" + "StorageLayout\022\021\n" + "\004name\030\001 \001(\tB\003\340A\003\022\025\n" + "\010location\030\002 \001(\tB\003\340A\003\022\032\n\r" + "location_type\030\003 \001(\tB\003\340A\003\022d\n" - + "\027custom_placement_config\030\004 \001(\0132>.google.storage" - + ".control.v2.StorageLayout.CustomPlacementConfigB\003\340A\003\022c\n" - + "\026hierarchical_namespace\030\005" - + " \001(\0132>.google.storage.control.v2.StorageLayout.HierarchicalNamespaceB\003\340A\003\032/\n" + + "\027custom_placement_config\030\004 \001(\0132" + + ">.google.storage.control.v2.StorageLayout.CustomPlacementConfigB\003\340A\003\022c\n" + + "\026hierarchical_namespace\030\005 \001(\0132>.google.storage.co" + + "ntrol.v2.StorageLayout.HierarchicalNamespaceB\003\340A\003\032/\n" + "\025CustomPlacementConfig\022\026\n" + "\016data_locations\030\001 \003(\t\032(\n" + "\025HierarchicalNamespace\022\017\n" - + "\007enabled\030\001 \001(\010:\\\352AY\n" - + "$storage.googleapis.com/Storag" - + "eLayout\0221projects/{project}/buckets/{bucket}/storageLayout\"\206\001\n" + + "\007enabled\030\001 \001(\010:{\352Ax\n" + + "$storage.googleapis.com/StorageLayout\0221projects/{proje" + + "ct}/buckets/{bucket}/storageLayout*\016storageLayouts2\r" + + "storageLayout\"\206\001\n" + "\027GetStorageLayoutRequest\022:\n" + "\004name\030\001 \001(\tB,\340A\002\372A&\n" + "$storage.googleapis.com/StorageLayout\022\016\n" @@ -220,8 +315,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\013create_time\030\004 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + "\013update_time\030\005" + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003:\221\001\352A\215\001\n" - + "$storage.googleapis.com/ManagedFolder\022Fprojects/{project}/bucke" - + "ts/{bucket}/managedFolders/{managed_folder=**}*\016managedFolders2\r" + + "$storage.googleapis.com/ManagedFolder\022Fprojects/{project" + + "}/buckets/{bucket}/managedFolders/{managed_folder=**}*\016managedFolders2\r" + "managedFolder\"\202\002\n" + "\027GetManagedFolderRequest\022:\n" + "\004name\030\006 \001(\tB,\340A\002\372A&\n" @@ -232,8 +327,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\030_if_metageneration_matchB\036\n" + "\034_if_metageneration_not_match\"\342\001\n" + "\032CreateManagedFolderRequest\022<\n" - + "\006parent\030\001 \001(" - + "\tB,\340A\002\372A&\022$storage.googleapis.com/ManagedFolder\022E\n" + + "\006parent\030\001 \001(\tB,\340A\002\372A&" + + "\022$storage.googleapis.com/ManagedFolder\022E\n" + "\016managed_folder\030\002" + " \001(\0132(.google.storage.control.v2.ManagedFolderB\003\340A\002\022\036\n" + "\021managed_folder_id\030\003 \001(\tB\003\340A\002\022\037\n\n" @@ -257,66 +352,272 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\032ListManagedFoldersResponse\022A\n" + "\017managed_folders\030\001" + " \003(\0132(.google.storage.control.v2.ManagedFolder\022\027\n" - + "\017next_page_token\030\002 \001(\t2\315\017\n" + + "\017next_page_token\030\002 \001(\t\"\260\002\n" + + "\033CreateAnywhereCacheMetadata\022V\n" + + "\017common_metadata\030\001 \001(\0132=." + + "google.storage.control.v2.CommonLongRunningOperationMetadata\022\036\n" + + "\021anywhere_cache_id\030\002 \001(\tH\000\210\001\001\022\021\n" + + "\004zone\030\006 \001(\tH\001\210\001\001\022+\n" + + "\003ttl\030\003 \001(\0132\031.google.protobuf.DurationH\002\210\001\001\022\035\n" + + "\020admission_policy\030\005 \001(\tH\003\210\001\001B\024\n" + + "\022_anywhere_cache_idB\007\n" + + "\005_zoneB\006\n" + + "\004_ttlB\023\n" + + "\021_admission_policy\"\260\002\n" + + "\033UpdateAnywhereCacheMetadata\022V\n" + + "\017common_metadata\030\001 \001(\0132=.google.storag" + + "e.control.v2.CommonLongRunningOperationMetadata\022\036\n" + + "\021anywhere_cache_id\030\002 \001(\tH\000\210\001\001\022\021\n" + + "\004zone\030\005 \001(\tH\001\210\001\001\022+\n" + + "\003ttl\030\003 \001(\0132\031.google.protobuf.DurationH\002\210\001\001\022\035\n" + + "\020admission_policy\030\004 \001(\tH\003\210\001\001B\024\n" + + "\022_anywhere_cache_idB\007\n" + + "\005_zoneB\006\n" + + "\004_ttlB\023\n" + + "\021_admission_policy\"\245\003\n\r" + + "AnywhereCache\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\005\022\021\n" + + "\004zone\030\n" + + " \001(\tB\003\340A\005\022&\n" + + "\003ttl\030\003 \001(\0132\031.google.protobuf.Duration\022\030\n" + + "\020admission_policy\030\t \001(\t\022\022\n" + + "\005state\030\005 \001(\tB\003\340A\003\0224\n" + + "\013create_time\030\006 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0224\n" + + "\013update_time\030\007" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\033\n" + + "\016pending_update\030\010 \001(\010B\003\340A\003:\216\001\352A\212\001\n" + + "$storage.googleapis.com/AnywhereCache\022Cprojects/{project}/buckets/{bucket}/anyw" + + "hereCaches/{anywhere_cache}*\016anywhereCaches2\r" + + "anywhereCache\"\302\001\n" + + "\032CreateAnywhereCacheRequest\022<\n" + + "\006parent\030\001 \001(" + + "\tB,\340A\002\372A&\022$storage.googleapis.com/AnywhereCache\022E\n" + + "\016anywhere_cache\030\003" + + " \001(\0132(.google.storage.control.v2.AnywhereCacheB\003\340A\002\022\037\n\n" + + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\272\001\n" + + "\032UpdateAnywhereCacheRequest\022E\n" + + "\016anywhere_cache\030\001" + + " \001(\0132(.google.storage.control.v2.AnywhereCacheB\003\340A\002\0224\n" + + "\013update_mask\030\002" + + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\022\037\n\n" + + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"z\n" + + "\033DisableAnywhereCacheRequest\022:\n" + + "\004name\030\001 \001(\tB,\340A\002\372A&\n" + + "$storage.googleapis.com/AnywhereCache\022\037\n\n" + + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"x\n" + + "\031PauseAnywhereCacheRequest\022:\n" + + "\004name\030\001 \001(\tB,\340A\002\372A&\n" + + "$storage.googleapis.com/AnywhereCache\022\037\n\n" + + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"y\n" + + "\032ResumeAnywhereCacheRequest\022:\n" + + "\004name\030\001 \001(\tB,\340A\002\372A&\n" + + "$storage.googleapis.com/AnywhereCache\022\037\n\n" + + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"v\n" + + "\027GetAnywhereCacheRequest\022:\n" + + "\004name\030\001 \001(\tB,\340A\002\372A&\n" + + "$storage.googleapis.com/AnywhereCache\022\037\n\n" + + "request_id\030\002 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\241\001\n" + + "\031ListAnywhereCachesRequest\022<\n" + + "\006parent\030\001 \001(" + + "\tB,\340A\002\372A&\022$storage.googleapis.com/AnywhereCache\022\021\n" + + "\tpage_size\030\002 \001(\005\022\022\n\n" + + "page_token\030\003 \001(\t\022\037\n\n" + + "request_id\030\004 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"x\n" + + "\032ListAnywhereCachesResponse\022A\n" + + "\017anywhere_caches\030\001" + + " \003(\0132(.google.storage.control.v2.AnywhereCache\022\027\n" + + "\017next_page_token\030\002 \001(\t\"\216\016\n" + + "\022IntelligenceConfig\022\021\n" + + "\004name\030\001 \001(\tB\003\340A\010\022X\n" + + "\016edition_config\030\002" + + " \001(\0162;.google.storage.control.v2.IntelligenceConfig.EditionConfigB\003\340A\001\0224\n" + + "\013update_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022I\n" + + "\006filter\030\004 \001(\01324.google.storage.c" + + "ontrol.v2.IntelligenceConfig.FilterB\003\340A\001\022u\n" + + "\035effective_intelligence_config\030\005 \001(\0132" + + "I.google.storage.control.v2.Intelligence" + + "Config.EffectiveIntelligenceConfigB\003\340A\003\022O\n" + + "\014trial_config\030\007 \001(\01329.google.storage.c" + + "ontrol.v2.IntelligenceConfig.TrialConfig\032\374\004\n" + + "\006Filter\022v\n" + + " included_cloud_storage_locations\030\001 \001(\0132J.google.storage.control.v" + + "2.IntelligenceConfig.Filter.CloudStorageLocationsH\000\022v\n" + + " excluded_cloud_storage_locations\030\002 \001(\0132J.google.storage.control.v" + + "2.IntelligenceConfig.Filter.CloudStorageLocationsH\000\022r\n" + + "\036included_cloud_storage_buckets\030\003 \001(\0132H.google.storage.control.v2." + + "IntelligenceConfig.Filter.CloudStorageBucketsH\001\022r\n" + + "\036excluded_cloud_storage_buckets\030\004 \001(\0132H.google.storage.control.v2.Inte" + + "lligenceConfig.Filter.CloudStorageBucketsH\001\032/\n" + + "\025CloudStorageLocations\022\026\n" + + "\tlocations\030\001 \003(\tB\003\340A\001\0325\n" + + "\023CloudStorageBuckets\022\036\n" + + "\021bucket_id_regexes\030\001 \003(\tB\003\340A\001B\031\n" + + "\027cloud_storage_locationsB\027\n" + + "\025cloud_storage_buckets\032\212\002\n" + + "\033EffectiveIntelligenceConfig\022z\n" + + "\021effective_edition\030\001 \001(\0162Z.google.storage.cont" + + "rol.v2.IntelligenceConfig.EffectiveIntelligenceConfig.EffectiveEditionB\003\340A\003\022" + + " \n" + + "\023intelligence_config\030\002 \001(\tB\003\340A\003\"M\n" + + "\020EffectiveEdition\022!\n" + + "\035EFFECTIVE_EDITION_UNSPECIFIED\020\000\022\010\n" + + "\004NONE\020\001\022\014\n" + + "\010STANDARD\020\002\032C\n" + + "\013TrialConfig\0224\n" + + "\013expire_time\030\003 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\"c\n\r" + + "EditionConfig\022\036\n" + + "\032EDITION_CONFIG_UNSPECIFIED\020\000\022\013\n" + + "\007INHERIT\020\001\022\014\n" + + "\010DISABLED\020\002\022\014\n" + + "\010STANDARD\020\003\022\t\n" + + "\005TRIAL\020\005:\213\002\352A\207\002\n" + + ")storage.googleapis.com/IntelligenceConfig\0228folders/{folder}/locations/{lo" + + "cation}/intelligenceConfig\022;organizations/{org}/locations/{location}/intelligenc" + + "eConfig\022:projects/{project}/locations/{l" + + "ocation}/intelligenceConfig*\023intelligenceConfigs2\022intelligenceConfig\"\325\001\n" + + "+UpdateOrganizationIntelligenceConfigRequest\022O\n" + + "\023intelligence_config\030\001" + + " \001(\0132-.google.storage.control.v2.IntelligenceConfigB\003\340A\002\0224\n" + + "\013update_mask\030\002" + + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\022\037\n\n" + + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\317\001\n" + + "%UpdateFolderIntelligenceConfigRequest\022O\n" + + "\023intelligence_config\030\001 \001(\0132-.go" + + "ogle.storage.control.v2.IntelligenceConfigB\003\340A\002\0224\n" + + "\013update_mask\030\002" + + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\022\037\n\n" + + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"\320\001\n" + + "&UpdateProjectIntelligenceConfigRequest\022O\n" + + "\023intelligence_config\030\001" + + " \001(\0132-.google.storage.control.v2.IntelligenceConfigB\003\340A\002\0224\n" + + "\013update_mask\030\002" + + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\022\037\n\n" + + "request_id\030\003 \001(\tB\013\340A\001\342\214\317\327\010\002\010\001\"k\n" + + "(GetOrganizationIntelligenceConfigRequest\022?\n" + + "\004name\030\001 \001(\tB1\340A\002\372A+\n" + + ")storage.googleapis.com/IntelligenceConfig\"e\n" + + "\"GetFolderIntelligenceConfigRequest\022?\n" + + "\004name\030\001 \001(\tB1\340A\002\372A+\n" + + ")storage.googleapis.com/IntelligenceConfig\"f\n" + + "#GetProjectIntelligenceConfigRequest\022?\n" + + "\004name\030\001 \001(\tB1\340A\002\372A+\n" + + ")storage.googleapis.com/IntelligenceConfig2\202&\n" + "\016StorageControl\022\232\001\n" - + "\014CreateFolder\022..google.storage.control.v2.Cr" - + "eateFolderRequest\032!.google.storage.contr" - + "ol.v2.Folder\"7\332A\027parent,folder,folder_id\212\323\344\223\002\027\022\025\n" + + "\014CreateFolder\022..google.storage.control.v2.CreateFolderRequest\032!.google.stora" + + "ge.control.v2.Folder\"7\332A\027parent,folder,folder_id\212\323\344\223\002\027\022\025\n" + "\006parent\022\013{bucket=**}\022\217\001\n" - + "\014DeleteFolder\022..google.storage.control.v2.Delet" - + "eFolderRequest\032\026.google.protobuf.Empty\"7\332A\004name\212\323\344\223\002*\022(\n" + + "\014DeleteFolder\022..google.storage.control." + + "v2.DeleteFolderRequest\032\026.google.protobuf.Empty\"7\332A\004name\212\323\344\223\002*\022(\n" + "\004name\022 {bucket=projects/*/buckets/*}/**\022\224\001\n" - + "\tGetFolder\022+.google.storage.control.v2.GetFolderRequest\032!.goo" - + "gle.storage.control.v2.Folder\"7\332A\004name\212\323\344\223\002*\022(\n" + + "\tGetFolder\022+.google.storage.control.v2.GetFolderReque" + + "st\032!.google.storage.control.v2.Folder\"7\332A\004name\212\323\344\223\002*\022(\n" + "\004name\022 {bucket=projects/*/buckets/*}/**\022\224\001\n" - + "\013ListFolders\022-.google.storage.control.v2.ListFoldersRequest\032..google.s" - + "torage.control.v2.ListFoldersResponse\"&\332A\006parent\212\323\344\223\002\027\022\025\n" + + "\013ListFolders\022-.google.storage.control.v2.ListFoldersRequest\032.." + + "google.storage.control.v2.ListFoldersResponse\"&\332A\006parent\212\323\344\223\002\027\022\025\n" + "\006parent\022\013{bucket=**}\022\315\001\n" - + "\014RenameFolder\022..google.storage.control." - + "v2.RenameFolderRequest\032\035.google.longrunning.Operation\"n\312A\036\n" - + "\006Folder\022\024RenameFolder" - + "Metadata\332A\032name,destination_folder_id\212\323\344\223\002*\022(\n" + + "\014RenameFolder\022..google.storage." + + "control.v2.RenameFolderRequest\032\035.google.longrunning.Operation\"n\312A\036\n" + + "\006Folder\022\024Rena" + + "meFolderMetadata\332A\032name,destination_folder_id\212\323\344\223\002*\022(\n" + "\004name\022 {bucket=projects/*/buckets/*}/**\022\251\001\n" - + "\020GetStorageLayout\0222.google.storage.control.v2.GetStorageLayoutRequest\032(" - + ".google.storage.control.v2.StorageLayout\"7\332A\004name\212\323\344\223\002*\022(\n" + + "\020GetStorageLayout\0222.google.storage.control.v2.GetStorageLayoutR" + + "equest\032(.google.storage.control.v2.StorageLayout\"7\332A\004name\212\323\344\223\002*\022(\n" + "\004name\022 {bucket=projects/*/buckets/*}/**\022\277\001\n" - + "\023CreateManagedFolder\0225.google.storage.control.v2.CreateMana" - + "gedFolderRequest\032(.google.storage.contro" - + "l.v2.ManagedFolder\"G\332A\'parent,managed_folder,managed_folder_id\212\323\344\223\002\027\022\025\n" + + "\023CreateManagedFolder\0225.google.storage.control.v2.Cr" + + "eateManagedFolderRequest\032(.google.storag" + + "e.control.v2.ManagedFolder\"G\332A\'parent,managed_folder,managed_folder_id\212\323\344\223\002\027\022\025\n" + "\006parent\022\013{bucket=**}\022\235\001\n" - + "\023DeleteManagedFolder\0225.google.storage.control.v2.DeleteManagedFol" - + "derRequest\032\026.google.protobuf.Empty\"7\332A\004name\212\323\344\223\002*\022(\n" + + "\023DeleteManagedFolder\0225.google.storage.control.v2.DeleteMa" + + "nagedFolderRequest\032\026.google.protobuf.Empty\"7\332A\004name\212\323\344\223\002*\022(\n" + + "\004name\022 {bucket=projects/*/buckets/*}/**\022\251\001\n" + + "\020GetManagedFolder\0222.google.storage.control.v2.GetManagedF" + + "olderRequest\032(.google.storage.control.v2.ManagedFolder\"7\332A\004name\212\323\344\223\002*\022(\n" + "\004name\022 {bucket=projects/*/buckets/*}/**\022\251\001\n" - + "\020GetManagedFolder\0222.google.storage.control.v2.GetManagedFolderReq" - + "uest\032(.google.storage.control.v2.ManagedFolder\"7\332A\004name\212\323\344\223\002*\022(\n" + + "\022ListManagedFolders\0224.google.storage.control." + + "v2.ListManagedFoldersRequest\0325.google.st" + + "orage.control.v2.ListManagedFoldersResponse\"&\332A\006parent\212\323\344\223\002\027\022\025\n" + + "\006parent\022\013{bucket=**}\022\321\001\n" + + "\023CreateAnywhereCache\0225.google.sto" + + "rage.control.v2.CreateAnywhereCacheRequest\032\035.google.longrunning.Operation\"d\312A,\n\r" + + "AnywhereCache\022\033CreateAnywhereCacheMetadata\332A\025parent,anywhere_cache\212\323\344\223\002\027\022\025\n" + + "\006parent\022\013{bucket=**}\022\371\001\n" + + "\023UpdateAnywhereCache\0225.google.storage.control.v2.UpdateAnywhe" + + "reCacheRequest\032\035.google.longrunning.Operation\"\213\001\312A,\n\r" + + "AnywhereCache\022\033UpdateAnywhe" + + "reCacheMetadata\332A\032anywhere_cache,update_mask\212\323\344\223\0029\0227\n" + + "\023anywhere_cache.name\022 {bucket=projects/*/buckets/*}/**\022\261\001\n" + + "\024DisableAnywhereCache\0226.google.storage.control.v2" + + ".DisableAnywhereCacheRequest\032(.google.st" + + "orage.control.v2.AnywhereCache\"7\332A\004name\212\323\344\223\002*\022(\n" + + "\004name\022 {bucket=projects/*/buckets/*}/**\022\255\001\n" + + "\022PauseAnywhereCache\0224.google.storage.control.v2.PauseAnywhereCacheReq" + + "uest\032(.google.storage.control.v2.AnywhereCache\"7\332A\004name\212\323\344\223\002*\022(\n" + + "\004name\022 {bucket=projects/*/buckets/*}/**\022\257\001\n" + + "\023ResumeAnywhereCache\0225.google.storage.control.v2.Resu" + + "meAnywhereCacheRequest\032(.google.storage." + + "control.v2.AnywhereCache\"7\332A\004name\212\323\344\223\002*\022(\n" + "\004name\022 {bucket=projects/*/buckets/*}/**\022\251\001\n" - + "\022ListManagedFolders\0224.google.storage.control.v2.ListM" - + "anagedFoldersRequest\0325.google.storage.co" - + "ntrol.v2.ListManagedFoldersResponse\"&\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.g" - + "oogleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform" - + ".read-only,https://www.googleapis.com/auth/devstorage.full_control,https://www.g" - + "oogleapis.com/auth/devstorage.read_only," - + "https://www.googleapis.com/auth/devstorage.read_writeB\246\002\n" - + "\035com.google.storage.control.v2B\023StorageControlProtoP\001Z=cloud.go" - + "ogle.com/go/storage/control/apiv2/contro" - + "lpb;controlpb\252\002\037Google.Cloud.Storage.Con" - + "trol.V2\312\002\037Google\\Cloud\\Storage\\Control\\V" - + "2\352\002#Google::Cloud::Storage::Control::V2\352AD\n" + + "\020GetAnywhereCache\0222.google.storage.control.v2.GetAnywhereCacheRequest\032(.goo" + + "gle.storage.control.v2.AnywhereCache\"7\332A\004name\212\323\344\223\002*\022(\n" + + "\004name\022 {bucket=projects/*/buckets/*}/**\022\251\001\n" + + "\022ListAnywhereCaches\0224.google.storage.control.v2.ListAnywhereCac" + + "hesRequest\0325.google.storage.control.v2.L" + + "istAnywhereCachesResponse\"&\332A\006parent\212\323\344\223\002\027\022\025\n" + + "\006parent\022\013{bucket=**}\022\322\001\n" + + "\034GetProjectIntelligenceConfig\022>.google.storage.cont" + + "rol.v2.GetProjectIntelligenceConfigRequest\032-.google.storage.control.v2.Intellige" + + "nceConfig\"C\332A\004name\202\323\344\223\0026\0224/v2/{name=proj" + + "ects/*/locations/*/intelligenceConfig}\022\235\002\n" + + "\037UpdateProjectIntelligenceConfig\022A.google.storage.control.v2.UpdateProjectInte" + + "lligenceConfigRequest\032-.google.storage.c" + + "ontrol.v2.IntelligenceConfig\"\207\001\332A\037intell" + + "igence_config,update_mask\202\323\344\223\002_2H/v2/{in" + + "telligence_config.name=projects/*/locati" + + "ons/*/intelligenceConfig}:\023intelligence_config\022\317\001\n" + + "\033GetFolderIntelligenceConfig\022=.google.storage.control.v2.GetFolderInte" + + "lligenceConfigRequest\032-.google.storage.c" + + "ontrol.v2.IntelligenceConfig\"B\332A\004name\202\323\344" + + "\223\0025\0223/v2/{name=folders/*/locations/*/intelligenceConfig}\022\232\002\n" + + "\036UpdateFolderIntelligenceConfig\022@.google.storage.control.v2." + + "UpdateFolderIntelligenceConfigRequest\032-.google.storage.control.v2.IntelligenceCo" + + "nfig\"\206\001\332A\037intelligence_config,update_mas" + + "k\202\323\344\223\002^2G/v2/{intelligence_config.name=f" + + "olders/*/locations/*/intelligenceConfig}:\023intelligence_config\022\341\001\n" + + "!GetOrganizationIntelligenceConfig\022C.google.storage.con" + + "trol.v2.GetOrganizationIntelligenceConfigRequest\032-.google.storage.control.v2.Int" + + "elligenceConfig\"H\332A\004name\202\323\344\223\002;\0229/v2/{nam" + + "e=organizations/*/locations/*/intelligenceConfig}\022\254\002\n" + + "$UpdateOrganizationIntelligenceConfig\022F.google.storage.control.v2.U" + + "pdateOrganizationIntelligenceConfigRequest\032-.google.storage.control.v2.Intellige" + + "nceConfig\"\214\001\332A\037intelligence_config,updat" + + "e_mask\202\323\344\223\002d2M/v2/{intelligence_config.n" + + "ame=organizations/*/locations/*/intellig" + + "enceConfig}:\023intelligence_config\032\247\002\312A\026st" + + "orage.googleapis.com\322A\212\002https://www.goog" + + "leapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.re" + + "ad-only,https://www.googleapis.com/auth/devstorage.full_control,https://www.goog" + + "leapis.com/auth/devstorage.read_only,htt" + + "ps://www.googleapis.com/auth/devstorage.read_writeB\246\002\n" + + "\035com.google.storage.control.v2B\023StorageControlProtoP\001Z=cloud.googl" + + "e.com/go/storage/control/apiv2/controlpb" + + ";controlpb\252\002\037Google.Cloud.Storage.Contro" + + "l.V2\312\002\037Google\\Cloud\\Storage\\Control\\V2\352\002#Google::Cloud::Storage::Control::V2\352AD\n" + "\035storage.googleapis.com/Bucket\022#projects/{project}/buckets/{bucket}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.FieldInfoProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.api.RoutingProto.getDescriptor(), com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), }); internal_static_google_storage_control_v2_PendingRenameInfo_descriptor = @@ -499,11 +800,223 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "ManagedFolders", "NextPageToken", }); + internal_static_google_storage_control_v2_CreateAnywhereCacheMetadata_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_storage_control_v2_CreateAnywhereCacheMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storage_control_v2_CreateAnywhereCacheMetadata_descriptor, + new java.lang.String[] { + "CommonMetadata", "AnywhereCacheId", "Zone", "Ttl", "AdmissionPolicy", + }); + internal_static_google_storage_control_v2_UpdateAnywhereCacheMetadata_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_storage_control_v2_UpdateAnywhereCacheMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storage_control_v2_UpdateAnywhereCacheMetadata_descriptor, + new java.lang.String[] { + "CommonMetadata", "AnywhereCacheId", "Zone", "Ttl", "AdmissionPolicy", + }); + internal_static_google_storage_control_v2_AnywhereCache_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_storage_control_v2_AnywhereCache_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storage_control_v2_AnywhereCache_descriptor, + new java.lang.String[] { + "Name", + "Zone", + "Ttl", + "AdmissionPolicy", + "State", + "CreateTime", + "UpdateTime", + "PendingUpdate", + }); + internal_static_google_storage_control_v2_CreateAnywhereCacheRequest_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_storage_control_v2_CreateAnywhereCacheRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storage_control_v2_CreateAnywhereCacheRequest_descriptor, + new java.lang.String[] { + "Parent", "AnywhereCache", "RequestId", + }); + internal_static_google_storage_control_v2_UpdateAnywhereCacheRequest_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_storage_control_v2_UpdateAnywhereCacheRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storage_control_v2_UpdateAnywhereCacheRequest_descriptor, + new java.lang.String[] { + "AnywhereCache", "UpdateMask", "RequestId", + }); + internal_static_google_storage_control_v2_DisableAnywhereCacheRequest_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_storage_control_v2_DisableAnywhereCacheRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storage_control_v2_DisableAnywhereCacheRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_storage_control_v2_PauseAnywhereCacheRequest_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_storage_control_v2_PauseAnywhereCacheRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storage_control_v2_PauseAnywhereCacheRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_storage_control_v2_ResumeAnywhereCacheRequest_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_storage_control_v2_ResumeAnywhereCacheRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storage_control_v2_ResumeAnywhereCacheRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_storage_control_v2_GetAnywhereCacheRequest_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_storage_control_v2_GetAnywhereCacheRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storage_control_v2_GetAnywhereCacheRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_storage_control_v2_ListAnywhereCachesRequest_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_storage_control_v2_ListAnywhereCachesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storage_control_v2_ListAnywhereCachesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "RequestId", + }); + internal_static_google_storage_control_v2_ListAnywhereCachesResponse_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_google_storage_control_v2_ListAnywhereCachesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storage_control_v2_ListAnywhereCachesResponse_descriptor, + new java.lang.String[] { + "AnywhereCaches", "NextPageToken", + }); + internal_static_google_storage_control_v2_IntelligenceConfig_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_google_storage_control_v2_IntelligenceConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storage_control_v2_IntelligenceConfig_descriptor, + new java.lang.String[] { + "Name", + "EditionConfig", + "UpdateTime", + "Filter", + "EffectiveIntelligenceConfig", + "TrialConfig", + }); + internal_static_google_storage_control_v2_IntelligenceConfig_Filter_descriptor = + internal_static_google_storage_control_v2_IntelligenceConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_storage_control_v2_IntelligenceConfig_Filter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storage_control_v2_IntelligenceConfig_Filter_descriptor, + new java.lang.String[] { + "IncludedCloudStorageLocations", + "ExcludedCloudStorageLocations", + "IncludedCloudStorageBuckets", + "ExcludedCloudStorageBuckets", + "CloudStorageLocations", + "CloudStorageBuckets", + }); + internal_static_google_storage_control_v2_IntelligenceConfig_Filter_CloudStorageLocations_descriptor = + internal_static_google_storage_control_v2_IntelligenceConfig_Filter_descriptor + .getNestedTypes() + .get(0); + internal_static_google_storage_control_v2_IntelligenceConfig_Filter_CloudStorageLocations_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storage_control_v2_IntelligenceConfig_Filter_CloudStorageLocations_descriptor, + new java.lang.String[] { + "Locations", + }); + internal_static_google_storage_control_v2_IntelligenceConfig_Filter_CloudStorageBuckets_descriptor = + internal_static_google_storage_control_v2_IntelligenceConfig_Filter_descriptor + .getNestedTypes() + .get(1); + internal_static_google_storage_control_v2_IntelligenceConfig_Filter_CloudStorageBuckets_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storage_control_v2_IntelligenceConfig_Filter_CloudStorageBuckets_descriptor, + new java.lang.String[] { + "BucketIdRegexes", + }); + internal_static_google_storage_control_v2_IntelligenceConfig_EffectiveIntelligenceConfig_descriptor = + internal_static_google_storage_control_v2_IntelligenceConfig_descriptor + .getNestedTypes() + .get(1); + internal_static_google_storage_control_v2_IntelligenceConfig_EffectiveIntelligenceConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storage_control_v2_IntelligenceConfig_EffectiveIntelligenceConfig_descriptor, + new java.lang.String[] { + "EffectiveEdition", "IntelligenceConfig", + }); + internal_static_google_storage_control_v2_IntelligenceConfig_TrialConfig_descriptor = + internal_static_google_storage_control_v2_IntelligenceConfig_descriptor + .getNestedTypes() + .get(2); + internal_static_google_storage_control_v2_IntelligenceConfig_TrialConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storage_control_v2_IntelligenceConfig_TrialConfig_descriptor, + new java.lang.String[] { + "ExpireTime", + }); + internal_static_google_storage_control_v2_UpdateOrganizationIntelligenceConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_google_storage_control_v2_UpdateOrganizationIntelligenceConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storage_control_v2_UpdateOrganizationIntelligenceConfigRequest_descriptor, + new java.lang.String[] { + "IntelligenceConfig", "UpdateMask", "RequestId", + }); + internal_static_google_storage_control_v2_UpdateFolderIntelligenceConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_google_storage_control_v2_UpdateFolderIntelligenceConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storage_control_v2_UpdateFolderIntelligenceConfigRequest_descriptor, + new java.lang.String[] { + "IntelligenceConfig", "UpdateMask", "RequestId", + }); + internal_static_google_storage_control_v2_UpdateProjectIntelligenceConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_google_storage_control_v2_UpdateProjectIntelligenceConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storage_control_v2_UpdateProjectIntelligenceConfigRequest_descriptor, + new java.lang.String[] { + "IntelligenceConfig", "UpdateMask", "RequestId", + }); + internal_static_google_storage_control_v2_GetOrganizationIntelligenceConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(33); + internal_static_google_storage_control_v2_GetOrganizationIntelligenceConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storage_control_v2_GetOrganizationIntelligenceConfigRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_storage_control_v2_GetFolderIntelligenceConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(34); + internal_static_google_storage_control_v2_GetFolderIntelligenceConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storage_control_v2_GetFolderIntelligenceConfigRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_storage_control_v2_GetProjectIntelligenceConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(35); + internal_static_google_storage_control_v2_GetProjectIntelligenceConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storage_control_v2_GetProjectIntelligenceConfigRequest_descriptor, + new java.lang.String[] { + "Name", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); registry.add(com.google.api.FieldInfoProto.fieldInfo); + registry.add(com.google.api.AnnotationsProto.http); registry.add(com.google.api.ClientProto.methodSignature); registry.add(com.google.api.ClientProto.oauthScopes); registry.add(com.google.api.ResourceProto.resource); @@ -513,13 +1026,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.longrunning.OperationsProto.operationInfo); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.FieldInfoProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.api.RoutingProto.getDescriptor(); com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); } diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/StorageLayout.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/StorageLayout.java index 7ce156ee52..7c7b0a3f6f 100644 --- a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/StorageLayout.java +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/StorageLayout.java @@ -132,7 +132,7 @@ public interface CustomPlacementConfigOrBuilder *
    * Configuration for Custom Dual Regions.  It should specify precisely two
    * eligible regions within the same Multiregion. More information on regions
-   * may be found [https://cloud.google.com/storage/docs/locations][here].
+   * may be found [here](https://cloud.google.com/storage/docs/locations).
    * 
* * Protobuf type {@code google.storage.control.v2.StorageLayout.CustomPlacementConfig} @@ -417,7 +417,7 @@ protected Builder newBuilderForType( *
      * Configuration for Custom Dual Regions.  It should specify precisely two
      * eligible regions within the same Multiregion. More information on regions
-     * may be found [https://cloud.google.com/storage/docs/locations][here].
+     * may be found [here](https://cloud.google.com/storage/docs/locations).
      * 
* * Protobuf type {@code google.storage.control.v2.StorageLayout.CustomPlacementConfig} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateAnywhereCacheMetadata.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateAnywhereCacheMetadata.java new file mode 100644 index 0000000000..f52a97b3f3 --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateAnywhereCacheMetadata.java @@ -0,0 +1,1757 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +/** + * + * + *
+ * Message returned in the metadata field of the Operation resource for
+ * UpdateAnywhereCache operation.
+ * 
+ * + * Protobuf type {@code google.storage.control.v2.UpdateAnywhereCacheMetadata} + */ +public final class UpdateAnywhereCacheMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storage.control.v2.UpdateAnywhereCacheMetadata) + UpdateAnywhereCacheMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + // Use UpdateAnywhereCacheMetadata.newBuilder() to construct. + private UpdateAnywhereCacheMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateAnywhereCacheMetadata() { + anywhereCacheId_ = ""; + zone_ = ""; + admissionPolicy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateAnywhereCacheMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_UpdateAnywhereCacheMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_UpdateAnywhereCacheMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.UpdateAnywhereCacheMetadata.class, + com.google.storage.control.v2.UpdateAnywhereCacheMetadata.Builder.class); + } + + private int bitField0_; + public static final int COMMON_METADATA_FIELD_NUMBER = 1; + private com.google.storage.control.v2.CommonLongRunningOperationMetadata commonMetadata_; + + /** + * + * + *
+   * Generic metadata for the long running operation.
+   * 
+ * + * .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * + * @return Whether the commonMetadata field is set. + */ + @java.lang.Override + public boolean hasCommonMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Generic metadata for the long running operation.
+   * 
+ * + * .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * + * @return The commonMetadata. + */ + @java.lang.Override + public com.google.storage.control.v2.CommonLongRunningOperationMetadata getCommonMetadata() { + return commonMetadata_ == null + ? com.google.storage.control.v2.CommonLongRunningOperationMetadata.getDefaultInstance() + : commonMetadata_; + } + + /** + * + * + *
+   * Generic metadata for the long running operation.
+   * 
+ * + * .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + */ + @java.lang.Override + public com.google.storage.control.v2.CommonLongRunningOperationMetadataOrBuilder + getCommonMetadataOrBuilder() { + return commonMetadata_ == null + ? com.google.storage.control.v2.CommonLongRunningOperationMetadata.getDefaultInstance() + : commonMetadata_; + } + + public static final int ANYWHERE_CACHE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object anywhereCacheId_ = ""; + + /** + * + * + *
+   * Anywhere Cache ID.
+   * 
+ * + * optional string anywhere_cache_id = 2; + * + * @return Whether the anywhereCacheId field is set. + */ + @java.lang.Override + public boolean hasAnywhereCacheId() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Anywhere Cache ID.
+   * 
+ * + * optional string anywhere_cache_id = 2; + * + * @return The anywhereCacheId. + */ + @java.lang.Override + public java.lang.String getAnywhereCacheId() { + java.lang.Object ref = anywhereCacheId_; + 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(); + anywhereCacheId_ = s; + return s; + } + } + + /** + * + * + *
+   * Anywhere Cache ID.
+   * 
+ * + * optional string anywhere_cache_id = 2; + * + * @return The bytes for anywhereCacheId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAnywhereCacheIdBytes() { + java.lang.Object ref = anywhereCacheId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + anywhereCacheId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ZONE_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object zone_ = ""; + + /** + * + * + *
+   * The zone in which the cache instance is running. For example,
+   * us-central1-a.
+   * 
+ * + * optional string zone = 5; + * + * @return Whether the zone field is set. + */ + @java.lang.Override + public boolean hasZone() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+   * The zone in which the cache instance is running. For example,
+   * us-central1-a.
+   * 
+ * + * optional string zone = 5; + * + * @return The zone. + */ + @java.lang.Override + public java.lang.String getZone() { + java.lang.Object ref = zone_; + 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(); + zone_ = s; + return s; + } + } + + /** + * + * + *
+   * The zone in which the cache instance is running. For example,
+   * us-central1-a.
+   * 
+ * + * optional string zone = 5; + * + * @return The bytes for zone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TTL_FIELD_NUMBER = 3; + private com.google.protobuf.Duration ttl_; + + /** + * + * + *
+   * Anywhere Cache entry's TTL between 1h and 7days. A cache-level config that
+   * is applied to all new cache entries on admission. If `ttl` is pending
+   * update, this field equals to the new value specified in the Update request.
+   * 
+ * + * optional .google.protobuf.Duration ttl = 3; + * + * @return Whether the ttl field is set. + */ + @java.lang.Override + public boolean hasTtl() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+   * Anywhere Cache entry's TTL between 1h and 7days. A cache-level config that
+   * is applied to all new cache entries on admission. If `ttl` is pending
+   * update, this field equals to the new value specified in the Update request.
+   * 
+ * + * optional .google.protobuf.Duration ttl = 3; + * + * @return The ttl. + */ + @java.lang.Override + public com.google.protobuf.Duration getTtl() { + return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_; + } + + /** + * + * + *
+   * Anywhere Cache entry's TTL between 1h and 7days. A cache-level config that
+   * is applied to all new cache entries on admission. If `ttl` is pending
+   * update, this field equals to the new value specified in the Update request.
+   * 
+ * + * optional .google.protobuf.Duration ttl = 3; + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() { + return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_; + } + + public static final int ADMISSION_POLICY_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object admissionPolicy_ = ""; + + /** + * + * + *
+   * L4 Cache entry Admission Policy in kebab-case (e.g.,
+   * "admit-on-first-miss"). If `admission_policy` is pending
+   * update, this field equals to the new value specified in the Update request.
+   * 
+ * + * optional string admission_policy = 4; + * + * @return Whether the admissionPolicy field is set. + */ + @java.lang.Override + public boolean hasAdmissionPolicy() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+   * L4 Cache entry Admission Policy in kebab-case (e.g.,
+   * "admit-on-first-miss"). If `admission_policy` is pending
+   * update, this field equals to the new value specified in the Update request.
+   * 
+ * + * optional string admission_policy = 4; + * + * @return The admissionPolicy. + */ + @java.lang.Override + public java.lang.String getAdmissionPolicy() { + java.lang.Object ref = admissionPolicy_; + 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(); + admissionPolicy_ = s; + return s; + } + } + + /** + * + * + *
+   * L4 Cache entry Admission Policy in kebab-case (e.g.,
+   * "admit-on-first-miss"). If `admission_policy` is pending
+   * update, this field equals to the new value specified in the Update request.
+   * 
+ * + * optional string admission_policy = 4; + * + * @return The bytes for admissionPolicy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAdmissionPolicyBytes() { + java.lang.Object ref = admissionPolicy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + admissionPolicy_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getCommonMetadata()); + } + if (((bitField0_ & 0x00000002) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, anywhereCacheId_); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(3, getTtl()); + } + if (((bitField0_ & 0x00000010) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, admissionPolicy_); + } + if (((bitField0_ & 0x00000004) != 0)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, zone_); + } + 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, getCommonMetadata()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, anywhereCacheId_); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTtl()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, admissionPolicy_); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, zone_); + } + 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.control.v2.UpdateAnywhereCacheMetadata)) { + return super.equals(obj); + } + com.google.storage.control.v2.UpdateAnywhereCacheMetadata other = + (com.google.storage.control.v2.UpdateAnywhereCacheMetadata) obj; + + if (hasCommonMetadata() != other.hasCommonMetadata()) return false; + if (hasCommonMetadata()) { + if (!getCommonMetadata().equals(other.getCommonMetadata())) return false; + } + if (hasAnywhereCacheId() != other.hasAnywhereCacheId()) return false; + if (hasAnywhereCacheId()) { + if (!getAnywhereCacheId().equals(other.getAnywhereCacheId())) return false; + } + if (hasZone() != other.hasZone()) return false; + if (hasZone()) { + if (!getZone().equals(other.getZone())) return false; + } + if (hasTtl() != other.hasTtl()) return false; + if (hasTtl()) { + if (!getTtl().equals(other.getTtl())) return false; + } + if (hasAdmissionPolicy() != other.hasAdmissionPolicy()) return false; + if (hasAdmissionPolicy()) { + if (!getAdmissionPolicy().equals(other.getAdmissionPolicy())) 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 (hasCommonMetadata()) { + hash = (37 * hash) + COMMON_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getCommonMetadata().hashCode(); + } + if (hasAnywhereCacheId()) { + hash = (37 * hash) + ANYWHERE_CACHE_ID_FIELD_NUMBER; + hash = (53 * hash) + getAnywhereCacheId().hashCode(); + } + if (hasZone()) { + hash = (37 * hash) + ZONE_FIELD_NUMBER; + hash = (53 * hash) + getZone().hashCode(); + } + if (hasTtl()) { + hash = (37 * hash) + TTL_FIELD_NUMBER; + hash = (53 * hash) + getTtl().hashCode(); + } + if (hasAdmissionPolicy()) { + hash = (37 * hash) + ADMISSION_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getAdmissionPolicy().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storage.control.v2.UpdateAnywhereCacheMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.UpdateAnywhereCacheMetadata 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.control.v2.UpdateAnywhereCacheMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.UpdateAnywhereCacheMetadata 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.control.v2.UpdateAnywhereCacheMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.UpdateAnywhereCacheMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storage.control.v2.UpdateAnywhereCacheMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.UpdateAnywhereCacheMetadata 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.control.v2.UpdateAnywhereCacheMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.UpdateAnywhereCacheMetadata 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.control.v2.UpdateAnywhereCacheMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.UpdateAnywhereCacheMetadata 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.control.v2.UpdateAnywhereCacheMetadata 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; + } + + /** + * + * + *
+   * Message returned in the metadata field of the Operation resource for
+   * UpdateAnywhereCache operation.
+   * 
+ * + * Protobuf type {@code google.storage.control.v2.UpdateAnywhereCacheMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storage.control.v2.UpdateAnywhereCacheMetadata) + com.google.storage.control.v2.UpdateAnywhereCacheMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_UpdateAnywhereCacheMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_UpdateAnywhereCacheMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.UpdateAnywhereCacheMetadata.class, + com.google.storage.control.v2.UpdateAnywhereCacheMetadata.Builder.class); + } + + // Construct using com.google.storage.control.v2.UpdateAnywhereCacheMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCommonMetadataFieldBuilder(); + getTtlFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + commonMetadata_ = null; + if (commonMetadataBuilder_ != null) { + commonMetadataBuilder_.dispose(); + commonMetadataBuilder_ = null; + } + anywhereCacheId_ = ""; + zone_ = ""; + ttl_ = null; + if (ttlBuilder_ != null) { + ttlBuilder_.dispose(); + ttlBuilder_ = null; + } + admissionPolicy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_UpdateAnywhereCacheMetadata_descriptor; + } + + @java.lang.Override + public com.google.storage.control.v2.UpdateAnywhereCacheMetadata getDefaultInstanceForType() { + return com.google.storage.control.v2.UpdateAnywhereCacheMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.storage.control.v2.UpdateAnywhereCacheMetadata build() { + com.google.storage.control.v2.UpdateAnywhereCacheMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storage.control.v2.UpdateAnywhereCacheMetadata buildPartial() { + com.google.storage.control.v2.UpdateAnywhereCacheMetadata result = + new com.google.storage.control.v2.UpdateAnywhereCacheMetadata(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.storage.control.v2.UpdateAnywhereCacheMetadata result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.commonMetadata_ = + commonMetadataBuilder_ == null ? commonMetadata_ : commonMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.anywhereCacheId_ = anywhereCacheId_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.zone_ = zone_; + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.ttl_ = ttlBuilder_ == null ? ttl_ : ttlBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.admissionPolicy_ = admissionPolicy_; + to_bitField0_ |= 0x00000010; + } + 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.control.v2.UpdateAnywhereCacheMetadata) { + return mergeFrom((com.google.storage.control.v2.UpdateAnywhereCacheMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.storage.control.v2.UpdateAnywhereCacheMetadata other) { + if (other == com.google.storage.control.v2.UpdateAnywhereCacheMetadata.getDefaultInstance()) + return this; + if (other.hasCommonMetadata()) { + mergeCommonMetadata(other.getCommonMetadata()); + } + if (other.hasAnywhereCacheId()) { + anywhereCacheId_ = other.anywhereCacheId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasZone()) { + zone_ = other.zone_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasTtl()) { + mergeTtl(other.getTtl()); + } + if (other.hasAdmissionPolicy()) { + admissionPolicy_ = other.admissionPolicy_; + bitField0_ |= 0x00000010; + 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: + { + input.readMessage(getCommonMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + anywhereCacheId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getTtlFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: + { + admissionPolicy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 42: + { + zone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 42 + 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.control.v2.CommonLongRunningOperationMetadata commonMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.CommonLongRunningOperationMetadata, + com.google.storage.control.v2.CommonLongRunningOperationMetadata.Builder, + com.google.storage.control.v2.CommonLongRunningOperationMetadataOrBuilder> + commonMetadataBuilder_; + + /** + * + * + *
+     * Generic metadata for the long running operation.
+     * 
+ * + * .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * + * + * @return Whether the commonMetadata field is set. + */ + public boolean hasCommonMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Generic metadata for the long running operation.
+     * 
+ * + * .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * + * + * @return The commonMetadata. + */ + public com.google.storage.control.v2.CommonLongRunningOperationMetadata getCommonMetadata() { + if (commonMetadataBuilder_ == null) { + return commonMetadata_ == null + ? com.google.storage.control.v2.CommonLongRunningOperationMetadata.getDefaultInstance() + : commonMetadata_; + } else { + return commonMetadataBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Generic metadata for the long running operation.
+     * 
+ * + * .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * + */ + public Builder setCommonMetadata( + com.google.storage.control.v2.CommonLongRunningOperationMetadata value) { + if (commonMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + commonMetadata_ = value; + } else { + commonMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Generic metadata for the long running operation.
+     * 
+ * + * .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * + */ + public Builder setCommonMetadata( + com.google.storage.control.v2.CommonLongRunningOperationMetadata.Builder builderForValue) { + if (commonMetadataBuilder_ == null) { + commonMetadata_ = builderForValue.build(); + } else { + commonMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Generic metadata for the long running operation.
+     * 
+ * + * .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * + */ + public Builder mergeCommonMetadata( + com.google.storage.control.v2.CommonLongRunningOperationMetadata value) { + if (commonMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && commonMetadata_ != null + && commonMetadata_ + != com.google.storage.control.v2.CommonLongRunningOperationMetadata + .getDefaultInstance()) { + getCommonMetadataBuilder().mergeFrom(value); + } else { + commonMetadata_ = value; + } + } else { + commonMetadataBuilder_.mergeFrom(value); + } + if (commonMetadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Generic metadata for the long running operation.
+     * 
+ * + * .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * + */ + public Builder clearCommonMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + commonMetadata_ = null; + if (commonMetadataBuilder_ != null) { + commonMetadataBuilder_.dispose(); + commonMetadataBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Generic metadata for the long running operation.
+     * 
+ * + * .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * + */ + public com.google.storage.control.v2.CommonLongRunningOperationMetadata.Builder + getCommonMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getCommonMetadataFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Generic metadata for the long running operation.
+     * 
+ * + * .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * + */ + public com.google.storage.control.v2.CommonLongRunningOperationMetadataOrBuilder + getCommonMetadataOrBuilder() { + if (commonMetadataBuilder_ != null) { + return commonMetadataBuilder_.getMessageOrBuilder(); + } else { + return commonMetadata_ == null + ? com.google.storage.control.v2.CommonLongRunningOperationMetadata.getDefaultInstance() + : commonMetadata_; + } + } + + /** + * + * + *
+     * Generic metadata for the long running operation.
+     * 
+ * + * .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.CommonLongRunningOperationMetadata, + com.google.storage.control.v2.CommonLongRunningOperationMetadata.Builder, + com.google.storage.control.v2.CommonLongRunningOperationMetadataOrBuilder> + getCommonMetadataFieldBuilder() { + if (commonMetadataBuilder_ == null) { + commonMetadataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.CommonLongRunningOperationMetadata, + com.google.storage.control.v2.CommonLongRunningOperationMetadata.Builder, + com.google.storage.control.v2.CommonLongRunningOperationMetadataOrBuilder>( + getCommonMetadata(), getParentForChildren(), isClean()); + commonMetadata_ = null; + } + return commonMetadataBuilder_; + } + + private java.lang.Object anywhereCacheId_ = ""; + + /** + * + * + *
+     * Anywhere Cache ID.
+     * 
+ * + * optional string anywhere_cache_id = 2; + * + * @return Whether the anywhereCacheId field is set. + */ + public boolean hasAnywhereCacheId() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Anywhere Cache ID.
+     * 
+ * + * optional string anywhere_cache_id = 2; + * + * @return The anywhereCacheId. + */ + public java.lang.String getAnywhereCacheId() { + java.lang.Object ref = anywhereCacheId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + anywhereCacheId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Anywhere Cache ID.
+     * 
+ * + * optional string anywhere_cache_id = 2; + * + * @return The bytes for anywhereCacheId. + */ + public com.google.protobuf.ByteString getAnywhereCacheIdBytes() { + java.lang.Object ref = anywhereCacheId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + anywhereCacheId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Anywhere Cache ID.
+     * 
+ * + * optional string anywhere_cache_id = 2; + * + * @param value The anywhereCacheId to set. + * @return This builder for chaining. + */ + public Builder setAnywhereCacheId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + anywhereCacheId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Anywhere Cache ID.
+     * 
+ * + * optional string anywhere_cache_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearAnywhereCacheId() { + anywhereCacheId_ = getDefaultInstance().getAnywhereCacheId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Anywhere Cache ID.
+     * 
+ * + * optional string anywhere_cache_id = 2; + * + * @param value The bytes for anywhereCacheId to set. + * @return This builder for chaining. + */ + public Builder setAnywhereCacheIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + anywhereCacheId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object zone_ = ""; + + /** + * + * + *
+     * The zone in which the cache instance is running. For example,
+     * us-central1-a.
+     * 
+ * + * optional string zone = 5; + * + * @return Whether the zone field is set. + */ + public boolean hasZone() { + return ((bitField0_ & 0x00000004) != 0); + } + + /** + * + * + *
+     * The zone in which the cache instance is running. For example,
+     * us-central1-a.
+     * 
+ * + * optional string zone = 5; + * + * @return The zone. + */ + public java.lang.String getZone() { + java.lang.Object ref = zone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + zone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * The zone in which the cache instance is running. For example,
+     * us-central1-a.
+     * 
+ * + * optional string zone = 5; + * + * @return The bytes for zone. + */ + public com.google.protobuf.ByteString getZoneBytes() { + java.lang.Object ref = zone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + zone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * The zone in which the cache instance is running. For example,
+     * us-central1-a.
+     * 
+ * + * optional string zone = 5; + * + * @param value The zone to set. + * @return This builder for chaining. + */ + public Builder setZone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + zone_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * The zone in which the cache instance is running. For example,
+     * us-central1-a.
+     * 
+ * + * optional string zone = 5; + * + * @return This builder for chaining. + */ + public Builder clearZone() { + zone_ = getDefaultInstance().getZone(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * The zone in which the cache instance is running. For example,
+     * us-central1-a.
+     * 
+ * + * optional string zone = 5; + * + * @param value The bytes for zone to set. + * @return This builder for chaining. + */ + public Builder setZoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + zone_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.protobuf.Duration ttl_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + ttlBuilder_; + + /** + * + * + *
+     * Anywhere Cache entry's TTL between 1h and 7days. A cache-level config that
+     * is applied to all new cache entries on admission. If `ttl` is pending
+     * update, this field equals to the new value specified in the Update request.
+     * 
+ * + * optional .google.protobuf.Duration ttl = 3; + * + * @return Whether the ttl field is set. + */ + public boolean hasTtl() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Anywhere Cache entry's TTL between 1h and 7days. A cache-level config that
+     * is applied to all new cache entries on admission. If `ttl` is pending
+     * update, this field equals to the new value specified in the Update request.
+     * 
+ * + * optional .google.protobuf.Duration ttl = 3; + * + * @return The ttl. + */ + public com.google.protobuf.Duration getTtl() { + if (ttlBuilder_ == null) { + return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_; + } else { + return ttlBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Anywhere Cache entry's TTL between 1h and 7days. A cache-level config that
+     * is applied to all new cache entries on admission. If `ttl` is pending
+     * update, this field equals to the new value specified in the Update request.
+     * 
+ * + * optional .google.protobuf.Duration ttl = 3; + */ + public Builder setTtl(com.google.protobuf.Duration value) { + if (ttlBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ttl_ = value; + } else { + ttlBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Anywhere Cache entry's TTL between 1h and 7days. A cache-level config that
+     * is applied to all new cache entries on admission. If `ttl` is pending
+     * update, this field equals to the new value specified in the Update request.
+     * 
+ * + * optional .google.protobuf.Duration ttl = 3; + */ + public Builder setTtl(com.google.protobuf.Duration.Builder builderForValue) { + if (ttlBuilder_ == null) { + ttl_ = builderForValue.build(); + } else { + ttlBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Anywhere Cache entry's TTL between 1h and 7days. A cache-level config that
+     * is applied to all new cache entries on admission. If `ttl` is pending
+     * update, this field equals to the new value specified in the Update request.
+     * 
+ * + * optional .google.protobuf.Duration ttl = 3; + */ + public Builder mergeTtl(com.google.protobuf.Duration value) { + if (ttlBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && ttl_ != null + && ttl_ != com.google.protobuf.Duration.getDefaultInstance()) { + getTtlBuilder().mergeFrom(value); + } else { + ttl_ = value; + } + } else { + ttlBuilder_.mergeFrom(value); + } + if (ttl_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Anywhere Cache entry's TTL between 1h and 7days. A cache-level config that
+     * is applied to all new cache entries on admission. If `ttl` is pending
+     * update, this field equals to the new value specified in the Update request.
+     * 
+ * + * optional .google.protobuf.Duration ttl = 3; + */ + public Builder clearTtl() { + bitField0_ = (bitField0_ & ~0x00000008); + ttl_ = null; + if (ttlBuilder_ != null) { + ttlBuilder_.dispose(); + ttlBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Anywhere Cache entry's TTL between 1h and 7days. A cache-level config that
+     * is applied to all new cache entries on admission. If `ttl` is pending
+     * update, this field equals to the new value specified in the Update request.
+     * 
+ * + * optional .google.protobuf.Duration ttl = 3; + */ + public com.google.protobuf.Duration.Builder getTtlBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getTtlFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Anywhere Cache entry's TTL between 1h and 7days. A cache-level config that
+     * is applied to all new cache entries on admission. If `ttl` is pending
+     * update, this field equals to the new value specified in the Update request.
+     * 
+ * + * optional .google.protobuf.Duration ttl = 3; + */ + public com.google.protobuf.DurationOrBuilder getTtlOrBuilder() { + if (ttlBuilder_ != null) { + return ttlBuilder_.getMessageOrBuilder(); + } else { + return ttl_ == null ? com.google.protobuf.Duration.getDefaultInstance() : ttl_; + } + } + + /** + * + * + *
+     * Anywhere Cache entry's TTL between 1h and 7days. A cache-level config that
+     * is applied to all new cache entries on admission. If `ttl` is pending
+     * update, this field equals to the new value specified in the Update request.
+     * 
+ * + * optional .google.protobuf.Duration ttl = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getTtlFieldBuilder() { + if (ttlBuilder_ == null) { + ttlBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>(getTtl(), getParentForChildren(), isClean()); + ttl_ = null; + } + return ttlBuilder_; + } + + private java.lang.Object admissionPolicy_ = ""; + + /** + * + * + *
+     * L4 Cache entry Admission Policy in kebab-case (e.g.,
+     * "admit-on-first-miss"). If `admission_policy` is pending
+     * update, this field equals to the new value specified in the Update request.
+     * 
+ * + * optional string admission_policy = 4; + * + * @return Whether the admissionPolicy field is set. + */ + public boolean hasAdmissionPolicy() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * L4 Cache entry Admission Policy in kebab-case (e.g.,
+     * "admit-on-first-miss"). If `admission_policy` is pending
+     * update, this field equals to the new value specified in the Update request.
+     * 
+ * + * optional string admission_policy = 4; + * + * @return The admissionPolicy. + */ + public java.lang.String getAdmissionPolicy() { + java.lang.Object ref = admissionPolicy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + admissionPolicy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * L4 Cache entry Admission Policy in kebab-case (e.g.,
+     * "admit-on-first-miss"). If `admission_policy` is pending
+     * update, this field equals to the new value specified in the Update request.
+     * 
+ * + * optional string admission_policy = 4; + * + * @return The bytes for admissionPolicy. + */ + public com.google.protobuf.ByteString getAdmissionPolicyBytes() { + java.lang.Object ref = admissionPolicy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + admissionPolicy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * L4 Cache entry Admission Policy in kebab-case (e.g.,
+     * "admit-on-first-miss"). If `admission_policy` is pending
+     * update, this field equals to the new value specified in the Update request.
+     * 
+ * + * optional string admission_policy = 4; + * + * @param value The admissionPolicy to set. + * @return This builder for chaining. + */ + public Builder setAdmissionPolicy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + admissionPolicy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * L4 Cache entry Admission Policy in kebab-case (e.g.,
+     * "admit-on-first-miss"). If `admission_policy` is pending
+     * update, this field equals to the new value specified in the Update request.
+     * 
+ * + * optional string admission_policy = 4; + * + * @return This builder for chaining. + */ + public Builder clearAdmissionPolicy() { + admissionPolicy_ = getDefaultInstance().getAdmissionPolicy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + /** + * + * + *
+     * L4 Cache entry Admission Policy in kebab-case (e.g.,
+     * "admit-on-first-miss"). If `admission_policy` is pending
+     * update, this field equals to the new value specified in the Update request.
+     * 
+ * + * optional string admission_policy = 4; + * + * @param value The bytes for admissionPolicy to set. + * @return This builder for chaining. + */ + public Builder setAdmissionPolicyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + admissionPolicy_ = value; + bitField0_ |= 0x00000010; + 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.control.v2.UpdateAnywhereCacheMetadata) + } + + // @@protoc_insertion_point(class_scope:google.storage.control.v2.UpdateAnywhereCacheMetadata) + private static final com.google.storage.control.v2.UpdateAnywhereCacheMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storage.control.v2.UpdateAnywhereCacheMetadata(); + } + + public static com.google.storage.control.v2.UpdateAnywhereCacheMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateAnywhereCacheMetadata 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.control.v2.UpdateAnywhereCacheMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateAnywhereCacheMetadataOrBuilder.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateAnywhereCacheMetadataOrBuilder.java new file mode 100644 index 0000000000..85d956d12a --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateAnywhereCacheMetadataOrBuilder.java @@ -0,0 +1,233 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +public interface UpdateAnywhereCacheMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storage.control.v2.UpdateAnywhereCacheMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Generic metadata for the long running operation.
+   * 
+ * + * .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * + * @return Whether the commonMetadata field is set. + */ + boolean hasCommonMetadata(); + + /** + * + * + *
+   * Generic metadata for the long running operation.
+   * 
+ * + * .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + * + * @return The commonMetadata. + */ + com.google.storage.control.v2.CommonLongRunningOperationMetadata getCommonMetadata(); + + /** + * + * + *
+   * Generic metadata for the long running operation.
+   * 
+ * + * .google.storage.control.v2.CommonLongRunningOperationMetadata common_metadata = 1; + */ + com.google.storage.control.v2.CommonLongRunningOperationMetadataOrBuilder + getCommonMetadataOrBuilder(); + + /** + * + * + *
+   * Anywhere Cache ID.
+   * 
+ * + * optional string anywhere_cache_id = 2; + * + * @return Whether the anywhereCacheId field is set. + */ + boolean hasAnywhereCacheId(); + + /** + * + * + *
+   * Anywhere Cache ID.
+   * 
+ * + * optional string anywhere_cache_id = 2; + * + * @return The anywhereCacheId. + */ + java.lang.String getAnywhereCacheId(); + + /** + * + * + *
+   * Anywhere Cache ID.
+   * 
+ * + * optional string anywhere_cache_id = 2; + * + * @return The bytes for anywhereCacheId. + */ + com.google.protobuf.ByteString getAnywhereCacheIdBytes(); + + /** + * + * + *
+   * The zone in which the cache instance is running. For example,
+   * us-central1-a.
+   * 
+ * + * optional string zone = 5; + * + * @return Whether the zone field is set. + */ + boolean hasZone(); + + /** + * + * + *
+   * The zone in which the cache instance is running. For example,
+   * us-central1-a.
+   * 
+ * + * optional string zone = 5; + * + * @return The zone. + */ + java.lang.String getZone(); + + /** + * + * + *
+   * The zone in which the cache instance is running. For example,
+   * us-central1-a.
+   * 
+ * + * optional string zone = 5; + * + * @return The bytes for zone. + */ + com.google.protobuf.ByteString getZoneBytes(); + + /** + * + * + *
+   * Anywhere Cache entry's TTL between 1h and 7days. A cache-level config that
+   * is applied to all new cache entries on admission. If `ttl` is pending
+   * update, this field equals to the new value specified in the Update request.
+   * 
+ * + * optional .google.protobuf.Duration ttl = 3; + * + * @return Whether the ttl field is set. + */ + boolean hasTtl(); + + /** + * + * + *
+   * Anywhere Cache entry's TTL between 1h and 7days. A cache-level config that
+   * is applied to all new cache entries on admission. If `ttl` is pending
+   * update, this field equals to the new value specified in the Update request.
+   * 
+ * + * optional .google.protobuf.Duration ttl = 3; + * + * @return The ttl. + */ + com.google.protobuf.Duration getTtl(); + + /** + * + * + *
+   * Anywhere Cache entry's TTL between 1h and 7days. A cache-level config that
+   * is applied to all new cache entries on admission. If `ttl` is pending
+   * update, this field equals to the new value specified in the Update request.
+   * 
+ * + * optional .google.protobuf.Duration ttl = 3; + */ + com.google.protobuf.DurationOrBuilder getTtlOrBuilder(); + + /** + * + * + *
+   * L4 Cache entry Admission Policy in kebab-case (e.g.,
+   * "admit-on-first-miss"). If `admission_policy` is pending
+   * update, this field equals to the new value specified in the Update request.
+   * 
+ * + * optional string admission_policy = 4; + * + * @return Whether the admissionPolicy field is set. + */ + boolean hasAdmissionPolicy(); + + /** + * + * + *
+   * L4 Cache entry Admission Policy in kebab-case (e.g.,
+   * "admit-on-first-miss"). If `admission_policy` is pending
+   * update, this field equals to the new value specified in the Update request.
+   * 
+ * + * optional string admission_policy = 4; + * + * @return The admissionPolicy. + */ + java.lang.String getAdmissionPolicy(); + + /** + * + * + *
+   * L4 Cache entry Admission Policy in kebab-case (e.g.,
+   * "admit-on-first-miss"). If `admission_policy` is pending
+   * update, this field equals to the new value specified in the Update request.
+   * 
+ * + * optional string admission_policy = 4; + * + * @return The bytes for admissionPolicy. + */ + com.google.protobuf.ByteString getAdmissionPolicyBytes(); +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateAnywhereCacheRequest.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateAnywhereCacheRequest.java new file mode 100644 index 0000000000..7a3d7bda2b --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateAnywhereCacheRequest.java @@ -0,0 +1,1364 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +/** + * + * + *
+ * Request message for UpdateAnywhereCache.
+ * 
+ * + * Protobuf type {@code google.storage.control.v2.UpdateAnywhereCacheRequest} + */ +public final class UpdateAnywhereCacheRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storage.control.v2.UpdateAnywhereCacheRequest) + UpdateAnywhereCacheRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use UpdateAnywhereCacheRequest.newBuilder() to construct. + private UpdateAnywhereCacheRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateAnywhereCacheRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateAnywhereCacheRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_UpdateAnywhereCacheRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_UpdateAnywhereCacheRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.UpdateAnywhereCacheRequest.class, + com.google.storage.control.v2.UpdateAnywhereCacheRequest.Builder.class); + } + + private int bitField0_; + public static final int ANYWHERE_CACHE_FIELD_NUMBER = 1; + private com.google.storage.control.v2.AnywhereCache anywhereCache_; + + /** + * + * + *
+   * Required. The Anywhere Cache instance to be updated.
+   * 
+ * + * + * .google.storage.control.v2.AnywhereCache anywhere_cache = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the anywhereCache field is set. + */ + @java.lang.Override + public boolean hasAnywhereCache() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The Anywhere Cache instance to be updated.
+   * 
+ * + * + * .google.storage.control.v2.AnywhereCache anywhere_cache = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The anywhereCache. + */ + @java.lang.Override + public com.google.storage.control.v2.AnywhereCache getAnywhereCache() { + return anywhereCache_ == null + ? com.google.storage.control.v2.AnywhereCache.getDefaultInstance() + : anywhereCache_; + } + + /** + * + * + *
+   * Required. The Anywhere Cache instance to be updated.
+   * 
+ * + * + * .google.storage.control.v2.AnywhereCache anywhere_cache = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.storage.control.v2.AnywhereCacheOrBuilder getAnywhereCacheOrBuilder() { + return anywhereCache_ == null + ? com.google.storage.control.v2.AnywhereCache.getDefaultInstance() + : anywhereCache_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Required. List of fields to be updated. Mutable fields of AnywhereCache
+   * include `ttl` and `admission_policy`.
+   *
+   * To specify ALL fields, specify a single field with the value `*`. Note: We
+   * recommend against doing this. If a new field is introduced at a later time,
+   * an older client updating with the `*` may accidentally reset the new
+   * field's value.
+   *
+   * Not specifying any fields is an error.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. List of fields to be updated. Mutable fields of AnywhereCache
+   * include `ttl` and `admission_policy`.
+   *
+   * To specify ALL fields, specify a single field with the value `*`. Note: We
+   * recommend against doing this. If a new field is introduced at a later time,
+   * an older client updating with the `*` may accidentally reset the new
+   * field's value.
+   *
+   * Not specifying any fields is an error.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Required. List of fields to be updated. Mutable fields of AnywhereCache
+   * include `ttl` and `admission_policy`.
+   *
+   * To specify ALL fields, specify a single field with the value `*`. Note: We
+   * recommend against doing this. If a new field is introduced at a later time,
+   * an older client updating with the `*` may accidentally reset the new
+   * field's value.
+   *
+   * Not specifying any fields is an error.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. A unique identifier for this request. UUID is the recommended
+   * format, but other formats are still accepted. This request is only
+   * idempotent if a `request_id` is provided.
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. A unique identifier for this request. UUID is the recommended
+   * format, but other formats are still accepted. This request is only
+   * idempotent if a `request_id` is provided.
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getAnywhereCache()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + 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, getAnywhereCache()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + 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.control.v2.UpdateAnywhereCacheRequest)) { + return super.equals(obj); + } + com.google.storage.control.v2.UpdateAnywhereCacheRequest other = + (com.google.storage.control.v2.UpdateAnywhereCacheRequest) obj; + + if (hasAnywhereCache() != other.hasAnywhereCache()) return false; + if (hasAnywhereCache()) { + if (!getAnywhereCache().equals(other.getAnywhereCache())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getRequestId().equals(other.getRequestId())) 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 (hasAnywhereCache()) { + hash = (37 * hash) + ANYWHERE_CACHE_FIELD_NUMBER; + hash = (53 * hash) + getAnywhereCache().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storage.control.v2.UpdateAnywhereCacheRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.UpdateAnywhereCacheRequest 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.control.v2.UpdateAnywhereCacheRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.UpdateAnywhereCacheRequest 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.control.v2.UpdateAnywhereCacheRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.UpdateAnywhereCacheRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storage.control.v2.UpdateAnywhereCacheRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.UpdateAnywhereCacheRequest 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.control.v2.UpdateAnywhereCacheRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.UpdateAnywhereCacheRequest 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.control.v2.UpdateAnywhereCacheRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.UpdateAnywhereCacheRequest 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.control.v2.UpdateAnywhereCacheRequest 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 UpdateAnywhereCache.
+   * 
+ * + * Protobuf type {@code google.storage.control.v2.UpdateAnywhereCacheRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storage.control.v2.UpdateAnywhereCacheRequest) + com.google.storage.control.v2.UpdateAnywhereCacheRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_UpdateAnywhereCacheRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_UpdateAnywhereCacheRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.UpdateAnywhereCacheRequest.class, + com.google.storage.control.v2.UpdateAnywhereCacheRequest.Builder.class); + } + + // Construct using com.google.storage.control.v2.UpdateAnywhereCacheRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAnywhereCacheFieldBuilder(); + getUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + anywhereCache_ = null; + if (anywhereCacheBuilder_ != null) { + anywhereCacheBuilder_.dispose(); + anywhereCacheBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_UpdateAnywhereCacheRequest_descriptor; + } + + @java.lang.Override + public com.google.storage.control.v2.UpdateAnywhereCacheRequest getDefaultInstanceForType() { + return com.google.storage.control.v2.UpdateAnywhereCacheRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.storage.control.v2.UpdateAnywhereCacheRequest build() { + com.google.storage.control.v2.UpdateAnywhereCacheRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storage.control.v2.UpdateAnywhereCacheRequest buildPartial() { + com.google.storage.control.v2.UpdateAnywhereCacheRequest result = + new com.google.storage.control.v2.UpdateAnywhereCacheRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.storage.control.v2.UpdateAnywhereCacheRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.anywhereCache_ = + anywhereCacheBuilder_ == null ? anywhereCache_ : anywhereCacheBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + 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.control.v2.UpdateAnywhereCacheRequest) { + return mergeFrom((com.google.storage.control.v2.UpdateAnywhereCacheRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.storage.control.v2.UpdateAnywhereCacheRequest other) { + if (other == com.google.storage.control.v2.UpdateAnywhereCacheRequest.getDefaultInstance()) + return this; + if (other.hasAnywhereCache()) { + mergeAnywhereCache(other.getAnywhereCache()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + input.readMessage(getAnywhereCacheFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = 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 com.google.storage.control.v2.AnywhereCache anywhereCache_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.AnywhereCache, + com.google.storage.control.v2.AnywhereCache.Builder, + com.google.storage.control.v2.AnywhereCacheOrBuilder> + anywhereCacheBuilder_; + + /** + * + * + *
+     * Required. The Anywhere Cache instance to be updated.
+     * 
+ * + * + * .google.storage.control.v2.AnywhereCache anywhere_cache = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the anywhereCache field is set. + */ + public boolean hasAnywhereCache() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The Anywhere Cache instance to be updated.
+     * 
+ * + * + * .google.storage.control.v2.AnywhereCache anywhere_cache = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The anywhereCache. + */ + public com.google.storage.control.v2.AnywhereCache getAnywhereCache() { + if (anywhereCacheBuilder_ == null) { + return anywhereCache_ == null + ? com.google.storage.control.v2.AnywhereCache.getDefaultInstance() + : anywhereCache_; + } else { + return anywhereCacheBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The Anywhere Cache instance to be updated.
+     * 
+ * + * + * .google.storage.control.v2.AnywhereCache anywhere_cache = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAnywhereCache(com.google.storage.control.v2.AnywhereCache value) { + if (anywhereCacheBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + anywhereCache_ = value; + } else { + anywhereCacheBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Anywhere Cache instance to be updated.
+     * 
+ * + * + * .google.storage.control.v2.AnywhereCache anywhere_cache = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAnywhereCache( + com.google.storage.control.v2.AnywhereCache.Builder builderForValue) { + if (anywhereCacheBuilder_ == null) { + anywhereCache_ = builderForValue.build(); + } else { + anywhereCacheBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Anywhere Cache instance to be updated.
+     * 
+ * + * + * .google.storage.control.v2.AnywhereCache anywhere_cache = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAnywhereCache(com.google.storage.control.v2.AnywhereCache value) { + if (anywhereCacheBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && anywhereCache_ != null + && anywhereCache_ != com.google.storage.control.v2.AnywhereCache.getDefaultInstance()) { + getAnywhereCacheBuilder().mergeFrom(value); + } else { + anywhereCache_ = value; + } + } else { + anywhereCacheBuilder_.mergeFrom(value); + } + if (anywhereCache_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The Anywhere Cache instance to be updated.
+     * 
+ * + * + * .google.storage.control.v2.AnywhereCache anywhere_cache = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAnywhereCache() { + bitField0_ = (bitField0_ & ~0x00000001); + anywhereCache_ = null; + if (anywhereCacheBuilder_ != null) { + anywhereCacheBuilder_.dispose(); + anywhereCacheBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The Anywhere Cache instance to be updated.
+     * 
+ * + * + * .google.storage.control.v2.AnywhereCache anywhere_cache = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.storage.control.v2.AnywhereCache.Builder getAnywhereCacheBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getAnywhereCacheFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The Anywhere Cache instance to be updated.
+     * 
+ * + * + * .google.storage.control.v2.AnywhereCache anywhere_cache = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.storage.control.v2.AnywhereCacheOrBuilder getAnywhereCacheOrBuilder() { + if (anywhereCacheBuilder_ != null) { + return anywhereCacheBuilder_.getMessageOrBuilder(); + } else { + return anywhereCache_ == null + ? com.google.storage.control.v2.AnywhereCache.getDefaultInstance() + : anywhereCache_; + } + } + + /** + * + * + *
+     * Required. The Anywhere Cache instance to be updated.
+     * 
+ * + * + * .google.storage.control.v2.AnywhereCache anywhere_cache = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.AnywhereCache, + com.google.storage.control.v2.AnywhereCache.Builder, + com.google.storage.control.v2.AnywhereCacheOrBuilder> + getAnywhereCacheFieldBuilder() { + if (anywhereCacheBuilder_ == null) { + anywhereCacheBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.AnywhereCache, + com.google.storage.control.v2.AnywhereCache.Builder, + com.google.storage.control.v2.AnywhereCacheOrBuilder>( + getAnywhereCache(), getParentForChildren(), isClean()); + anywhereCache_ = null; + } + return anywhereCacheBuilder_; + } + + 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_; + + /** + * + * + *
+     * Required. List of fields to be updated. Mutable fields of AnywhereCache
+     * include `ttl` and `admission_policy`.
+     *
+     * To specify ALL fields, specify a single field with the value `*`. Note: We
+     * recommend against doing this. If a new field is introduced at a later time,
+     * an older client updating with the `*` may accidentally reset the new
+     * field's value.
+     *
+     * Not specifying any fields is an error.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. List of fields to be updated. Mutable fields of AnywhereCache
+     * include `ttl` and `admission_policy`.
+     *
+     * To specify ALL fields, specify a single field with the value `*`. Note: We
+     * recommend against doing this. If a new field is introduced at a later time,
+     * an older client updating with the `*` may accidentally reset the new
+     * field's value.
+     *
+     * Not specifying any fields is an error.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @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(); + } + } + + /** + * + * + *
+     * Required. List of fields to be updated. Mutable fields of AnywhereCache
+     * include `ttl` and `admission_policy`.
+     *
+     * To specify ALL fields, specify a single field with the value `*`. Note: We
+     * recommend against doing this. If a new field is introduced at a later time,
+     * an older client updating with the `*` may accidentally reset the new
+     * field's value.
+     *
+     * Not specifying any fields is an error.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + + /** + * + * + *
+     * Required. List of fields to be updated. Mutable fields of AnywhereCache
+     * include `ttl` and `admission_policy`.
+     *
+     * To specify ALL fields, specify a single field with the value `*`. Note: We
+     * recommend against doing this. If a new field is introduced at a later time,
+     * an older client updating with the `*` may accidentally reset the new
+     * field's value.
+     *
+     * Not specifying any fields is an error.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + + /** + * + * + *
+     * Required. List of fields to be updated. Mutable fields of AnywhereCache
+     * include `ttl` and `admission_policy`.
+     *
+     * To specify ALL fields, specify a single field with the value `*`. Note: We
+     * recommend against doing this. If a new field is introduced at a later time,
+     * an older client updating with the `*` may accidentally reset the new
+     * field's value.
+     *
+     * Not specifying any fields is an error.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + + /** + * + * + *
+     * Required. List of fields to be updated. Mutable fields of AnywhereCache
+     * include `ttl` and `admission_policy`.
+     *
+     * To specify ALL fields, specify a single field with the value `*`. Note: We
+     * recommend against doing this. If a new field is introduced at a later time,
+     * an older client updating with the `*` may accidentally reset the new
+     * field's value.
+     *
+     * Not specifying any fields is an error.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. List of fields to be updated. Mutable fields of AnywhereCache
+     * include `ttl` and `admission_policy`.
+     *
+     * To specify ALL fields, specify a single field with the value `*`. Note: We
+     * recommend against doing this. If a new field is introduced at a later time,
+     * an older client updating with the `*` may accidentally reset the new
+     * field's value.
+     *
+     * Not specifying any fields is an error.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. List of fields to be updated. Mutable fields of AnywhereCache
+     * include `ttl` and `admission_policy`.
+     *
+     * To specify ALL fields, specify a single field with the value `*`. Note: We
+     * recommend against doing this. If a new field is introduced at a later time,
+     * an older client updating with the `*` may accidentally reset the new
+     * field's value.
+     *
+     * Not specifying any fields is an error.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Required. List of fields to be updated. Mutable fields of AnywhereCache
+     * include `ttl` and `admission_policy`.
+     *
+     * To specify ALL fields, specify a single field with the value `*`. Note: We
+     * recommend against doing this. If a new field is introduced at a later time,
+     * an older client updating with the `*` may accidentally reset the new
+     * field's value.
+     *
+     * Not specifying any fields is an error.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted. This request is only
+     * idempotent if a `request_id` is provided.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted. This request is only
+     * idempotent if a `request_id` is provided.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted. This request is only
+     * idempotent if a `request_id` is provided.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted. This request is only
+     * idempotent if a `request_id` is provided.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. A unique identifier for this request. UUID is the recommended
+     * format, but other formats are still accepted. This request is only
+     * idempotent if a `request_id` is provided.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = 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.control.v2.UpdateAnywhereCacheRequest) + } + + // @@protoc_insertion_point(class_scope:google.storage.control.v2.UpdateAnywhereCacheRequest) + private static final com.google.storage.control.v2.UpdateAnywhereCacheRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storage.control.v2.UpdateAnywhereCacheRequest(); + } + + public static com.google.storage.control.v2.UpdateAnywhereCacheRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateAnywhereCacheRequest 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.control.v2.UpdateAnywhereCacheRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateAnywhereCacheRequestOrBuilder.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateAnywhereCacheRequestOrBuilder.java new file mode 100644 index 0000000000..7b97ac8611 --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateAnywhereCacheRequestOrBuilder.java @@ -0,0 +1,167 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +public interface UpdateAnywhereCacheRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storage.control.v2.UpdateAnywhereCacheRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The Anywhere Cache instance to be updated.
+   * 
+ * + * + * .google.storage.control.v2.AnywhereCache anywhere_cache = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the anywhereCache field is set. + */ + boolean hasAnywhereCache(); + + /** + * + * + *
+   * Required. The Anywhere Cache instance to be updated.
+   * 
+ * + * + * .google.storage.control.v2.AnywhereCache anywhere_cache = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The anywhereCache. + */ + com.google.storage.control.v2.AnywhereCache getAnywhereCache(); + + /** + * + * + *
+   * Required. The Anywhere Cache instance to be updated.
+   * 
+ * + * + * .google.storage.control.v2.AnywhereCache anywhere_cache = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.storage.control.v2.AnywhereCacheOrBuilder getAnywhereCacheOrBuilder(); + + /** + * + * + *
+   * Required. List of fields to be updated. Mutable fields of AnywhereCache
+   * include `ttl` and `admission_policy`.
+   *
+   * To specify ALL fields, specify a single field with the value `*`. Note: We
+   * recommend against doing this. If a new field is introduced at a later time,
+   * an older client updating with the `*` may accidentally reset the new
+   * field's value.
+   *
+   * Not specifying any fields is an error.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Required. List of fields to be updated. Mutable fields of AnywhereCache
+   * include `ttl` and `admission_policy`.
+   *
+   * To specify ALL fields, specify a single field with the value `*`. Note: We
+   * recommend against doing this. If a new field is introduced at a later time,
+   * an older client updating with the `*` may accidentally reset the new
+   * field's value.
+   *
+   * Not specifying any fields is an error.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Required. List of fields to be updated. Mutable fields of AnywhereCache
+   * include `ttl` and `admission_policy`.
+   *
+   * To specify ALL fields, specify a single field with the value `*`. Note: We
+   * recommend against doing this. If a new field is introduced at a later time,
+   * an older client updating with the `*` may accidentally reset the new
+   * field's value.
+   *
+   * Not specifying any fields is an error.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Optional. A unique identifier for this request. UUID is the recommended
+   * format, but other formats are still accepted. This request is only
+   * idempotent if a `request_id` is provided.
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. A unique identifier for this request. UUID is the recommended
+   * format, but other formats are still accepted. This request is only
+   * idempotent if a `request_id` is provided.
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateFolderIntelligenceConfigRequest.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateFolderIntelligenceConfigRequest.java new file mode 100644 index 0000000000..d7b08a89e2 --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateFolderIntelligenceConfigRequest.java @@ -0,0 +1,1318 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +/** + * + * + *
+ * Request message to update the `IntelligenceConfig` resource associated with
+ * your folder.
+ *
+ * **IAM Permissions**:
+ *
+ * Requires `storage.intelligenceConfigs.update`
+ * [IAM](https://cloud.google.com/iam/docs/overview#permissions) permission on
+ * the folder.
+ * 
+ * + * Protobuf type {@code google.storage.control.v2.UpdateFolderIntelligenceConfigRequest} + */ +public final class UpdateFolderIntelligenceConfigRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storage.control.v2.UpdateFolderIntelligenceConfigRequest) + UpdateFolderIntelligenceConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use UpdateFolderIntelligenceConfigRequest.newBuilder() to construct. + private UpdateFolderIntelligenceConfigRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateFolderIntelligenceConfigRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateFolderIntelligenceConfigRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_UpdateFolderIntelligenceConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_UpdateFolderIntelligenceConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest.class, + com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest.Builder.class); + } + + private int bitField0_; + public static final int INTELLIGENCE_CONFIG_FIELD_NUMBER = 1; + private com.google.storage.control.v2.IntelligenceConfig intelligenceConfig_; + + /** + * + * + *
+   * Required. The `IntelligenceConfig` resource to be updated.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the intelligenceConfig field is set. + */ + @java.lang.Override + public boolean hasIntelligenceConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The `IntelligenceConfig` resource to be updated.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The intelligenceConfig. + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig getIntelligenceConfig() { + return intelligenceConfig_ == null + ? com.google.storage.control.v2.IntelligenceConfig.getDefaultInstance() + : intelligenceConfig_; + } + + /** + * + * + *
+   * Required. The `IntelligenceConfig` resource to be updated.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfigOrBuilder + getIntelligenceConfigOrBuilder() { + return intelligenceConfig_ == null + ? com.google.storage.control.v2.IntelligenceConfig.getDefaultInstance() + : intelligenceConfig_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Required. The `update_mask` that specifies the fields within the
+   * `IntelligenceConfig` resource that should be modified by this update. Only
+   * the listed fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The `update_mask` that specifies the fields within the
+   * `IntelligenceConfig` resource that should be modified by this update. Only
+   * the listed fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Required. The `update_mask` that specifies the fields within the
+   * `IntelligenceConfig` resource that should be modified by this update. Only
+   * the listed fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. The ID that uniquely identifies the request, preventing duplicate
+   * processing.
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The ID that uniquely identifies the request, preventing duplicate
+   * processing.
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getIntelligenceConfig()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + 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, getIntelligenceConfig()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + 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.control.v2.UpdateFolderIntelligenceConfigRequest)) { + return super.equals(obj); + } + com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest other = + (com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest) obj; + + if (hasIntelligenceConfig() != other.hasIntelligenceConfig()) return false; + if (hasIntelligenceConfig()) { + if (!getIntelligenceConfig().equals(other.getIntelligenceConfig())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getRequestId().equals(other.getRequestId())) 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 (hasIntelligenceConfig()) { + hash = (37 * hash) + INTELLIGENCE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getIntelligenceConfig().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest 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.control.v2.UpdateFolderIntelligenceConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest 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.control.v2.UpdateFolderIntelligenceConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest 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.control.v2.UpdateFolderIntelligenceConfigRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest + 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.control.v2.UpdateFolderIntelligenceConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest 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.control.v2.UpdateFolderIntelligenceConfigRequest 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 to update the `IntelligenceConfig` resource associated with
+   * your folder.
+   *
+   * **IAM Permissions**:
+   *
+   * Requires `storage.intelligenceConfigs.update`
+   * [IAM](https://cloud.google.com/iam/docs/overview#permissions) permission on
+   * the folder.
+   * 
+ * + * Protobuf type {@code google.storage.control.v2.UpdateFolderIntelligenceConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storage.control.v2.UpdateFolderIntelligenceConfigRequest) + com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_UpdateFolderIntelligenceConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_UpdateFolderIntelligenceConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest.class, + com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest.Builder.class); + } + + // Construct using + // com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getIntelligenceConfigFieldBuilder(); + getUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + intelligenceConfig_ = null; + if (intelligenceConfigBuilder_ != null) { + intelligenceConfigBuilder_.dispose(); + intelligenceConfigBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_UpdateFolderIntelligenceConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest + getDefaultInstanceForType() { + return com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest build() { + com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest buildPartial() { + com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest result = + new com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.intelligenceConfig_ = + intelligenceConfigBuilder_ == null + ? intelligenceConfig_ + : intelligenceConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + 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.control.v2.UpdateFolderIntelligenceConfigRequest) { + return mergeFrom( + (com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest other) { + if (other + == com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest + .getDefaultInstance()) return this; + if (other.hasIntelligenceConfig()) { + mergeIntelligenceConfig(other.getIntelligenceConfig()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + input.readMessage( + getIntelligenceConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = 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 com.google.storage.control.v2.IntelligenceConfig intelligenceConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.IntelligenceConfig, + com.google.storage.control.v2.IntelligenceConfig.Builder, + com.google.storage.control.v2.IntelligenceConfigOrBuilder> + intelligenceConfigBuilder_; + + /** + * + * + *
+     * Required. The `IntelligenceConfig` resource to be updated.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the intelligenceConfig field is set. + */ + public boolean hasIntelligenceConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The `IntelligenceConfig` resource to be updated.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The intelligenceConfig. + */ + public com.google.storage.control.v2.IntelligenceConfig getIntelligenceConfig() { + if (intelligenceConfigBuilder_ == null) { + return intelligenceConfig_ == null + ? com.google.storage.control.v2.IntelligenceConfig.getDefaultInstance() + : intelligenceConfig_; + } else { + return intelligenceConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The `IntelligenceConfig` resource to be updated.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setIntelligenceConfig(com.google.storage.control.v2.IntelligenceConfig value) { + if (intelligenceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + intelligenceConfig_ = value; + } else { + intelligenceConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The `IntelligenceConfig` resource to be updated.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setIntelligenceConfig( + com.google.storage.control.v2.IntelligenceConfig.Builder builderForValue) { + if (intelligenceConfigBuilder_ == null) { + intelligenceConfig_ = builderForValue.build(); + } else { + intelligenceConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The `IntelligenceConfig` resource to be updated.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeIntelligenceConfig(com.google.storage.control.v2.IntelligenceConfig value) { + if (intelligenceConfigBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && intelligenceConfig_ != null + && intelligenceConfig_ + != com.google.storage.control.v2.IntelligenceConfig.getDefaultInstance()) { + getIntelligenceConfigBuilder().mergeFrom(value); + } else { + intelligenceConfig_ = value; + } + } else { + intelligenceConfigBuilder_.mergeFrom(value); + } + if (intelligenceConfig_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The `IntelligenceConfig` resource to be updated.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearIntelligenceConfig() { + bitField0_ = (bitField0_ & ~0x00000001); + intelligenceConfig_ = null; + if (intelligenceConfigBuilder_ != null) { + intelligenceConfigBuilder_.dispose(); + intelligenceConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The `IntelligenceConfig` resource to be updated.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.storage.control.v2.IntelligenceConfig.Builder getIntelligenceConfigBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getIntelligenceConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The `IntelligenceConfig` resource to be updated.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.storage.control.v2.IntelligenceConfigOrBuilder + getIntelligenceConfigOrBuilder() { + if (intelligenceConfigBuilder_ != null) { + return intelligenceConfigBuilder_.getMessageOrBuilder(); + } else { + return intelligenceConfig_ == null + ? com.google.storage.control.v2.IntelligenceConfig.getDefaultInstance() + : intelligenceConfig_; + } + } + + /** + * + * + *
+     * Required. The `IntelligenceConfig` resource to be updated.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.IntelligenceConfig, + com.google.storage.control.v2.IntelligenceConfig.Builder, + com.google.storage.control.v2.IntelligenceConfigOrBuilder> + getIntelligenceConfigFieldBuilder() { + if (intelligenceConfigBuilder_ == null) { + intelligenceConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.IntelligenceConfig, + com.google.storage.control.v2.IntelligenceConfig.Builder, + com.google.storage.control.v2.IntelligenceConfigOrBuilder>( + getIntelligenceConfig(), getParentForChildren(), isClean()); + intelligenceConfig_ = null; + } + return intelligenceConfigBuilder_; + } + + 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_; + + /** + * + * + *
+     * Required. The `update_mask` that specifies the fields within the
+     * `IntelligenceConfig` resource that should be modified by this update. Only
+     * the listed fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The `update_mask` that specifies the fields within the
+     * `IntelligenceConfig` resource that should be modified by this update. Only
+     * the listed fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @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(); + } + } + + /** + * + * + *
+     * Required. The `update_mask` that specifies the fields within the
+     * `IntelligenceConfig` resource that should be modified by this update. Only
+     * the listed fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + + /** + * + * + *
+     * Required. The `update_mask` that specifies the fields within the
+     * `IntelligenceConfig` resource that should be modified by this update. Only
+     * the listed fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + + /** + * + * + *
+     * Required. The `update_mask` that specifies the fields within the
+     * `IntelligenceConfig` resource that should be modified by this update. Only
+     * the listed fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + + /** + * + * + *
+     * Required. The `update_mask` that specifies the fields within the
+     * `IntelligenceConfig` resource that should be modified by this update. Only
+     * the listed fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The `update_mask` that specifies the fields within the
+     * `IntelligenceConfig` resource that should be modified by this update. Only
+     * the listed fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The `update_mask` that specifies the fields within the
+     * `IntelligenceConfig` resource that should be modified by this update. Only
+     * the listed fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Required. The `update_mask` that specifies the fields within the
+     * `IntelligenceConfig` resource that should be modified by this update. Only
+     * the listed fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. The ID that uniquely identifies the request, preventing duplicate
+     * processing.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The ID that uniquely identifies the request, preventing duplicate
+     * processing.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The ID that uniquely identifies the request, preventing duplicate
+     * processing.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The ID that uniquely identifies the request, preventing duplicate
+     * processing.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The ID that uniquely identifies the request, preventing duplicate
+     * processing.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = 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.control.v2.UpdateFolderIntelligenceConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.storage.control.v2.UpdateFolderIntelligenceConfigRequest) + private static final com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest(); + } + + public static com.google.storage.control.v2.UpdateFolderIntelligenceConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateFolderIntelligenceConfigRequest 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.control.v2.UpdateFolderIntelligenceConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateFolderIntelligenceConfigRequestOrBuilder.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateFolderIntelligenceConfigRequestOrBuilder.java new file mode 100644 index 0000000000..9c6b508d85 --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateFolderIntelligenceConfigRequestOrBuilder.java @@ -0,0 +1,147 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +public interface UpdateFolderIntelligenceConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storage.control.v2.UpdateFolderIntelligenceConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The `IntelligenceConfig` resource to be updated.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the intelligenceConfig field is set. + */ + boolean hasIntelligenceConfig(); + + /** + * + * + *
+   * Required. The `IntelligenceConfig` resource to be updated.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The intelligenceConfig. + */ + com.google.storage.control.v2.IntelligenceConfig getIntelligenceConfig(); + + /** + * + * + *
+   * Required. The `IntelligenceConfig` resource to be updated.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.storage.control.v2.IntelligenceConfigOrBuilder getIntelligenceConfigOrBuilder(); + + /** + * + * + *
+   * Required. The `update_mask` that specifies the fields within the
+   * `IntelligenceConfig` resource that should be modified by this update. Only
+   * the listed fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Required. The `update_mask` that specifies the fields within the
+   * `IntelligenceConfig` resource that should be modified by this update. Only
+   * the listed fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Required. The `update_mask` that specifies the fields within the
+   * `IntelligenceConfig` resource that should be modified by this update. Only
+   * the listed fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Optional. The ID that uniquely identifies the request, preventing duplicate
+   * processing.
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. The ID that uniquely identifies the request, preventing duplicate
+   * processing.
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateOrganizationIntelligenceConfigRequest.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateOrganizationIntelligenceConfigRequest.java new file mode 100644 index 0000000000..0df51307c9 --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateOrganizationIntelligenceConfigRequest.java @@ -0,0 +1,1328 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +/** + * + * + *
+ * Request message to update the `IntelligenceConfig` resource associated with
+ * your organization.
+ *
+ * **IAM Permissions**:
+ *
+ * Requires `storage.intelligenceConfigs.update`
+ * [IAM](https://cloud.google.com/iam/docs/overview#permissions) permission on
+ * the organization.
+ * 
+ * + * Protobuf type {@code google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest} + */ +public final class UpdateOrganizationIntelligenceConfigRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest) + UpdateOrganizationIntelligenceConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use UpdateOrganizationIntelligenceConfigRequest.newBuilder() to construct. + private UpdateOrganizationIntelligenceConfigRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateOrganizationIntelligenceConfigRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateOrganizationIntelligenceConfigRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_UpdateOrganizationIntelligenceConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_UpdateOrganizationIntelligenceConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest.class, + com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest.Builder + .class); + } + + private int bitField0_; + public static final int INTELLIGENCE_CONFIG_FIELD_NUMBER = 1; + private com.google.storage.control.v2.IntelligenceConfig intelligenceConfig_; + + /** + * + * + *
+   * Required. The `IntelligenceConfig` resource to be updated.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the intelligenceConfig field is set. + */ + @java.lang.Override + public boolean hasIntelligenceConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The `IntelligenceConfig` resource to be updated.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The intelligenceConfig. + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig getIntelligenceConfig() { + return intelligenceConfig_ == null + ? com.google.storage.control.v2.IntelligenceConfig.getDefaultInstance() + : intelligenceConfig_; + } + + /** + * + * + *
+   * Required. The `IntelligenceConfig` resource to be updated.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfigOrBuilder + getIntelligenceConfigOrBuilder() { + return intelligenceConfig_ == null + ? com.google.storage.control.v2.IntelligenceConfig.getDefaultInstance() + : intelligenceConfig_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Required. The `update_mask` that specifies the fields within the
+   * `IntelligenceConfig` resource that should be modified by this update. Only
+   * the listed fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The `update_mask` that specifies the fields within the
+   * `IntelligenceConfig` resource that should be modified by this update. Only
+   * the listed fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Required. The `update_mask` that specifies the fields within the
+   * `IntelligenceConfig` resource that should be modified by this update. Only
+   * the listed fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. The ID that uniquely identifies the request, preventing duplicate
+   * processing.
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The ID that uniquely identifies the request, preventing duplicate
+   * processing.
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getIntelligenceConfig()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + 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, getIntelligenceConfig()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + 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.control.v2.UpdateOrganizationIntelligenceConfigRequest)) { + return super.equals(obj); + } + com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest other = + (com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest) obj; + + if (hasIntelligenceConfig() != other.hasIntelligenceConfig()) return false; + if (hasIntelligenceConfig()) { + if (!getIntelligenceConfig().equals(other.getIntelligenceConfig())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getRequestId().equals(other.getRequestId())) 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 (hasIntelligenceConfig()) { + hash = (37 * hash) + INTELLIGENCE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getIntelligenceConfig().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest 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.control.v2.UpdateOrganizationIntelligenceConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest 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.control.v2.UpdateOrganizationIntelligenceConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest 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.control.v2.UpdateOrganizationIntelligenceConfigRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest + 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.control.v2.UpdateOrganizationIntelligenceConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest 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.control.v2.UpdateOrganizationIntelligenceConfigRequest 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 to update the `IntelligenceConfig` resource associated with
+   * your organization.
+   *
+   * **IAM Permissions**:
+   *
+   * Requires `storage.intelligenceConfigs.update`
+   * [IAM](https://cloud.google.com/iam/docs/overview#permissions) permission on
+   * the organization.
+   * 
+ * + * Protobuf type {@code google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest) + com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_UpdateOrganizationIntelligenceConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_UpdateOrganizationIntelligenceConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest.class, + com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest.Builder + .class); + } + + // Construct using + // com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getIntelligenceConfigFieldBuilder(); + getUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + intelligenceConfig_ = null; + if (intelligenceConfigBuilder_ != null) { + intelligenceConfigBuilder_.dispose(); + intelligenceConfigBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_UpdateOrganizationIntelligenceConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest + getDefaultInstanceForType() { + return com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest build() { + com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest + buildPartial() { + com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest result = + new com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.intelligenceConfig_ = + intelligenceConfigBuilder_ == null + ? intelligenceConfig_ + : intelligenceConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + 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.control.v2.UpdateOrganizationIntelligenceConfigRequest) { + return mergeFrom( + (com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest other) { + if (other + == com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest + .getDefaultInstance()) return this; + if (other.hasIntelligenceConfig()) { + mergeIntelligenceConfig(other.getIntelligenceConfig()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + input.readMessage( + getIntelligenceConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = 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 com.google.storage.control.v2.IntelligenceConfig intelligenceConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.IntelligenceConfig, + com.google.storage.control.v2.IntelligenceConfig.Builder, + com.google.storage.control.v2.IntelligenceConfigOrBuilder> + intelligenceConfigBuilder_; + + /** + * + * + *
+     * Required. The `IntelligenceConfig` resource to be updated.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the intelligenceConfig field is set. + */ + public boolean hasIntelligenceConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The `IntelligenceConfig` resource to be updated.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The intelligenceConfig. + */ + public com.google.storage.control.v2.IntelligenceConfig getIntelligenceConfig() { + if (intelligenceConfigBuilder_ == null) { + return intelligenceConfig_ == null + ? com.google.storage.control.v2.IntelligenceConfig.getDefaultInstance() + : intelligenceConfig_; + } else { + return intelligenceConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The `IntelligenceConfig` resource to be updated.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setIntelligenceConfig(com.google.storage.control.v2.IntelligenceConfig value) { + if (intelligenceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + intelligenceConfig_ = value; + } else { + intelligenceConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The `IntelligenceConfig` resource to be updated.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setIntelligenceConfig( + com.google.storage.control.v2.IntelligenceConfig.Builder builderForValue) { + if (intelligenceConfigBuilder_ == null) { + intelligenceConfig_ = builderForValue.build(); + } else { + intelligenceConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The `IntelligenceConfig` resource to be updated.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeIntelligenceConfig(com.google.storage.control.v2.IntelligenceConfig value) { + if (intelligenceConfigBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && intelligenceConfig_ != null + && intelligenceConfig_ + != com.google.storage.control.v2.IntelligenceConfig.getDefaultInstance()) { + getIntelligenceConfigBuilder().mergeFrom(value); + } else { + intelligenceConfig_ = value; + } + } else { + intelligenceConfigBuilder_.mergeFrom(value); + } + if (intelligenceConfig_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The `IntelligenceConfig` resource to be updated.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearIntelligenceConfig() { + bitField0_ = (bitField0_ & ~0x00000001); + intelligenceConfig_ = null; + if (intelligenceConfigBuilder_ != null) { + intelligenceConfigBuilder_.dispose(); + intelligenceConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The `IntelligenceConfig` resource to be updated.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.storage.control.v2.IntelligenceConfig.Builder getIntelligenceConfigBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getIntelligenceConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The `IntelligenceConfig` resource to be updated.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.storage.control.v2.IntelligenceConfigOrBuilder + getIntelligenceConfigOrBuilder() { + if (intelligenceConfigBuilder_ != null) { + return intelligenceConfigBuilder_.getMessageOrBuilder(); + } else { + return intelligenceConfig_ == null + ? com.google.storage.control.v2.IntelligenceConfig.getDefaultInstance() + : intelligenceConfig_; + } + } + + /** + * + * + *
+     * Required. The `IntelligenceConfig` resource to be updated.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.IntelligenceConfig, + com.google.storage.control.v2.IntelligenceConfig.Builder, + com.google.storage.control.v2.IntelligenceConfigOrBuilder> + getIntelligenceConfigFieldBuilder() { + if (intelligenceConfigBuilder_ == null) { + intelligenceConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.IntelligenceConfig, + com.google.storage.control.v2.IntelligenceConfig.Builder, + com.google.storage.control.v2.IntelligenceConfigOrBuilder>( + getIntelligenceConfig(), getParentForChildren(), isClean()); + intelligenceConfig_ = null; + } + return intelligenceConfigBuilder_; + } + + 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_; + + /** + * + * + *
+     * Required. The `update_mask` that specifies the fields within the
+     * `IntelligenceConfig` resource that should be modified by this update. Only
+     * the listed fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The `update_mask` that specifies the fields within the
+     * `IntelligenceConfig` resource that should be modified by this update. Only
+     * the listed fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @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(); + } + } + + /** + * + * + *
+     * Required. The `update_mask` that specifies the fields within the
+     * `IntelligenceConfig` resource that should be modified by this update. Only
+     * the listed fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + + /** + * + * + *
+     * Required. The `update_mask` that specifies the fields within the
+     * `IntelligenceConfig` resource that should be modified by this update. Only
+     * the listed fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + + /** + * + * + *
+     * Required. The `update_mask` that specifies the fields within the
+     * `IntelligenceConfig` resource that should be modified by this update. Only
+     * the listed fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + + /** + * + * + *
+     * Required. The `update_mask` that specifies the fields within the
+     * `IntelligenceConfig` resource that should be modified by this update. Only
+     * the listed fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The `update_mask` that specifies the fields within the
+     * `IntelligenceConfig` resource that should be modified by this update. Only
+     * the listed fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The `update_mask` that specifies the fields within the
+     * `IntelligenceConfig` resource that should be modified by this update. Only
+     * the listed fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Required. The `update_mask` that specifies the fields within the
+     * `IntelligenceConfig` resource that should be modified by this update. Only
+     * the listed fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. The ID that uniquely identifies the request, preventing duplicate
+     * processing.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The ID that uniquely identifies the request, preventing duplicate
+     * processing.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The ID that uniquely identifies the request, preventing duplicate
+     * processing.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The ID that uniquely identifies the request, preventing duplicate
+     * processing.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The ID that uniquely identifies the request, preventing duplicate
+     * processing.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = 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.control.v2.UpdateOrganizationIntelligenceConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest) + private static final com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest(); + } + + public static com.google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateOrganizationIntelligenceConfigRequest 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.control.v2.UpdateOrganizationIntelligenceConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateOrganizationIntelligenceConfigRequestOrBuilder.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateOrganizationIntelligenceConfigRequestOrBuilder.java new file mode 100644 index 0000000000..67b83c491b --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateOrganizationIntelligenceConfigRequestOrBuilder.java @@ -0,0 +1,147 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +public interface UpdateOrganizationIntelligenceConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storage.control.v2.UpdateOrganizationIntelligenceConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The `IntelligenceConfig` resource to be updated.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the intelligenceConfig field is set. + */ + boolean hasIntelligenceConfig(); + + /** + * + * + *
+   * Required. The `IntelligenceConfig` resource to be updated.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The intelligenceConfig. + */ + com.google.storage.control.v2.IntelligenceConfig getIntelligenceConfig(); + + /** + * + * + *
+   * Required. The `IntelligenceConfig` resource to be updated.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.storage.control.v2.IntelligenceConfigOrBuilder getIntelligenceConfigOrBuilder(); + + /** + * + * + *
+   * Required. The `update_mask` that specifies the fields within the
+   * `IntelligenceConfig` resource that should be modified by this update. Only
+   * the listed fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Required. The `update_mask` that specifies the fields within the
+   * `IntelligenceConfig` resource that should be modified by this update. Only
+   * the listed fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Required. The `update_mask` that specifies the fields within the
+   * `IntelligenceConfig` resource that should be modified by this update. Only
+   * the listed fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Optional. The ID that uniquely identifies the request, preventing duplicate
+   * processing.
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. The ID that uniquely identifies the request, preventing duplicate
+   * processing.
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateProjectIntelligenceConfigRequest.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateProjectIntelligenceConfigRequest.java new file mode 100644 index 0000000000..e59fa2254b --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateProjectIntelligenceConfigRequest.java @@ -0,0 +1,1318 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +/** + * + * + *
+ * Request message to update the `IntelligenceConfig` resource associated with
+ * your project.
+ *
+ * **IAM Permissions**:
+ *
+ * Requires `storage.intelligenceConfigs.update`
+ * [IAM](https://cloud.google.com/iam/docs/overview#permissions) permission on
+ * the folder.
+ * 
+ * + * Protobuf type {@code google.storage.control.v2.UpdateProjectIntelligenceConfigRequest} + */ +public final class UpdateProjectIntelligenceConfigRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storage.control.v2.UpdateProjectIntelligenceConfigRequest) + UpdateProjectIntelligenceConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + + // Use UpdateProjectIntelligenceConfigRequest.newBuilder() to construct. + private UpdateProjectIntelligenceConfigRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateProjectIntelligenceConfigRequest() { + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateProjectIntelligenceConfigRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_UpdateProjectIntelligenceConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_UpdateProjectIntelligenceConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest.class, + com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest.Builder.class); + } + + private int bitField0_; + public static final int INTELLIGENCE_CONFIG_FIELD_NUMBER = 1; + private com.google.storage.control.v2.IntelligenceConfig intelligenceConfig_; + + /** + * + * + *
+   * Required. The `IntelligenceConfig` resource to be updated.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the intelligenceConfig field is set. + */ + @java.lang.Override + public boolean hasIntelligenceConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Required. The `IntelligenceConfig` resource to be updated.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The intelligenceConfig. + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfig getIntelligenceConfig() { + return intelligenceConfig_ == null + ? com.google.storage.control.v2.IntelligenceConfig.getDefaultInstance() + : intelligenceConfig_; + } + + /** + * + * + *
+   * Required. The `IntelligenceConfig` resource to be updated.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.storage.control.v2.IntelligenceConfigOrBuilder + getIntelligenceConfigOrBuilder() { + return intelligenceConfig_ == null + ? com.google.storage.control.v2.IntelligenceConfig.getDefaultInstance() + : intelligenceConfig_; + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + + /** + * + * + *
+   * Required. The `update_mask` that specifies the fields within the
+   * `IntelligenceConfig` resource that should be modified by this update. Only
+   * the listed fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Required. The `update_mask` that specifies the fields within the
+   * `IntelligenceConfig` resource that should be modified by this update. Only
+   * the listed fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + /** + * + * + *
+   * Required. The `update_mask` that specifies the fields within the
+   * `IntelligenceConfig` resource that should be modified by this update. Only
+   * the listed fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object requestId_ = ""; + + /** + * + * + *
+   * Optional. The ID that uniquely identifies the request, preventing duplicate
+   * processing.
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + 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(); + requestId_ = s; + return s; + } + } + + /** + * + * + *
+   * Optional. The ID that uniquely identifies the request, preventing duplicate
+   * processing.
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = 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 (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getIntelligenceConfig()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getUpdateMask()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + 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, getIntelligenceConfig()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + 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.control.v2.UpdateProjectIntelligenceConfigRequest)) { + return super.equals(obj); + } + com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest other = + (com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest) obj; + + if (hasIntelligenceConfig() != other.hasIntelligenceConfig()) return false; + if (hasIntelligenceConfig()) { + if (!getIntelligenceConfig().equals(other.getIntelligenceConfig())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!getRequestId().equals(other.getRequestId())) 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 (hasIntelligenceConfig()) { + hash = (37 * hash) + INTELLIGENCE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getIntelligenceConfig().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest 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.control.v2.UpdateProjectIntelligenceConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest 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.control.v2.UpdateProjectIntelligenceConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest 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.control.v2.UpdateProjectIntelligenceConfigRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest + 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.control.v2.UpdateProjectIntelligenceConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest 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.control.v2.UpdateProjectIntelligenceConfigRequest 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 to update the `IntelligenceConfig` resource associated with
+   * your project.
+   *
+   * **IAM Permissions**:
+   *
+   * Requires `storage.intelligenceConfigs.update`
+   * [IAM](https://cloud.google.com/iam/docs/overview#permissions) permission on
+   * the folder.
+   * 
+ * + * Protobuf type {@code google.storage.control.v2.UpdateProjectIntelligenceConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storage.control.v2.UpdateProjectIntelligenceConfigRequest) + com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_UpdateProjectIntelligenceConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_UpdateProjectIntelligenceConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest.class, + com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest.Builder.class); + } + + // Construct using + // com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getIntelligenceConfigFieldBuilder(); + getUpdateMaskFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + intelligenceConfig_ = null; + if (intelligenceConfigBuilder_ != null) { + intelligenceConfigBuilder_.dispose(); + intelligenceConfigBuilder_ = null; + } + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + requestId_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storage.control.v2.StorageControlProto + .internal_static_google_storage_control_v2_UpdateProjectIntelligenceConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest + getDefaultInstanceForType() { + return com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest build() { + com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest buildPartial() { + com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest result = + new com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.intelligenceConfig_ = + intelligenceConfigBuilder_ == null + ? intelligenceConfig_ + : intelligenceConfigBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.requestId_ = requestId_; + } + 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.control.v2.UpdateProjectIntelligenceConfigRequest) { + return mergeFrom( + (com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest other) { + if (other + == com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest + .getDefaultInstance()) return this; + if (other.hasIntelligenceConfig()) { + mergeIntelligenceConfig(other.getIntelligenceConfig()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + 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: + { + input.readMessage( + getIntelligenceConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + requestId_ = 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 com.google.storage.control.v2.IntelligenceConfig intelligenceConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.IntelligenceConfig, + com.google.storage.control.v2.IntelligenceConfig.Builder, + com.google.storage.control.v2.IntelligenceConfigOrBuilder> + intelligenceConfigBuilder_; + + /** + * + * + *
+     * Required. The `IntelligenceConfig` resource to be updated.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the intelligenceConfig field is set. + */ + public boolean hasIntelligenceConfig() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+     * Required. The `IntelligenceConfig` resource to be updated.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The intelligenceConfig. + */ + public com.google.storage.control.v2.IntelligenceConfig getIntelligenceConfig() { + if (intelligenceConfigBuilder_ == null) { + return intelligenceConfig_ == null + ? com.google.storage.control.v2.IntelligenceConfig.getDefaultInstance() + : intelligenceConfig_; + } else { + return intelligenceConfigBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Required. The `IntelligenceConfig` resource to be updated.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setIntelligenceConfig(com.google.storage.control.v2.IntelligenceConfig value) { + if (intelligenceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + intelligenceConfig_ = value; + } else { + intelligenceConfigBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The `IntelligenceConfig` resource to be updated.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setIntelligenceConfig( + com.google.storage.control.v2.IntelligenceConfig.Builder builderForValue) { + if (intelligenceConfigBuilder_ == null) { + intelligenceConfig_ = builderForValue.build(); + } else { + intelligenceConfigBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The `IntelligenceConfig` resource to be updated.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeIntelligenceConfig(com.google.storage.control.v2.IntelligenceConfig value) { + if (intelligenceConfigBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && intelligenceConfig_ != null + && intelligenceConfig_ + != com.google.storage.control.v2.IntelligenceConfig.getDefaultInstance()) { + getIntelligenceConfigBuilder().mergeFrom(value); + } else { + intelligenceConfig_ = value; + } + } else { + intelligenceConfigBuilder_.mergeFrom(value); + } + if (intelligenceConfig_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Required. The `IntelligenceConfig` resource to be updated.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearIntelligenceConfig() { + bitField0_ = (bitField0_ & ~0x00000001); + intelligenceConfig_ = null; + if (intelligenceConfigBuilder_ != null) { + intelligenceConfigBuilder_.dispose(); + intelligenceConfigBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The `IntelligenceConfig` resource to be updated.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.storage.control.v2.IntelligenceConfig.Builder getIntelligenceConfigBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getIntelligenceConfigFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The `IntelligenceConfig` resource to be updated.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.storage.control.v2.IntelligenceConfigOrBuilder + getIntelligenceConfigOrBuilder() { + if (intelligenceConfigBuilder_ != null) { + return intelligenceConfigBuilder_.getMessageOrBuilder(); + } else { + return intelligenceConfig_ == null + ? com.google.storage.control.v2.IntelligenceConfig.getDefaultInstance() + : intelligenceConfig_; + } + } + + /** + * + * + *
+     * Required. The `IntelligenceConfig` resource to be updated.
+     * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.IntelligenceConfig, + com.google.storage.control.v2.IntelligenceConfig.Builder, + com.google.storage.control.v2.IntelligenceConfigOrBuilder> + getIntelligenceConfigFieldBuilder() { + if (intelligenceConfigBuilder_ == null) { + intelligenceConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.control.v2.IntelligenceConfig, + com.google.storage.control.v2.IntelligenceConfig.Builder, + com.google.storage.control.v2.IntelligenceConfigOrBuilder>( + getIntelligenceConfig(), getParentForChildren(), isClean()); + intelligenceConfig_ = null; + } + return intelligenceConfigBuilder_; + } + + 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_; + + /** + * + * + *
+     * Required. The `update_mask` that specifies the fields within the
+     * `IntelligenceConfig` resource that should be modified by this update. Only
+     * the listed fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+     * Required. The `update_mask` that specifies the fields within the
+     * `IntelligenceConfig` resource that should be modified by this update. Only
+     * the listed fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @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(); + } + } + + /** + * + * + *
+     * Required. The `update_mask` that specifies the fields within the
+     * `IntelligenceConfig` resource that should be modified by this update. Only
+     * the listed fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + + /** + * + * + *
+     * Required. The `update_mask` that specifies the fields within the
+     * `IntelligenceConfig` resource that should be modified by this update. Only
+     * the listed fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + + /** + * + * + *
+     * Required. The `update_mask` that specifies the fields within the
+     * `IntelligenceConfig` resource that should be modified by this update. Only
+     * the listed fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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; + } + + /** + * + * + *
+     * Required. The `update_mask` that specifies the fields within the
+     * `IntelligenceConfig` resource that should be modified by this update. Only
+     * the listed fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000002); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The `update_mask` that specifies the fields within the
+     * `IntelligenceConfig` resource that should be modified by this update. Only
+     * the listed fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Required. The `update_mask` that specifies the fields within the
+     * `IntelligenceConfig` resource that should be modified by this update. Only
+     * the listed fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + + /** + * + * + *
+     * Required. The `update_mask` that specifies the fields within the
+     * `IntelligenceConfig` resource that should be modified by this update. Only
+     * the listed fields are updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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_; + } + + private java.lang.Object requestId_ = ""; + + /** + * + * + *
+     * Optional. The ID that uniquely identifies the request, preventing duplicate
+     * processing.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Optional. The ID that uniquely identifies the request, preventing duplicate
+     * processing.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Optional. The ID that uniquely identifies the request, preventing duplicate
+     * processing.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + requestId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The ID that uniquely identifies the request, preventing duplicate
+     * processing.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + requestId_ = getDefaultInstance().getRequestId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. The ID that uniquely identifies the request, preventing duplicate
+     * processing.
+     * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + requestId_ = 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.control.v2.UpdateProjectIntelligenceConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.storage.control.v2.UpdateProjectIntelligenceConfigRequest) + private static final com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest(); + } + + public static com.google.storage.control.v2.UpdateProjectIntelligenceConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateProjectIntelligenceConfigRequest 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.control.v2.UpdateProjectIntelligenceConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateProjectIntelligenceConfigRequestOrBuilder.java b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateProjectIntelligenceConfigRequestOrBuilder.java new file mode 100644 index 0000000000..ba62153497 --- /dev/null +++ b/proto-google-cloud-storage-control-v2/src/main/java/com/google/storage/control/v2/UpdateProjectIntelligenceConfigRequestOrBuilder.java @@ -0,0 +1,147 @@ +/* + * Copyright 2025 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/control/v2/storage_control.proto + +// Protobuf Java Version: 3.25.5 +package com.google.storage.control.v2; + +public interface UpdateProjectIntelligenceConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storage.control.v2.UpdateProjectIntelligenceConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The `IntelligenceConfig` resource to be updated.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the intelligenceConfig field is set. + */ + boolean hasIntelligenceConfig(); + + /** + * + * + *
+   * Required. The `IntelligenceConfig` resource to be updated.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The intelligenceConfig. + */ + com.google.storage.control.v2.IntelligenceConfig getIntelligenceConfig(); + + /** + * + * + *
+   * Required. The `IntelligenceConfig` resource to be updated.
+   * 
+ * + * + * .google.storage.control.v2.IntelligenceConfig intelligence_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.storage.control.v2.IntelligenceConfigOrBuilder getIntelligenceConfigOrBuilder(); + + /** + * + * + *
+   * Required. The `update_mask` that specifies the fields within the
+   * `IntelligenceConfig` resource that should be modified by this update. Only
+   * the listed fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + + /** + * + * + *
+   * Required. The `update_mask` that specifies the fields within the
+   * `IntelligenceConfig` resource that should be modified by this update. Only
+   * the listed fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + + /** + * + * + *
+   * Required. The `update_mask` that specifies the fields within the
+   * `IntelligenceConfig` resource that should be modified by this update. Only
+   * the listed fields are updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Optional. The ID that uniquely identifies the request, preventing duplicate
+   * processing.
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The requestId. + */ + java.lang.String getRequestId(); + + /** + * + * + *
+   * Optional. The ID that uniquely identifies the request, preventing duplicate
+   * processing.
+   * 
+ * + * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { ... } + * + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/proto-google-cloud-storage-control-v2/src/main/proto/google/storage/control/v2/storage_control.proto b/proto-google-cloud-storage-control-v2/src/main/proto/google/storage/control/v2/storage_control.proto index 9351a7d43f..28680a7617 100644 --- a/proto-google-cloud-storage-control-v2/src/main/proto/google/storage/control/v2/storage_control.proto +++ b/proto-google-cloud-storage-control-v2/src/main/proto/google/storage/control/v2/storage_control.proto @@ -16,13 +16,16 @@ syntax = "proto3"; package google.storage.control.v2; +import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/field_info.proto"; import "google/api/resource.proto"; import "google/api/routing.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Storage.Control.V2"; @@ -158,6 +161,151 @@ service StorageControl { }; option (google.api.method_signature) = "parent"; } + + // Creates an Anywhere Cache instance. + rpc CreateAnywhereCache(CreateAnywhereCacheRequest) + returns (google.longrunning.Operation) { + option (google.api.routing) = { + routing_parameters { field: "parent" path_template: "{bucket=**}" } + }; + option (google.api.method_signature) = "parent,anywhere_cache"; + option (google.longrunning.operation_info) = { + response_type: "AnywhereCache" + metadata_type: "CreateAnywhereCacheMetadata" + }; + } + + // Updates an Anywhere Cache instance. Mutable fields include `ttl` and + // `admission_policy`. + rpc UpdateAnywhereCache(UpdateAnywhereCacheRequest) + returns (google.longrunning.Operation) { + option (google.api.routing) = { + routing_parameters { + field: "anywhere_cache.name" + path_template: "{bucket=projects/*/buckets/*}/**" + } + }; + option (google.api.method_signature) = "anywhere_cache,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "AnywhereCache" + metadata_type: "UpdateAnywhereCacheMetadata" + }; + } + + // Disables an Anywhere Cache instance. A disabled instance is read-only. The + // disablement could be revoked by calling ResumeAnywhereCache. The cache + // instance will be deleted automatically if it remains in the disabled state + // for at least one hour. + rpc DisableAnywhereCache(DisableAnywhereCacheRequest) + returns (AnywhereCache) { + option (google.api.routing) = { + routing_parameters { + field: "name" + path_template: "{bucket=projects/*/buckets/*}/**" + } + }; + option (google.api.method_signature) = "name"; + } + + // Pauses an Anywhere Cache instance. + rpc PauseAnywhereCache(PauseAnywhereCacheRequest) returns (AnywhereCache) { + option (google.api.routing) = { + routing_parameters { + field: "name" + path_template: "{bucket=projects/*/buckets/*}/**" + } + }; + option (google.api.method_signature) = "name"; + } + + // Resumes a disabled or paused Anywhere Cache instance. + rpc ResumeAnywhereCache(ResumeAnywhereCacheRequest) returns (AnywhereCache) { + option (google.api.routing) = { + routing_parameters { + field: "name" + path_template: "{bucket=projects/*/buckets/*}/**" + } + }; + option (google.api.method_signature) = "name"; + } + + // Gets an Anywhere Cache instance. + rpc GetAnywhereCache(GetAnywhereCacheRequest) returns (AnywhereCache) { + option (google.api.routing) = { + routing_parameters { + field: "name" + path_template: "{bucket=projects/*/buckets/*}/**" + } + }; + option (google.api.method_signature) = "name"; + } + + // Lists Anywhere Cache instances for a given bucket. + rpc ListAnywhereCaches(ListAnywhereCachesRequest) + returns (ListAnywhereCachesResponse) { + option (google.api.routing) = { + routing_parameters { field: "parent" path_template: "{bucket=**}" } + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the Project scoped singleton IntelligenceConfig resource. + rpc GetProjectIntelligenceConfig(GetProjectIntelligenceConfigRequest) + returns (IntelligenceConfig) { + option (google.api.http) = { + get: "/v2/{name=projects/*/locations/*/intelligenceConfig}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the Project scoped singleton IntelligenceConfig resource. + rpc UpdateProjectIntelligenceConfig(UpdateProjectIntelligenceConfigRequest) + returns (IntelligenceConfig) { + option (google.api.http) = { + patch: "/v2/{intelligence_config.name=projects/*/locations/*/intelligenceConfig}" + body: "intelligence_config" + }; + option (google.api.method_signature) = "intelligence_config,update_mask"; + } + + // Returns the Folder scoped singleton IntelligenceConfig resource. + rpc GetFolderIntelligenceConfig(GetFolderIntelligenceConfigRequest) + returns (IntelligenceConfig) { + option (google.api.http) = { + get: "/v2/{name=folders/*/locations/*/intelligenceConfig}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the Folder scoped singleton IntelligenceConfig resource. + rpc UpdateFolderIntelligenceConfig(UpdateFolderIntelligenceConfigRequest) + returns (IntelligenceConfig) { + option (google.api.http) = { + patch: "/v2/{intelligence_config.name=folders/*/locations/*/intelligenceConfig}" + body: "intelligence_config" + }; + option (google.api.method_signature) = "intelligence_config,update_mask"; + } + + // Returns the Organization scoped singleton IntelligenceConfig resource. + rpc GetOrganizationIntelligenceConfig( + GetOrganizationIntelligenceConfigRequest) returns (IntelligenceConfig) { + option (google.api.http) = { + get: "/v2/{name=organizations/*/locations/*/intelligenceConfig}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the Organization scoped singleton IntelligenceConfig resource. + rpc UpdateOrganizationIntelligenceConfig( + UpdateOrganizationIntelligenceConfigRequest) + returns (IntelligenceConfig) { + option (google.api.http) = { + patch: "/v2/{intelligence_config.name=organizations/*/locations/*/intelligenceConfig}" + body: "intelligence_config" + }; + option (google.api.method_signature) = "intelligence_config,update_mask"; + } } // Contains information about a pending rename operation. @@ -424,11 +572,13 @@ message StorageLayout { option (google.api.resource) = { type: "storage.googleapis.com/StorageLayout" pattern: "projects/{project}/buckets/{bucket}/storageLayout" + plural: "storageLayouts" + singular: "storageLayout" }; // Configuration for Custom Dual Regions. It should specify precisely two // eligible regions within the same Multiregion. More information on regions - // may be found [https://cloud.google.com/storage/docs/locations][here]. + // may be found [here](https://cloud.google.com/storage/docs/locations). message CustomPlacementConfig { // List of locations to use for data placement. repeated string data_locations = 1; @@ -642,3 +792,559 @@ message ListManagedFoldersResponse { // this value in a subsequent request to return the next page of results. string next_page_token = 2; } + +// Message returned in the metadata field of the Operation resource for +// CreateAnywhereCache operations. +message CreateAnywhereCacheMetadata { + // Generic metadata for the long running operation. + CommonLongRunningOperationMetadata common_metadata = 1; + + // Anywhere Cache ID. + optional string anywhere_cache_id = 2; + + // The zone in which the cache instance is running. For example, + // us-central1-a. + optional string zone = 6; + + // Anywhere Cache entry's TTL. A cache-level config that is applied to all new + // cache entries on admission. Default ttl value (24hrs) is applied if not + // specified in the create request. + optional google.protobuf.Duration ttl = 3; + + // Anywhere Cache entry Admission Policy in kebab-case (e.g., + // "admit-on-first-miss"). Default admission policy (admit-on-first-miss) is + // applied if not specified in the create request. + optional string admission_policy = 5; +} + +// Message returned in the metadata field of the Operation resource for +// UpdateAnywhereCache operation. +message UpdateAnywhereCacheMetadata { + // Generic metadata for the long running operation. + CommonLongRunningOperationMetadata common_metadata = 1; + + // Anywhere Cache ID. + optional string anywhere_cache_id = 2; + + // The zone in which the cache instance is running. For example, + // us-central1-a. + optional string zone = 5; + + // Anywhere Cache entry's TTL between 1h and 7days. A cache-level config that + // is applied to all new cache entries on admission. If `ttl` is pending + // update, this field equals to the new value specified in the Update request. + optional google.protobuf.Duration ttl = 3; + + // L4 Cache entry Admission Policy in kebab-case (e.g., + // "admit-on-first-miss"). If `admission_policy` is pending + // update, this field equals to the new value specified in the Update request. + optional string admission_policy = 4; +} + +// An Anywhere Cache Instance. +message AnywhereCache { + option (google.api.resource) = { + type: "storage.googleapis.com/AnywhereCache" + pattern: "projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}" + plural: "anywhereCaches" + singular: "anywhereCache" + }; + + // Immutable. The resource name of this AnywhereCache. + // Format: + // `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. The zone in which the cache instance is running. For example, + // us-central1-a. + string zone = 10 [(google.api.field_behavior) = IMMUTABLE]; + + // Cache entry TTL (ranges between 1h to 7d). This is a cache-level config + // that defines how long a cache entry can live. Default ttl value (24hrs) + // is applied if not specified in the create request. TTL must be in whole + // seconds. + google.protobuf.Duration ttl = 3; + + // Cache admission policy. Valid policies includes: + // `admit-on-first-miss` and `admit-on-second-miss`. Defaults to + // `admit-on-first-miss`. Default value is applied if not specified in the + // create request. + string admission_policy = 9; + + // Output only. Cache state including RUNNING, CREATING, DISABLED and PAUSED. + string state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when Anywhere cache instance is allocated. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when Anywhere cache instance is last updated, including + // creation. + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. True if there is an active update operation against this cache + // instance. Subsequential update requests will be rejected if this field is + // true. Output only. + bool pending_update = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for CreateAnywhereCache. +message CreateAnywhereCacheRequest { + // Required. The bucket to which this cache belongs. + // Format: `projects/{project}/buckets/{bucket}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "storage.googleapis.com/AnywhereCache" + } + ]; + + // Required. Properties of the Anywhere Cache instance being created. + // The parent bucket name is specified in the `parent` field. Server uses the + // default value of `ttl` or `admission_policy` if not specified in + // request. + AnywhereCache anywhere_cache = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A unique identifier for this request. UUID is the recommended + // format, but other formats are still accepted. This request is only + // idempotent if a `request_id` is provided. + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for UpdateAnywhereCache. +message UpdateAnywhereCacheRequest { + // Required. The Anywhere Cache instance to be updated. + AnywhereCache anywhere_cache = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. List of fields to be updated. Mutable fields of AnywhereCache + // include `ttl` and `admission_policy`. + // + // To specify ALL fields, specify a single field with the value `*`. Note: We + // recommend against doing this. If a new field is introduced at a later time, + // an older client updating with the `*` may accidentally reset the new + // field's value. + // + // Not specifying any fields is an error. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. A unique identifier for this request. UUID is the recommended + // format, but other formats are still accepted. This request is only + // idempotent if a `request_id` is provided. + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for DisableAnywhereCache. +message DisableAnywhereCacheRequest { + // Required. The name field in the request should be: + // `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "storage.googleapis.com/AnywhereCache" + } + ]; + + // Optional. A unique identifier for this request. UUID is the recommended + // format, but other formats are still accepted. This request is only + // idempotent if a `request_id` is provided. + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for PauseAnywhereCache. +message PauseAnywhereCacheRequest { + // Required. The name field in the request should be: + // `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "storage.googleapis.com/AnywhereCache" + } + ]; + + // Optional. A unique identifier for this request. UUID is the recommended + // format, but other formats are still accepted. This request is only + // idempotent if a `request_id` is provided. + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for ResumeAnywhereCache. +message ResumeAnywhereCacheRequest { + // Required. The name field in the request should be: + // `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "storage.googleapis.com/AnywhereCache" + } + ]; + + // Optional. A unique identifier for this request. UUID is the recommended + // format, but other formats are still accepted. This request is only + // idempotent if a `request_id` is provided. + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for GetAnywhereCache. +message GetAnywhereCacheRequest { + // Required. The name field in the request should be: + // `projects/{project}/buckets/{bucket}/anywhereCaches/{anywhere_cache}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "storage.googleapis.com/AnywhereCache" + } + ]; + + // Optional. A unique identifier for this request. UUID is the recommended + // format, but other formats are still accepted. + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message for ListAnywhereCaches. +message ListAnywhereCachesRequest { + // Required. The bucket to which this cache belongs. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "storage.googleapis.com/AnywhereCache" + } + ]; + + // Maximum number of caches to return in a single response. + // The service will use this parameter or 1,000 items, whichever is smaller. + int32 page_size = 2; + + // A previously-returned page token representing part of the larger set of + // results to view. + string page_token = 3; + + // Optional. A unique identifier for this request. UUID is the recommended + // format, but other formats are still accepted. + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Response message for ListAnywhereCaches. +message ListAnywhereCachesResponse { + // The list of items. + repeated AnywhereCache anywhere_caches = 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; +} + +// The `IntelligenceConfig` resource associated with your organization, folder, +// or project. +message IntelligenceConfig { + option (google.api.resource) = { + type: "storage.googleapis.com/IntelligenceConfig" + pattern: "folders/{folder}/locations/{location}/intelligenceConfig" + pattern: "organizations/{org}/locations/{location}/intelligenceConfig" + pattern: "projects/{project}/locations/{location}/intelligenceConfig" + plural: "intelligenceConfigs" + singular: "intelligenceConfig" + }; + + // The edition configuration of the `IntelligenceConfig` resource. This + // signifies the edition used for configuring the `IntelligenceConfig` + // resource and can only take the following values: + // `EDITION_CONFIG_UNSPECIFIED`, `INHERIT`, `DISABLED`, `STANDARD` and + // `TRIAL`. + enum EditionConfig { + // This is an unknown edition of the resource. + EDITION_CONFIG_UNSPECIFIED = 0; + + // The inherited edition from the parent and filters. This is the default + // edition when there is no `IntelligenceConfig` setup for a GCP resource. + INHERIT = 1; + + // The edition configuration is disabled for the `IntelligenceConfig` + // resource and its children. Filters are not applicable. + DISABLED = 2; + + // The `IntelligenceConfig` resource is of STANDARD edition. + STANDARD = 3; + + // The `IntelligenceConfig` resource is available in `TRIAL` edition. During + // the trial period, Cloud Storage does not charge for Storage Intelligence + // usage. You can specify the buckets to include in the trial period by + // using filters. At the end of the trial period, the `IntelligenceConfig` + // resource is upgraded to `STANDARD` edition. + TRIAL = 5; + } + + // Filter over location and bucket using include or exclude semantics. + // Resources that match the include or exclude filter are exclusively included + // or excluded from the Storage Intelligence plan. + message Filter { + // Collection of bucket locations. + message CloudStorageLocations { + // Optional. Bucket locations. Location can be any of the Cloud Storage + // regions specified in lower case format. For example, `us-east1`, + // `us-west1`. + repeated string locations = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Collection of buckets. + message CloudStorageBuckets { + // Optional. A regex pattern for matching bucket names. Regex should + // follow the syntax specified in + // [google/re2](https://github.com/google/re2). For example, + // `^sample_.*` matches all buckets of the form + // `gs://sample_bucket-1`, `gs://sample_bucket-2`, + // `gs://sample_bucket-n` but not `gs://test_sample_bucket`. + // If you want to match a single bucket, say `gs://sample_bucket`, + // use `sample_bucket`. + repeated string bucket_id_regexes = 1 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Bucket locations to include or exclude. + oneof cloud_storage_locations { + // Bucket locations to include. + CloudStorageLocations included_cloud_storage_locations = 1; + + // Bucket locations to exclude. + CloudStorageLocations excluded_cloud_storage_locations = 2; + } + + // Buckets to include or exclude. + oneof cloud_storage_buckets { + // Buckets to include. + CloudStorageBuckets included_cloud_storage_buckets = 3; + + // Buckets to exclude. + CloudStorageBuckets excluded_cloud_storage_buckets = 4; + } + } + + // The effective `IntelligenceConfig` for the resource. + message EffectiveIntelligenceConfig { + // The effective edition of the `IntelligenceConfig` resource. + enum EffectiveEdition { + // This is an unknown edition of the resource. + EFFECTIVE_EDITION_UNSPECIFIED = 0; + + // No edition. + NONE = 1; + + // The `IntelligenceConfig` resource is of STANDARD edition. + STANDARD = 2; + } + + // Output only. The `IntelligenceConfig` edition that is applicable for the + // resource. + EffectiveEdition effective_edition = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The `IntelligenceConfig` resource that is applied for the + // target resource. Format: + // `{organizations|folders|projects}/{id}/locations/{location}/intelligenceConfig` + string intelligence_config = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // The trial configuration of the `IntelligenceConfig` resource. + message TrialConfig { + // Output only. The time at which the trial expires. + google.protobuf.Timestamp expire_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Identifier. The name of the `IntelligenceConfig` resource associated with + // your organization, folder, or project. + // + // The name format varies based on the GCP resource hierarchy as follows: + // + // * For project: + // `projects/{project_number}/locations/global/intelligenceConfig` + // * For organization: + // `organizations/{org_id}/locations/global/intelligenceConfig` + // * For folder: `folders/{folder_id}/locations/global/intelligenceConfig` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. The edition configuration of the `IntelligenceConfig` resource. + EditionConfig edition_config = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time at which the `IntelligenceConfig` resource is last + // updated. + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Filter over location and bucket. + Filter filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The `IntelligenceConfig` resource that is applicable for the + // resource. + EffectiveIntelligenceConfig effective_intelligence_config = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The trial configuration of the `IntelligenceConfig` resource. + TrialConfig trial_config = 7; +} + +// Request message to update the `IntelligenceConfig` resource associated with +// your organization. +// +// **IAM Permissions**: +// +// Requires `storage.intelligenceConfigs.update` +// [IAM](https://cloud.google.com/iam/docs/overview#permissions) permission on +// the organization. +message UpdateOrganizationIntelligenceConfigRequest { + // Required. The `IntelligenceConfig` resource to be updated. + IntelligenceConfig intelligence_config = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The `update_mask` that specifies the fields within the + // `IntelligenceConfig` resource that should be modified by this update. Only + // the listed fields are updated. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The ID that uniquely identifies the request, preventing duplicate + // processing. + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message to update the `IntelligenceConfig` resource associated with +// your folder. +// +// **IAM Permissions**: +// +// Requires `storage.intelligenceConfigs.update` +// [IAM](https://cloud.google.com/iam/docs/overview#permissions) permission on +// the folder. +message UpdateFolderIntelligenceConfigRequest { + // Required. The `IntelligenceConfig` resource to be updated. + IntelligenceConfig intelligence_config = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The `update_mask` that specifies the fields within the + // `IntelligenceConfig` resource that should be modified by this update. Only + // the listed fields are updated. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The ID that uniquely identifies the request, preventing duplicate + // processing. + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message to update the `IntelligenceConfig` resource associated with +// your project. +// +// **IAM Permissions**: +// +// Requires `storage.intelligenceConfigs.update` +// [IAM](https://cloud.google.com/iam/docs/overview#permissions) permission on +// the folder. +message UpdateProjectIntelligenceConfigRequest { + // Required. The `IntelligenceConfig` resource to be updated. + IntelligenceConfig intelligence_config = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The `update_mask` that specifies the fields within the + // `IntelligenceConfig` resource that should be modified by this update. Only + // the listed fields are updated. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The ID that uniquely identifies the request, preventing duplicate + // processing. + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Request message to get the `IntelligenceConfig` resource associated with your +// organization. +// +// **IAM Permissions** +// +// Requires `storage.intelligenceConfigs.get` +// [IAM](https://cloud.google.com/iam/docs/overview#permissions) permission on +// the organization. +message GetOrganizationIntelligenceConfigRequest { + // Required. The name of the `IntelligenceConfig` resource associated with + // your organization. + // + // Format: `organizations/{org_id}/locations/global/intelligenceConfig` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "storage.googleapis.com/IntelligenceConfig" + } + ]; +} + +// Request message to get the `IntelligenceConfig` resource associated with your +// folder. +// +// **IAM Permissions** +// +// Requires `storage.intelligenceConfigs.get` +// [IAM](https://cloud.google.com/iam/docs/overview#permissions) permission on +// the folder. +message GetFolderIntelligenceConfigRequest { + // Required. The name of the `IntelligenceConfig` resource associated with + // your folder. + // + // Format: `folders/{id}/locations/global/intelligenceConfig` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "storage.googleapis.com/IntelligenceConfig" + } + ]; +} + +// Request message to get the `IntelligenceConfig` resource associated with your +// project. +// +// **IAM Permissions**: +// +// Requires `storage.intelligenceConfigs.get` +// [IAM](https://cloud.google.com/iam/docs/overview#permissions) permission +// on the project. +message GetProjectIntelligenceConfigRequest { + // Required. The name of the `IntelligenceConfig` resource associated with + // your project. + // + // Format: `projects/{id}/locations/global/intelligenceConfig` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "storage.googleapis.com/IntelligenceConfig" + } + ]; +} From a374cf45f628e646f52a21aa09ac554d57170f03 Mon Sep 17 00:00:00 2001 From: Diego Marquez Date: Tue, 20 May 2025 16:21:54 -0400 Subject: [PATCH 03/22] chore: hermetic build to manage the graalvm presubmit image versions (#3111) https://github.com/googleapis/sdk-platform-java/pull/3800 --- renovate.json | 9 --------- 1 file changed, 9 deletions(-) diff --git a/renovate.json b/renovate.json index c4eb8ff74d..6ee6e25a9e 100644 --- a/renovate.json +++ b/renovate.json @@ -12,15 +12,6 @@ ], "ignorePaths": [".kokoro/requirements.txt"], "customManagers": [ - { - "customType": "regex", - "fileMatch": [ - "^.kokoro/presubmit/graalvm-native.*.cfg$" - ], - "matchStrings": ["value: \"gcr.io/cloud-devrel-public-resources/graalvm.*:(?.*?)\""], - "depNameTemplate": "com.google.cloud:sdk-platform-java-config", - "datasourceTemplate": "maven" - }, { "customType": "regex", "fileMatch": [ From ca46d00085a8e05a79ca69ee70b895e819470a6e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 20 May 2025 16:23:07 -0400 Subject: [PATCH 04/22] chore(main): release 2.52.4-SNAPSHOT (#3107) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- gapic-google-cloud-storage-v2/pom.xml | 4 ++-- google-cloud-storage-bom/pom.xml | 16 ++++++++-------- google-cloud-storage-control/pom.xml | 4 ++-- google-cloud-storage/pom.xml | 4 ++-- grpc-google-cloud-storage-control-v2/pom.xml | 4 ++-- grpc-google-cloud-storage-v2/pom.xml | 4 ++-- pom.xml | 16 ++++++++-------- proto-google-cloud-storage-control-v2/pom.xml | 4 ++-- proto-google-cloud-storage-v2/pom.xml | 4 ++-- samples/snapshot/pom.xml | 6 +++--- storage-shared-benchmarking/pom.xml | 4 ++-- versions.txt | 14 +++++++------- 12 files changed, 42 insertions(+), 42 deletions(-) diff --git a/gapic-google-cloud-storage-v2/pom.xml b/gapic-google-cloud-storage-v2/pom.xml index 8b03e777fc..fd1bbd0a61 100644 --- a/gapic-google-cloud-storage-v2/pom.xml +++ b/gapic-google-cloud-storage-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc gapic-google-cloud-storage-v2 - 2.52.3 + 2.52.4-SNAPSHOT gapic-google-cloud-storage-v2 GRPC library for gapic-google-cloud-storage-v2 com.google.cloud google-cloud-storage-parent - 2.52.3 + 2.52.4-SNAPSHOT diff --git a/google-cloud-storage-bom/pom.xml b/google-cloud-storage-bom/pom.xml index 90849cc68a..35adcf376c 100644 --- a/google-cloud-storage-bom/pom.xml +++ b/google-cloud-storage-bom/pom.xml @@ -19,7 +19,7 @@ 4.0.0 com.google.cloud google-cloud-storage-bom - 2.52.3 + 2.52.4-SNAPSHOT pom com.google.cloud @@ -69,37 +69,37 @@ com.google.cloud google-cloud-storage - 2.52.3 + 2.52.4-SNAPSHOT com.google.api.grpc gapic-google-cloud-storage-v2 - 2.52.3 + 2.52.4-SNAPSHOT com.google.api.grpc grpc-google-cloud-storage-v2 - 2.52.3 + 2.52.4-SNAPSHOT com.google.api.grpc proto-google-cloud-storage-v2 - 2.52.3 + 2.52.4-SNAPSHOT com.google.cloud google-cloud-storage-control - 2.52.3 + 2.52.4-SNAPSHOT com.google.api.grpc grpc-google-cloud-storage-control-v2 - 2.52.3 + 2.52.4-SNAPSHOT com.google.api.grpc proto-google-cloud-storage-control-v2 - 2.52.3 + 2.52.4-SNAPSHOT diff --git a/google-cloud-storage-control/pom.xml b/google-cloud-storage-control/pom.xml index c900ffebdf..f52135c3e0 100644 --- a/google-cloud-storage-control/pom.xml +++ b/google-cloud-storage-control/pom.xml @@ -5,13 +5,13 @@ 4.0.0 com.google.cloud google-cloud-storage-control - 2.52.3 + 2.52.4-SNAPSHOT google-cloud-storage-control GRPC library for google-cloud-storage-control com.google.cloud google-cloud-storage-parent - 2.52.3 + 2.52.4-SNAPSHOT diff --git a/google-cloud-storage/pom.xml b/google-cloud-storage/pom.xml index 9c37b3968a..66fe1d9060 100644 --- a/google-cloud-storage/pom.xml +++ b/google-cloud-storage/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-storage - 2.52.3 + 2.52.4-SNAPSHOT jar Google Cloud Storage https://github.com/googleapis/java-storage @@ -12,7 +12,7 @@ com.google.cloud google-cloud-storage-parent - 2.52.3 + 2.52.4-SNAPSHOT google-cloud-storage diff --git a/grpc-google-cloud-storage-control-v2/pom.xml b/grpc-google-cloud-storage-control-v2/pom.xml index 0f9902988d..6a79d23147 100644 --- a/grpc-google-cloud-storage-control-v2/pom.xml +++ b/grpc-google-cloud-storage-control-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-storage-control-v2 - 2.52.3 + 2.52.4-SNAPSHOT grpc-google-cloud-storage-control-v2 GRPC library for google-cloud-storage com.google.cloud google-cloud-storage-parent - 2.52.3 + 2.52.4-SNAPSHOT diff --git a/grpc-google-cloud-storage-v2/pom.xml b/grpc-google-cloud-storage-v2/pom.xml index a8e15cd49f..ae09078613 100644 --- a/grpc-google-cloud-storage-v2/pom.xml +++ b/grpc-google-cloud-storage-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-storage-v2 - 2.52.3 + 2.52.4-SNAPSHOT grpc-google-cloud-storage-v2 GRPC library for grpc-google-cloud-storage-v2 com.google.cloud google-cloud-storage-parent - 2.52.3 + 2.52.4-SNAPSHOT diff --git a/pom.xml b/pom.xml index 65c6685c1b..6b130f6eb3 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-storage-parent pom - 2.52.3 + 2.52.4-SNAPSHOT Storage Parent https://github.com/googleapis/java-storage @@ -82,7 +82,7 @@ com.google.cloud google-cloud-storage - 2.52.3 + 2.52.4-SNAPSHOT com.google.apis @@ -104,32 +104,32 @@ com.google.api.grpc proto-google-cloud-storage-v2 - 2.52.3 + 2.52.4-SNAPSHOT com.google.api.grpc grpc-google-cloud-storage-v2 - 2.52.3 + 2.52.4-SNAPSHOT com.google.api.grpc gapic-google-cloud-storage-v2 - 2.52.3 + 2.52.4-SNAPSHOT com.google.api.grpc grpc-google-cloud-storage-control-v2 - 2.52.3 + 2.52.4-SNAPSHOT com.google.api.grpc proto-google-cloud-storage-control-v2 - 2.52.3 + 2.52.4-SNAPSHOT com.google.cloud google-cloud-storage-control - 2.52.3 + 2.52.4-SNAPSHOT com.google.cloud diff --git a/proto-google-cloud-storage-control-v2/pom.xml b/proto-google-cloud-storage-control-v2/pom.xml index 993f3f4849..5dd6fab19d 100644 --- a/proto-google-cloud-storage-control-v2/pom.xml +++ b/proto-google-cloud-storage-control-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-storage-control-v2 - 2.52.3 + 2.52.4-SNAPSHOT proto-google-cloud-storage-control-v2 Proto library for proto-google-cloud-storage-control-v2 com.google.cloud google-cloud-storage-parent - 2.52.3 + 2.52.4-SNAPSHOT diff --git a/proto-google-cloud-storage-v2/pom.xml b/proto-google-cloud-storage-v2/pom.xml index 43c5ed9c02..55951e8a4b 100644 --- a/proto-google-cloud-storage-v2/pom.xml +++ b/proto-google-cloud-storage-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-storage-v2 - 2.52.3 + 2.52.4-SNAPSHOT proto-google-cloud-storage-v2 PROTO library for proto-google-cloud-storage-v2 com.google.cloud google-cloud-storage-parent - 2.52.3 + 2.52.4-SNAPSHOT diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 8ad169a8ef..0727335a2e 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,12 +28,12 @@ com.google.cloud google-cloud-storage - 2.52.3 + 2.52.4-SNAPSHOT com.google.cloud google-cloud-storage-control - 2.52.3 + 2.52.4-SNAPSHOT compile @@ -64,7 +64,7 @@ com.google.cloud google-cloud-storage - 2.52.3 + 2.52.4-SNAPSHOT tests test diff --git a/storage-shared-benchmarking/pom.xml b/storage-shared-benchmarking/pom.xml index 1fde6135ae..69576f5987 100644 --- a/storage-shared-benchmarking/pom.xml +++ b/storage-shared-benchmarking/pom.xml @@ -10,7 +10,7 @@ com.google.cloud google-cloud-storage-parent - 2.52.3 + 2.52.4-SNAPSHOT @@ -31,7 +31,7 @@ com.google.cloud google-cloud-storage - 2.52.3 + 2.52.4-SNAPSHOT tests diff --git a/versions.txt b/versions.txt index 869aca8d55..a0c9fc5cf5 100644 --- a/versions.txt +++ b/versions.txt @@ -1,10 +1,10 @@ # Format: # module:released-version:current-version -google-cloud-storage:2.52.3:2.52.3 -gapic-google-cloud-storage-v2:2.52.3:2.52.3 -grpc-google-cloud-storage-v2:2.52.3:2.52.3 -proto-google-cloud-storage-v2:2.52.3:2.52.3 -google-cloud-storage-control:2.52.3:2.52.3 -proto-google-cloud-storage-control-v2:2.52.3:2.52.3 -grpc-google-cloud-storage-control-v2:2.52.3:2.52.3 +google-cloud-storage:2.52.3:2.52.4-SNAPSHOT +gapic-google-cloud-storage-v2:2.52.3:2.52.4-SNAPSHOT +grpc-google-cloud-storage-v2:2.52.3:2.52.4-SNAPSHOT +proto-google-cloud-storage-v2:2.52.3:2.52.4-SNAPSHOT +google-cloud-storage-control:2.52.3:2.52.4-SNAPSHOT +proto-google-cloud-storage-control-v2:2.52.3:2.52.4-SNAPSHOT +grpc-google-cloud-storage-control-v2:2.52.3:2.52.4-SNAPSHOT From 31772d75e03a9768362238d12e3f0205ce4ac6f0 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 20 May 2025 22:23:40 +0200 Subject: [PATCH 05/22] chore(deps): update storage release dependencies (#3099) --- samples/install-without-bom/pom.xml | 6 +++--- samples/snippets/pom.xml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 6b971470cf..caa32daa96 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -30,12 +30,12 @@ com.google.cloud google-cloud-storage - 2.52.2 + 2.52.3 com.google.cloud google-cloud-storage-control - 2.52.2 + 2.52.3 @@ -72,7 +72,7 @@ com.google.cloud google-cloud-storage - 2.52.2 + 2.52.3 tests test diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index ae5d5cdf3e..619806920a 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 26.59.0 + 26.60.0 pom import @@ -93,7 +93,7 @@ com.google.cloud google-cloud-storage - 2.52.2 + 2.52.3 tests test From 7c2ae957487945dee298479f1f42c5634e83c9de Mon Sep 17 00:00:00 2001 From: cloud-java-bot <122572305+cloud-java-bot@users.noreply.github.com> Date: Wed, 21 May 2025 10:57:06 -0400 Subject: [PATCH 06/22] chore: Update generation configuration at Wed May 21 02:30:22 UTC 2025 (#3113) * chore: Update generation configuration at Wed May 21 02:30:22 UTC 2025 * chore: generate libraries at Wed May 21 02:30:57 UTC 2025 --- README.md | 6 +++--- generation_config.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 22c9862e8d..ce251217b6 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.59.0 + 26.60.0 pom import @@ -46,12 +46,12 @@ If you are using Maven without the BOM, add this to your dependencies: com.google.cloud google-cloud-storage - 2.52.2 + 2.52.3 com.google.cloud google-cloud-storage-control - 2.52.2 + 2.52.3 ``` diff --git a/generation_config.yaml b/generation_config.yaml index c94688aa2f..44e1ba046c 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.58.0 -googleapis_commitish: 7d43527b927f65a80de9f0071d0a2e1c172de849 +googleapis_commitish: 5c929307255b1726cdc72855ffc67014fc897d11 libraries_bom_version: 26.60.0 libraries: - api_shortname: storage From 53b6927de9e5b948e1192e6cf716b88cc872c632 Mon Sep 17 00:00:00 2001 From: cloud-java-bot <122572305+cloud-java-bot@users.noreply.github.com> Date: Thu, 22 May 2025 11:18:14 -0400 Subject: [PATCH 07/22] chore: Update generation configuration at Thu May 22 02:30:36 UTC 2025 (#3114) * chore: Update generation configuration at Thu May 22 02:30:36 UTC 2025 * chore: generate libraries at Thu May 22 02:31:04 UTC 2025 --- .../com/google/storage/v2/StorageClient.java | 68 +- .../storage/v2/stub/GrpcStorageStub.java | 6 + .../com.google.storage.v2/reflect-config.json | 81 + .../google/storage/v2/StorageClientTest.java | 17 + generation_config.yaml | 2 +- .../com/google/storage/v2/StorageGrpc.java | 40 +- .../storage/v2/BidiReadObjectRequest.java | 476 +- .../v2/BidiReadObjectRequestOrBuilder.java | 107 +- .../google/storage/v2/BidiReadObjectSpec.java | 116 +- .../v2/BidiReadObjectSpecOrBuilder.java | 31 +- .../storage/v2/BidiWriteObjectRequest.java | 356 +- .../v2/BidiWriteObjectRequestOrBuilder.java | 89 +- .../java/com/google/storage/v2/Bucket.java | 8668 +++++++++++++---- .../storage/v2/BucketAccessControl.java | 268 +- .../v2/BucketAccessControlOrBuilder.java | 74 +- .../google/storage/v2/BucketOrBuilder.java | 468 +- .../storage/v2/CommonObjectRequestParams.java | 90 +- .../CommonObjectRequestParamsOrBuilder.java | 24 +- .../storage/v2/ComposeObjectRequest.java | 487 +- .../v2/ComposeObjectRequestOrBuilder.java | 104 +- .../storage/v2/CreateBucketRequest.java | 153 +- .../v2/CreateBucketRequestOrBuilder.java | 42 +- .../google/storage/v2/CustomerEncryption.java | 44 +- .../v2/CustomerEncryptionOrBuilder.java | 12 +- .../storage/v2/DeleteObjectRequest.java | 108 +- .../v2/DeleteObjectRequestOrBuilder.java | 27 +- .../google/storage/v2/GetObjectRequest.java | 108 +- .../storage/v2/GetObjectRequestOrBuilder.java | 27 +- .../google/storage/v2/ListBucketsRequest.java | 110 +- .../v2/ListBucketsRequestOrBuilder.java | 30 +- .../google/storage/v2/ListObjectsRequest.java | 209 +- .../v2/ListObjectsRequestOrBuilder.java | 58 +- .../java/com/google/storage/v2/Object.java | 2375 ++++- .../storage/v2/ObjectAccessControl.java | 275 +- .../v2/ObjectAccessControlOrBuilder.java | 76 +- .../google/storage/v2/ObjectChecksums.java | 16 +- .../storage/v2/ObjectChecksumsOrBuilder.java | 4 +- .../google/storage/v2/ObjectOrBuilder.java | 271 +- .../java/com/google/storage/v2/Owner.java | 56 +- .../com/google/storage/v2/OwnerOrBuilder.java | 16 +- .../com/google/storage/v2/ProjectTeam.java | 56 +- .../storage/v2/ProjectTeamOrBuilder.java | 16 +- .../storage/v2/QueryWriteStatusRequest.java | 84 +- .../v2/QueryWriteStatusRequestOrBuilder.java | 21 +- .../google/storage/v2/ReadObjectRequest.java | 168 +- .../v2/ReadObjectRequestOrBuilder.java | 42 +- .../storage/v2/RestoreObjectRequest.java | 84 +- .../v2/RestoreObjectRequestOrBuilder.java | 21 +- .../storage/v2/RewriteObjectRequest.java | 689 +- .../v2/RewriteObjectRequestOrBuilder.java | 180 +- .../v2/StartResumableWriteRequest.java | 204 +- .../StartResumableWriteRequestOrBuilder.java | 51 +- .../com/google/storage/v2/StorageProto.java | 764 +- .../storage/v2/UpdateBucketRequest.java | 77 +- .../v2/UpdateBucketRequestOrBuilder.java | 22 +- .../storage/v2/UpdateObjectRequest.java | 112 +- .../v2/UpdateObjectRequestOrBuilder.java | 29 +- .../google/storage/v2/WriteObjectRequest.java | 244 +- .../v2/WriteObjectRequestOrBuilder.java | 61 +- .../google/storage/v2/WriteObjectSpec.java | 28 +- .../storage/v2/WriteObjectSpecOrBuilder.java | 8 +- .../proto/google/storage/v2/storage.proto | 1086 ++- 62 files changed, 13973 insertions(+), 5663 deletions(-) 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 c03a4e70ec..a8dfaf263a 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 @@ -184,7 +184,7 @@ * * *

GetIamPolicy - *

Gets the IAM policy for a specified bucket. The `resource` field in the request should be `projects/_/buckets/{bucket}`. + *

Gets the IAM policy for a specified bucket. The `resource` field in the request should be `projects/_/buckets/{bucket}` for a bucket, or `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` for a managed folder. * *

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

*
    @@ -203,7 +203,7 @@ * * *

    SetIamPolicy - *

    Updates an IAM policy for the specified bucket. The `resource` field in the request should be `projects/_/buckets/{bucket}`. + *

    Updates an IAM policy for the specified bucket. The `resource` field in the request should be `projects/_/buckets/{bucket}` for a bucket, or `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` for a managed folder. * *

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

    *
      @@ -856,11 +856,13 @@ public final UnaryCallable getBucketCallable() { * } * } * - * @param parent Required. The project to which this bucket will belong. - * @param bucket Properties of the new bucket being inserted. The name of the bucket is specified - * in the `bucket_id` field. Populating `bucket.name` field will result in an error. The - * project of the bucket must be specified in the `bucket.project` field. This field must be - * in `projects/{projectIdentifier}` format, {projectIdentifier} can be the project ID or + * @param parent Required. The project to which this bucket will belong. This field must either be + * empty or `projects/_`. The project ID that owns this bucket should be specified in the + * `bucket.project` field. + * @param bucket Optional. Properties of the new bucket being inserted. The name of the bucket is + * specified in the `bucket_id` field. Populating `bucket.name` field will result in an error. + * The project of the bucket must be specified in the `bucket.project` field. This field must + * be in `projects/{projectIdentifier}` format, {projectIdentifier} can be the project ID or * project number. The `parent` field must be either empty or `projects/_`. * @param bucketId Required. The ID to use for this bucket, which will become the final component * of the bucket's resource name. For example, the value `foo` might result in a bucket with @@ -897,11 +899,13 @@ public final Bucket createBucket(ProjectName parent, Bucket bucket, String bucke * } * } * - * @param parent Required. The project to which this bucket will belong. - * @param bucket Properties of the new bucket being inserted. The name of the bucket is specified - * in the `bucket_id` field. Populating `bucket.name` field will result in an error. The - * project of the bucket must be specified in the `bucket.project` field. This field must be - * in `projects/{projectIdentifier}` format, {projectIdentifier} can be the project ID or + * @param parent Required. The project to which this bucket will belong. This field must either be + * empty or `projects/_`. The project ID that owns this bucket should be specified in the + * `bucket.project` field. + * @param bucket Optional. Properties of the new bucket being inserted. The name of the bucket is + * specified in the `bucket_id` field. Populating `bucket.name` field will result in an error. + * The project of the bucket must be specified in the `bucket.project` field. This field must + * be in `projects/{projectIdentifier}` format, {projectIdentifier} can be the project ID or * project number. The `parent` field must be either empty or `projects/_`. * @param bucketId Required. The ID to use for this bucket, which will become the final component * of the bucket's resource name. For example, the value `foo` might result in a bucket with @@ -1266,7 +1270,8 @@ public final Bucket lockBucketRetentionPolicy(LockBucketRetentionPolicyRequest r // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets the IAM policy for a specified bucket. The `resource` field in the request should be - * `projects/_/buckets/{bucket}`. + * `projects/_/buckets/{bucket}` for a bucket, or + * `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` for a managed folder. * *

      Sample code: * @@ -1298,7 +1303,8 @@ public final Policy getIamPolicy(ResourceName resource) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets the IAM policy for a specified bucket. The `resource` field in the request should be - * `projects/_/buckets/{bucket}`. + * `projects/_/buckets/{bucket}` for a bucket, or + * `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` for a managed folder. * *

      Sample code: * @@ -1327,7 +1333,8 @@ public final Policy getIamPolicy(String resource) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets the IAM policy for a specified bucket. The `resource` field in the request should be - * `projects/_/buckets/{bucket}`. + * `projects/_/buckets/{bucket}` for a bucket, or + * `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` for a managed folder. * *

      Sample code: * @@ -1359,7 +1366,8 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Gets the IAM policy for a specified bucket. The `resource` field in the request should be - * `projects/_/buckets/{bucket}`. + * `projects/_/buckets/{bucket}` for a bucket, or + * `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` for a managed folder. * *

      Sample code: * @@ -1390,7 +1398,8 @@ public final UnaryCallable getIamPolicyCallable() { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates an IAM policy for the specified bucket. The `resource` field in the request should be - * `projects/_/buckets/{bucket}`. + * `projects/_/buckets/{bucket}` for a bucket, or + * `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` for a managed folder. * *

      Sample code: * @@ -1427,7 +1436,8 @@ public final Policy setIamPolicy(ResourceName resource, Policy policy) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates an IAM policy for the specified bucket. The `resource` field in the request should be - * `projects/_/buckets/{bucket}`. + * `projects/_/buckets/{bucket}` for a bucket, or + * `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` for a managed folder. * *

      Sample code: * @@ -1461,7 +1471,8 @@ public final Policy setIamPolicy(String resource, Policy policy) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates an IAM policy for the specified bucket. The `resource` field in the request should be - * `projects/_/buckets/{bucket}`. + * `projects/_/buckets/{bucket}` for a bucket, or + * `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` for a managed folder. * *

      Sample code: * @@ -1494,7 +1505,8 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Updates an IAM policy for the specified bucket. The `resource` field in the request should be - * `projects/_/buckets/{bucket}`. + * `projects/_/buckets/{bucket}` for a bucket, or + * `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` for a managed folder. * *

      Sample code: * @@ -1977,8 +1989,8 @@ public final void deleteObject(String bucket, String object) { * @param bucket Required. Name of the bucket in which the object resides. * @param object Required. The name of the finalized object to delete. Note: If you want to delete * an unfinalized resumable upload please use `CancelResumableWrite`. - * @param generation If present, permanently deletes a specific revision of this object (as - * opposed to the latest version, the default). + * @param generation Optional. If present, permanently deletes a specific revision of this object + * (as opposed to the latest version, the default). * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteObject(BucketName bucket, String object, long generation) { @@ -2028,8 +2040,8 @@ public final void deleteObject(BucketName bucket, String object, long generation * @param bucket Required. Name of the bucket in which the object resides. * @param object Required. The name of the finalized object to delete. Note: If you want to delete * an unfinalized resumable upload please use `CancelResumableWrite`. - * @param generation If present, permanently deletes a specific revision of this object (as - * opposed to the latest version, the default). + * @param generation Optional. If present, permanently deletes a specific revision of this object + * (as opposed to the latest version, the default). * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteObject(String bucket, String object, long generation) { @@ -2483,8 +2495,8 @@ public final Object getObject(String bucket, String object) { * * @param bucket Required. Name of the bucket in which the object resides. * @param object Required. Name of the object. - * @param generation If present, selects a specific revision of this object (as opposed to the - * latest version, the default). + * @param generation Optional. If present, selects a specific revision of this object (as opposed + * to the latest version, the default). * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Object getObject(BucketName bucket, String object, long generation) { @@ -2526,8 +2538,8 @@ public final Object getObject(BucketName bucket, String object, long generation) * * @param bucket Required. Name of the bucket in which the object resides. * @param object Required. Name of the object. - * @param generation If present, selects a specific revision of this object (as opposed to the - * latest version, the default). + * @param generation Optional. If present, selects a specific revision of this object (as opposed + * to the latest version, the default). * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Object getObject(String bucket, String object, long generation) { 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 3b9340a440..bd0747d9b6 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 @@ -363,8 +363,12 @@ public class GrpcStorageStub extends StorageStub { PathTemplate.create("{bucket=**}"); private static final PathTemplate GET_IAM_POLICY_0_PATH_TEMPLATE = PathTemplate.create("{bucket=**}"); + private static final PathTemplate GET_IAM_POLICY_1_PATH_TEMPLATE = + PathTemplate.create("{bucket=projects/*/buckets/*}/**"); private static final PathTemplate SET_IAM_POLICY_0_PATH_TEMPLATE = PathTemplate.create("{bucket=**}"); + private static final PathTemplate SET_IAM_POLICY_1_PATH_TEMPLATE = + PathTemplate.create("{bucket=projects/*/buckets/*}/**"); private static final PathTemplate TEST_IAM_PERMISSIONS_0_PATH_TEMPLATE = PathTemplate.create("{bucket=**}"); private static final PathTemplate TEST_IAM_PERMISSIONS_1_PATH_TEMPLATE = @@ -501,6 +505,7 @@ protected GrpcStorageStub( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add(request.getResource(), "bucket", GET_IAM_POLICY_0_PATH_TEMPLATE); + builder.add(request.getResource(), "bucket", GET_IAM_POLICY_1_PATH_TEMPLATE); return builder.build(); }) .build(); @@ -511,6 +516,7 @@ protected GrpcStorageStub( request -> { RequestParamsBuilder builder = RequestParamsBuilder.create(); builder.add(request.getResource(), "bucket", SET_IAM_POLICY_0_PATH_TEMPLATE); + builder.add(request.getResource(), "bucket", SET_IAM_POLICY_1_PATH_TEMPLATE); return builder.build(); }) .build(); 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 7d2ebcda10..70f0f0bba9 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 @@ -1889,6 +1889,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.storage.v2.Bucket$IpFilter", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.v2.Bucket$IpFilter$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.v2.Bucket$IpFilter$PublicNetworkSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.v2.Bucket$IpFilter$PublicNetworkSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.v2.Bucket$IpFilter$VpcNetworkSource", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.v2.Bucket$IpFilter$VpcNetworkSource$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.storage.v2.Bucket$Lifecycle", "queryAllDeclaredConstructors": true, @@ -2447,6 +2501,33 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.storage.v2.Object$Retention", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.v2.Object$Retention$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.storage.v2.Object$Retention$Mode", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.storage.v2.ObjectAccessControl", "queryAllDeclaredConstructors": true, 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 af5dbfcb7f..36f8e2a56c 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 @@ -202,6 +202,7 @@ public void getBucketTest() throws Exception { .setAutoclass(Bucket.Autoclass.newBuilder().build()) .setHierarchicalNamespace(Bucket.HierarchicalNamespace.newBuilder().build()) .setSoftDeletePolicy(Bucket.SoftDeletePolicy.newBuilder().build()) + .setIpFilter(Bucket.IpFilter.newBuilder().build()) .build(); mockStorage.addResponse(expectedResponse); @@ -269,6 +270,7 @@ public void getBucketTest2() throws Exception { .setAutoclass(Bucket.Autoclass.newBuilder().build()) .setHierarchicalNamespace(Bucket.HierarchicalNamespace.newBuilder().build()) .setSoftDeletePolicy(Bucket.SoftDeletePolicy.newBuilder().build()) + .setIpFilter(Bucket.IpFilter.newBuilder().build()) .build(); mockStorage.addResponse(expectedResponse); @@ -336,6 +338,7 @@ public void createBucketTest() throws Exception { .setAutoclass(Bucket.Autoclass.newBuilder().build()) .setHierarchicalNamespace(Bucket.HierarchicalNamespace.newBuilder().build()) .setSoftDeletePolicy(Bucket.SoftDeletePolicy.newBuilder().build()) + .setIpFilter(Bucket.IpFilter.newBuilder().build()) .build(); mockStorage.addResponse(expectedResponse); @@ -409,6 +412,7 @@ public void createBucketTest2() throws Exception { .setAutoclass(Bucket.Autoclass.newBuilder().build()) .setHierarchicalNamespace(Bucket.HierarchicalNamespace.newBuilder().build()) .setSoftDeletePolicy(Bucket.SoftDeletePolicy.newBuilder().build()) + .setIpFilter(Bucket.IpFilter.newBuilder().build()) .build(); mockStorage.addResponse(expectedResponse); @@ -570,6 +574,7 @@ public void lockBucketRetentionPolicyTest() throws Exception { .setAutoclass(Bucket.Autoclass.newBuilder().build()) .setHierarchicalNamespace(Bucket.HierarchicalNamespace.newBuilder().build()) .setSoftDeletePolicy(Bucket.SoftDeletePolicy.newBuilder().build()) + .setIpFilter(Bucket.IpFilter.newBuilder().build()) .build(); mockStorage.addResponse(expectedResponse); @@ -638,6 +643,7 @@ public void lockBucketRetentionPolicyTest2() throws Exception { .setAutoclass(Bucket.Autoclass.newBuilder().build()) .setHierarchicalNamespace(Bucket.HierarchicalNamespace.newBuilder().build()) .setSoftDeletePolicy(Bucket.SoftDeletePolicy.newBuilder().build()) + .setIpFilter(Bucket.IpFilter.newBuilder().build()) .build(); mockStorage.addResponse(expectedResponse); @@ -960,6 +966,7 @@ public void updateBucketTest() throws Exception { .setAutoclass(Bucket.Autoclass.newBuilder().build()) .setHierarchicalNamespace(Bucket.HierarchicalNamespace.newBuilder().build()) .setSoftDeletePolicy(Bucket.SoftDeletePolicy.newBuilder().build()) + .setIpFilter(Bucket.IpFilter.newBuilder().build()) .build(); mockStorage.addResponse(expectedResponse); @@ -1033,6 +1040,7 @@ public void composeObjectTest() throws Exception { .setCustomTime(Timestamp.newBuilder().build()) .setSoftDeleteTime(Timestamp.newBuilder().build()) .setHardDeleteTime(Timestamp.newBuilder().build()) + .setRetention(Object.Retention.newBuilder().build()) .build(); mockStorage.addResponse(expectedResponse); @@ -1291,6 +1299,7 @@ public void restoreObjectTest() throws Exception { .setCustomTime(Timestamp.newBuilder().build()) .setSoftDeleteTime(Timestamp.newBuilder().build()) .setHardDeleteTime(Timestamp.newBuilder().build()) + .setRetention(Object.Retention.newBuilder().build()) .build(); mockStorage.addResponse(expectedResponse); @@ -1367,6 +1376,7 @@ public void restoreObjectTest2() throws Exception { .setCustomTime(Timestamp.newBuilder().build()) .setSoftDeleteTime(Timestamp.newBuilder().build()) .setHardDeleteTime(Timestamp.newBuilder().build()) + .setRetention(Object.Retention.newBuilder().build()) .build(); mockStorage.addResponse(expectedResponse); @@ -1480,6 +1490,7 @@ public void getObjectTest() throws Exception { .setCustomTime(Timestamp.newBuilder().build()) .setSoftDeleteTime(Timestamp.newBuilder().build()) .setHardDeleteTime(Timestamp.newBuilder().build()) + .setRetention(Object.Retention.newBuilder().build()) .build(); mockStorage.addResponse(expectedResponse); @@ -1553,6 +1564,7 @@ public void getObjectTest2() throws Exception { .setCustomTime(Timestamp.newBuilder().build()) .setSoftDeleteTime(Timestamp.newBuilder().build()) .setHardDeleteTime(Timestamp.newBuilder().build()) + .setRetention(Object.Retention.newBuilder().build()) .build(); mockStorage.addResponse(expectedResponse); @@ -1626,6 +1638,7 @@ public void getObjectTest3() throws Exception { .setCustomTime(Timestamp.newBuilder().build()) .setSoftDeleteTime(Timestamp.newBuilder().build()) .setHardDeleteTime(Timestamp.newBuilder().build()) + .setRetention(Object.Retention.newBuilder().build()) .build(); mockStorage.addResponse(expectedResponse); @@ -1702,6 +1715,7 @@ public void getObjectTest4() throws Exception { .setCustomTime(Timestamp.newBuilder().build()) .setSoftDeleteTime(Timestamp.newBuilder().build()) .setHardDeleteTime(Timestamp.newBuilder().build()) + .setRetention(Object.Retention.newBuilder().build()) .build(); mockStorage.addResponse(expectedResponse); @@ -1908,6 +1922,7 @@ public void updateObjectTest() throws Exception { .setCustomTime(Timestamp.newBuilder().build()) .setSoftDeleteTime(Timestamp.newBuilder().build()) .setHardDeleteTime(Timestamp.newBuilder().build()) + .setRetention(Object.Retention.newBuilder().build()) .build(); mockStorage.addResponse(expectedResponse); @@ -2409,6 +2424,7 @@ public void moveObjectTest() throws Exception { .setCustomTime(Timestamp.newBuilder().build()) .setSoftDeleteTime(Timestamp.newBuilder().build()) .setHardDeleteTime(Timestamp.newBuilder().build()) + .setRetention(Object.Retention.newBuilder().build()) .build(); mockStorage.addResponse(expectedResponse); @@ -2485,6 +2501,7 @@ public void moveObjectTest2() throws Exception { .setCustomTime(Timestamp.newBuilder().build()) .setSoftDeleteTime(Timestamp.newBuilder().build()) .setHardDeleteTime(Timestamp.newBuilder().build()) + .setRetention(Object.Retention.newBuilder().build()) .build(); mockStorage.addResponse(expectedResponse); diff --git a/generation_config.yaml b/generation_config.yaml index 44e1ba046c..33a17fbdaf 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.58.0 -googleapis_commitish: 5c929307255b1726cdc72855ffc67014fc897d11 +googleapis_commitish: 488c8cc0d41aca4b4f33748ab6166129edcfd836 libraries_bom_version: 26.60.0 libraries: - api_shortname: storage 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 0cc99d7fe6..b68ebe1294 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 @@ -1197,7 +1197,9 @@ default void lockBucketRetentionPolicy( *

            * Gets the IAM policy for a specified bucket.
            * The `resource` field in the request should be
      -     * `projects/_/buckets/{bucket}`.
      +     * `projects/_/buckets/{bucket}` for a bucket, or
      +     * `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
      +     * for a managed folder.
            * 
      */ default void getIamPolicy( @@ -1213,7 +1215,9 @@ default void getIamPolicy( *
            * Updates an IAM policy for the specified bucket.
            * The `resource` field in the request should be
      -     * `projects/_/buckets/{bucket}`.
      +     * `projects/_/buckets/{bucket}` for a bucket, or
      +     * `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
      +     * for a managed folder.
            * 
      */ default void setIamPolicy( @@ -1763,7 +1767,9 @@ public void lockBucketRetentionPolicy( *
            * Gets the IAM policy for a specified bucket.
            * The `resource` field in the request should be
      -     * `projects/_/buckets/{bucket}`.
      +     * `projects/_/buckets/{bucket}` for a bucket, or
      +     * `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
      +     * for a managed folder.
            * 
      */ public void getIamPolicy( @@ -1781,7 +1787,9 @@ public void getIamPolicy( *
            * Updates an IAM policy for the specified bucket.
            * The `resource` field in the request should be
      -     * `projects/_/buckets/{bucket}`.
      +     * `projects/_/buckets/{bucket}` for a bucket, or
      +     * `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
      +     * for a managed folder.
            * 
      */ public void setIamPolicy( @@ -2314,7 +2322,9 @@ public com.google.storage.v2.Bucket lockBucketRetentionPolicy( *
            * Gets the IAM policy for a specified bucket.
            * The `resource` field in the request should be
      -     * `projects/_/buckets/{bucket}`.
      +     * `projects/_/buckets/{bucket}` for a bucket, or
      +     * `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
      +     * for a managed folder.
            * 
      */ public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) { @@ -2328,7 +2338,9 @@ public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyReque *
            * Updates an IAM policy for the specified bucket.
            * The `resource` field in the request should be
      -     * `projects/_/buckets/{bucket}`.
      +     * `projects/_/buckets/{bucket}` for a bucket, or
      +     * `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
      +     * for a managed folder.
            * 
      */ public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { @@ -2821,7 +2833,9 @@ public com.google.storage.v2.Bucket lockBucketRetentionPolicy( *
            * Gets the IAM policy for a specified bucket.
            * The `resource` field in the request should be
      -     * `projects/_/buckets/{bucket}`.
      +     * `projects/_/buckets/{bucket}` for a bucket, or
      +     * `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
      +     * for a managed folder.
            * 
      */ public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) { @@ -2835,7 +2849,9 @@ public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyReque *
            * Updates an IAM policy for the specified bucket.
            * The `resource` field in the request should be
      -     * `projects/_/buckets/{bucket}`.
      +     * `projects/_/buckets/{bucket}` for a bucket, or
      +     * `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
      +     * for a managed folder.
            * 
      */ public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { @@ -3200,7 +3216,9 @@ protected StorageFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions c *
            * Gets the IAM policy for a specified bucket.
            * The `resource` field in the request should be
      -     * `projects/_/buckets/{bucket}`.
      +     * `projects/_/buckets/{bucket}` for a bucket, or
      +     * `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
      +     * for a managed folder.
            * 
      */ public com.google.common.util.concurrent.ListenableFuture @@ -3215,7 +3233,9 @@ protected StorageFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions c *
            * Updates an IAM policy for the specified bucket.
            * The `resource` field in the request should be
      -     * `projects/_/buckets/{bucket}`.
      +     * `projects/_/buckets/{bucket}` for a bucket, or
      +     * `projects/_/buckets/{bucket}/managedFolders/{managedFolder}`
      +     * for a managed folder.
            * 
      */ public com.google.common.util.concurrent.ListenableFuture diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BidiReadObjectRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BidiReadObjectRequest.java index f2e9f70e87..9d08aa1dfc 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BidiReadObjectRequest.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BidiReadObjectRequest.java @@ -72,11 +72,14 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
      -   * The first message of each stream should set this field. If this is not
      -   * the first message, an error will be returned. Describes the object to read.
      +   * Optional. The first message of each stream should set this field. If this
      +   * is not the first message, an error will be returned. Describes the object
      +   * to read.
          * 
      * - * .google.storage.v2.BidiReadObjectSpec read_object_spec = 1; + * + * .google.storage.v2.BidiReadObjectSpec read_object_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the readObjectSpec field is set. */ @@ -89,11 +92,14 @@ public boolean hasReadObjectSpec() { * * *
      -   * The first message of each stream should set this field. If this is not
      -   * the first message, an error will be returned. Describes the object to read.
      +   * Optional. The first message of each stream should set this field. If this
      +   * is not the first message, an error will be returned. Describes the object
      +   * to read.
          * 
      * - * .google.storage.v2.BidiReadObjectSpec read_object_spec = 1; + * + * .google.storage.v2.BidiReadObjectSpec read_object_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The readObjectSpec. */ @@ -108,11 +114,14 @@ public com.google.storage.v2.BidiReadObjectSpec getReadObjectSpec() { * * *
      -   * The first message of each stream should set this field. If this is not
      -   * the first message, an error will be returned. Describes the object to read.
      +   * Optional. The first message of each stream should set this field. If this
      +   * is not the first message, an error will be returned. Describes the object
      +   * to read.
          * 
      * - * .google.storage.v2.BidiReadObjectSpec read_object_spec = 1; + * + * .google.storage.v2.BidiReadObjectSpec read_object_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.BidiReadObjectSpecOrBuilder getReadObjectSpecOrBuilder() { @@ -130,15 +139,17 @@ public com.google.storage.v2.BidiReadObjectSpecOrBuilder getReadObjectSpecOrBuil * * *
      -   * Provides a list of 0 or more (up to 100) ranges to read. If a single range
      -   * is large enough to require multiple responses, they are guaranteed to be
      -   * delivered in increasing offset order. There are no ordering guarantees
      -   * across ranges. When no ranges are provided, the response message will not
      -   * include ObjectRangeData. For full object downloads, the offset and size can
      -   * be set to 0.
      +   * Optional. Provides a list of 0 or more (up to 100) ranges to read. If a
      +   * single range is large enough to require multiple responses, they are
      +   * guaranteed to be delivered in increasing offset order. There are no
      +   * ordering guarantees across ranges. When no ranges are provided, the
      +   * response message will not include ObjectRangeData. For full object
      +   * downloads, the offset and size can be set to 0.
          * 
      * - * repeated .google.storage.v2.ReadRange read_ranges = 8; + * + * repeated .google.storage.v2.ReadRange read_ranges = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public java.util.List getReadRangesList() { @@ -149,15 +160,17 @@ public java.util.List getReadRangesList() { * * *
      -   * Provides a list of 0 or more (up to 100) ranges to read. If a single range
      -   * is large enough to require multiple responses, they are guaranteed to be
      -   * delivered in increasing offset order. There are no ordering guarantees
      -   * across ranges. When no ranges are provided, the response message will not
      -   * include ObjectRangeData. For full object downloads, the offset and size can
      -   * be set to 0.
      +   * Optional. Provides a list of 0 or more (up to 100) ranges to read. If a
      +   * single range is large enough to require multiple responses, they are
      +   * guaranteed to be delivered in increasing offset order. There are no
      +   * ordering guarantees across ranges. When no ranges are provided, the
      +   * response message will not include ObjectRangeData. For full object
      +   * downloads, the offset and size can be set to 0.
          * 
      * - * repeated .google.storage.v2.ReadRange read_ranges = 8; + * + * repeated .google.storage.v2.ReadRange read_ranges = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public java.util.List @@ -169,15 +182,17 @@ public java.util.List getReadRangesList() { * * *
      -   * Provides a list of 0 or more (up to 100) ranges to read. If a single range
      -   * is large enough to require multiple responses, they are guaranteed to be
      -   * delivered in increasing offset order. There are no ordering guarantees
      -   * across ranges. When no ranges are provided, the response message will not
      -   * include ObjectRangeData. For full object downloads, the offset and size can
      -   * be set to 0.
      +   * Optional. Provides a list of 0 or more (up to 100) ranges to read. If a
      +   * single range is large enough to require multiple responses, they are
      +   * guaranteed to be delivered in increasing offset order. There are no
      +   * ordering guarantees across ranges. When no ranges are provided, the
      +   * response message will not include ObjectRangeData. For full object
      +   * downloads, the offset and size can be set to 0.
          * 
      * - * repeated .google.storage.v2.ReadRange read_ranges = 8; + * + * repeated .google.storage.v2.ReadRange read_ranges = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public int getReadRangesCount() { @@ -188,15 +203,17 @@ public int getReadRangesCount() { * * *
      -   * Provides a list of 0 or more (up to 100) ranges to read. If a single range
      -   * is large enough to require multiple responses, they are guaranteed to be
      -   * delivered in increasing offset order. There are no ordering guarantees
      -   * across ranges. When no ranges are provided, the response message will not
      -   * include ObjectRangeData. For full object downloads, the offset and size can
      -   * be set to 0.
      +   * Optional. Provides a list of 0 or more (up to 100) ranges to read. If a
      +   * single range is large enough to require multiple responses, they are
      +   * guaranteed to be delivered in increasing offset order. There are no
      +   * ordering guarantees across ranges. When no ranges are provided, the
      +   * response message will not include ObjectRangeData. For full object
      +   * downloads, the offset and size can be set to 0.
          * 
      * - * repeated .google.storage.v2.ReadRange read_ranges = 8; + * + * repeated .google.storage.v2.ReadRange read_ranges = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.ReadRange getReadRanges(int index) { @@ -207,15 +224,17 @@ public com.google.storage.v2.ReadRange getReadRanges(int index) { * * *
      -   * Provides a list of 0 or more (up to 100) ranges to read. If a single range
      -   * is large enough to require multiple responses, they are guaranteed to be
      -   * delivered in increasing offset order. There are no ordering guarantees
      -   * across ranges. When no ranges are provided, the response message will not
      -   * include ObjectRangeData. For full object downloads, the offset and size can
      -   * be set to 0.
      +   * Optional. Provides a list of 0 or more (up to 100) ranges to read. If a
      +   * single range is large enough to require multiple responses, they are
      +   * guaranteed to be delivered in increasing offset order. There are no
      +   * ordering guarantees across ranges. When no ranges are provided, the
      +   * response message will not include ObjectRangeData. For full object
      +   * downloads, the offset and size can be set to 0.
          * 
      * - * repeated .google.storage.v2.ReadRange read_ranges = 8; + * + * repeated .google.storage.v2.ReadRange read_ranges = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.ReadRangeOrBuilder getReadRangesOrBuilder(int index) { @@ -666,11 +685,14 @@ public Builder mergeFrom( * * *
      -     * The first message of each stream should set this field. If this is not
      -     * the first message, an error will be returned. Describes the object to read.
      +     * Optional. The first message of each stream should set this field. If this
      +     * is not the first message, an error will be returned. Describes the object
      +     * to read.
            * 
      * - * .google.storage.v2.BidiReadObjectSpec read_object_spec = 1; + * + * .google.storage.v2.BidiReadObjectSpec read_object_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the readObjectSpec field is set. */ @@ -682,11 +704,14 @@ public boolean hasReadObjectSpec() { * * *
      -     * The first message of each stream should set this field. If this is not
      -     * the first message, an error will be returned. Describes the object to read.
      +     * Optional. The first message of each stream should set this field. If this
      +     * is not the first message, an error will be returned. Describes the object
      +     * to read.
            * 
      * - * .google.storage.v2.BidiReadObjectSpec read_object_spec = 1; + * + * .google.storage.v2.BidiReadObjectSpec read_object_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The readObjectSpec. */ @@ -704,11 +729,14 @@ public com.google.storage.v2.BidiReadObjectSpec getReadObjectSpec() { * * *
      -     * The first message of each stream should set this field. If this is not
      -     * the first message, an error will be returned. Describes the object to read.
      +     * Optional. The first message of each stream should set this field. If this
      +     * is not the first message, an error will be returned. Describes the object
      +     * to read.
            * 
      * - * .google.storage.v2.BidiReadObjectSpec read_object_spec = 1; + * + * .google.storage.v2.BidiReadObjectSpec read_object_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setReadObjectSpec(com.google.storage.v2.BidiReadObjectSpec value) { if (readObjectSpecBuilder_ == null) { @@ -728,11 +756,14 @@ public Builder setReadObjectSpec(com.google.storage.v2.BidiReadObjectSpec value) * * *
      -     * The first message of each stream should set this field. If this is not
      -     * the first message, an error will be returned. Describes the object to read.
      +     * Optional. The first message of each stream should set this field. If this
      +     * is not the first message, an error will be returned. Describes the object
      +     * to read.
            * 
      * - * .google.storage.v2.BidiReadObjectSpec read_object_spec = 1; + * + * .google.storage.v2.BidiReadObjectSpec read_object_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setReadObjectSpec( com.google.storage.v2.BidiReadObjectSpec.Builder builderForValue) { @@ -750,11 +781,14 @@ public Builder setReadObjectSpec( * * *
      -     * The first message of each stream should set this field. If this is not
      -     * the first message, an error will be returned. Describes the object to read.
      +     * Optional. The first message of each stream should set this field. If this
      +     * is not the first message, an error will be returned. Describes the object
      +     * to read.
            * 
      * - * .google.storage.v2.BidiReadObjectSpec read_object_spec = 1; + * + * .google.storage.v2.BidiReadObjectSpec read_object_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeReadObjectSpec(com.google.storage.v2.BidiReadObjectSpec value) { if (readObjectSpecBuilder_ == null) { @@ -779,11 +813,14 @@ public Builder mergeReadObjectSpec(com.google.storage.v2.BidiReadObjectSpec valu * * *
      -     * The first message of each stream should set this field. If this is not
      -     * the first message, an error will be returned. Describes the object to read.
      +     * Optional. The first message of each stream should set this field. If this
      +     * is not the first message, an error will be returned. Describes the object
      +     * to read.
            * 
      * - * .google.storage.v2.BidiReadObjectSpec read_object_spec = 1; + * + * .google.storage.v2.BidiReadObjectSpec read_object_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearReadObjectSpec() { bitField0_ = (bitField0_ & ~0x00000001); @@ -800,11 +837,14 @@ public Builder clearReadObjectSpec() { * * *
      -     * The first message of each stream should set this field. If this is not
      -     * the first message, an error will be returned. Describes the object to read.
      +     * Optional. The first message of each stream should set this field. If this
      +     * is not the first message, an error will be returned. Describes the object
      +     * to read.
            * 
      * - * .google.storage.v2.BidiReadObjectSpec read_object_spec = 1; + * + * .google.storage.v2.BidiReadObjectSpec read_object_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.BidiReadObjectSpec.Builder getReadObjectSpecBuilder() { bitField0_ |= 0x00000001; @@ -816,11 +856,14 @@ public com.google.storage.v2.BidiReadObjectSpec.Builder getReadObjectSpecBuilder * * *
      -     * The first message of each stream should set this field. If this is not
      -     * the first message, an error will be returned. Describes the object to read.
      +     * Optional. The first message of each stream should set this field. If this
      +     * is not the first message, an error will be returned. Describes the object
      +     * to read.
            * 
      * - * .google.storage.v2.BidiReadObjectSpec read_object_spec = 1; + * + * .google.storage.v2.BidiReadObjectSpec read_object_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.BidiReadObjectSpecOrBuilder getReadObjectSpecOrBuilder() { if (readObjectSpecBuilder_ != null) { @@ -836,11 +879,14 @@ public com.google.storage.v2.BidiReadObjectSpecOrBuilder getReadObjectSpecOrBuil * * *
      -     * The first message of each stream should set this field. If this is not
      -     * the first message, an error will be returned. Describes the object to read.
      +     * Optional. The first message of each stream should set this field. If this
      +     * is not the first message, an error will be returned. Describes the object
      +     * to read.
            * 
      * - * .google.storage.v2.BidiReadObjectSpec read_object_spec = 1; + * + * .google.storage.v2.BidiReadObjectSpec read_object_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.BidiReadObjectSpec, @@ -879,15 +925,17 @@ private void ensureReadRangesIsMutable() { * * *
      -     * Provides a list of 0 or more (up to 100) ranges to read. If a single range
      -     * is large enough to require multiple responses, they are guaranteed to be
      -     * delivered in increasing offset order. There are no ordering guarantees
      -     * across ranges. When no ranges are provided, the response message will not
      -     * include ObjectRangeData. For full object downloads, the offset and size can
      -     * be set to 0.
      +     * Optional. Provides a list of 0 or more (up to 100) ranges to read. If a
      +     * single range is large enough to require multiple responses, they are
      +     * guaranteed to be delivered in increasing offset order. There are no
      +     * ordering guarantees across ranges. When no ranges are provided, the
      +     * response message will not include ObjectRangeData. For full object
      +     * downloads, the offset and size can be set to 0.
            * 
      * - * repeated .google.storage.v2.ReadRange read_ranges = 8; + * + * repeated .google.storage.v2.ReadRange read_ranges = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public java.util.List getReadRangesList() { if (readRangesBuilder_ == null) { @@ -901,15 +949,17 @@ public java.util.List getReadRangesList() { * * *
      -     * Provides a list of 0 or more (up to 100) ranges to read. If a single range
      -     * is large enough to require multiple responses, they are guaranteed to be
      -     * delivered in increasing offset order. There are no ordering guarantees
      -     * across ranges. When no ranges are provided, the response message will not
      -     * include ObjectRangeData. For full object downloads, the offset and size can
      -     * be set to 0.
      +     * Optional. Provides a list of 0 or more (up to 100) ranges to read. If a
      +     * single range is large enough to require multiple responses, they are
      +     * guaranteed to be delivered in increasing offset order. There are no
      +     * ordering guarantees across ranges. When no ranges are provided, the
      +     * response message will not include ObjectRangeData. For full object
      +     * downloads, the offset and size can be set to 0.
            * 
      * - * repeated .google.storage.v2.ReadRange read_ranges = 8; + * + * repeated .google.storage.v2.ReadRange read_ranges = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public int getReadRangesCount() { if (readRangesBuilder_ == null) { @@ -923,15 +973,17 @@ public int getReadRangesCount() { * * *
      -     * Provides a list of 0 or more (up to 100) ranges to read. If a single range
      -     * is large enough to require multiple responses, they are guaranteed to be
      -     * delivered in increasing offset order. There are no ordering guarantees
      -     * across ranges. When no ranges are provided, the response message will not
      -     * include ObjectRangeData. For full object downloads, the offset and size can
      -     * be set to 0.
      +     * Optional. Provides a list of 0 or more (up to 100) ranges to read. If a
      +     * single range is large enough to require multiple responses, they are
      +     * guaranteed to be delivered in increasing offset order. There are no
      +     * ordering guarantees across ranges. When no ranges are provided, the
      +     * response message will not include ObjectRangeData. For full object
      +     * downloads, the offset and size can be set to 0.
            * 
      * - * repeated .google.storage.v2.ReadRange read_ranges = 8; + * + * repeated .google.storage.v2.ReadRange read_ranges = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.ReadRange getReadRanges(int index) { if (readRangesBuilder_ == null) { @@ -945,15 +997,17 @@ public com.google.storage.v2.ReadRange getReadRanges(int index) { * * *
      -     * Provides a list of 0 or more (up to 100) ranges to read. If a single range
      -     * is large enough to require multiple responses, they are guaranteed to be
      -     * delivered in increasing offset order. There are no ordering guarantees
      -     * across ranges. When no ranges are provided, the response message will not
      -     * include ObjectRangeData. For full object downloads, the offset and size can
      -     * be set to 0.
      +     * Optional. Provides a list of 0 or more (up to 100) ranges to read. If a
      +     * single range is large enough to require multiple responses, they are
      +     * guaranteed to be delivered in increasing offset order. There are no
      +     * ordering guarantees across ranges. When no ranges are provided, the
      +     * response message will not include ObjectRangeData. For full object
      +     * downloads, the offset and size can be set to 0.
            * 
      * - * repeated .google.storage.v2.ReadRange read_ranges = 8; + * + * repeated .google.storage.v2.ReadRange read_ranges = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setReadRanges(int index, com.google.storage.v2.ReadRange value) { if (readRangesBuilder_ == null) { @@ -973,15 +1027,17 @@ public Builder setReadRanges(int index, com.google.storage.v2.ReadRange value) { * * *
      -     * Provides a list of 0 or more (up to 100) ranges to read. If a single range
      -     * is large enough to require multiple responses, they are guaranteed to be
      -     * delivered in increasing offset order. There are no ordering guarantees
      -     * across ranges. When no ranges are provided, the response message will not
      -     * include ObjectRangeData. For full object downloads, the offset and size can
      -     * be set to 0.
      +     * Optional. Provides a list of 0 or more (up to 100) ranges to read. If a
      +     * single range is large enough to require multiple responses, they are
      +     * guaranteed to be delivered in increasing offset order. There are no
      +     * ordering guarantees across ranges. When no ranges are provided, the
      +     * response message will not include ObjectRangeData. For full object
      +     * downloads, the offset and size can be set to 0.
            * 
      * - * repeated .google.storage.v2.ReadRange read_ranges = 8; + * + * repeated .google.storage.v2.ReadRange read_ranges = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setReadRanges( int index, com.google.storage.v2.ReadRange.Builder builderForValue) { @@ -999,15 +1055,17 @@ public Builder setReadRanges( * * *
      -     * Provides a list of 0 or more (up to 100) ranges to read. If a single range
      -     * is large enough to require multiple responses, they are guaranteed to be
      -     * delivered in increasing offset order. There are no ordering guarantees
      -     * across ranges. When no ranges are provided, the response message will not
      -     * include ObjectRangeData. For full object downloads, the offset and size can
      -     * be set to 0.
      +     * Optional. Provides a list of 0 or more (up to 100) ranges to read. If a
      +     * single range is large enough to require multiple responses, they are
      +     * guaranteed to be delivered in increasing offset order. There are no
      +     * ordering guarantees across ranges. When no ranges are provided, the
      +     * response message will not include ObjectRangeData. For full object
      +     * downloads, the offset and size can be set to 0.
            * 
      * - * repeated .google.storage.v2.ReadRange read_ranges = 8; + * + * repeated .google.storage.v2.ReadRange read_ranges = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder addReadRanges(com.google.storage.v2.ReadRange value) { if (readRangesBuilder_ == null) { @@ -1027,15 +1085,17 @@ public Builder addReadRanges(com.google.storage.v2.ReadRange value) { * * *
      -     * Provides a list of 0 or more (up to 100) ranges to read. If a single range
      -     * is large enough to require multiple responses, they are guaranteed to be
      -     * delivered in increasing offset order. There are no ordering guarantees
      -     * across ranges. When no ranges are provided, the response message will not
      -     * include ObjectRangeData. For full object downloads, the offset and size can
      -     * be set to 0.
      +     * Optional. Provides a list of 0 or more (up to 100) ranges to read. If a
      +     * single range is large enough to require multiple responses, they are
      +     * guaranteed to be delivered in increasing offset order. There are no
      +     * ordering guarantees across ranges. When no ranges are provided, the
      +     * response message will not include ObjectRangeData. For full object
      +     * downloads, the offset and size can be set to 0.
            * 
      * - * repeated .google.storage.v2.ReadRange read_ranges = 8; + * + * repeated .google.storage.v2.ReadRange read_ranges = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder addReadRanges(int index, com.google.storage.v2.ReadRange value) { if (readRangesBuilder_ == null) { @@ -1055,15 +1115,17 @@ public Builder addReadRanges(int index, com.google.storage.v2.ReadRange value) { * * *
      -     * Provides a list of 0 or more (up to 100) ranges to read. If a single range
      -     * is large enough to require multiple responses, they are guaranteed to be
      -     * delivered in increasing offset order. There are no ordering guarantees
      -     * across ranges. When no ranges are provided, the response message will not
      -     * include ObjectRangeData. For full object downloads, the offset and size can
      -     * be set to 0.
      +     * Optional. Provides a list of 0 or more (up to 100) ranges to read. If a
      +     * single range is large enough to require multiple responses, they are
      +     * guaranteed to be delivered in increasing offset order. There are no
      +     * ordering guarantees across ranges. When no ranges are provided, the
      +     * response message will not include ObjectRangeData. For full object
      +     * downloads, the offset and size can be set to 0.
            * 
      * - * repeated .google.storage.v2.ReadRange read_ranges = 8; + * + * repeated .google.storage.v2.ReadRange read_ranges = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder addReadRanges(com.google.storage.v2.ReadRange.Builder builderForValue) { if (readRangesBuilder_ == null) { @@ -1080,15 +1142,17 @@ public Builder addReadRanges(com.google.storage.v2.ReadRange.Builder builderForV * * *
      -     * Provides a list of 0 or more (up to 100) ranges to read. If a single range
      -     * is large enough to require multiple responses, they are guaranteed to be
      -     * delivered in increasing offset order. There are no ordering guarantees
      -     * across ranges. When no ranges are provided, the response message will not
      -     * include ObjectRangeData. For full object downloads, the offset and size can
      -     * be set to 0.
      +     * Optional. Provides a list of 0 or more (up to 100) ranges to read. If a
      +     * single range is large enough to require multiple responses, they are
      +     * guaranteed to be delivered in increasing offset order. There are no
      +     * ordering guarantees across ranges. When no ranges are provided, the
      +     * response message will not include ObjectRangeData. For full object
      +     * downloads, the offset and size can be set to 0.
            * 
      * - * repeated .google.storage.v2.ReadRange read_ranges = 8; + * + * repeated .google.storage.v2.ReadRange read_ranges = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder addReadRanges( int index, com.google.storage.v2.ReadRange.Builder builderForValue) { @@ -1106,15 +1170,17 @@ public Builder addReadRanges( * * *
      -     * Provides a list of 0 or more (up to 100) ranges to read. If a single range
      -     * is large enough to require multiple responses, they are guaranteed to be
      -     * delivered in increasing offset order. There are no ordering guarantees
      -     * across ranges. When no ranges are provided, the response message will not
      -     * include ObjectRangeData. For full object downloads, the offset and size can
      -     * be set to 0.
      +     * Optional. Provides a list of 0 or more (up to 100) ranges to read. If a
      +     * single range is large enough to require multiple responses, they are
      +     * guaranteed to be delivered in increasing offset order. There are no
      +     * ordering guarantees across ranges. When no ranges are provided, the
      +     * response message will not include ObjectRangeData. For full object
      +     * downloads, the offset and size can be set to 0.
            * 
      * - * repeated .google.storage.v2.ReadRange read_ranges = 8; + * + * repeated .google.storage.v2.ReadRange read_ranges = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder addAllReadRanges( java.lang.Iterable values) { @@ -1132,15 +1198,17 @@ public Builder addAllReadRanges( * * *
      -     * Provides a list of 0 or more (up to 100) ranges to read. If a single range
      -     * is large enough to require multiple responses, they are guaranteed to be
      -     * delivered in increasing offset order. There are no ordering guarantees
      -     * across ranges. When no ranges are provided, the response message will not
      -     * include ObjectRangeData. For full object downloads, the offset and size can
      -     * be set to 0.
      +     * Optional. Provides a list of 0 or more (up to 100) ranges to read. If a
      +     * single range is large enough to require multiple responses, they are
      +     * guaranteed to be delivered in increasing offset order. There are no
      +     * ordering guarantees across ranges. When no ranges are provided, the
      +     * response message will not include ObjectRangeData. For full object
      +     * downloads, the offset and size can be set to 0.
            * 
      * - * repeated .google.storage.v2.ReadRange read_ranges = 8; + * + * repeated .google.storage.v2.ReadRange read_ranges = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearReadRanges() { if (readRangesBuilder_ == null) { @@ -1157,15 +1225,17 @@ public Builder clearReadRanges() { * * *
      -     * Provides a list of 0 or more (up to 100) ranges to read. If a single range
      -     * is large enough to require multiple responses, they are guaranteed to be
      -     * delivered in increasing offset order. There are no ordering guarantees
      -     * across ranges. When no ranges are provided, the response message will not
      -     * include ObjectRangeData. For full object downloads, the offset and size can
      -     * be set to 0.
      +     * Optional. Provides a list of 0 or more (up to 100) ranges to read. If a
      +     * single range is large enough to require multiple responses, they are
      +     * guaranteed to be delivered in increasing offset order. There are no
      +     * ordering guarantees across ranges. When no ranges are provided, the
      +     * response message will not include ObjectRangeData. For full object
      +     * downloads, the offset and size can be set to 0.
            * 
      * - * repeated .google.storage.v2.ReadRange read_ranges = 8; + * + * repeated .google.storage.v2.ReadRange read_ranges = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder removeReadRanges(int index) { if (readRangesBuilder_ == null) { @@ -1182,15 +1252,17 @@ public Builder removeReadRanges(int index) { * * *
      -     * Provides a list of 0 or more (up to 100) ranges to read. If a single range
      -     * is large enough to require multiple responses, they are guaranteed to be
      -     * delivered in increasing offset order. There are no ordering guarantees
      -     * across ranges. When no ranges are provided, the response message will not
      -     * include ObjectRangeData. For full object downloads, the offset and size can
      -     * be set to 0.
      +     * Optional. Provides a list of 0 or more (up to 100) ranges to read. If a
      +     * single range is large enough to require multiple responses, they are
      +     * guaranteed to be delivered in increasing offset order. There are no
      +     * ordering guarantees across ranges. When no ranges are provided, the
      +     * response message will not include ObjectRangeData. For full object
      +     * downloads, the offset and size can be set to 0.
            * 
      * - * repeated .google.storage.v2.ReadRange read_ranges = 8; + * + * repeated .google.storage.v2.ReadRange read_ranges = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.ReadRange.Builder getReadRangesBuilder(int index) { return getReadRangesFieldBuilder().getBuilder(index); @@ -1200,15 +1272,17 @@ public com.google.storage.v2.ReadRange.Builder getReadRangesBuilder(int index) { * * *
      -     * Provides a list of 0 or more (up to 100) ranges to read. If a single range
      -     * is large enough to require multiple responses, they are guaranteed to be
      -     * delivered in increasing offset order. There are no ordering guarantees
      -     * across ranges. When no ranges are provided, the response message will not
      -     * include ObjectRangeData. For full object downloads, the offset and size can
      -     * be set to 0.
      +     * Optional. Provides a list of 0 or more (up to 100) ranges to read. If a
      +     * single range is large enough to require multiple responses, they are
      +     * guaranteed to be delivered in increasing offset order. There are no
      +     * ordering guarantees across ranges. When no ranges are provided, the
      +     * response message will not include ObjectRangeData. For full object
      +     * downloads, the offset and size can be set to 0.
            * 
      * - * repeated .google.storage.v2.ReadRange read_ranges = 8; + * + * repeated .google.storage.v2.ReadRange read_ranges = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.ReadRangeOrBuilder getReadRangesOrBuilder(int index) { if (readRangesBuilder_ == null) { @@ -1222,15 +1296,17 @@ public com.google.storage.v2.ReadRangeOrBuilder getReadRangesOrBuilder(int index * * *
      -     * Provides a list of 0 or more (up to 100) ranges to read. If a single range
      -     * is large enough to require multiple responses, they are guaranteed to be
      -     * delivered in increasing offset order. There are no ordering guarantees
      -     * across ranges. When no ranges are provided, the response message will not
      -     * include ObjectRangeData. For full object downloads, the offset and size can
      -     * be set to 0.
      +     * Optional. Provides a list of 0 or more (up to 100) ranges to read. If a
      +     * single range is large enough to require multiple responses, they are
      +     * guaranteed to be delivered in increasing offset order. There are no
      +     * ordering guarantees across ranges. When no ranges are provided, the
      +     * response message will not include ObjectRangeData. For full object
      +     * downloads, the offset and size can be set to 0.
            * 
      * - * repeated .google.storage.v2.ReadRange read_ranges = 8; + * + * repeated .google.storage.v2.ReadRange read_ranges = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public java.util.List getReadRangesOrBuilderList() { @@ -1245,15 +1321,17 @@ public com.google.storage.v2.ReadRangeOrBuilder getReadRangesOrBuilder(int index * * *
      -     * Provides a list of 0 or more (up to 100) ranges to read. If a single range
      -     * is large enough to require multiple responses, they are guaranteed to be
      -     * delivered in increasing offset order. There are no ordering guarantees
      -     * across ranges. When no ranges are provided, the response message will not
      -     * include ObjectRangeData. For full object downloads, the offset and size can
      -     * be set to 0.
      +     * Optional. Provides a list of 0 or more (up to 100) ranges to read. If a
      +     * single range is large enough to require multiple responses, they are
      +     * guaranteed to be delivered in increasing offset order. There are no
      +     * ordering guarantees across ranges. When no ranges are provided, the
      +     * response message will not include ObjectRangeData. For full object
      +     * downloads, the offset and size can be set to 0.
            * 
      * - * repeated .google.storage.v2.ReadRange read_ranges = 8; + * + * repeated .google.storage.v2.ReadRange read_ranges = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.ReadRange.Builder addReadRangesBuilder() { return getReadRangesFieldBuilder() @@ -1264,15 +1342,17 @@ public com.google.storage.v2.ReadRange.Builder addReadRangesBuilder() { * * *
      -     * Provides a list of 0 or more (up to 100) ranges to read. If a single range
      -     * is large enough to require multiple responses, they are guaranteed to be
      -     * delivered in increasing offset order. There are no ordering guarantees
      -     * across ranges. When no ranges are provided, the response message will not
      -     * include ObjectRangeData. For full object downloads, the offset and size can
      -     * be set to 0.
      +     * Optional. Provides a list of 0 or more (up to 100) ranges to read. If a
      +     * single range is large enough to require multiple responses, they are
      +     * guaranteed to be delivered in increasing offset order. There are no
      +     * ordering guarantees across ranges. When no ranges are provided, the
      +     * response message will not include ObjectRangeData. For full object
      +     * downloads, the offset and size can be set to 0.
            * 
      * - * repeated .google.storage.v2.ReadRange read_ranges = 8; + * + * repeated .google.storage.v2.ReadRange read_ranges = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.ReadRange.Builder addReadRangesBuilder(int index) { return getReadRangesFieldBuilder() @@ -1283,15 +1363,17 @@ public com.google.storage.v2.ReadRange.Builder addReadRangesBuilder(int index) { * * *
      -     * Provides a list of 0 or more (up to 100) ranges to read. If a single range
      -     * is large enough to require multiple responses, they are guaranteed to be
      -     * delivered in increasing offset order. There are no ordering guarantees
      -     * across ranges. When no ranges are provided, the response message will not
      -     * include ObjectRangeData. For full object downloads, the offset and size can
      -     * be set to 0.
      +     * Optional. Provides a list of 0 or more (up to 100) ranges to read. If a
      +     * single range is large enough to require multiple responses, they are
      +     * guaranteed to be delivered in increasing offset order. There are no
      +     * ordering guarantees across ranges. When no ranges are provided, the
      +     * response message will not include ObjectRangeData. For full object
      +     * downloads, the offset and size can be set to 0.
            * 
      * - * repeated .google.storage.v2.ReadRange read_ranges = 8; + * + * repeated .google.storage.v2.ReadRange read_ranges = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public java.util.List getReadRangesBuilderList() { return getReadRangesFieldBuilder().getBuilderList(); diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BidiReadObjectRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BidiReadObjectRequestOrBuilder.java index 56688cc938..af8d49894e 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BidiReadObjectRequestOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BidiReadObjectRequestOrBuilder.java @@ -28,11 +28,14 @@ public interface BidiReadObjectRequestOrBuilder * * *
      -   * The first message of each stream should set this field. If this is not
      -   * the first message, an error will be returned. Describes the object to read.
      +   * Optional. The first message of each stream should set this field. If this
      +   * is not the first message, an error will be returned. Describes the object
      +   * to read.
          * 
      * - * .google.storage.v2.BidiReadObjectSpec read_object_spec = 1; + * + * .google.storage.v2.BidiReadObjectSpec read_object_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the readObjectSpec field is set. */ @@ -42,11 +45,14 @@ public interface BidiReadObjectRequestOrBuilder * * *
      -   * The first message of each stream should set this field. If this is not
      -   * the first message, an error will be returned. Describes the object to read.
      +   * Optional. The first message of each stream should set this field. If this
      +   * is not the first message, an error will be returned. Describes the object
      +   * to read.
          * 
      * - * .google.storage.v2.BidiReadObjectSpec read_object_spec = 1; + * + * .google.storage.v2.BidiReadObjectSpec read_object_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The readObjectSpec. */ @@ -56,11 +62,14 @@ public interface BidiReadObjectRequestOrBuilder * * *
      -   * The first message of each stream should set this field. If this is not
      -   * the first message, an error will be returned. Describes the object to read.
      +   * Optional. The first message of each stream should set this field. If this
      +   * is not the first message, an error will be returned. Describes the object
      +   * to read.
          * 
      * - * .google.storage.v2.BidiReadObjectSpec read_object_spec = 1; + * + * .google.storage.v2.BidiReadObjectSpec read_object_spec = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.BidiReadObjectSpecOrBuilder getReadObjectSpecOrBuilder(); @@ -68,15 +77,17 @@ public interface BidiReadObjectRequestOrBuilder * * *
      -   * Provides a list of 0 or more (up to 100) ranges to read. If a single range
      -   * is large enough to require multiple responses, they are guaranteed to be
      -   * delivered in increasing offset order. There are no ordering guarantees
      -   * across ranges. When no ranges are provided, the response message will not
      -   * include ObjectRangeData. For full object downloads, the offset and size can
      -   * be set to 0.
      +   * Optional. Provides a list of 0 or more (up to 100) ranges to read. If a
      +   * single range is large enough to require multiple responses, they are
      +   * guaranteed to be delivered in increasing offset order. There are no
      +   * ordering guarantees across ranges. When no ranges are provided, the
      +   * response message will not include ObjectRangeData. For full object
      +   * downloads, the offset and size can be set to 0.
          * 
      * - * repeated .google.storage.v2.ReadRange read_ranges = 8; + * + * repeated .google.storage.v2.ReadRange read_ranges = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ java.util.List getReadRangesList(); @@ -84,15 +95,17 @@ public interface BidiReadObjectRequestOrBuilder * * *
      -   * Provides a list of 0 or more (up to 100) ranges to read. If a single range
      -   * is large enough to require multiple responses, they are guaranteed to be
      -   * delivered in increasing offset order. There are no ordering guarantees
      -   * across ranges. When no ranges are provided, the response message will not
      -   * include ObjectRangeData. For full object downloads, the offset and size can
      -   * be set to 0.
      +   * Optional. Provides a list of 0 or more (up to 100) ranges to read. If a
      +   * single range is large enough to require multiple responses, they are
      +   * guaranteed to be delivered in increasing offset order. There are no
      +   * ordering guarantees across ranges. When no ranges are provided, the
      +   * response message will not include ObjectRangeData. For full object
      +   * downloads, the offset and size can be set to 0.
          * 
      * - * repeated .google.storage.v2.ReadRange read_ranges = 8; + * + * repeated .google.storage.v2.ReadRange read_ranges = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.ReadRange getReadRanges(int index); @@ -100,15 +113,17 @@ public interface BidiReadObjectRequestOrBuilder * * *
      -   * Provides a list of 0 or more (up to 100) ranges to read. If a single range
      -   * is large enough to require multiple responses, they are guaranteed to be
      -   * delivered in increasing offset order. There are no ordering guarantees
      -   * across ranges. When no ranges are provided, the response message will not
      -   * include ObjectRangeData. For full object downloads, the offset and size can
      -   * be set to 0.
      +   * Optional. Provides a list of 0 or more (up to 100) ranges to read. If a
      +   * single range is large enough to require multiple responses, they are
      +   * guaranteed to be delivered in increasing offset order. There are no
      +   * ordering guarantees across ranges. When no ranges are provided, the
      +   * response message will not include ObjectRangeData. For full object
      +   * downloads, the offset and size can be set to 0.
          * 
      * - * repeated .google.storage.v2.ReadRange read_ranges = 8; + * + * repeated .google.storage.v2.ReadRange read_ranges = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ int getReadRangesCount(); @@ -116,15 +131,17 @@ public interface BidiReadObjectRequestOrBuilder * * *
      -   * Provides a list of 0 or more (up to 100) ranges to read. If a single range
      -   * is large enough to require multiple responses, they are guaranteed to be
      -   * delivered in increasing offset order. There are no ordering guarantees
      -   * across ranges. When no ranges are provided, the response message will not
      -   * include ObjectRangeData. For full object downloads, the offset and size can
      -   * be set to 0.
      +   * Optional. Provides a list of 0 or more (up to 100) ranges to read. If a
      +   * single range is large enough to require multiple responses, they are
      +   * guaranteed to be delivered in increasing offset order. There are no
      +   * ordering guarantees across ranges. When no ranges are provided, the
      +   * response message will not include ObjectRangeData. For full object
      +   * downloads, the offset and size can be set to 0.
          * 
      * - * repeated .google.storage.v2.ReadRange read_ranges = 8; + * + * repeated .google.storage.v2.ReadRange read_ranges = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ java.util.List getReadRangesOrBuilderList(); @@ -132,15 +149,17 @@ public interface BidiReadObjectRequestOrBuilder * * *
      -   * Provides a list of 0 or more (up to 100) ranges to read. If a single range
      -   * is large enough to require multiple responses, they are guaranteed to be
      -   * delivered in increasing offset order. There are no ordering guarantees
      -   * across ranges. When no ranges are provided, the response message will not
      -   * include ObjectRangeData. For full object downloads, the offset and size can
      -   * be set to 0.
      +   * Optional. Provides a list of 0 or more (up to 100) ranges to read. If a
      +   * single range is large enough to require multiple responses, they are
      +   * guaranteed to be delivered in increasing offset order. There are no
      +   * ordering guarantees across ranges. When no ranges are provided, the
      +   * response message will not include ObjectRangeData. For full object
      +   * downloads, the offset and size can be set to 0.
          * 
      * - * repeated .google.storage.v2.ReadRange read_ranges = 8; + * + * repeated .google.storage.v2.ReadRange read_ranges = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.ReadRangeOrBuilder getReadRangesOrBuilder(int index); } diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BidiReadObjectSpec.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BidiReadObjectSpec.java index 680983db06..6d3ba97822 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BidiReadObjectSpec.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BidiReadObjectSpec.java @@ -184,11 +184,11 @@ public com.google.protobuf.ByteString getObjectBytes() { * * *
      -   * If present, selects a specific revision of this object (as opposed
      -   * to the latest version, the default).
      +   * Optional. If present, selects a specific revision of this object (as
      +   * opposed to the latest version, the default).
          * 
      * - * int64 generation = 3; + * int64 generation = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The generation. */ @@ -358,10 +358,13 @@ public long getIfMetagenerationNotMatch() { * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -374,10 +377,13 @@ public boolean hasCommonObjectRequestParams() { * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -392,10 +398,13 @@ public com.google.storage.v2.CommonObjectRequestParams getCommonObjectRequestPar * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.CommonObjectRequestParamsOrBuilder @@ -425,7 +434,7 @@ public com.google.storage.v2.CommonObjectRequestParams getCommonObjectRequestPar * optional .google.protobuf.FieldMask read_mask = 12 [deprecated = true]; * * @deprecated google.storage.v2.BidiReadObjectSpec.read_mask is deprecated. See - * google/storage/v2/storage.proto;l=987 + * google/storage/v2/storage.proto;l=1024 * @return Whether the readMask field is set. */ @java.lang.Override @@ -451,7 +460,7 @@ public boolean hasReadMask() { * optional .google.protobuf.FieldMask read_mask = 12 [deprecated = true]; * * @deprecated google.storage.v2.BidiReadObjectSpec.read_mask is deprecated. See - * google/storage/v2/storage.proto;l=987 + * google/storage/v2/storage.proto;l=1024 * @return The readMask. */ @java.lang.Override @@ -1496,11 +1505,11 @@ public Builder setObjectBytes(com.google.protobuf.ByteString value) { * * *
      -     * If present, selects a specific revision of this object (as opposed
      -     * to the latest version, the default).
      +     * Optional. If present, selects a specific revision of this object (as
      +     * opposed to the latest version, the default).
            * 
      * - * int64 generation = 3; + * int64 generation = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The generation. */ @@ -1513,11 +1522,11 @@ public long getGeneration() { * * *
      -     * If present, selects a specific revision of this object (as opposed
      -     * to the latest version, the default).
      +     * Optional. If present, selects a specific revision of this object (as
      +     * opposed to the latest version, the default).
            * 
      * - * int64 generation = 3; + * int64 generation = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The generation to set. * @return This builder for chaining. @@ -1534,11 +1543,11 @@ public Builder setGeneration(long value) { * * *
      -     * If present, selects a specific revision of this object (as opposed
      -     * to the latest version, the default).
      +     * Optional. If present, selects a specific revision of this object (as
      +     * opposed to the latest version, the default).
            * 
      * - * int64 generation = 3; + * int64 generation = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1876,10 +1885,13 @@ public Builder clearIfMetagenerationNotMatch() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -1891,10 +1903,13 @@ public boolean hasCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -1912,10 +1927,13 @@ public com.google.storage.v2.CommonObjectRequestParams getCommonObjectRequestPar * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams value) { @@ -1936,10 +1954,13 @@ public Builder setCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams.Builder builderForValue) { @@ -1957,10 +1978,13 @@ public Builder setCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams value) { @@ -1987,10 +2011,13 @@ public Builder mergeCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearCommonObjectRequestParams() { bitField0_ = (bitField0_ & ~0x00000080); @@ -2007,10 +2034,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.CommonObjectRequestParams.Builder getCommonObjectRequestParamsBuilder() { @@ -2023,10 +2053,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.CommonObjectRequestParamsOrBuilder getCommonObjectRequestParamsOrBuilder() { @@ -2043,10 +2076,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.CommonObjectRequestParams, @@ -2089,7 +2125,7 @@ public Builder clearCommonObjectRequestParams() { * optional .google.protobuf.FieldMask read_mask = 12 [deprecated = true]; * * @deprecated google.storage.v2.BidiReadObjectSpec.read_mask is deprecated. See - * google/storage/v2/storage.proto;l=987 + * google/storage/v2/storage.proto;l=1024 * @return Whether the readMask field is set. */ @java.lang.Deprecated @@ -2114,7 +2150,7 @@ public boolean hasReadMask() { * optional .google.protobuf.FieldMask read_mask = 12 [deprecated = true]; * * @deprecated google.storage.v2.BidiReadObjectSpec.read_mask is deprecated. See - * google/storage/v2/storage.proto;l=987 + * google/storage/v2/storage.proto;l=1024 * @return The readMask. */ @java.lang.Deprecated diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BidiReadObjectSpecOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BidiReadObjectSpecOrBuilder.java index bbec550f4e..9e9ef39815 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BidiReadObjectSpecOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BidiReadObjectSpecOrBuilder.java @@ -84,11 +84,11 @@ public interface BidiReadObjectSpecOrBuilder * * *
      -   * If present, selects a specific revision of this object (as opposed
      -   * to the latest version, the default).
      +   * Optional. If present, selects a specific revision of this object (as
      +   * opposed to the latest version, the default).
          * 
      * - * int64 generation = 3; + * int64 generation = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The generation. */ @@ -216,10 +216,13 @@ public interface BidiReadObjectSpecOrBuilder * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -229,10 +232,13 @@ public interface BidiReadObjectSpecOrBuilder * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -242,10 +248,13 @@ public interface BidiReadObjectSpecOrBuilder * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.CommonObjectRequestParamsOrBuilder getCommonObjectRequestParamsOrBuilder(); @@ -266,7 +275,7 @@ public interface BidiReadObjectSpecOrBuilder * optional .google.protobuf.FieldMask read_mask = 12 [deprecated = true]; * * @deprecated google.storage.v2.BidiReadObjectSpec.read_mask is deprecated. See - * google/storage/v2/storage.proto;l=987 + * google/storage/v2/storage.proto;l=1024 * @return Whether the readMask field is set. */ @java.lang.Deprecated @@ -289,7 +298,7 @@ public interface BidiReadObjectSpecOrBuilder * optional .google.protobuf.FieldMask read_mask = 12 [deprecated = true]; * * @deprecated google.storage.v2.BidiReadObjectSpec.read_mask is deprecated. See - * google/storage/v2/storage.proto;l=987 + * google/storage/v2/storage.proto;l=1024 * @return The readMask. */ @java.lang.Deprecated diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BidiWriteObjectRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BidiWriteObjectRequest.java index dc5d58f69b..e99183abc8 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BidiWriteObjectRequest.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BidiWriteObjectRequest.java @@ -445,13 +445,15 @@ public com.google.storage.v2.ChecksummedDataOrBuilder getChecksummedDataOrBuilde * * *
      -   * Checksums for the complete object. If the checksums computed by the service
      -   * don't match the specified checksums the call will fail. May only be
      -   * provided in the first request or the
      -   * last request (with finish_write set).
      +   * Optional. Checksums for the complete object. If the checksums computed by
      +   * the service don't match the specified checksums the call will fail. May
      +   * only be provided in the first request or the last request (with
      +   * finish_write set).
          * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 6; + * + * .google.storage.v2.ObjectChecksums object_checksums = 6 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the objectChecksums field is set. */ @@ -464,13 +466,15 @@ public boolean hasObjectChecksums() { * * *
      -   * Checksums for the complete object. If the checksums computed by the service
      -   * don't match the specified checksums the call will fail. May only be
      -   * provided in the first request or the
      -   * last request (with finish_write set).
      +   * Optional. Checksums for the complete object. If the checksums computed by
      +   * the service don't match the specified checksums the call will fail. May
      +   * only be provided in the first request or the last request (with
      +   * finish_write set).
          * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 6; + * + * .google.storage.v2.ObjectChecksums object_checksums = 6 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The objectChecksums. */ @@ -485,13 +489,15 @@ public com.google.storage.v2.ObjectChecksums getObjectChecksums() { * * *
      -   * Checksums for the complete object. If the checksums computed by the service
      -   * don't match the specified checksums the call will fail. May only be
      -   * provided in the first request or the
      -   * last request (with finish_write set).
      +   * Optional. Checksums for the complete object. If the checksums computed by
      +   * the service don't match the specified checksums the call will fail. May
      +   * only be provided in the first request or the last request (with
      +   * finish_write set).
          * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 6; + * + * .google.storage.v2.ObjectChecksums object_checksums = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.ObjectChecksumsOrBuilder getObjectChecksumsOrBuilder() { @@ -507,17 +513,17 @@ public com.google.storage.v2.ObjectChecksumsOrBuilder getObjectChecksumsOrBuilde * * *
      -   * For each BidiWriteObjectRequest where state_lookup is `true` or the client
      -   * closes the stream, the service will send a BidiWriteObjectResponse
      -   * containing the current persisted size. The persisted size sent in responses
      -   * covers all the bytes the server has persisted thus far and can be used to
      -   * decide what data is safe for the client to drop. Note that the object's
      -   * current size reported by the BidiWriteObjectResponse may lag behind the
      -   * number of bytes written by the client. This field is ignored if
      -   * `finish_write` is set to true.
      +   * Optional. For each BidiWriteObjectRequest where state_lookup is `true` or
      +   * the client closes the stream, the service will send a
      +   * BidiWriteObjectResponse containing the current persisted size. The
      +   * persisted size sent in responses covers all the bytes the server has
      +   * persisted thus far and can be used to decide what data is safe for the
      +   * client to drop. Note that the object's current size reported by the
      +   * BidiWriteObjectResponse may lag behind the number of bytes written by the
      +   * client. This field is ignored if `finish_write` is set to true.
          * 
      * - * bool state_lookup = 7; + * bool state_lookup = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The stateLookup. */ @@ -533,15 +539,15 @@ public boolean getStateLookup() { * * *
      -   * Persists data written on the stream, up to and including the current
      -   * message, to permanent storage. This option should be used sparingly as it
      -   * may reduce performance. Ongoing writes will periodically be persisted on
      -   * the server even when `flush` is not set. This field is ignored if
      +   * Optional. Persists data written on the stream, up to and including the
      +   * current message, to permanent storage. This option should be used sparingly
      +   * as it may reduce performance. Ongoing writes will periodically be persisted
      +   * on the server even when `flush` is not set. This field is ignored if
          * `finish_write` is set to true since there's no need to checkpoint or flush
          * if this message completes the write.
          * 
      * - * bool flush = 8; + * bool flush = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The flush. */ @@ -557,7 +563,7 @@ public boolean getFlush() { * * *
      -   * If `true`, this indicates that the write is complete. Sending any
      +   * Optional. If `true`, this indicates that the write is complete. Sending any
          * `WriteObjectRequest`s subsequent to one in which `finish_write` is `true`
          * will cause an error.
          * For a non-resumable write (where the upload_id was not set in the first
      @@ -565,7 +571,7 @@ public boolean getFlush() {
          * stream.
          * 
      * - * bool finish_write = 9; + * bool finish_write = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return The finishWrite. */ @@ -581,10 +587,13 @@ public boolean getFinishWrite() { * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -597,10 +606,13 @@ public boolean hasCommonObjectRequestParams() { * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -615,10 +627,13 @@ public com.google.storage.v2.CommonObjectRequestParams getCommonObjectRequestPar * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.CommonObjectRequestParamsOrBuilder @@ -2229,13 +2244,15 @@ public com.google.storage.v2.ChecksummedDataOrBuilder getChecksummedDataOrBuilde * * *
      -     * Checksums for the complete object. If the checksums computed by the service
      -     * don't match the specified checksums the call will fail. May only be
      -     * provided in the first request or the
      -     * last request (with finish_write set).
      +     * Optional. Checksums for the complete object. If the checksums computed by
      +     * the service don't match the specified checksums the call will fail. May
      +     * only be provided in the first request or the last request (with
      +     * finish_write set).
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 6; + * + * .google.storage.v2.ObjectChecksums object_checksums = 6 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the objectChecksums field is set. */ @@ -2247,13 +2264,15 @@ public boolean hasObjectChecksums() { * * *
      -     * Checksums for the complete object. If the checksums computed by the service
      -     * don't match the specified checksums the call will fail. May only be
      -     * provided in the first request or the
      -     * last request (with finish_write set).
      +     * Optional. Checksums for the complete object. If the checksums computed by
      +     * the service don't match the specified checksums the call will fail. May
      +     * only be provided in the first request or the last request (with
      +     * finish_write set).
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 6; + * + * .google.storage.v2.ObjectChecksums object_checksums = 6 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The objectChecksums. */ @@ -2271,13 +2290,15 @@ public com.google.storage.v2.ObjectChecksums getObjectChecksums() { * * *
      -     * Checksums for the complete object. If the checksums computed by the service
      -     * don't match the specified checksums the call will fail. May only be
      -     * provided in the first request or the
      -     * last request (with finish_write set).
      +     * Optional. Checksums for the complete object. If the checksums computed by
      +     * the service don't match the specified checksums the call will fail. May
      +     * only be provided in the first request or the last request (with
      +     * finish_write set).
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 6; + * + * .google.storage.v2.ObjectChecksums object_checksums = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setObjectChecksums(com.google.storage.v2.ObjectChecksums value) { if (objectChecksumsBuilder_ == null) { @@ -2297,13 +2318,15 @@ public Builder setObjectChecksums(com.google.storage.v2.ObjectChecksums value) { * * *
      -     * Checksums for the complete object. If the checksums computed by the service
      -     * don't match the specified checksums the call will fail. May only be
      -     * provided in the first request or the
      -     * last request (with finish_write set).
      +     * Optional. Checksums for the complete object. If the checksums computed by
      +     * the service don't match the specified checksums the call will fail. May
      +     * only be provided in the first request or the last request (with
      +     * finish_write set).
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 6; + * + * .google.storage.v2.ObjectChecksums object_checksums = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setObjectChecksums( com.google.storage.v2.ObjectChecksums.Builder builderForValue) { @@ -2321,13 +2344,15 @@ public Builder setObjectChecksums( * * *
      -     * Checksums for the complete object. If the checksums computed by the service
      -     * don't match the specified checksums the call will fail. May only be
      -     * provided in the first request or the
      -     * last request (with finish_write set).
      +     * Optional. Checksums for the complete object. If the checksums computed by
      +     * the service don't match the specified checksums the call will fail. May
      +     * only be provided in the first request or the last request (with
      +     * finish_write set).
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 6; + * + * .google.storage.v2.ObjectChecksums object_checksums = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeObjectChecksums(com.google.storage.v2.ObjectChecksums value) { if (objectChecksumsBuilder_ == null) { @@ -2352,13 +2377,15 @@ public Builder mergeObjectChecksums(com.google.storage.v2.ObjectChecksums value) * * *
      -     * Checksums for the complete object. If the checksums computed by the service
      -     * don't match the specified checksums the call will fail. May only be
      -     * provided in the first request or the
      -     * last request (with finish_write set).
      +     * Optional. Checksums for the complete object. If the checksums computed by
      +     * the service don't match the specified checksums the call will fail. May
      +     * only be provided in the first request or the last request (with
      +     * finish_write set).
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 6; + * + * .google.storage.v2.ObjectChecksums object_checksums = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearObjectChecksums() { bitField0_ = (bitField0_ & ~0x00000020); @@ -2375,13 +2402,15 @@ public Builder clearObjectChecksums() { * * *
      -     * Checksums for the complete object. If the checksums computed by the service
      -     * don't match the specified checksums the call will fail. May only be
      -     * provided in the first request or the
      -     * last request (with finish_write set).
      +     * Optional. Checksums for the complete object. If the checksums computed by
      +     * the service don't match the specified checksums the call will fail. May
      +     * only be provided in the first request or the last request (with
      +     * finish_write set).
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 6; + * + * .google.storage.v2.ObjectChecksums object_checksums = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.ObjectChecksums.Builder getObjectChecksumsBuilder() { bitField0_ |= 0x00000020; @@ -2393,13 +2422,15 @@ public com.google.storage.v2.ObjectChecksums.Builder getObjectChecksumsBuilder() * * *
      -     * Checksums for the complete object. If the checksums computed by the service
      -     * don't match the specified checksums the call will fail. May only be
      -     * provided in the first request or the
      -     * last request (with finish_write set).
      +     * Optional. Checksums for the complete object. If the checksums computed by
      +     * the service don't match the specified checksums the call will fail. May
      +     * only be provided in the first request or the last request (with
      +     * finish_write set).
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 6; + * + * .google.storage.v2.ObjectChecksums object_checksums = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.ObjectChecksumsOrBuilder getObjectChecksumsOrBuilder() { if (objectChecksumsBuilder_ != null) { @@ -2415,13 +2446,15 @@ public com.google.storage.v2.ObjectChecksumsOrBuilder getObjectChecksumsOrBuilde * * *
      -     * Checksums for the complete object. If the checksums computed by the service
      -     * don't match the specified checksums the call will fail. May only be
      -     * provided in the first request or the
      -     * last request (with finish_write set).
      +     * Optional. Checksums for the complete object. If the checksums computed by
      +     * the service don't match the specified checksums the call will fail. May
      +     * only be provided in the first request or the last request (with
      +     * finish_write set).
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 6; + * + * .google.storage.v2.ObjectChecksums object_checksums = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.ObjectChecksums, @@ -2446,17 +2479,17 @@ public com.google.storage.v2.ObjectChecksumsOrBuilder getObjectChecksumsOrBuilde * * *
      -     * For each BidiWriteObjectRequest where state_lookup is `true` or the client
      -     * closes the stream, the service will send a BidiWriteObjectResponse
      -     * containing the current persisted size. The persisted size sent in responses
      -     * covers all the bytes the server has persisted thus far and can be used to
      -     * decide what data is safe for the client to drop. Note that the object's
      -     * current size reported by the BidiWriteObjectResponse may lag behind the
      -     * number of bytes written by the client. This field is ignored if
      -     * `finish_write` is set to true.
      +     * Optional. For each BidiWriteObjectRequest where state_lookup is `true` or
      +     * the client closes the stream, the service will send a
      +     * BidiWriteObjectResponse containing the current persisted size. The
      +     * persisted size sent in responses covers all the bytes the server has
      +     * persisted thus far and can be used to decide what data is safe for the
      +     * client to drop. Note that the object's current size reported by the
      +     * BidiWriteObjectResponse may lag behind the number of bytes written by the
      +     * client. This field is ignored if `finish_write` is set to true.
            * 
      * - * bool state_lookup = 7; + * bool state_lookup = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The stateLookup. */ @@ -2469,17 +2502,17 @@ public boolean getStateLookup() { * * *
      -     * For each BidiWriteObjectRequest where state_lookup is `true` or the client
      -     * closes the stream, the service will send a BidiWriteObjectResponse
      -     * containing the current persisted size. The persisted size sent in responses
      -     * covers all the bytes the server has persisted thus far and can be used to
      -     * decide what data is safe for the client to drop. Note that the object's
      -     * current size reported by the BidiWriteObjectResponse may lag behind the
      -     * number of bytes written by the client. This field is ignored if
      -     * `finish_write` is set to true.
      +     * Optional. For each BidiWriteObjectRequest where state_lookup is `true` or
      +     * the client closes the stream, the service will send a
      +     * BidiWriteObjectResponse containing the current persisted size. The
      +     * persisted size sent in responses covers all the bytes the server has
      +     * persisted thus far and can be used to decide what data is safe for the
      +     * client to drop. Note that the object's current size reported by the
      +     * BidiWriteObjectResponse may lag behind the number of bytes written by the
      +     * client. This field is ignored if `finish_write` is set to true.
            * 
      * - * bool state_lookup = 7; + * bool state_lookup = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The stateLookup to set. * @return This builder for chaining. @@ -2496,17 +2529,17 @@ public Builder setStateLookup(boolean value) { * * *
      -     * For each BidiWriteObjectRequest where state_lookup is `true` or the client
      -     * closes the stream, the service will send a BidiWriteObjectResponse
      -     * containing the current persisted size. The persisted size sent in responses
      -     * covers all the bytes the server has persisted thus far and can be used to
      -     * decide what data is safe for the client to drop. Note that the object's
      -     * current size reported by the BidiWriteObjectResponse may lag behind the
      -     * number of bytes written by the client. This field is ignored if
      -     * `finish_write` is set to true.
      +     * Optional. For each BidiWriteObjectRequest where state_lookup is `true` or
      +     * the client closes the stream, the service will send a
      +     * BidiWriteObjectResponse containing the current persisted size. The
      +     * persisted size sent in responses covers all the bytes the server has
      +     * persisted thus far and can be used to decide what data is safe for the
      +     * client to drop. Note that the object's current size reported by the
      +     * BidiWriteObjectResponse may lag behind the number of bytes written by the
      +     * client. This field is ignored if `finish_write` is set to true.
            * 
      * - * bool state_lookup = 7; + * bool state_lookup = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -2523,15 +2556,15 @@ public Builder clearStateLookup() { * * *
      -     * Persists data written on the stream, up to and including the current
      -     * message, to permanent storage. This option should be used sparingly as it
      -     * may reduce performance. Ongoing writes will periodically be persisted on
      -     * the server even when `flush` is not set. This field is ignored if
      +     * Optional. Persists data written on the stream, up to and including the
      +     * current message, to permanent storage. This option should be used sparingly
      +     * as it may reduce performance. Ongoing writes will periodically be persisted
      +     * on the server even when `flush` is not set. This field is ignored if
            * `finish_write` is set to true since there's no need to checkpoint or flush
            * if this message completes the write.
            * 
      * - * bool flush = 8; + * bool flush = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The flush. */ @@ -2544,15 +2577,15 @@ public boolean getFlush() { * * *
      -     * Persists data written on the stream, up to and including the current
      -     * message, to permanent storage. This option should be used sparingly as it
      -     * may reduce performance. Ongoing writes will periodically be persisted on
      -     * the server even when `flush` is not set. This field is ignored if
      +     * Optional. Persists data written on the stream, up to and including the
      +     * current message, to permanent storage. This option should be used sparingly
      +     * as it may reduce performance. Ongoing writes will periodically be persisted
      +     * on the server even when `flush` is not set. This field is ignored if
            * `finish_write` is set to true since there's no need to checkpoint or flush
            * if this message completes the write.
            * 
      * - * bool flush = 8; + * bool flush = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The flush to set. * @return This builder for chaining. @@ -2569,15 +2602,15 @@ public Builder setFlush(boolean value) { * * *
      -     * Persists data written on the stream, up to and including the current
      -     * message, to permanent storage. This option should be used sparingly as it
      -     * may reduce performance. Ongoing writes will periodically be persisted on
      -     * the server even when `flush` is not set. This field is ignored if
      +     * Optional. Persists data written on the stream, up to and including the
      +     * current message, to permanent storage. This option should be used sparingly
      +     * as it may reduce performance. Ongoing writes will periodically be persisted
      +     * on the server even when `flush` is not set. This field is ignored if
            * `finish_write` is set to true since there's no need to checkpoint or flush
            * if this message completes the write.
            * 
      * - * bool flush = 8; + * bool flush = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -2594,7 +2627,7 @@ public Builder clearFlush() { * * *
      -     * If `true`, this indicates that the write is complete. Sending any
      +     * Optional. If `true`, this indicates that the write is complete. Sending any
            * `WriteObjectRequest`s subsequent to one in which `finish_write` is `true`
            * will cause an error.
            * For a non-resumable write (where the upload_id was not set in the first
      @@ -2602,7 +2635,7 @@ public Builder clearFlush() {
            * stream.
            * 
      * - * bool finish_write = 9; + * bool finish_write = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return The finishWrite. */ @@ -2615,7 +2648,7 @@ public boolean getFinishWrite() { * * *
      -     * If `true`, this indicates that the write is complete. Sending any
      +     * Optional. If `true`, this indicates that the write is complete. Sending any
            * `WriteObjectRequest`s subsequent to one in which `finish_write` is `true`
            * will cause an error.
            * For a non-resumable write (where the upload_id was not set in the first
      @@ -2623,7 +2656,7 @@ public boolean getFinishWrite() {
            * stream.
            * 
      * - * bool finish_write = 9; + * bool finish_write = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The finishWrite to set. * @return This builder for chaining. @@ -2640,7 +2673,7 @@ public Builder setFinishWrite(boolean value) { * * *
      -     * If `true`, this indicates that the write is complete. Sending any
      +     * Optional. If `true`, this indicates that the write is complete. Sending any
            * `WriteObjectRequest`s subsequent to one in which `finish_write` is `true`
            * will cause an error.
            * For a non-resumable write (where the upload_id was not set in the first
      @@ -2648,7 +2681,7 @@ public Builder setFinishWrite(boolean value) {
            * stream.
            * 
      * - * bool finish_write = 9; + * bool finish_write = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -2670,10 +2703,13 @@ public Builder clearFinishWrite() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -2685,10 +2721,13 @@ public boolean hasCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -2706,10 +2745,13 @@ public com.google.storage.v2.CommonObjectRequestParams getCommonObjectRequestPar * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams value) { @@ -2730,10 +2772,13 @@ public Builder setCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams.Builder builderForValue) { @@ -2751,10 +2796,13 @@ public Builder setCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams value) { @@ -2781,10 +2829,13 @@ public Builder mergeCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearCommonObjectRequestParams() { bitField0_ = (bitField0_ & ~0x00000200); @@ -2801,10 +2852,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.CommonObjectRequestParams.Builder getCommonObjectRequestParamsBuilder() { @@ -2817,10 +2871,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.CommonObjectRequestParamsOrBuilder getCommonObjectRequestParamsOrBuilder() { @@ -2837,10 +2894,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.CommonObjectRequestParams, diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BidiWriteObjectRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BidiWriteObjectRequestOrBuilder.java index ba879f7ca8..5b5e562552 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BidiWriteObjectRequestOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BidiWriteObjectRequestOrBuilder.java @@ -212,13 +212,15 @@ public interface BidiWriteObjectRequestOrBuilder * * *
      -   * Checksums for the complete object. If the checksums computed by the service
      -   * don't match the specified checksums the call will fail. May only be
      -   * provided in the first request or the
      -   * last request (with finish_write set).
      +   * Optional. Checksums for the complete object. If the checksums computed by
      +   * the service don't match the specified checksums the call will fail. May
      +   * only be provided in the first request or the last request (with
      +   * finish_write set).
          * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 6; + * + * .google.storage.v2.ObjectChecksums object_checksums = 6 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the objectChecksums field is set. */ @@ -228,13 +230,15 @@ public interface BidiWriteObjectRequestOrBuilder * * *
      -   * Checksums for the complete object. If the checksums computed by the service
      -   * don't match the specified checksums the call will fail. May only be
      -   * provided in the first request or the
      -   * last request (with finish_write set).
      +   * Optional. Checksums for the complete object. If the checksums computed by
      +   * the service don't match the specified checksums the call will fail. May
      +   * only be provided in the first request or the last request (with
      +   * finish_write set).
          * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 6; + * + * .google.storage.v2.ObjectChecksums object_checksums = 6 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The objectChecksums. */ @@ -244,13 +248,15 @@ public interface BidiWriteObjectRequestOrBuilder * * *
      -   * Checksums for the complete object. If the checksums computed by the service
      -   * don't match the specified checksums the call will fail. May only be
      -   * provided in the first request or the
      -   * last request (with finish_write set).
      +   * Optional. Checksums for the complete object. If the checksums computed by
      +   * the service don't match the specified checksums the call will fail. May
      +   * only be provided in the first request or the last request (with
      +   * finish_write set).
          * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 6; + * + * .google.storage.v2.ObjectChecksums object_checksums = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.ObjectChecksumsOrBuilder getObjectChecksumsOrBuilder(); @@ -258,17 +264,17 @@ public interface BidiWriteObjectRequestOrBuilder * * *
      -   * For each BidiWriteObjectRequest where state_lookup is `true` or the client
      -   * closes the stream, the service will send a BidiWriteObjectResponse
      -   * containing the current persisted size. The persisted size sent in responses
      -   * covers all the bytes the server has persisted thus far and can be used to
      -   * decide what data is safe for the client to drop. Note that the object's
      -   * current size reported by the BidiWriteObjectResponse may lag behind the
      -   * number of bytes written by the client. This field is ignored if
      -   * `finish_write` is set to true.
      +   * Optional. For each BidiWriteObjectRequest where state_lookup is `true` or
      +   * the client closes the stream, the service will send a
      +   * BidiWriteObjectResponse containing the current persisted size. The
      +   * persisted size sent in responses covers all the bytes the server has
      +   * persisted thus far and can be used to decide what data is safe for the
      +   * client to drop. Note that the object's current size reported by the
      +   * BidiWriteObjectResponse may lag behind the number of bytes written by the
      +   * client. This field is ignored if `finish_write` is set to true.
          * 
      * - * bool state_lookup = 7; + * bool state_lookup = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The stateLookup. */ @@ -278,15 +284,15 @@ public interface BidiWriteObjectRequestOrBuilder * * *
      -   * Persists data written on the stream, up to and including the current
      -   * message, to permanent storage. This option should be used sparingly as it
      -   * may reduce performance. Ongoing writes will periodically be persisted on
      -   * the server even when `flush` is not set. This field is ignored if
      +   * Optional. Persists data written on the stream, up to and including the
      +   * current message, to permanent storage. This option should be used sparingly
      +   * as it may reduce performance. Ongoing writes will periodically be persisted
      +   * on the server even when `flush` is not set. This field is ignored if
          * `finish_write` is set to true since there's no need to checkpoint or flush
          * if this message completes the write.
          * 
      * - * bool flush = 8; + * bool flush = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The flush. */ @@ -296,7 +302,7 @@ public interface BidiWriteObjectRequestOrBuilder * * *
      -   * If `true`, this indicates that the write is complete. Sending any
      +   * Optional. If `true`, this indicates that the write is complete. Sending any
          * `WriteObjectRequest`s subsequent to one in which `finish_write` is `true`
          * will cause an error.
          * For a non-resumable write (where the upload_id was not set in the first
      @@ -304,7 +310,7 @@ public interface BidiWriteObjectRequestOrBuilder
          * stream.
          * 
      * - * bool finish_write = 9; + * bool finish_write = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return The finishWrite. */ @@ -314,10 +320,13 @@ public interface BidiWriteObjectRequestOrBuilder * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -327,10 +336,13 @@ public interface BidiWriteObjectRequestOrBuilder * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -340,10 +352,13 @@ public interface BidiWriteObjectRequestOrBuilder * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.CommonObjectRequestParamsOrBuilder getCommonObjectRequestParamsOrBuilder(); diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Bucket.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Bucket.java index 5cc1b6fda4..21febe3219 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Bucket.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Bucket.java @@ -93,10 +93,10 @@ public interface BillingOrBuilder * * *
      -     * When set to true, Requester Pays is enabled for this bucket.
      +     * Optional. When set to true, Requester Pays is enabled for this bucket.
            * 
      * - * bool requester_pays = 1; + * bool requester_pays = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The requesterPays. */ @@ -153,10 +153,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
      -     * When set to true, Requester Pays is enabled for this bucket.
      +     * Optional. When set to true, Requester Pays is enabled for this bucket.
            * 
      * - * bool requester_pays = 1; + * bool requester_pays = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The requesterPays. */ @@ -514,10 +514,10 @@ public Builder mergeFrom( * * *
      -       * When set to true, Requester Pays is enabled for this bucket.
      +       * Optional. When set to true, Requester Pays is enabled for this bucket.
              * 
      * - * bool requester_pays = 1; + * bool requester_pays = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The requesterPays. */ @@ -530,10 +530,10 @@ public boolean getRequesterPays() { * * *
      -       * When set to true, Requester Pays is enabled for this bucket.
      +       * Optional. When set to true, Requester Pays is enabled for this bucket.
              * 
      * - * bool requester_pays = 1; + * bool requester_pays = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The requesterPays to set. * @return This builder for chaining. @@ -550,10 +550,10 @@ public Builder setRequesterPays(boolean value) { * * *
      -       * When set to true, Requester Pays is enabled for this bucket.
      +       * Optional. When set to true, Requester Pays is enabled for this bucket.
              * 
      * - * bool requester_pays = 1; + * bool requester_pays = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -637,12 +637,12 @@ public interface CorsOrBuilder * * *
      -     * The list of Origins eligible to receive CORS response headers. See
      -     * [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
      +     * Optional. The list of Origins eligible to receive CORS response headers.
      +     * See [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
            * Note: "*" is permitted in the list of origins, and means "any Origin".
            * 
      * - * repeated string origin = 1; + * repeated string origin = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return A list containing the origin. */ @@ -652,12 +652,12 @@ public interface CorsOrBuilder * * *
      -     * The list of Origins eligible to receive CORS response headers. See
      -     * [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
      +     * Optional. The list of Origins eligible to receive CORS response headers.
      +     * See [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
            * Note: "*" is permitted in the list of origins, and means "any Origin".
            * 
      * - * repeated string origin = 1; + * repeated string origin = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The count of origin. */ @@ -667,12 +667,12 @@ public interface CorsOrBuilder * * *
      -     * The list of Origins eligible to receive CORS response headers. See
      -     * [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
      +     * Optional. The list of Origins eligible to receive CORS response headers.
      +     * See [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
            * Note: "*" is permitted in the list of origins, and means "any Origin".
            * 
      * - * repeated string origin = 1; + * repeated string origin = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the element to return. * @return The origin at the given index. @@ -683,12 +683,12 @@ public interface CorsOrBuilder * * *
      -     * The list of Origins eligible to receive CORS response headers. See
      -     * [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
      +     * Optional. The list of Origins eligible to receive CORS response headers.
      +     * See [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
            * Note: "*" is permitted in the list of origins, and means "any Origin".
            * 
      * - * repeated string origin = 1; + * repeated string origin = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the value to return. * @return The bytes of the origin at the given index. @@ -699,12 +699,13 @@ public interface CorsOrBuilder * * *
      -     * The list of HTTP methods on which to include CORS response headers,
      +     * Optional. The list of HTTP methods on which to include CORS response
      +     * headers,
            * (`GET`, `OPTIONS`, `POST`, etc) Note: "*" is permitted in the list of
            * methods, and means "any method".
            * 
      * - * repeated string method = 2; + * repeated string method = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return A list containing the method. */ @@ -714,12 +715,13 @@ public interface CorsOrBuilder * * *
      -     * The list of HTTP methods on which to include CORS response headers,
      +     * Optional. The list of HTTP methods on which to include CORS response
      +     * headers,
            * (`GET`, `OPTIONS`, `POST`, etc) Note: "*" is permitted in the list of
            * methods, and means "any method".
            * 
      * - * repeated string method = 2; + * repeated string method = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The count of method. */ @@ -729,12 +731,13 @@ public interface CorsOrBuilder * * *
      -     * The list of HTTP methods on which to include CORS response headers,
      +     * Optional. The list of HTTP methods on which to include CORS response
      +     * headers,
            * (`GET`, `OPTIONS`, `POST`, etc) Note: "*" is permitted in the list of
            * methods, and means "any method".
            * 
      * - * repeated string method = 2; + * repeated string method = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the element to return. * @return The method at the given index. @@ -745,12 +748,13 @@ public interface CorsOrBuilder * * *
      -     * The list of HTTP methods on which to include CORS response headers,
      +     * Optional. The list of HTTP methods on which to include CORS response
      +     * headers,
            * (`GET`, `OPTIONS`, `POST`, etc) Note: "*" is permitted in the list of
            * methods, and means "any method".
            * 
      * - * repeated string method = 2; + * repeated string method = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the value to return. * @return The bytes of the method at the given index. @@ -761,12 +765,12 @@ public interface CorsOrBuilder * * *
      -     * The list of HTTP headers other than the
      +     * Optional. The list of HTTP headers other than the
            * [https://www.w3.org/TR/cors/#simple-response-header][simple response
            * headers] to give permission for the user-agent to share across domains.
            * 
      * - * repeated string response_header = 3; + * repeated string response_header = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return A list containing the responseHeader. */ @@ -776,12 +780,12 @@ public interface CorsOrBuilder * * *
      -     * The list of HTTP headers other than the
      +     * Optional. The list of HTTP headers other than the
            * [https://www.w3.org/TR/cors/#simple-response-header][simple response
            * headers] to give permission for the user-agent to share across domains.
            * 
      * - * repeated string response_header = 3; + * repeated string response_header = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The count of responseHeader. */ @@ -791,12 +795,12 @@ public interface CorsOrBuilder * * *
      -     * The list of HTTP headers other than the
      +     * Optional. The list of HTTP headers other than the
            * [https://www.w3.org/TR/cors/#simple-response-header][simple response
            * headers] to give permission for the user-agent to share across domains.
            * 
      * - * repeated string response_header = 3; + * repeated string response_header = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the element to return. * @return The responseHeader at the given index. @@ -807,12 +811,12 @@ public interface CorsOrBuilder * * *
      -     * The list of HTTP headers other than the
      +     * Optional. The list of HTTP headers other than the
            * [https://www.w3.org/TR/cors/#simple-response-header][simple response
            * headers] to give permission for the user-agent to share across domains.
            * 
      * - * repeated string response_header = 3; + * repeated string response_header = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the value to return. * @return The bytes of the responseHeader at the given index. @@ -823,12 +827,12 @@ public interface CorsOrBuilder * * *
      -     * The value, in seconds, to return in the
      +     * Optional. The value, in seconds, to return in the
            * [https://www.w3.org/TR/cors/#access-control-max-age-response-header][Access-Control-Max-Age
            * header] used in preflight responses.
            * 
      * - * int32 max_age_seconds = 4; + * int32 max_age_seconds = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The maxAgeSeconds. */ @@ -895,12 +899,12 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
      -     * The list of Origins eligible to receive CORS response headers. See
      -     * [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
      +     * Optional. The list of Origins eligible to receive CORS response headers.
      +     * See [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
            * Note: "*" is permitted in the list of origins, and means "any Origin".
            * 
      * - * repeated string origin = 1; + * repeated string origin = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return A list containing the origin. */ @@ -912,12 +916,12 @@ public com.google.protobuf.ProtocolStringList getOriginList() { * * *
      -     * The list of Origins eligible to receive CORS response headers. See
      -     * [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
      +     * Optional. The list of Origins eligible to receive CORS response headers.
      +     * See [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
            * Note: "*" is permitted in the list of origins, and means "any Origin".
            * 
      * - * repeated string origin = 1; + * repeated string origin = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The count of origin. */ @@ -929,12 +933,12 @@ public int getOriginCount() { * * *
      -     * The list of Origins eligible to receive CORS response headers. See
      -     * [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
      +     * Optional. The list of Origins eligible to receive CORS response headers.
      +     * See [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
            * Note: "*" is permitted in the list of origins, and means "any Origin".
            * 
      * - * repeated string origin = 1; + * repeated string origin = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the element to return. * @return The origin at the given index. @@ -947,12 +951,12 @@ public java.lang.String getOrigin(int index) { * * *
      -     * The list of Origins eligible to receive CORS response headers. See
      -     * [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
      +     * Optional. The list of Origins eligible to receive CORS response headers.
      +     * See [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
            * Note: "*" is permitted in the list of origins, and means "any Origin".
            * 
      * - * repeated string origin = 1; + * repeated string origin = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the value to return. * @return The bytes of the origin at the given index. @@ -971,12 +975,13 @@ public com.google.protobuf.ByteString getOriginBytes(int index) { * * *
      -     * The list of HTTP methods on which to include CORS response headers,
      +     * Optional. The list of HTTP methods on which to include CORS response
      +     * headers,
            * (`GET`, `OPTIONS`, `POST`, etc) Note: "*" is permitted in the list of
            * methods, and means "any method".
            * 
      * - * repeated string method = 2; + * repeated string method = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return A list containing the method. */ @@ -988,12 +993,13 @@ public com.google.protobuf.ProtocolStringList getMethodList() { * * *
      -     * The list of HTTP methods on which to include CORS response headers,
      +     * Optional. The list of HTTP methods on which to include CORS response
      +     * headers,
            * (`GET`, `OPTIONS`, `POST`, etc) Note: "*" is permitted in the list of
            * methods, and means "any method".
            * 
      * - * repeated string method = 2; + * repeated string method = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The count of method. */ @@ -1005,12 +1011,13 @@ public int getMethodCount() { * * *
      -     * The list of HTTP methods on which to include CORS response headers,
      +     * Optional. The list of HTTP methods on which to include CORS response
      +     * headers,
            * (`GET`, `OPTIONS`, `POST`, etc) Note: "*" is permitted in the list of
            * methods, and means "any method".
            * 
      * - * repeated string method = 2; + * repeated string method = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the element to return. * @return The method at the given index. @@ -1023,12 +1030,13 @@ public java.lang.String getMethod(int index) { * * *
      -     * The list of HTTP methods on which to include CORS response headers,
      +     * Optional. The list of HTTP methods on which to include CORS response
      +     * headers,
            * (`GET`, `OPTIONS`, `POST`, etc) Note: "*" is permitted in the list of
            * methods, and means "any method".
            * 
      * - * repeated string method = 2; + * repeated string method = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the value to return. * @return The bytes of the method at the given index. @@ -1047,12 +1055,12 @@ public com.google.protobuf.ByteString getMethodBytes(int index) { * * *
      -     * The list of HTTP headers other than the
      +     * Optional. The list of HTTP headers other than the
            * [https://www.w3.org/TR/cors/#simple-response-header][simple response
            * headers] to give permission for the user-agent to share across domains.
            * 
      * - * repeated string response_header = 3; + * repeated string response_header = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return A list containing the responseHeader. */ @@ -1064,12 +1072,12 @@ public com.google.protobuf.ProtocolStringList getResponseHeaderList() { * * *
      -     * The list of HTTP headers other than the
      +     * Optional. The list of HTTP headers other than the
            * [https://www.w3.org/TR/cors/#simple-response-header][simple response
            * headers] to give permission for the user-agent to share across domains.
            * 
      * - * repeated string response_header = 3; + * repeated string response_header = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The count of responseHeader. */ @@ -1081,12 +1089,12 @@ public int getResponseHeaderCount() { * * *
      -     * The list of HTTP headers other than the
      +     * Optional. The list of HTTP headers other than the
            * [https://www.w3.org/TR/cors/#simple-response-header][simple response
            * headers] to give permission for the user-agent to share across domains.
            * 
      * - * repeated string response_header = 3; + * repeated string response_header = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the element to return. * @return The responseHeader at the given index. @@ -1099,12 +1107,12 @@ public java.lang.String getResponseHeader(int index) { * * *
      -     * The list of HTTP headers other than the
      +     * Optional. The list of HTTP headers other than the
            * [https://www.w3.org/TR/cors/#simple-response-header][simple response
            * headers] to give permission for the user-agent to share across domains.
            * 
      * - * repeated string response_header = 3; + * repeated string response_header = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the value to return. * @return The bytes of the responseHeader at the given index. @@ -1120,12 +1128,12 @@ public com.google.protobuf.ByteString getResponseHeaderBytes(int index) { * * *
      -     * The value, in seconds, to return in the
      +     * Optional. The value, in seconds, to return in the
            * [https://www.w3.org/TR/cors/#access-control-max-age-response-header][Access-Control-Max-Age
            * header] used in preflight responses.
            * 
      * - * int32 max_age_seconds = 4; + * int32 max_age_seconds = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The maxAgeSeconds. */ @@ -1606,12 +1614,12 @@ private void ensureOriginIsMutable() { * * *
      -       * The list of Origins eligible to receive CORS response headers. See
      -       * [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
      +       * Optional. The list of Origins eligible to receive CORS response headers.
      +       * See [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
              * Note: "*" is permitted in the list of origins, and means "any Origin".
              * 
      * - * repeated string origin = 1; + * repeated string origin = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return A list containing the origin. */ @@ -1624,12 +1632,12 @@ public com.google.protobuf.ProtocolStringList getOriginList() { * * *
      -       * The list of Origins eligible to receive CORS response headers. See
      -       * [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
      +       * Optional. The list of Origins eligible to receive CORS response headers.
      +       * See [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
              * Note: "*" is permitted in the list of origins, and means "any Origin".
              * 
      * - * repeated string origin = 1; + * repeated string origin = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The count of origin. */ @@ -1641,12 +1649,12 @@ public int getOriginCount() { * * *
      -       * The list of Origins eligible to receive CORS response headers. See
      -       * [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
      +       * Optional. The list of Origins eligible to receive CORS response headers.
      +       * See [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
              * Note: "*" is permitted in the list of origins, and means "any Origin".
              * 
      * - * repeated string origin = 1; + * repeated string origin = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the element to return. * @return The origin at the given index. @@ -1659,12 +1667,12 @@ public java.lang.String getOrigin(int index) { * * *
      -       * The list of Origins eligible to receive CORS response headers. See
      -       * [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
      +       * Optional. The list of Origins eligible to receive CORS response headers.
      +       * See [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
              * Note: "*" is permitted in the list of origins, and means "any Origin".
              * 
      * - * repeated string origin = 1; + * repeated string origin = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the value to return. * @return The bytes of the origin at the given index. @@ -1677,12 +1685,12 @@ public com.google.protobuf.ByteString getOriginBytes(int index) { * * *
      -       * The list of Origins eligible to receive CORS response headers. See
      -       * [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
      +       * Optional. The list of Origins eligible to receive CORS response headers.
      +       * See [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
              * Note: "*" is permitted in the list of origins, and means "any Origin".
              * 
      * - * repeated string origin = 1; + * repeated string origin = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index to set the value at. * @param value The origin to set. @@ -1703,12 +1711,12 @@ public Builder setOrigin(int index, java.lang.String value) { * * *
      -       * The list of Origins eligible to receive CORS response headers. See
      -       * [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
      +       * Optional. The list of Origins eligible to receive CORS response headers.
      +       * See [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
              * Note: "*" is permitted in the list of origins, and means "any Origin".
              * 
      * - * repeated string origin = 1; + * repeated string origin = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The origin to add. * @return This builder for chaining. @@ -1728,12 +1736,12 @@ public Builder addOrigin(java.lang.String value) { * * *
      -       * The list of Origins eligible to receive CORS response headers. See
      -       * [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
      +       * Optional. The list of Origins eligible to receive CORS response headers.
      +       * See [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
              * Note: "*" is permitted in the list of origins, and means "any Origin".
              * 
      * - * repeated string origin = 1; + * repeated string origin = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param values The origin to add. * @return This builder for chaining. @@ -1750,12 +1758,12 @@ public Builder addAllOrigin(java.lang.Iterable values) { * * *
      -       * The list of Origins eligible to receive CORS response headers. See
      -       * [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
      +       * Optional. The list of Origins eligible to receive CORS response headers.
      +       * See [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
              * Note: "*" is permitted in the list of origins, and means "any Origin".
              * 
      * - * repeated string origin = 1; + * repeated string origin = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1771,12 +1779,12 @@ public Builder clearOrigin() { * * *
      -       * The list of Origins eligible to receive CORS response headers. See
      -       * [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
      +       * Optional. The list of Origins eligible to receive CORS response headers.
      +       * See [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins.
              * Note: "*" is permitted in the list of origins, and means "any Origin".
              * 
      * - * repeated string origin = 1; + * repeated string origin = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes of the origin to add. * @return This builder for chaining. @@ -1807,12 +1815,13 @@ private void ensureMethodIsMutable() { * * *
      -       * The list of HTTP methods on which to include CORS response headers,
      +       * Optional. The list of HTTP methods on which to include CORS response
      +       * headers,
              * (`GET`, `OPTIONS`, `POST`, etc) Note: "*" is permitted in the list of
              * methods, and means "any method".
              * 
      * - * repeated string method = 2; + * repeated string method = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return A list containing the method. */ @@ -1825,12 +1834,13 @@ public com.google.protobuf.ProtocolStringList getMethodList() { * * *
      -       * The list of HTTP methods on which to include CORS response headers,
      +       * Optional. The list of HTTP methods on which to include CORS response
      +       * headers,
              * (`GET`, `OPTIONS`, `POST`, etc) Note: "*" is permitted in the list of
              * methods, and means "any method".
              * 
      * - * repeated string method = 2; + * repeated string method = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The count of method. */ @@ -1842,12 +1852,13 @@ public int getMethodCount() { * * *
      -       * The list of HTTP methods on which to include CORS response headers,
      +       * Optional. The list of HTTP methods on which to include CORS response
      +       * headers,
              * (`GET`, `OPTIONS`, `POST`, etc) Note: "*" is permitted in the list of
              * methods, and means "any method".
              * 
      * - * repeated string method = 2; + * repeated string method = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the element to return. * @return The method at the given index. @@ -1860,12 +1871,13 @@ public java.lang.String getMethod(int index) { * * *
      -       * The list of HTTP methods on which to include CORS response headers,
      +       * Optional. The list of HTTP methods on which to include CORS response
      +       * headers,
              * (`GET`, `OPTIONS`, `POST`, etc) Note: "*" is permitted in the list of
              * methods, and means "any method".
              * 
      * - * repeated string method = 2; + * repeated string method = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the value to return. * @return The bytes of the method at the given index. @@ -1878,12 +1890,13 @@ public com.google.protobuf.ByteString getMethodBytes(int index) { * * *
      -       * The list of HTTP methods on which to include CORS response headers,
      +       * Optional. The list of HTTP methods on which to include CORS response
      +       * headers,
              * (`GET`, `OPTIONS`, `POST`, etc) Note: "*" is permitted in the list of
              * methods, and means "any method".
              * 
      * - * repeated string method = 2; + * repeated string method = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index to set the value at. * @param value The method to set. @@ -1904,12 +1917,13 @@ public Builder setMethod(int index, java.lang.String value) { * * *
      -       * The list of HTTP methods on which to include CORS response headers,
      +       * Optional. The list of HTTP methods on which to include CORS response
      +       * headers,
              * (`GET`, `OPTIONS`, `POST`, etc) Note: "*" is permitted in the list of
              * methods, and means "any method".
              * 
      * - * repeated string method = 2; + * repeated string method = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The method to add. * @return This builder for chaining. @@ -1929,12 +1943,13 @@ public Builder addMethod(java.lang.String value) { * * *
      -       * The list of HTTP methods on which to include CORS response headers,
      +       * Optional. The list of HTTP methods on which to include CORS response
      +       * headers,
              * (`GET`, `OPTIONS`, `POST`, etc) Note: "*" is permitted in the list of
              * methods, and means "any method".
              * 
      * - * repeated string method = 2; + * repeated string method = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param values The method to add. * @return This builder for chaining. @@ -1951,12 +1966,13 @@ public Builder addAllMethod(java.lang.Iterable values) { * * *
      -       * The list of HTTP methods on which to include CORS response headers,
      +       * Optional. The list of HTTP methods on which to include CORS response
      +       * headers,
              * (`GET`, `OPTIONS`, `POST`, etc) Note: "*" is permitted in the list of
              * methods, and means "any method".
              * 
      * - * repeated string method = 2; + * repeated string method = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1972,12 +1988,13 @@ public Builder clearMethod() { * * *
      -       * The list of HTTP methods on which to include CORS response headers,
      +       * Optional. The list of HTTP methods on which to include CORS response
      +       * headers,
              * (`GET`, `OPTIONS`, `POST`, etc) Note: "*" is permitted in the list of
              * methods, and means "any method".
              * 
      * - * repeated string method = 2; + * repeated string method = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes of the method to add. * @return This builder for chaining. @@ -2008,12 +2025,12 @@ private void ensureResponseHeaderIsMutable() { * * *
      -       * The list of HTTP headers other than the
      +       * Optional. The list of HTTP headers other than the
              * [https://www.w3.org/TR/cors/#simple-response-header][simple response
              * headers] to give permission for the user-agent to share across domains.
              * 
      * - * repeated string response_header = 3; + * repeated string response_header = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return A list containing the responseHeader. */ @@ -2026,12 +2043,12 @@ public com.google.protobuf.ProtocolStringList getResponseHeaderList() { * * *
      -       * The list of HTTP headers other than the
      +       * Optional. The list of HTTP headers other than the
              * [https://www.w3.org/TR/cors/#simple-response-header][simple response
              * headers] to give permission for the user-agent to share across domains.
              * 
      * - * repeated string response_header = 3; + * repeated string response_header = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The count of responseHeader. */ @@ -2043,12 +2060,12 @@ public int getResponseHeaderCount() { * * *
      -       * The list of HTTP headers other than the
      +       * Optional. The list of HTTP headers other than the
              * [https://www.w3.org/TR/cors/#simple-response-header][simple response
              * headers] to give permission for the user-agent to share across domains.
              * 
      * - * repeated string response_header = 3; + * repeated string response_header = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the element to return. * @return The responseHeader at the given index. @@ -2061,12 +2078,12 @@ public java.lang.String getResponseHeader(int index) { * * *
      -       * The list of HTTP headers other than the
      +       * Optional. The list of HTTP headers other than the
              * [https://www.w3.org/TR/cors/#simple-response-header][simple response
              * headers] to give permission for the user-agent to share across domains.
              * 
      * - * repeated string response_header = 3; + * repeated string response_header = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the value to return. * @return The bytes of the responseHeader at the given index. @@ -2079,12 +2096,12 @@ public com.google.protobuf.ByteString getResponseHeaderBytes(int index) { * * *
      -       * The list of HTTP headers other than the
      +       * Optional. The list of HTTP headers other than the
              * [https://www.w3.org/TR/cors/#simple-response-header][simple response
              * headers] to give permission for the user-agent to share across domains.
              * 
      * - * repeated string response_header = 3; + * repeated string response_header = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index to set the value at. * @param value The responseHeader to set. @@ -2105,12 +2122,12 @@ public Builder setResponseHeader(int index, java.lang.String value) { * * *
      -       * The list of HTTP headers other than the
      +       * Optional. The list of HTTP headers other than the
              * [https://www.w3.org/TR/cors/#simple-response-header][simple response
              * headers] to give permission for the user-agent to share across domains.
              * 
      * - * repeated string response_header = 3; + * repeated string response_header = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The responseHeader to add. * @return This builder for chaining. @@ -2130,12 +2147,12 @@ public Builder addResponseHeader(java.lang.String value) { * * *
      -       * The list of HTTP headers other than the
      +       * Optional. The list of HTTP headers other than the
              * [https://www.w3.org/TR/cors/#simple-response-header][simple response
              * headers] to give permission for the user-agent to share across domains.
              * 
      * - * repeated string response_header = 3; + * repeated string response_header = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param values The responseHeader to add. * @return This builder for chaining. @@ -2152,12 +2169,12 @@ public Builder addAllResponseHeader(java.lang.Iterable values) * * *
      -       * The list of HTTP headers other than the
      +       * Optional. The list of HTTP headers other than the
              * [https://www.w3.org/TR/cors/#simple-response-header][simple response
              * headers] to give permission for the user-agent to share across domains.
              * 
      * - * repeated string response_header = 3; + * repeated string response_header = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -2173,12 +2190,12 @@ public Builder clearResponseHeader() { * * *
      -       * The list of HTTP headers other than the
      +       * Optional. The list of HTTP headers other than the
              * [https://www.w3.org/TR/cors/#simple-response-header][simple response
              * headers] to give permission for the user-agent to share across domains.
              * 
      * - * repeated string response_header = 3; + * repeated string response_header = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes of the responseHeader to add. * @return This builder for chaining. @@ -2201,12 +2218,12 @@ public Builder addResponseHeaderBytes(com.google.protobuf.ByteString value) { * * *
      -       * The value, in seconds, to return in the
      +       * Optional. The value, in seconds, to return in the
              * [https://www.w3.org/TR/cors/#access-control-max-age-response-header][Access-Control-Max-Age
              * header] used in preflight responses.
              * 
      * - * int32 max_age_seconds = 4; + * int32 max_age_seconds = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The maxAgeSeconds. */ @@ -2219,12 +2236,12 @@ public int getMaxAgeSeconds() { * * *
      -       * The value, in seconds, to return in the
      +       * Optional. The value, in seconds, to return in the
              * [https://www.w3.org/TR/cors/#access-control-max-age-response-header][Access-Control-Max-Age
              * header] used in preflight responses.
              * 
      * - * int32 max_age_seconds = 4; + * int32 max_age_seconds = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The maxAgeSeconds to set. * @return This builder for chaining. @@ -2241,12 +2258,12 @@ public Builder setMaxAgeSeconds(int value) { * * *
      -       * The value, in seconds, to return in the
      +       * Optional. The value, in seconds, to return in the
              * [https://www.w3.org/TR/cors/#access-control-max-age-response-header][Access-Control-Max-Age
              * header] used in preflight responses.
              * 
      * - * int32 max_age_seconds = 4; + * int32 max_age_seconds = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -2330,11 +2347,13 @@ public interface EncryptionOrBuilder * * *
      -     * The name of the Cloud KMS key that will be used to encrypt objects
      -     * inserted into this bucket, if no encryption method is specified.
      +     * Optional. The name of the Cloud KMS key that will be used to encrypt
      +     * objects inserted into this bucket, if no encryption method is specified.
            * 
      * - * string default_kms_key = 1 [(.google.api.resource_reference) = { ... } + * + * string default_kms_key = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The defaultKmsKey. */ @@ -2344,11 +2363,13 @@ public interface EncryptionOrBuilder * * *
      -     * The name of the Cloud KMS key that will be used to encrypt objects
      -     * inserted into this bucket, if no encryption method is specified.
      +     * Optional. The name of the Cloud KMS key that will be used to encrypt
      +     * objects inserted into this bucket, if no encryption method is specified.
            * 
      * - * string default_kms_key = 1 [(.google.api.resource_reference) = { ... } + * + * string default_kms_key = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for defaultKmsKey. */ @@ -2409,11 +2430,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
      -     * The name of the Cloud KMS key that will be used to encrypt objects
      -     * inserted into this bucket, if no encryption method is specified.
      +     * Optional. The name of the Cloud KMS key that will be used to encrypt
      +     * objects inserted into this bucket, if no encryption method is specified.
            * 
      * - * string default_kms_key = 1 [(.google.api.resource_reference) = { ... } + * + * string default_kms_key = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The defaultKmsKey. */ @@ -2434,11 +2457,13 @@ public java.lang.String getDefaultKmsKey() { * * *
      -     * The name of the Cloud KMS key that will be used to encrypt objects
      -     * inserted into this bucket, if no encryption method is specified.
      +     * Optional. The name of the Cloud KMS key that will be used to encrypt
      +     * objects inserted into this bucket, if no encryption method is specified.
            * 
      * - * string default_kms_key = 1 [(.google.api.resource_reference) = { ... } + * + * string default_kms_key = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for defaultKmsKey. */ @@ -2806,11 +2831,13 @@ public Builder mergeFrom( * * *
      -       * The name of the Cloud KMS key that will be used to encrypt objects
      -       * inserted into this bucket, if no encryption method is specified.
      +       * Optional. The name of the Cloud KMS key that will be used to encrypt
      +       * objects inserted into this bucket, if no encryption method is specified.
              * 
      * - * string default_kms_key = 1 [(.google.api.resource_reference) = { ... } + * + * string default_kms_key = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The defaultKmsKey. */ @@ -2830,11 +2857,13 @@ public java.lang.String getDefaultKmsKey() { * * *
      -       * The name of the Cloud KMS key that will be used to encrypt objects
      -       * inserted into this bucket, if no encryption method is specified.
      +       * Optional. The name of the Cloud KMS key that will be used to encrypt
      +       * objects inserted into this bucket, if no encryption method is specified.
              * 
      * - * string default_kms_key = 1 [(.google.api.resource_reference) = { ... } + * + * string default_kms_key = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for defaultKmsKey. */ @@ -2854,11 +2883,13 @@ public com.google.protobuf.ByteString getDefaultKmsKeyBytes() { * * *
      -       * The name of the Cloud KMS key that will be used to encrypt objects
      -       * inserted into this bucket, if no encryption method is specified.
      +       * Optional. The name of the Cloud KMS key that will be used to encrypt
      +       * objects inserted into this bucket, if no encryption method is specified.
              * 
      * - * string default_kms_key = 1 [(.google.api.resource_reference) = { ... } + * + * string default_kms_key = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param value The defaultKmsKey to set. * @return This builder for chaining. @@ -2877,11 +2908,13 @@ public Builder setDefaultKmsKey(java.lang.String value) { * * *
      -       * The name of the Cloud KMS key that will be used to encrypt objects
      -       * inserted into this bucket, if no encryption method is specified.
      +       * Optional. The name of the Cloud KMS key that will be used to encrypt
      +       * objects inserted into this bucket, if no encryption method is specified.
              * 
      * - * string default_kms_key = 1 [(.google.api.resource_reference) = { ... } + * + * string default_kms_key = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -2896,11 +2929,13 @@ public Builder clearDefaultKmsKey() { * * *
      -       * The name of the Cloud KMS key that will be used to encrypt objects
      -       * inserted into this bucket, if no encryption method is specified.
      +       * Optional. The name of the Cloud KMS key that will be used to encrypt
      +       * objects inserted into this bucket, if no encryption method is specified.
              * 
      * - * string default_kms_key = 1 [(.google.api.resource_reference) = { ... } + * + * string default_kms_key = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for defaultKmsKey to set. * @return This builder for chaining. @@ -2989,11 +3024,11 @@ public interface IamConfigOrBuilder * * *
      -     * Bucket restriction options currently enforced on the bucket.
      +     * Optional. Bucket restriction options currently enforced on the bucket.
            * 
      * * - * .google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess uniform_bucket_level_access = 1; + * .google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess uniform_bucket_level_access = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the uniformBucketLevelAccess field is set. @@ -3004,11 +3039,11 @@ public interface IamConfigOrBuilder * * *
      -     * Bucket restriction options currently enforced on the bucket.
      +     * Optional. Bucket restriction options currently enforced on the bucket.
            * 
      * * - * .google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess uniform_bucket_level_access = 1; + * .google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess uniform_bucket_level_access = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The uniformBucketLevelAccess. @@ -3019,11 +3054,11 @@ public interface IamConfigOrBuilder * * *
      -     * Bucket restriction options currently enforced on the bucket.
      +     * Optional. Bucket restriction options currently enforced on the bucket.
            * 
      * * - * .google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess uniform_bucket_level_access = 1; + * .google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess uniform_bucket_level_access = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ com.google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccessOrBuilder @@ -3033,11 +3068,11 @@ public interface IamConfigOrBuilder * * *
      -     * Whether IAM will enforce public access prevention. Valid values are
      -     * "enforced" or "inherited".
      +     * Optional. Whether IAM will enforce public access prevention. Valid values
      +     * are "enforced" or "inherited".
            * 
      * - * string public_access_prevention = 3; + * string public_access_prevention = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The publicAccessPrevention. */ @@ -3047,11 +3082,11 @@ public interface IamConfigOrBuilder * * *
      -     * Whether IAM will enforce public access prevention. Valid values are
      -     * "enforced" or "inherited".
      +     * Optional. Whether IAM will enforce public access prevention. Valid values
      +     * are "enforced" or "inherited".
            * 
      * - * string public_access_prevention = 3; + * string public_access_prevention = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for publicAccessPrevention. */ @@ -3112,10 +3147,11 @@ public interface UniformBucketLevelAccessOrBuilder * * *
      -       * If set, access checks only use bucket-level IAM policies or above.
      +       * Optional. If set, access checks only use bucket-level IAM policies or
      +       * above.
              * 
      * - * bool enabled = 1; + * bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The enabled. */ @@ -3125,13 +3161,14 @@ public interface UniformBucketLevelAccessOrBuilder * * *
      -       * The deadline time for changing
      +       * Optional. The deadline time for changing
              * `iam_config.uniform_bucket_level_access.enabled` from `true` to
              * `false`. Mutable until the specified deadline is reached, but not
              * afterward.
              * 
      * - * .google.protobuf.Timestamp lock_time = 2; + * .google.protobuf.Timestamp lock_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the lockTime field is set. */ @@ -3141,13 +3178,14 @@ public interface UniformBucketLevelAccessOrBuilder * * *
      -       * The deadline time for changing
      +       * Optional. The deadline time for changing
              * `iam_config.uniform_bucket_level_access.enabled` from `true` to
              * `false`. Mutable until the specified deadline is reached, but not
              * afterward.
              * 
      * - * .google.protobuf.Timestamp lock_time = 2; + * .google.protobuf.Timestamp lock_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The lockTime. */ @@ -3157,13 +3195,14 @@ public interface UniformBucketLevelAccessOrBuilder * * *
      -       * The deadline time for changing
      +       * Optional. The deadline time for changing
              * `iam_config.uniform_bucket_level_access.enabled` from `true` to
              * `false`. Mutable until the specified deadline is reached, but not
              * afterward.
              * 
      * - * .google.protobuf.Timestamp lock_time = 2; + * .google.protobuf.Timestamp lock_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.protobuf.TimestampOrBuilder getLockTimeOrBuilder(); } @@ -3221,10 +3260,11 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
      -       * If set, access checks only use bucket-level IAM policies or above.
      +       * Optional. If set, access checks only use bucket-level IAM policies or
      +       * above.
              * 
      * - * bool enabled = 1; + * bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The enabled. */ @@ -3240,13 +3280,14 @@ public boolean getEnabled() { * * *
      -       * The deadline time for changing
      +       * Optional. The deadline time for changing
              * `iam_config.uniform_bucket_level_access.enabled` from `true` to
              * `false`. Mutable until the specified deadline is reached, but not
              * afterward.
              * 
      * - * .google.protobuf.Timestamp lock_time = 2; + * .google.protobuf.Timestamp lock_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the lockTime field is set. */ @@ -3259,13 +3300,14 @@ public boolean hasLockTime() { * * *
      -       * The deadline time for changing
      +       * Optional. The deadline time for changing
              * `iam_config.uniform_bucket_level_access.enabled` from `true` to
              * `false`. Mutable until the specified deadline is reached, but not
              * afterward.
              * 
      * - * .google.protobuf.Timestamp lock_time = 2; + * .google.protobuf.Timestamp lock_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The lockTime. */ @@ -3278,13 +3320,14 @@ public com.google.protobuf.Timestamp getLockTime() { * * *
      -       * The deadline time for changing
      +       * Optional. The deadline time for changing
              * `iam_config.uniform_bucket_level_access.enabled` from `true` to
              * `false`. Mutable until the specified deadline is reached, but not
              * afterward.
              * 
      * - * .google.protobuf.Timestamp lock_time = 2; + * .google.protobuf.Timestamp lock_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getLockTimeOrBuilder() { @@ -3696,10 +3739,11 @@ public Builder mergeFrom( * * *
      -         * If set, access checks only use bucket-level IAM policies or above.
      +         * Optional. If set, access checks only use bucket-level IAM policies or
      +         * above.
                * 
      * - * bool enabled = 1; + * bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The enabled. */ @@ -3712,10 +3756,11 @@ public boolean getEnabled() { * * *
      -         * If set, access checks only use bucket-level IAM policies or above.
      +         * Optional. If set, access checks only use bucket-level IAM policies or
      +         * above.
                * 
      * - * bool enabled = 1; + * bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The enabled to set. * @return This builder for chaining. @@ -3732,10 +3777,11 @@ public Builder setEnabled(boolean value) { * * *
      -         * If set, access checks only use bucket-level IAM policies or above.
      +         * Optional. If set, access checks only use bucket-level IAM policies or
      +         * above.
                * 
      * - * bool enabled = 1; + * bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -3757,13 +3803,14 @@ public Builder clearEnabled() { * * *
      -         * The deadline time for changing
      +         * Optional. The deadline time for changing
                * `iam_config.uniform_bucket_level_access.enabled` from `true` to
                * `false`. Mutable until the specified deadline is reached, but not
                * afterward.
                * 
      * - * .google.protobuf.Timestamp lock_time = 2; + * .google.protobuf.Timestamp lock_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the lockTime field is set. */ @@ -3775,13 +3822,14 @@ public boolean hasLockTime() { * * *
      -         * The deadline time for changing
      +         * Optional. The deadline time for changing
                * `iam_config.uniform_bucket_level_access.enabled` from `true` to
                * `false`. Mutable until the specified deadline is reached, but not
                * afterward.
                * 
      * - * .google.protobuf.Timestamp lock_time = 2; + * .google.protobuf.Timestamp lock_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The lockTime. */ @@ -3799,13 +3847,14 @@ public com.google.protobuf.Timestamp getLockTime() { * * *
      -         * The deadline time for changing
      +         * Optional. The deadline time for changing
                * `iam_config.uniform_bucket_level_access.enabled` from `true` to
                * `false`. Mutable until the specified deadline is reached, but not
                * afterward.
                * 
      * - * .google.protobuf.Timestamp lock_time = 2; + * .google.protobuf.Timestamp lock_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setLockTime(com.google.protobuf.Timestamp value) { if (lockTimeBuilder_ == null) { @@ -3825,13 +3874,14 @@ public Builder setLockTime(com.google.protobuf.Timestamp value) { * * *
      -         * The deadline time for changing
      +         * Optional. The deadline time for changing
                * `iam_config.uniform_bucket_level_access.enabled` from `true` to
                * `false`. Mutable until the specified deadline is reached, but not
                * afterward.
                * 
      * - * .google.protobuf.Timestamp lock_time = 2; + * .google.protobuf.Timestamp lock_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setLockTime(com.google.protobuf.Timestamp.Builder builderForValue) { if (lockTimeBuilder_ == null) { @@ -3848,13 +3898,14 @@ public Builder setLockTime(com.google.protobuf.Timestamp.Builder builderForValue * * *
      -         * The deadline time for changing
      +         * Optional. The deadline time for changing
                * `iam_config.uniform_bucket_level_access.enabled` from `true` to
                * `false`. Mutable until the specified deadline is reached, but not
                * afterward.
                * 
      * - * .google.protobuf.Timestamp lock_time = 2; + * .google.protobuf.Timestamp lock_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeLockTime(com.google.protobuf.Timestamp value) { if (lockTimeBuilder_ == null) { @@ -3879,13 +3930,14 @@ public Builder mergeLockTime(com.google.protobuf.Timestamp value) { * * *
      -         * The deadline time for changing
      +         * Optional. The deadline time for changing
                * `iam_config.uniform_bucket_level_access.enabled` from `true` to
                * `false`. Mutable until the specified deadline is reached, but not
                * afterward.
                * 
      * - * .google.protobuf.Timestamp lock_time = 2; + * .google.protobuf.Timestamp lock_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearLockTime() { bitField0_ = (bitField0_ & ~0x00000002); @@ -3902,13 +3954,14 @@ public Builder clearLockTime() { * * *
      -         * The deadline time for changing
      +         * Optional. The deadline time for changing
                * `iam_config.uniform_bucket_level_access.enabled` from `true` to
                * `false`. Mutable until the specified deadline is reached, but not
                * afterward.
                * 
      * - * .google.protobuf.Timestamp lock_time = 2; + * .google.protobuf.Timestamp lock_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.protobuf.Timestamp.Builder getLockTimeBuilder() { bitField0_ |= 0x00000002; @@ -3920,13 +3973,14 @@ public com.google.protobuf.Timestamp.Builder getLockTimeBuilder() { * * *
      -         * The deadline time for changing
      +         * Optional. The deadline time for changing
                * `iam_config.uniform_bucket_level_access.enabled` from `true` to
                * `false`. Mutable until the specified deadline is reached, but not
                * afterward.
                * 
      * - * .google.protobuf.Timestamp lock_time = 2; + * .google.protobuf.Timestamp lock_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.protobuf.TimestampOrBuilder getLockTimeOrBuilder() { if (lockTimeBuilder_ != null) { @@ -3942,13 +3996,14 @@ public com.google.protobuf.TimestampOrBuilder getLockTimeOrBuilder() { * * *
      -         * The deadline time for changing
      +         * Optional. The deadline time for changing
                * `iam_config.uniform_bucket_level_access.enabled` from `true` to
                * `false`. Mutable until the specified deadline is reached, but not
                * afterward.
                * 
      * - * .google.protobuf.Timestamp lock_time = 2; + * .google.protobuf.Timestamp lock_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, @@ -4043,11 +4098,11 @@ public com.google.protobuf.Parser getParserForType() { * * *
      -     * Bucket restriction options currently enforced on the bucket.
      +     * Optional. Bucket restriction options currently enforced on the bucket.
            * 
      * * - * .google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess uniform_bucket_level_access = 1; + * .google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess uniform_bucket_level_access = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the uniformBucketLevelAccess field is set. @@ -4061,11 +4116,11 @@ public boolean hasUniformBucketLevelAccess() { * * *
      -     * Bucket restriction options currently enforced on the bucket.
      +     * Optional. Bucket restriction options currently enforced on the bucket.
            * 
      * * - * .google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess uniform_bucket_level_access = 1; + * .google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess uniform_bucket_level_access = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The uniformBucketLevelAccess. @@ -4082,11 +4137,11 @@ public boolean hasUniformBucketLevelAccess() { * * *
      -     * Bucket restriction options currently enforced on the bucket.
      +     * Optional. Bucket restriction options currently enforced on the bucket.
            * 
      * * - * .google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess uniform_bucket_level_access = 1; + * .google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess uniform_bucket_level_access = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override @@ -4106,11 +4161,11 @@ public boolean hasUniformBucketLevelAccess() { * * *
      -     * Whether IAM will enforce public access prevention. Valid values are
      -     * "enforced" or "inherited".
      +     * Optional. Whether IAM will enforce public access prevention. Valid values
      +     * are "enforced" or "inherited".
            * 
      * - * string public_access_prevention = 3; + * string public_access_prevention = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The publicAccessPrevention. */ @@ -4131,11 +4186,11 @@ public java.lang.String getPublicAccessPrevention() { * * *
      -     * Whether IAM will enforce public access prevention. Valid values are
      -     * "enforced" or "inherited".
      +     * Optional. Whether IAM will enforce public access prevention. Valid values
      +     * are "enforced" or "inherited".
            * 
      * - * string public_access_prevention = 3; + * string public_access_prevention = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for publicAccessPrevention. */ @@ -4560,11 +4615,11 @@ public Builder mergeFrom( * * *
      -       * Bucket restriction options currently enforced on the bucket.
      +       * Optional. Bucket restriction options currently enforced on the bucket.
              * 
      * * - * .google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess uniform_bucket_level_access = 1; + * .google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess uniform_bucket_level_access = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the uniformBucketLevelAccess field is set. @@ -4577,11 +4632,11 @@ public boolean hasUniformBucketLevelAccess() { * * *
      -       * Bucket restriction options currently enforced on the bucket.
      +       * Optional. Bucket restriction options currently enforced on the bucket.
              * 
      * * - * .google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess uniform_bucket_level_access = 1; + * .google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess uniform_bucket_level_access = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The uniformBucketLevelAccess. @@ -4601,11 +4656,11 @@ public boolean hasUniformBucketLevelAccess() { * * *
      -       * Bucket restriction options currently enforced on the bucket.
      +       * Optional. Bucket restriction options currently enforced on the bucket.
              * 
      * * - * .google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess uniform_bucket_level_access = 1; + * .google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess uniform_bucket_level_access = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setUniformBucketLevelAccess( @@ -4627,11 +4682,11 @@ public Builder setUniformBucketLevelAccess( * * *
      -       * Bucket restriction options currently enforced on the bucket.
      +       * Optional. Bucket restriction options currently enforced on the bucket.
              * 
      * * - * .google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess uniform_bucket_level_access = 1; + * .google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess uniform_bucket_level_access = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setUniformBucketLevelAccess( @@ -4650,11 +4705,11 @@ public Builder setUniformBucketLevelAccess( * * *
      -       * Bucket restriction options currently enforced on the bucket.
      +       * Optional. Bucket restriction options currently enforced on the bucket.
              * 
      * * - * .google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess uniform_bucket_level_access = 1; + * .google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess uniform_bucket_level_access = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder mergeUniformBucketLevelAccess( @@ -4683,11 +4738,11 @@ public Builder mergeUniformBucketLevelAccess( * * *
      -       * Bucket restriction options currently enforced on the bucket.
      +       * Optional. Bucket restriction options currently enforced on the bucket.
              * 
      * * - * .google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess uniform_bucket_level_access = 1; + * .google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess uniform_bucket_level_access = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder clearUniformBucketLevelAccess() { @@ -4705,11 +4760,11 @@ public Builder clearUniformBucketLevelAccess() { * * *
      -       * Bucket restriction options currently enforced on the bucket.
      +       * Optional. Bucket restriction options currently enforced on the bucket.
              * 
      * * - * .google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess uniform_bucket_level_access = 1; + * .google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess uniform_bucket_level_access = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess.Builder @@ -4723,11 +4778,11 @@ public Builder clearUniformBucketLevelAccess() { * * *
      -       * Bucket restriction options currently enforced on the bucket.
      +       * Optional. Bucket restriction options currently enforced on the bucket.
              * 
      * * - * .google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess uniform_bucket_level_access = 1; + * .google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess uniform_bucket_level_access = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccessOrBuilder @@ -4745,11 +4800,11 @@ public Builder clearUniformBucketLevelAccess() { * * *
      -       * Bucket restriction options currently enforced on the bucket.
      +       * Optional. Bucket restriction options currently enforced on the bucket.
              * 
      * * - * .google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess uniform_bucket_level_access = 1; + * .google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess uniform_bucket_level_access = 1 [(.google.api.field_behavior) = OPTIONAL]; * */ private com.google.protobuf.SingleFieldBuilderV3< @@ -4775,11 +4830,11 @@ public Builder clearUniformBucketLevelAccess() { * * *
      -       * Whether IAM will enforce public access prevention. Valid values are
      -       * "enforced" or "inherited".
      +       * Optional. Whether IAM will enforce public access prevention. Valid values
      +       * are "enforced" or "inherited".
              * 
      * - * string public_access_prevention = 3; + * string public_access_prevention = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The publicAccessPrevention. */ @@ -4799,11 +4854,11 @@ public java.lang.String getPublicAccessPrevention() { * * *
      -       * Whether IAM will enforce public access prevention. Valid values are
      -       * "enforced" or "inherited".
      +       * Optional. Whether IAM will enforce public access prevention. Valid values
      +       * are "enforced" or "inherited".
              * 
      * - * string public_access_prevention = 3; + * string public_access_prevention = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for publicAccessPrevention. */ @@ -4823,11 +4878,11 @@ public com.google.protobuf.ByteString getPublicAccessPreventionBytes() { * * *
      -       * Whether IAM will enforce public access prevention. Valid values are
      -       * "enforced" or "inherited".
      +       * Optional. Whether IAM will enforce public access prevention. Valid values
      +       * are "enforced" or "inherited".
              * 
      * - * string public_access_prevention = 3; + * string public_access_prevention = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The publicAccessPrevention to set. * @return This builder for chaining. @@ -4846,11 +4901,11 @@ public Builder setPublicAccessPrevention(java.lang.String value) { * * *
      -       * Whether IAM will enforce public access prevention. Valid values are
      -       * "enforced" or "inherited".
      +       * Optional. Whether IAM will enforce public access prevention. Valid values
      +       * are "enforced" or "inherited".
              * 
      * - * string public_access_prevention = 3; + * string public_access_prevention = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -4865,11 +4920,11 @@ public Builder clearPublicAccessPrevention() { * * *
      -       * Whether IAM will enforce public access prevention. Valid values are
      -       * "enforced" or "inherited".
      +       * Optional. Whether IAM will enforce public access prevention. Valid values
      +       * are "enforced" or "inherited".
              * 
      * - * string public_access_prevention = 3; + * string public_access_prevention = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for publicAccessPrevention to set. * @return This builder for chaining. @@ -4958,11 +5013,13 @@ public interface LifecycleOrBuilder * * *
      -     * A lifecycle management rule, which is made of an action to take and the
      -     * condition(s) under which the action will be taken.
      +     * Optional. A lifecycle management rule, which is made of an action to take
      +     * and the condition(s) under which the action will be taken.
            * 
      * - * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1; + * + * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ java.util.List getRuleList(); @@ -4970,11 +5027,13 @@ public interface LifecycleOrBuilder * * *
      -     * A lifecycle management rule, which is made of an action to take and the
      -     * condition(s) under which the action will be taken.
      +     * Optional. A lifecycle management rule, which is made of an action to take
      +     * and the condition(s) under which the action will be taken.
            * 
      * - * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1; + * + * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.Bucket.Lifecycle.Rule getRule(int index); @@ -4982,11 +5041,13 @@ public interface LifecycleOrBuilder * * *
      -     * A lifecycle management rule, which is made of an action to take and the
      -     * condition(s) under which the action will be taken.
      +     * Optional. A lifecycle management rule, which is made of an action to take
      +     * and the condition(s) under which the action will be taken.
            * 
      * - * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1; + * + * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ int getRuleCount(); @@ -4994,11 +5055,13 @@ public interface LifecycleOrBuilder * * *
      -     * A lifecycle management rule, which is made of an action to take and the
      -     * condition(s) under which the action will be taken.
      +     * Optional. A lifecycle management rule, which is made of an action to take
      +     * and the condition(s) under which the action will be taken.
            * 
      * - * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1; + * + * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ java.util.List getRuleOrBuilderList(); @@ -5007,11 +5070,13 @@ public interface LifecycleOrBuilder * * *
      -     * A lifecycle management rule, which is made of an action to take and the
      -     * condition(s) under which the action will be taken.
      +     * Optional. A lifecycle management rule, which is made of an action to take
      +     * and the condition(s) under which the action will be taken.
            * 
      * - * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1; + * + * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.Bucket.Lifecycle.RuleOrBuilder getRuleOrBuilder(int index); } @@ -5071,10 +5136,12 @@ public interface RuleOrBuilder * * *
      -       * The action to take.
      +       * Optional. The action to take.
              * 
      * - * .google.storage.v2.Bucket.Lifecycle.Rule.Action action = 1; + * + * .google.storage.v2.Bucket.Lifecycle.Rule.Action action = 1 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the action field is set. */ @@ -5084,10 +5151,12 @@ public interface RuleOrBuilder * * *
      -       * The action to take.
      +       * Optional. The action to take.
              * 
      * - * .google.storage.v2.Bucket.Lifecycle.Rule.Action action = 1; + * + * .google.storage.v2.Bucket.Lifecycle.Rule.Action action = 1 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The action. */ @@ -5097,10 +5166,12 @@ public interface RuleOrBuilder * * *
      -       * The action to take.
      +       * Optional. The action to take.
              * 
      * - * .google.storage.v2.Bucket.Lifecycle.Rule.Action action = 1; + * + * .google.storage.v2.Bucket.Lifecycle.Rule.Action action = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.Bucket.Lifecycle.Rule.ActionOrBuilder getActionOrBuilder(); @@ -5108,10 +5179,12 @@ public interface RuleOrBuilder * * *
      -       * The condition(s) under which the action will be taken.
      +       * Optional. The condition(s) under which the action will be taken.
              * 
      * - * .google.storage.v2.Bucket.Lifecycle.Rule.Condition condition = 2; + * + * .google.storage.v2.Bucket.Lifecycle.Rule.Condition condition = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the condition field is set. */ @@ -5121,10 +5194,12 @@ public interface RuleOrBuilder * * *
      -       * The condition(s) under which the action will be taken.
      +       * Optional. The condition(s) under which the action will be taken.
              * 
      * - * .google.storage.v2.Bucket.Lifecycle.Rule.Condition condition = 2; + * + * .google.storage.v2.Bucket.Lifecycle.Rule.Condition condition = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The condition. */ @@ -5134,10 +5209,12 @@ public interface RuleOrBuilder * * *
      -       * The condition(s) under which the action will be taken.
      +       * Optional. The condition(s) under which the action will be taken.
              * 
      * - * .google.storage.v2.Bucket.Lifecycle.Rule.Condition condition = 2; + * + * .google.storage.v2.Bucket.Lifecycle.Rule.Condition condition = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.Bucket.Lifecycle.Rule.ConditionOrBuilder getConditionOrBuilder(); } @@ -5195,11 +5272,12 @@ public interface ActionOrBuilder * * *
      -         * Type of the action. Currently, only `Delete`, `SetStorageClass`, and
      -         * `AbortIncompleteMultipartUpload` are supported.
      +         * Optional. Type of the action. Currently, only `Delete`,
      +         * `SetStorageClass`, and `AbortIncompleteMultipartUpload` are
      +         * supported.
                * 
      * - * string type = 1; + * string type = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The type. */ @@ -5209,11 +5287,12 @@ public interface ActionOrBuilder * * *
      -         * Type of the action. Currently, only `Delete`, `SetStorageClass`, and
      -         * `AbortIncompleteMultipartUpload` are supported.
      +         * Optional. Type of the action. Currently, only `Delete`,
      +         * `SetStorageClass`, and `AbortIncompleteMultipartUpload` are
      +         * supported.
                * 
      * - * string type = 1; + * string type = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for type. */ @@ -5223,11 +5302,11 @@ public interface ActionOrBuilder * * *
      -         * Target storage class. Required iff the type of the action is
      -         * SetStorageClass.
      +         * Optional. Target storage class. Required iff the type of the action
      +         * is SetStorageClass.
                * 
      * - * string storage_class = 2; + * string storage_class = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The storageClass. */ @@ -5237,11 +5316,11 @@ public interface ActionOrBuilder * * *
      -         * Target storage class. Required iff the type of the action is
      -         * SetStorageClass.
      +         * Optional. Target storage class. Required iff the type of the action
      +         * is SetStorageClass.
                * 
      * - * string storage_class = 2; + * string storage_class = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for storageClass. */ @@ -5303,11 +5382,12 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
      -         * Type of the action. Currently, only `Delete`, `SetStorageClass`, and
      -         * `AbortIncompleteMultipartUpload` are supported.
      +         * Optional. Type of the action. Currently, only `Delete`,
      +         * `SetStorageClass`, and `AbortIncompleteMultipartUpload` are
      +         * supported.
                * 
      * - * string type = 1; + * string type = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The type. */ @@ -5328,11 +5408,12 @@ public java.lang.String getType() { * * *
      -         * Type of the action. Currently, only `Delete`, `SetStorageClass`, and
      -         * `AbortIncompleteMultipartUpload` are supported.
      +         * Optional. Type of the action. Currently, only `Delete`,
      +         * `SetStorageClass`, and `AbortIncompleteMultipartUpload` are
      +         * supported.
                * 
      * - * string type = 1; + * string type = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for type. */ @@ -5358,11 +5439,11 @@ public com.google.protobuf.ByteString getTypeBytes() { * * *
      -         * Target storage class. Required iff the type of the action is
      -         * SetStorageClass.
      +         * Optional. Target storage class. Required iff the type of the action
      +         * is SetStorageClass.
                * 
      * - * string storage_class = 2; + * string storage_class = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The storageClass. */ @@ -5383,11 +5464,11 @@ public java.lang.String getStorageClass() { * * *
      -         * Target storage class. Required iff the type of the action is
      -         * SetStorageClass.
      +         * Optional. Target storage class. Required iff the type of the action
      +         * is SetStorageClass.
                * 
      * - * string storage_class = 2; + * string storage_class = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for storageClass. */ @@ -5784,11 +5865,12 @@ public Builder mergeFrom( * * *
      -           * Type of the action. Currently, only `Delete`, `SetStorageClass`, and
      -           * `AbortIncompleteMultipartUpload` are supported.
      +           * Optional. Type of the action. Currently, only `Delete`,
      +           * `SetStorageClass`, and `AbortIncompleteMultipartUpload` are
      +           * supported.
                  * 
      * - * string type = 1; + * string type = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The type. */ @@ -5808,11 +5890,12 @@ public java.lang.String getType() { * * *
      -           * Type of the action. Currently, only `Delete`, `SetStorageClass`, and
      -           * `AbortIncompleteMultipartUpload` are supported.
      +           * Optional. Type of the action. Currently, only `Delete`,
      +           * `SetStorageClass`, and `AbortIncompleteMultipartUpload` are
      +           * supported.
                  * 
      * - * string type = 1; + * string type = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for type. */ @@ -5832,11 +5915,12 @@ public com.google.protobuf.ByteString getTypeBytes() { * * *
      -           * Type of the action. Currently, only `Delete`, `SetStorageClass`, and
      -           * `AbortIncompleteMultipartUpload` are supported.
      +           * Optional. Type of the action. Currently, only `Delete`,
      +           * `SetStorageClass`, and `AbortIncompleteMultipartUpload` are
      +           * supported.
                  * 
      * - * string type = 1; + * string type = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The type to set. * @return This builder for chaining. @@ -5855,11 +5939,12 @@ public Builder setType(java.lang.String value) { * * *
      -           * Type of the action. Currently, only `Delete`, `SetStorageClass`, and
      -           * `AbortIncompleteMultipartUpload` are supported.
      +           * Optional. Type of the action. Currently, only `Delete`,
      +           * `SetStorageClass`, and `AbortIncompleteMultipartUpload` are
      +           * supported.
                  * 
      * - * string type = 1; + * string type = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -5874,11 +5959,12 @@ public Builder clearType() { * * *
      -           * Type of the action. Currently, only `Delete`, `SetStorageClass`, and
      -           * `AbortIncompleteMultipartUpload` are supported.
      +           * Optional. Type of the action. Currently, only `Delete`,
      +           * `SetStorageClass`, and `AbortIncompleteMultipartUpload` are
      +           * supported.
                  * 
      * - * string type = 1; + * string type = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for type to set. * @return This builder for chaining. @@ -5900,11 +5986,11 @@ public Builder setTypeBytes(com.google.protobuf.ByteString value) { * * *
      -           * Target storage class. Required iff the type of the action is
      -           * SetStorageClass.
      +           * Optional. Target storage class. Required iff the type of the action
      +           * is SetStorageClass.
                  * 
      * - * string storage_class = 2; + * string storage_class = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The storageClass. */ @@ -5924,11 +6010,11 @@ public java.lang.String getStorageClass() { * * *
      -           * Target storage class. Required iff the type of the action is
      -           * SetStorageClass.
      +           * Optional. Target storage class. Required iff the type of the action
      +           * is SetStorageClass.
                  * 
      * - * string storage_class = 2; + * string storage_class = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for storageClass. */ @@ -5948,11 +6034,11 @@ public com.google.protobuf.ByteString getStorageClassBytes() { * * *
      -           * Target storage class. Required iff the type of the action is
      -           * SetStorageClass.
      +           * Optional. Target storage class. Required iff the type of the action
      +           * is SetStorageClass.
                  * 
      * - * string storage_class = 2; + * string storage_class = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The storageClass to set. * @return This builder for chaining. @@ -5971,11 +6057,11 @@ public Builder setStorageClass(java.lang.String value) { * * *
      -           * Target storage class. Required iff the type of the action is
      -           * SetStorageClass.
      +           * Optional. Target storage class. Required iff the type of the action
      +           * is SetStorageClass.
                  * 
      * - * string storage_class = 2; + * string storage_class = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -5990,11 +6076,11 @@ public Builder clearStorageClass() { * * *
      -           * Target storage class. Required iff the type of the action is
      -           * SetStorageClass.
      +           * Optional. Target storage class. Required iff the type of the action
      +           * is SetStorageClass.
                  * 
      * - * string storage_class = 2; + * string storage_class = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for storageClass to set. * @return This builder for chaining. @@ -6115,11 +6201,12 @@ public interface ConditionOrBuilder * * *
      -         * This condition is satisfied when an object is created before midnight
      -         * of the specified date in UTC.
      +         * Optional. This condition is satisfied when an object is created
      +         * before midnight of the specified date in UTC.
                * 
      * - * .google.type.Date created_before = 2; + * .google.type.Date created_before = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the createdBefore field is set. */ @@ -6129,11 +6216,12 @@ public interface ConditionOrBuilder * * *
      -         * This condition is satisfied when an object is created before midnight
      -         * of the specified date in UTC.
      +         * Optional. This condition is satisfied when an object is created
      +         * before midnight of the specified date in UTC.
                * 
      * - * .google.type.Date created_before = 2; + * .google.type.Date created_before = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The createdBefore. */ @@ -6143,11 +6231,12 @@ public interface ConditionOrBuilder * * *
      -         * This condition is satisfied when an object is created before midnight
      -         * of the specified date in UTC.
      +         * Optional. This condition is satisfied when an object is created
      +         * before midnight of the specified date in UTC.
                * 
      * - * .google.type.Date created_before = 2; + * .google.type.Date created_before = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.type.DateOrBuilder getCreatedBeforeOrBuilder(); @@ -6215,13 +6304,15 @@ public interface ConditionOrBuilder * * *
      -         * Objects having any of the storage classes specified by this condition
      -         * will be matched. Values include `MULTI_REGIONAL`, `REGIONAL`,
      -         * `NEARLINE`, `COLDLINE`, `STANDARD`, and
      +         * Optional. Objects having any of the storage classes specified by this
      +         * condition will be matched. Values include `MULTI_REGIONAL`,
      +         * `REGIONAL`, `NEARLINE`, `COLDLINE`, `STANDARD`, and
                * `DURABLE_REDUCED_AVAILABILITY`.
                * 
      * - * repeated string matches_storage_class = 5; + * + * repeated string matches_storage_class = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return A list containing the matchesStorageClass. */ @@ -6231,13 +6322,15 @@ public interface ConditionOrBuilder * * *
      -         * Objects having any of the storage classes specified by this condition
      -         * will be matched. Values include `MULTI_REGIONAL`, `REGIONAL`,
      -         * `NEARLINE`, `COLDLINE`, `STANDARD`, and
      +         * Optional. Objects having any of the storage classes specified by this
      +         * condition will be matched. Values include `MULTI_REGIONAL`,
      +         * `REGIONAL`, `NEARLINE`, `COLDLINE`, `STANDARD`, and
                * `DURABLE_REDUCED_AVAILABILITY`.
                * 
      * - * repeated string matches_storage_class = 5; + * + * repeated string matches_storage_class = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The count of matchesStorageClass. */ @@ -6247,13 +6340,15 @@ public interface ConditionOrBuilder * * *
      -         * Objects having any of the storage classes specified by this condition
      -         * will be matched. Values include `MULTI_REGIONAL`, `REGIONAL`,
      -         * `NEARLINE`, `COLDLINE`, `STANDARD`, and
      +         * Optional. Objects having any of the storage classes specified by this
      +         * condition will be matched. Values include `MULTI_REGIONAL`,
      +         * `REGIONAL`, `NEARLINE`, `COLDLINE`, `STANDARD`, and
                * `DURABLE_REDUCED_AVAILABILITY`.
                * 
      * - * repeated string matches_storage_class = 5; + * + * repeated string matches_storage_class = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param index The index of the element to return. * @return The matchesStorageClass at the given index. @@ -6264,13 +6359,15 @@ public interface ConditionOrBuilder * * *
      -         * Objects having any of the storage classes specified by this condition
      -         * will be matched. Values include `MULTI_REGIONAL`, `REGIONAL`,
      -         * `NEARLINE`, `COLDLINE`, `STANDARD`, and
      +         * Optional. Objects having any of the storage classes specified by this
      +         * condition will be matched. Values include `MULTI_REGIONAL`,
      +         * `REGIONAL`, `NEARLINE`, `COLDLINE`, `STANDARD`, and
                * `DURABLE_REDUCED_AVAILABILITY`.
                * 
      * - * repeated string matches_storage_class = 5; + * + * repeated string matches_storage_class = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param index The index of the value to return. * @return The bytes of the matchesStorageClass at the given index. @@ -6311,11 +6408,12 @@ public interface ConditionOrBuilder * * *
      -         * An object matches this condition if the custom timestamp set on the
      -         * object is before the specified date in UTC.
      +         * Optional. An object matches this condition if the custom timestamp
      +         * set on the object is before the specified date in UTC.
                * 
      * - * .google.type.Date custom_time_before = 8; + * .google.type.Date custom_time_before = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the customTimeBefore field is set. */ @@ -6325,11 +6423,12 @@ public interface ConditionOrBuilder * * *
      -         * An object matches this condition if the custom timestamp set on the
      -         * object is before the specified date in UTC.
      +         * Optional. An object matches this condition if the custom timestamp
      +         * set on the object is before the specified date in UTC.
                * 
      * - * .google.type.Date custom_time_before = 8; + * .google.type.Date custom_time_before = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The customTimeBefore. */ @@ -6339,11 +6438,12 @@ public interface ConditionOrBuilder * * *
      -         * An object matches this condition if the custom timestamp set on the
      -         * object is before the specified date in UTC.
      +         * Optional. An object matches this condition if the custom timestamp
      +         * set on the object is before the specified date in UTC.
                * 
      * - * .google.type.Date custom_time_before = 8; + * .google.type.Date custom_time_before = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.type.DateOrBuilder getCustomTimeBeforeOrBuilder(); @@ -6385,12 +6485,14 @@ public interface ConditionOrBuilder * * *
      -         * This condition is relevant only for versioned objects. An object
      -         * version satisfies this condition only if it became noncurrent before
      -         * the specified date in UTC.
      +         * Optional. This condition is relevant only for versioned objects. An
      +         * object version satisfies this condition only if it became noncurrent
      +         * before the specified date in UTC.
                * 
      * - * .google.type.Date noncurrent_time_before = 10; + * + * .google.type.Date noncurrent_time_before = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the noncurrentTimeBefore field is set. */ @@ -6400,12 +6502,14 @@ public interface ConditionOrBuilder * * *
      -         * This condition is relevant only for versioned objects. An object
      -         * version satisfies this condition only if it became noncurrent before
      -         * the specified date in UTC.
      +         * Optional. This condition is relevant only for versioned objects. An
      +         * object version satisfies this condition only if it became noncurrent
      +         * before the specified date in UTC.
                * 
      * - * .google.type.Date noncurrent_time_before = 10; + * + * .google.type.Date noncurrent_time_before = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The noncurrentTimeBefore. */ @@ -6415,12 +6519,14 @@ public interface ConditionOrBuilder * * *
      -         * This condition is relevant only for versioned objects. An object
      -         * version satisfies this condition only if it became noncurrent before
      -         * the specified date in UTC.
      +         * Optional. This condition is relevant only for versioned objects. An
      +         * object version satisfies this condition only if it became noncurrent
      +         * before the specified date in UTC.
                * 
      * - * .google.type.Date noncurrent_time_before = 10; + * + * .google.type.Date noncurrent_time_before = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.type.DateOrBuilder getNoncurrentTimeBeforeOrBuilder(); @@ -6428,11 +6534,12 @@ public interface ConditionOrBuilder * * *
      -         * List of object name prefixes. If any prefix exactly matches the
      -         * beginning of the object name, the condition evaluates to true.
      +         * Optional. List of object name prefixes. If any prefix exactly matches
      +         * the beginning of the object name, the condition evaluates to true.
                * 
      * - * repeated string matches_prefix = 11; + * repeated string matches_prefix = 11 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return A list containing the matchesPrefix. */ @@ -6442,11 +6549,12 @@ public interface ConditionOrBuilder * * *
      -         * List of object name prefixes. If any prefix exactly matches the
      -         * beginning of the object name, the condition evaluates to true.
      +         * Optional. List of object name prefixes. If any prefix exactly matches
      +         * the beginning of the object name, the condition evaluates to true.
                * 
      * - * repeated string matches_prefix = 11; + * repeated string matches_prefix = 11 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The count of matchesPrefix. */ @@ -6456,11 +6564,12 @@ public interface ConditionOrBuilder * * *
      -         * List of object name prefixes. If any prefix exactly matches the
      -         * beginning of the object name, the condition evaluates to true.
      +         * Optional. List of object name prefixes. If any prefix exactly matches
      +         * the beginning of the object name, the condition evaluates to true.
                * 
      * - * repeated string matches_prefix = 11; + * repeated string matches_prefix = 11 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param index The index of the element to return. * @return The matchesPrefix at the given index. @@ -6471,11 +6580,12 @@ public interface ConditionOrBuilder * * *
      -         * List of object name prefixes. If any prefix exactly matches the
      -         * beginning of the object name, the condition evaluates to true.
      +         * Optional. List of object name prefixes. If any prefix exactly matches
      +         * the beginning of the object name, the condition evaluates to true.
                * 
      * - * repeated string matches_prefix = 11; + * repeated string matches_prefix = 11 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param index The index of the value to return. * @return The bytes of the matchesPrefix at the given index. @@ -6486,11 +6596,12 @@ public interface ConditionOrBuilder * * *
      -         * List of object name suffixes. If any suffix exactly matches the
      -         * end of the object name, the condition evaluates to true.
      +         * Optional. List of object name suffixes. If any suffix exactly matches
      +         * the end of the object name, the condition evaluates to true.
                * 
      * - * repeated string matches_suffix = 12; + * repeated string matches_suffix = 12 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return A list containing the matchesSuffix. */ @@ -6500,11 +6611,12 @@ public interface ConditionOrBuilder * * *
      -         * List of object name suffixes. If any suffix exactly matches the
      -         * end of the object name, the condition evaluates to true.
      +         * Optional. List of object name suffixes. If any suffix exactly matches
      +         * the end of the object name, the condition evaluates to true.
                * 
      * - * repeated string matches_suffix = 12; + * repeated string matches_suffix = 12 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The count of matchesSuffix. */ @@ -6514,11 +6626,12 @@ public interface ConditionOrBuilder * * *
      -         * List of object name suffixes. If any suffix exactly matches the
      -         * end of the object name, the condition evaluates to true.
      +         * Optional. List of object name suffixes. If any suffix exactly matches
      +         * the end of the object name, the condition evaluates to true.
                * 
      * - * repeated string matches_suffix = 12; + * repeated string matches_suffix = 12 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param index The index of the element to return. * @return The matchesSuffix at the given index. @@ -6529,11 +6642,12 @@ public interface ConditionOrBuilder * * *
      -         * List of object name suffixes. If any suffix exactly matches the
      -         * end of the object name, the condition evaluates to true.
      +         * Optional. List of object name suffixes. If any suffix exactly matches
      +         * the end of the object name, the condition evaluates to true.
                * 
      * - * repeated string matches_suffix = 12; + * repeated string matches_suffix = 12 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param index The index of the value to return. * @return The bytes of the matchesSuffix at the given index. @@ -6637,11 +6751,12 @@ public int getAgeDays() { * * *
      -         * This condition is satisfied when an object is created before midnight
      -         * of the specified date in UTC.
      +         * Optional. This condition is satisfied when an object is created
      +         * before midnight of the specified date in UTC.
                * 
      * - * .google.type.Date created_before = 2; + * .google.type.Date created_before = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the createdBefore field is set. */ @@ -6654,11 +6769,12 @@ public boolean hasCreatedBefore() { * * *
      -         * This condition is satisfied when an object is created before midnight
      -         * of the specified date in UTC.
      +         * Optional. This condition is satisfied when an object is created
      +         * before midnight of the specified date in UTC.
                * 
      * - * .google.type.Date created_before = 2; + * .google.type.Date created_before = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The createdBefore. */ @@ -6673,11 +6789,12 @@ public com.google.type.Date getCreatedBefore() { * * *
      -         * This condition is satisfied when an object is created before midnight
      -         * of the specified date in UTC.
      +         * Optional. This condition is satisfied when an object is created
      +         * before midnight of the specified date in UTC.
                * 
      * - * .google.type.Date created_before = 2; + * .google.type.Date created_before = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.type.DateOrBuilder getCreatedBeforeOrBuilder() { @@ -6774,13 +6891,15 @@ public int getNumNewerVersions() { * * *
      -         * Objects having any of the storage classes specified by this condition
      -         * will be matched. Values include `MULTI_REGIONAL`, `REGIONAL`,
      -         * `NEARLINE`, `COLDLINE`, `STANDARD`, and
      +         * Optional. Objects having any of the storage classes specified by this
      +         * condition will be matched. Values include `MULTI_REGIONAL`,
      +         * `REGIONAL`, `NEARLINE`, `COLDLINE`, `STANDARD`, and
                * `DURABLE_REDUCED_AVAILABILITY`.
                * 
      * - * repeated string matches_storage_class = 5; + * + * repeated string matches_storage_class = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return A list containing the matchesStorageClass. */ @@ -6792,13 +6911,15 @@ public com.google.protobuf.ProtocolStringList getMatchesStorageClassList() { * * *
      -         * Objects having any of the storage classes specified by this condition
      -         * will be matched. Values include `MULTI_REGIONAL`, `REGIONAL`,
      -         * `NEARLINE`, `COLDLINE`, `STANDARD`, and
      +         * Optional. Objects having any of the storage classes specified by this
      +         * condition will be matched. Values include `MULTI_REGIONAL`,
      +         * `REGIONAL`, `NEARLINE`, `COLDLINE`, `STANDARD`, and
                * `DURABLE_REDUCED_AVAILABILITY`.
                * 
      * - * repeated string matches_storage_class = 5; + * + * repeated string matches_storage_class = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The count of matchesStorageClass. */ @@ -6810,13 +6931,15 @@ public int getMatchesStorageClassCount() { * * *
      -         * Objects having any of the storage classes specified by this condition
      -         * will be matched. Values include `MULTI_REGIONAL`, `REGIONAL`,
      -         * `NEARLINE`, `COLDLINE`, `STANDARD`, and
      +         * Optional. Objects having any of the storage classes specified by this
      +         * condition will be matched. Values include `MULTI_REGIONAL`,
      +         * `REGIONAL`, `NEARLINE`, `COLDLINE`, `STANDARD`, and
                * `DURABLE_REDUCED_AVAILABILITY`.
                * 
      * - * repeated string matches_storage_class = 5; + * + * repeated string matches_storage_class = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param index The index of the element to return. * @return The matchesStorageClass at the given index. @@ -6829,13 +6952,15 @@ public java.lang.String getMatchesStorageClass(int index) { * * *
      -         * Objects having any of the storage classes specified by this condition
      -         * will be matched. Values include `MULTI_REGIONAL`, `REGIONAL`,
      -         * `NEARLINE`, `COLDLINE`, `STANDARD`, and
      +         * Optional. Objects having any of the storage classes specified by this
      +         * condition will be matched. Values include `MULTI_REGIONAL`,
      +         * `REGIONAL`, `NEARLINE`, `COLDLINE`, `STANDARD`, and
                * `DURABLE_REDUCED_AVAILABILITY`.
                * 
      * - * repeated string matches_storage_class = 5; + * + * repeated string matches_storage_class = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param index The index of the value to return. * @return The bytes of the matchesStorageClass at the given index. @@ -6890,11 +7015,12 @@ public int getDaysSinceCustomTime() { * * *
      -         * An object matches this condition if the custom timestamp set on the
      -         * object is before the specified date in UTC.
      +         * Optional. An object matches this condition if the custom timestamp
      +         * set on the object is before the specified date in UTC.
                * 
      * - * .google.type.Date custom_time_before = 8; + * .google.type.Date custom_time_before = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the customTimeBefore field is set. */ @@ -6907,11 +7033,12 @@ public boolean hasCustomTimeBefore() { * * *
      -         * An object matches this condition if the custom timestamp set on the
      -         * object is before the specified date in UTC.
      +         * Optional. An object matches this condition if the custom timestamp
      +         * set on the object is before the specified date in UTC.
                * 
      * - * .google.type.Date custom_time_before = 8; + * .google.type.Date custom_time_before = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The customTimeBefore. */ @@ -6926,11 +7053,12 @@ public com.google.type.Date getCustomTimeBefore() { * * *
      -         * An object matches this condition if the custom timestamp set on the
      -         * object is before the specified date in UTC.
      +         * Optional. An object matches this condition if the custom timestamp
      +         * set on the object is before the specified date in UTC.
                * 
      * - * .google.type.Date custom_time_before = 8; + * .google.type.Date custom_time_before = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.type.DateOrBuilder getCustomTimeBeforeOrBuilder() { @@ -6989,12 +7117,14 @@ public int getDaysSinceNoncurrentTime() { * * *
      -         * This condition is relevant only for versioned objects. An object
      -         * version satisfies this condition only if it became noncurrent before
      -         * the specified date in UTC.
      +         * Optional. This condition is relevant only for versioned objects. An
      +         * object version satisfies this condition only if it became noncurrent
      +         * before the specified date in UTC.
                * 
      * - * .google.type.Date noncurrent_time_before = 10; + * + * .google.type.Date noncurrent_time_before = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the noncurrentTimeBefore field is set. */ @@ -7007,12 +7137,14 @@ public boolean hasNoncurrentTimeBefore() { * * *
      -         * This condition is relevant only for versioned objects. An object
      -         * version satisfies this condition only if it became noncurrent before
      -         * the specified date in UTC.
      +         * Optional. This condition is relevant only for versioned objects. An
      +         * object version satisfies this condition only if it became noncurrent
      +         * before the specified date in UTC.
                * 
      * - * .google.type.Date noncurrent_time_before = 10; + * + * .google.type.Date noncurrent_time_before = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The noncurrentTimeBefore. */ @@ -7027,12 +7159,14 @@ public com.google.type.Date getNoncurrentTimeBefore() { * * *
      -         * This condition is relevant only for versioned objects. An object
      -         * version satisfies this condition only if it became noncurrent before
      -         * the specified date in UTC.
      +         * Optional. This condition is relevant only for versioned objects. An
      +         * object version satisfies this condition only if it became noncurrent
      +         * before the specified date in UTC.
                * 
      * - * .google.type.Date noncurrent_time_before = 10; + * + * .google.type.Date noncurrent_time_before = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.type.DateOrBuilder getNoncurrentTimeBeforeOrBuilder() { @@ -7051,11 +7185,12 @@ public com.google.type.DateOrBuilder getNoncurrentTimeBeforeOrBuilder() { * * *
      -         * List of object name prefixes. If any prefix exactly matches the
      -         * beginning of the object name, the condition evaluates to true.
      +         * Optional. List of object name prefixes. If any prefix exactly matches
      +         * the beginning of the object name, the condition evaluates to true.
                * 
      * - * repeated string matches_prefix = 11; + * repeated string matches_prefix = 11 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return A list containing the matchesPrefix. */ @@ -7067,11 +7202,12 @@ public com.google.protobuf.ProtocolStringList getMatchesPrefixList() { * * *
      -         * List of object name prefixes. If any prefix exactly matches the
      -         * beginning of the object name, the condition evaluates to true.
      +         * Optional. List of object name prefixes. If any prefix exactly matches
      +         * the beginning of the object name, the condition evaluates to true.
                * 
      * - * repeated string matches_prefix = 11; + * repeated string matches_prefix = 11 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The count of matchesPrefix. */ @@ -7083,11 +7219,12 @@ public int getMatchesPrefixCount() { * * *
      -         * List of object name prefixes. If any prefix exactly matches the
      -         * beginning of the object name, the condition evaluates to true.
      +         * Optional. List of object name prefixes. If any prefix exactly matches
      +         * the beginning of the object name, the condition evaluates to true.
                * 
      * - * repeated string matches_prefix = 11; + * repeated string matches_prefix = 11 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param index The index of the element to return. * @return The matchesPrefix at the given index. @@ -7100,11 +7237,12 @@ public java.lang.String getMatchesPrefix(int index) { * * *
      -         * List of object name prefixes. If any prefix exactly matches the
      -         * beginning of the object name, the condition evaluates to true.
      +         * Optional. List of object name prefixes. If any prefix exactly matches
      +         * the beginning of the object name, the condition evaluates to true.
                * 
      * - * repeated string matches_prefix = 11; + * repeated string matches_prefix = 11 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param index The index of the value to return. * @return The bytes of the matchesPrefix at the given index. @@ -7123,11 +7261,12 @@ public com.google.protobuf.ByteString getMatchesPrefixBytes(int index) { * * *
      -         * List of object name suffixes. If any suffix exactly matches the
      -         * end of the object name, the condition evaluates to true.
      +         * Optional. List of object name suffixes. If any suffix exactly matches
      +         * the end of the object name, the condition evaluates to true.
                * 
      * - * repeated string matches_suffix = 12; + * repeated string matches_suffix = 12 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return A list containing the matchesSuffix. */ @@ -7139,11 +7278,12 @@ public com.google.protobuf.ProtocolStringList getMatchesSuffixList() { * * *
      -         * List of object name suffixes. If any suffix exactly matches the
      -         * end of the object name, the condition evaluates to true.
      +         * Optional. List of object name suffixes. If any suffix exactly matches
      +         * the end of the object name, the condition evaluates to true.
                * 
      * - * repeated string matches_suffix = 12; + * repeated string matches_suffix = 12 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The count of matchesSuffix. */ @@ -7155,11 +7295,12 @@ public int getMatchesSuffixCount() { * * *
      -         * List of object name suffixes. If any suffix exactly matches the
      -         * end of the object name, the condition evaluates to true.
      +         * Optional. List of object name suffixes. If any suffix exactly matches
      +         * the end of the object name, the condition evaluates to true.
                * 
      * - * repeated string matches_suffix = 12; + * repeated string matches_suffix = 12 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param index The index of the element to return. * @return The matchesSuffix at the given index. @@ -7172,11 +7313,12 @@ public java.lang.String getMatchesSuffix(int index) { * * *
      -         * List of object name suffixes. If any suffix exactly matches the
      -         * end of the object name, the condition evaluates to true.
      +         * Optional. List of object name suffixes. If any suffix exactly matches
      +         * the end of the object name, the condition evaluates to true.
                * 
      * - * repeated string matches_suffix = 12; + * repeated string matches_suffix = 12 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param index The index of the value to return. * @return The bytes of the matchesSuffix at the given index. @@ -7985,11 +8127,12 @@ public Builder clearAgeDays() { * * *
      -           * This condition is satisfied when an object is created before midnight
      -           * of the specified date in UTC.
      +           * Optional. This condition is satisfied when an object is created
      +           * before midnight of the specified date in UTC.
                  * 
      * - * .google.type.Date created_before = 2; + * .google.type.Date created_before = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the createdBefore field is set. */ @@ -8001,11 +8144,12 @@ public boolean hasCreatedBefore() { * * *
      -           * This condition is satisfied when an object is created before midnight
      -           * of the specified date in UTC.
      +           * Optional. This condition is satisfied when an object is created
      +           * before midnight of the specified date in UTC.
                  * 
      * - * .google.type.Date created_before = 2; + * .google.type.Date created_before = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The createdBefore. */ @@ -8023,11 +8167,12 @@ public com.google.type.Date getCreatedBefore() { * * *
      -           * This condition is satisfied when an object is created before midnight
      -           * of the specified date in UTC.
      +           * Optional. This condition is satisfied when an object is created
      +           * before midnight of the specified date in UTC.
                  * 
      * - * .google.type.Date created_before = 2; + * .google.type.Date created_before = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCreatedBefore(com.google.type.Date value) { if (createdBeforeBuilder_ == null) { @@ -8047,11 +8192,12 @@ public Builder setCreatedBefore(com.google.type.Date value) { * * *
      -           * This condition is satisfied when an object is created before midnight
      -           * of the specified date in UTC.
      +           * Optional. This condition is satisfied when an object is created
      +           * before midnight of the specified date in UTC.
                  * 
      * - * .google.type.Date created_before = 2; + * .google.type.Date created_before = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCreatedBefore(com.google.type.Date.Builder builderForValue) { if (createdBeforeBuilder_ == null) { @@ -8068,11 +8214,12 @@ public Builder setCreatedBefore(com.google.type.Date.Builder builderForValue) { * * *
      -           * This condition is satisfied when an object is created before midnight
      -           * of the specified date in UTC.
      +           * Optional. This condition is satisfied when an object is created
      +           * before midnight of the specified date in UTC.
                  * 
      * - * .google.type.Date created_before = 2; + * .google.type.Date created_before = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeCreatedBefore(com.google.type.Date value) { if (createdBeforeBuilder_ == null) { @@ -8097,11 +8244,12 @@ public Builder mergeCreatedBefore(com.google.type.Date value) { * * *
      -           * This condition is satisfied when an object is created before midnight
      -           * of the specified date in UTC.
      +           * Optional. This condition is satisfied when an object is created
      +           * before midnight of the specified date in UTC.
                  * 
      * - * .google.type.Date created_before = 2; + * .google.type.Date created_before = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearCreatedBefore() { bitField0_ = (bitField0_ & ~0x00000002); @@ -8118,11 +8266,12 @@ public Builder clearCreatedBefore() { * * *
      -           * This condition is satisfied when an object is created before midnight
      -           * of the specified date in UTC.
      +           * Optional. This condition is satisfied when an object is created
      +           * before midnight of the specified date in UTC.
                  * 
      * - * .google.type.Date created_before = 2; + * .google.type.Date created_before = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.type.Date.Builder getCreatedBeforeBuilder() { bitField0_ |= 0x00000002; @@ -8134,11 +8283,12 @@ public com.google.type.Date.Builder getCreatedBeforeBuilder() { * * *
      -           * This condition is satisfied when an object is created before midnight
      -           * of the specified date in UTC.
      +           * Optional. This condition is satisfied when an object is created
      +           * before midnight of the specified date in UTC.
                  * 
      * - * .google.type.Date created_before = 2; + * .google.type.Date created_before = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.type.DateOrBuilder getCreatedBeforeOrBuilder() { if (createdBeforeBuilder_ != null) { @@ -8154,11 +8304,12 @@ public com.google.type.DateOrBuilder getCreatedBeforeOrBuilder() { * * *
      -           * This condition is satisfied when an object is created before midnight
      -           * of the specified date in UTC.
      +           * Optional. This condition is satisfied when an object is created
      +           * before midnight of the specified date in UTC.
                  * 
      * - * .google.type.Date created_before = 2; + * .google.type.Date created_before = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> @@ -8350,13 +8501,15 @@ private void ensureMatchesStorageClassIsMutable() { * * *
      -           * Objects having any of the storage classes specified by this condition
      -           * will be matched. Values include `MULTI_REGIONAL`, `REGIONAL`,
      -           * `NEARLINE`, `COLDLINE`, `STANDARD`, and
      +           * Optional. Objects having any of the storage classes specified by this
      +           * condition will be matched. Values include `MULTI_REGIONAL`,
      +           * `REGIONAL`, `NEARLINE`, `COLDLINE`, `STANDARD`, and
                  * `DURABLE_REDUCED_AVAILABILITY`.
                  * 
      * - * repeated string matches_storage_class = 5; + * + * repeated string matches_storage_class = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return A list containing the matchesStorageClass. */ @@ -8369,13 +8522,15 @@ public com.google.protobuf.ProtocolStringList getMatchesStorageClassList() { * * *
      -           * Objects having any of the storage classes specified by this condition
      -           * will be matched. Values include `MULTI_REGIONAL`, `REGIONAL`,
      -           * `NEARLINE`, `COLDLINE`, `STANDARD`, and
      +           * Optional. Objects having any of the storage classes specified by this
      +           * condition will be matched. Values include `MULTI_REGIONAL`,
      +           * `REGIONAL`, `NEARLINE`, `COLDLINE`, `STANDARD`, and
                  * `DURABLE_REDUCED_AVAILABILITY`.
                  * 
      * - * repeated string matches_storage_class = 5; + * + * repeated string matches_storage_class = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The count of matchesStorageClass. */ @@ -8387,13 +8542,15 @@ public int getMatchesStorageClassCount() { * * *
      -           * Objects having any of the storage classes specified by this condition
      -           * will be matched. Values include `MULTI_REGIONAL`, `REGIONAL`,
      -           * `NEARLINE`, `COLDLINE`, `STANDARD`, and
      +           * Optional. Objects having any of the storage classes specified by this
      +           * condition will be matched. Values include `MULTI_REGIONAL`,
      +           * `REGIONAL`, `NEARLINE`, `COLDLINE`, `STANDARD`, and
                  * `DURABLE_REDUCED_AVAILABILITY`.
                  * 
      * - * repeated string matches_storage_class = 5; + * + * repeated string matches_storage_class = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param index The index of the element to return. * @return The matchesStorageClass at the given index. @@ -8406,13 +8563,15 @@ public java.lang.String getMatchesStorageClass(int index) { * * *
      -           * Objects having any of the storage classes specified by this condition
      -           * will be matched. Values include `MULTI_REGIONAL`, `REGIONAL`,
      -           * `NEARLINE`, `COLDLINE`, `STANDARD`, and
      +           * Optional. Objects having any of the storage classes specified by this
      +           * condition will be matched. Values include `MULTI_REGIONAL`,
      +           * `REGIONAL`, `NEARLINE`, `COLDLINE`, `STANDARD`, and
                  * `DURABLE_REDUCED_AVAILABILITY`.
                  * 
      * - * repeated string matches_storage_class = 5; + * + * repeated string matches_storage_class = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param index The index of the value to return. * @return The bytes of the matchesStorageClass at the given index. @@ -8425,13 +8584,15 @@ public com.google.protobuf.ByteString getMatchesStorageClassBytes(int index) { * * *
      -           * Objects having any of the storage classes specified by this condition
      -           * will be matched. Values include `MULTI_REGIONAL`, `REGIONAL`,
      -           * `NEARLINE`, `COLDLINE`, `STANDARD`, and
      +           * Optional. Objects having any of the storage classes specified by this
      +           * condition will be matched. Values include `MULTI_REGIONAL`,
      +           * `REGIONAL`, `NEARLINE`, `COLDLINE`, `STANDARD`, and
                  * `DURABLE_REDUCED_AVAILABILITY`.
                  * 
      * - * repeated string matches_storage_class = 5; + * + * repeated string matches_storage_class = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param index The index to set the value at. * @param value The matchesStorageClass to set. @@ -8452,13 +8613,15 @@ public Builder setMatchesStorageClass(int index, java.lang.String value) { * * *
      -           * Objects having any of the storage classes specified by this condition
      -           * will be matched. Values include `MULTI_REGIONAL`, `REGIONAL`,
      -           * `NEARLINE`, `COLDLINE`, `STANDARD`, and
      +           * Optional. Objects having any of the storage classes specified by this
      +           * condition will be matched. Values include `MULTI_REGIONAL`,
      +           * `REGIONAL`, `NEARLINE`, `COLDLINE`, `STANDARD`, and
                  * `DURABLE_REDUCED_AVAILABILITY`.
                  * 
      * - * repeated string matches_storage_class = 5; + * + * repeated string matches_storage_class = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param value The matchesStorageClass to add. * @return This builder for chaining. @@ -8478,13 +8641,15 @@ public Builder addMatchesStorageClass(java.lang.String value) { * * *
      -           * Objects having any of the storage classes specified by this condition
      -           * will be matched. Values include `MULTI_REGIONAL`, `REGIONAL`,
      -           * `NEARLINE`, `COLDLINE`, `STANDARD`, and
      +           * Optional. Objects having any of the storage classes specified by this
      +           * condition will be matched. Values include `MULTI_REGIONAL`,
      +           * `REGIONAL`, `NEARLINE`, `COLDLINE`, `STANDARD`, and
                  * `DURABLE_REDUCED_AVAILABILITY`.
                  * 
      * - * repeated string matches_storage_class = 5; + * + * repeated string matches_storage_class = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param values The matchesStorageClass to add. * @return This builder for chaining. @@ -8501,13 +8666,15 @@ public Builder addAllMatchesStorageClass(java.lang.Iterable va * * *
      -           * Objects having any of the storage classes specified by this condition
      -           * will be matched. Values include `MULTI_REGIONAL`, `REGIONAL`,
      -           * `NEARLINE`, `COLDLINE`, `STANDARD`, and
      +           * Optional. Objects having any of the storage classes specified by this
      +           * condition will be matched. Values include `MULTI_REGIONAL`,
      +           * `REGIONAL`, `NEARLINE`, `COLDLINE`, `STANDARD`, and
                  * `DURABLE_REDUCED_AVAILABILITY`.
                  * 
      * - * repeated string matches_storage_class = 5; + * + * repeated string matches_storage_class = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return This builder for chaining. */ @@ -8523,13 +8690,15 @@ public Builder clearMatchesStorageClass() { * * *
      -           * Objects having any of the storage classes specified by this condition
      -           * will be matched. Values include `MULTI_REGIONAL`, `REGIONAL`,
      -           * `NEARLINE`, `COLDLINE`, `STANDARD`, and
      +           * Optional. Objects having any of the storage classes specified by this
      +           * condition will be matched. Values include `MULTI_REGIONAL`,
      +           * `REGIONAL`, `NEARLINE`, `COLDLINE`, `STANDARD`, and
                  * `DURABLE_REDUCED_AVAILABILITY`.
                  * 
      * - * repeated string matches_storage_class = 5; + * + * repeated string matches_storage_class = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param value The bytes of the matchesStorageClass to add. * @return This builder for chaining. @@ -8635,11 +8804,13 @@ public Builder clearDaysSinceCustomTime() { * * *
      -           * An object matches this condition if the custom timestamp set on the
      -           * object is before the specified date in UTC.
      +           * Optional. An object matches this condition if the custom timestamp
      +           * set on the object is before the specified date in UTC.
                  * 
      * - * .google.type.Date custom_time_before = 8; + * + * .google.type.Date custom_time_before = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the customTimeBefore field is set. */ @@ -8651,11 +8822,13 @@ public boolean hasCustomTimeBefore() { * * *
      -           * An object matches this condition if the custom timestamp set on the
      -           * object is before the specified date in UTC.
      +           * Optional. An object matches this condition if the custom timestamp
      +           * set on the object is before the specified date in UTC.
                  * 
      * - * .google.type.Date custom_time_before = 8; + * + * .google.type.Date custom_time_before = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The customTimeBefore. */ @@ -8673,11 +8846,13 @@ public com.google.type.Date getCustomTimeBefore() { * * *
      -           * An object matches this condition if the custom timestamp set on the
      -           * object is before the specified date in UTC.
      +           * Optional. An object matches this condition if the custom timestamp
      +           * set on the object is before the specified date in UTC.
                  * 
      * - * .google.type.Date custom_time_before = 8; + * + * .google.type.Date custom_time_before = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCustomTimeBefore(com.google.type.Date value) { if (customTimeBeforeBuilder_ == null) { @@ -8697,11 +8872,13 @@ public Builder setCustomTimeBefore(com.google.type.Date value) { * * *
      -           * An object matches this condition if the custom timestamp set on the
      -           * object is before the specified date in UTC.
      +           * Optional. An object matches this condition if the custom timestamp
      +           * set on the object is before the specified date in UTC.
                  * 
      * - * .google.type.Date custom_time_before = 8; + * + * .google.type.Date custom_time_before = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCustomTimeBefore(com.google.type.Date.Builder builderForValue) { if (customTimeBeforeBuilder_ == null) { @@ -8718,11 +8895,13 @@ public Builder setCustomTimeBefore(com.google.type.Date.Builder builderForValue) * * *
      -           * An object matches this condition if the custom timestamp set on the
      -           * object is before the specified date in UTC.
      +           * Optional. An object matches this condition if the custom timestamp
      +           * set on the object is before the specified date in UTC.
                  * 
      * - * .google.type.Date custom_time_before = 8; + * + * .google.type.Date custom_time_before = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeCustomTimeBefore(com.google.type.Date value) { if (customTimeBeforeBuilder_ == null) { @@ -8747,11 +8926,13 @@ public Builder mergeCustomTimeBefore(com.google.type.Date value) { * * *
      -           * An object matches this condition if the custom timestamp set on the
      -           * object is before the specified date in UTC.
      +           * Optional. An object matches this condition if the custom timestamp
      +           * set on the object is before the specified date in UTC.
                  * 
      * - * .google.type.Date custom_time_before = 8; + * + * .google.type.Date custom_time_before = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearCustomTimeBefore() { bitField0_ = (bitField0_ & ~0x00000040); @@ -8768,11 +8949,13 @@ public Builder clearCustomTimeBefore() { * * *
      -           * An object matches this condition if the custom timestamp set on the
      -           * object is before the specified date in UTC.
      +           * Optional. An object matches this condition if the custom timestamp
      +           * set on the object is before the specified date in UTC.
                  * 
      * - * .google.type.Date custom_time_before = 8; + * + * .google.type.Date custom_time_before = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.type.Date.Builder getCustomTimeBeforeBuilder() { bitField0_ |= 0x00000040; @@ -8784,11 +8967,13 @@ public com.google.type.Date.Builder getCustomTimeBeforeBuilder() { * * *
      -           * An object matches this condition if the custom timestamp set on the
      -           * object is before the specified date in UTC.
      +           * Optional. An object matches this condition if the custom timestamp
      +           * set on the object is before the specified date in UTC.
                  * 
      * - * .google.type.Date custom_time_before = 8; + * + * .google.type.Date custom_time_before = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.type.DateOrBuilder getCustomTimeBeforeOrBuilder() { if (customTimeBeforeBuilder_ != null) { @@ -8804,11 +8989,13 @@ public com.google.type.DateOrBuilder getCustomTimeBeforeOrBuilder() { * * *
      -           * An object matches this condition if the custom timestamp set on the
      -           * object is before the specified date in UTC.
      +           * Optional. An object matches this condition if the custom timestamp
      +           * set on the object is before the specified date in UTC.
                  * 
      * - * .google.type.Date custom_time_before = 8; + * + * .google.type.Date custom_time_before = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> @@ -8922,12 +9109,14 @@ public Builder clearDaysSinceNoncurrentTime() { * * *
      -           * This condition is relevant only for versioned objects. An object
      -           * version satisfies this condition only if it became noncurrent before
      -           * the specified date in UTC.
      +           * Optional. This condition is relevant only for versioned objects. An
      +           * object version satisfies this condition only if it became noncurrent
      +           * before the specified date in UTC.
                  * 
      * - * .google.type.Date noncurrent_time_before = 10; + * + * .google.type.Date noncurrent_time_before = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the noncurrentTimeBefore field is set. */ @@ -8939,12 +9128,14 @@ public boolean hasNoncurrentTimeBefore() { * * *
      -           * This condition is relevant only for versioned objects. An object
      -           * version satisfies this condition only if it became noncurrent before
      -           * the specified date in UTC.
      +           * Optional. This condition is relevant only for versioned objects. An
      +           * object version satisfies this condition only if it became noncurrent
      +           * before the specified date in UTC.
                  * 
      * - * .google.type.Date noncurrent_time_before = 10; + * + * .google.type.Date noncurrent_time_before = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The noncurrentTimeBefore. */ @@ -8962,12 +9153,14 @@ public com.google.type.Date getNoncurrentTimeBefore() { * * *
      -           * This condition is relevant only for versioned objects. An object
      -           * version satisfies this condition only if it became noncurrent before
      -           * the specified date in UTC.
      +           * Optional. This condition is relevant only for versioned objects. An
      +           * object version satisfies this condition only if it became noncurrent
      +           * before the specified date in UTC.
                  * 
      * - * .google.type.Date noncurrent_time_before = 10; + * + * .google.type.Date noncurrent_time_before = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setNoncurrentTimeBefore(com.google.type.Date value) { if (noncurrentTimeBeforeBuilder_ == null) { @@ -8987,12 +9180,14 @@ public Builder setNoncurrentTimeBefore(com.google.type.Date value) { * * *
      -           * This condition is relevant only for versioned objects. An object
      -           * version satisfies this condition only if it became noncurrent before
      -           * the specified date in UTC.
      +           * Optional. This condition is relevant only for versioned objects. An
      +           * object version satisfies this condition only if it became noncurrent
      +           * before the specified date in UTC.
                  * 
      * - * .google.type.Date noncurrent_time_before = 10; + * + * .google.type.Date noncurrent_time_before = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setNoncurrentTimeBefore(com.google.type.Date.Builder builderForValue) { if (noncurrentTimeBeforeBuilder_ == null) { @@ -9009,12 +9204,14 @@ public Builder setNoncurrentTimeBefore(com.google.type.Date.Builder builderForVa * * *
      -           * This condition is relevant only for versioned objects. An object
      -           * version satisfies this condition only if it became noncurrent before
      -           * the specified date in UTC.
      +           * Optional. This condition is relevant only for versioned objects. An
      +           * object version satisfies this condition only if it became noncurrent
      +           * before the specified date in UTC.
                  * 
      * - * .google.type.Date noncurrent_time_before = 10; + * + * .google.type.Date noncurrent_time_before = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeNoncurrentTimeBefore(com.google.type.Date value) { if (noncurrentTimeBeforeBuilder_ == null) { @@ -9039,12 +9236,14 @@ public Builder mergeNoncurrentTimeBefore(com.google.type.Date value) { * * *
      -           * This condition is relevant only for versioned objects. An object
      -           * version satisfies this condition only if it became noncurrent before
      -           * the specified date in UTC.
      +           * Optional. This condition is relevant only for versioned objects. An
      +           * object version satisfies this condition only if it became noncurrent
      +           * before the specified date in UTC.
                  * 
      * - * .google.type.Date noncurrent_time_before = 10; + * + * .google.type.Date noncurrent_time_before = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearNoncurrentTimeBefore() { bitField0_ = (bitField0_ & ~0x00000100); @@ -9061,12 +9260,14 @@ public Builder clearNoncurrentTimeBefore() { * * *
      -           * This condition is relevant only for versioned objects. An object
      -           * version satisfies this condition only if it became noncurrent before
      -           * the specified date in UTC.
      +           * Optional. This condition is relevant only for versioned objects. An
      +           * object version satisfies this condition only if it became noncurrent
      +           * before the specified date in UTC.
                  * 
      * - * .google.type.Date noncurrent_time_before = 10; + * + * .google.type.Date noncurrent_time_before = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.type.Date.Builder getNoncurrentTimeBeforeBuilder() { bitField0_ |= 0x00000100; @@ -9078,12 +9279,14 @@ public com.google.type.Date.Builder getNoncurrentTimeBeforeBuilder() { * * *
      -           * This condition is relevant only for versioned objects. An object
      -           * version satisfies this condition only if it became noncurrent before
      -           * the specified date in UTC.
      +           * Optional. This condition is relevant only for versioned objects. An
      +           * object version satisfies this condition only if it became noncurrent
      +           * before the specified date in UTC.
                  * 
      * - * .google.type.Date noncurrent_time_before = 10; + * + * .google.type.Date noncurrent_time_before = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.type.DateOrBuilder getNoncurrentTimeBeforeOrBuilder() { if (noncurrentTimeBeforeBuilder_ != null) { @@ -9099,12 +9302,14 @@ public com.google.type.DateOrBuilder getNoncurrentTimeBeforeOrBuilder() { * * *
      -           * This condition is relevant only for versioned objects. An object
      -           * version satisfies this condition only if it became noncurrent before
      -           * the specified date in UTC.
      +           * Optional. This condition is relevant only for versioned objects. An
      +           * object version satisfies this condition only if it became noncurrent
      +           * before the specified date in UTC.
                  * 
      * - * .google.type.Date noncurrent_time_before = 10; + * + * .google.type.Date noncurrent_time_before = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> @@ -9135,11 +9340,12 @@ private void ensureMatchesPrefixIsMutable() { * * *
      -           * List of object name prefixes. If any prefix exactly matches the
      -           * beginning of the object name, the condition evaluates to true.
      +           * Optional. List of object name prefixes. If any prefix exactly matches
      +           * the beginning of the object name, the condition evaluates to true.
                  * 
      * - * repeated string matches_prefix = 11; + * repeated string matches_prefix = 11 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return A list containing the matchesPrefix. */ @@ -9152,11 +9358,12 @@ public com.google.protobuf.ProtocolStringList getMatchesPrefixList() { * * *
      -           * List of object name prefixes. If any prefix exactly matches the
      -           * beginning of the object name, the condition evaluates to true.
      +           * Optional. List of object name prefixes. If any prefix exactly matches
      +           * the beginning of the object name, the condition evaluates to true.
                  * 
      * - * repeated string matches_prefix = 11; + * repeated string matches_prefix = 11 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The count of matchesPrefix. */ @@ -9168,11 +9375,12 @@ public int getMatchesPrefixCount() { * * *
      -           * List of object name prefixes. If any prefix exactly matches the
      -           * beginning of the object name, the condition evaluates to true.
      +           * Optional. List of object name prefixes. If any prefix exactly matches
      +           * the beginning of the object name, the condition evaluates to true.
                  * 
      * - * repeated string matches_prefix = 11; + * repeated string matches_prefix = 11 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param index The index of the element to return. * @return The matchesPrefix at the given index. @@ -9185,11 +9393,12 @@ public java.lang.String getMatchesPrefix(int index) { * * *
      -           * List of object name prefixes. If any prefix exactly matches the
      -           * beginning of the object name, the condition evaluates to true.
      +           * Optional. List of object name prefixes. If any prefix exactly matches
      +           * the beginning of the object name, the condition evaluates to true.
                  * 
      * - * repeated string matches_prefix = 11; + * repeated string matches_prefix = 11 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param index The index of the value to return. * @return The bytes of the matchesPrefix at the given index. @@ -9202,11 +9411,12 @@ public com.google.protobuf.ByteString getMatchesPrefixBytes(int index) { * * *
      -           * List of object name prefixes. If any prefix exactly matches the
      -           * beginning of the object name, the condition evaluates to true.
      +           * Optional. List of object name prefixes. If any prefix exactly matches
      +           * the beginning of the object name, the condition evaluates to true.
                  * 
      * - * repeated string matches_prefix = 11; + * repeated string matches_prefix = 11 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param index The index to set the value at. * @param value The matchesPrefix to set. @@ -9227,11 +9437,12 @@ public Builder setMatchesPrefix(int index, java.lang.String value) { * * *
      -           * List of object name prefixes. If any prefix exactly matches the
      -           * beginning of the object name, the condition evaluates to true.
      +           * Optional. List of object name prefixes. If any prefix exactly matches
      +           * the beginning of the object name, the condition evaluates to true.
                  * 
      * - * repeated string matches_prefix = 11; + * repeated string matches_prefix = 11 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param value The matchesPrefix to add. * @return This builder for chaining. @@ -9251,11 +9462,12 @@ public Builder addMatchesPrefix(java.lang.String value) { * * *
      -           * List of object name prefixes. If any prefix exactly matches the
      -           * beginning of the object name, the condition evaluates to true.
      +           * Optional. List of object name prefixes. If any prefix exactly matches
      +           * the beginning of the object name, the condition evaluates to true.
                  * 
      * - * repeated string matches_prefix = 11; + * repeated string matches_prefix = 11 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param values The matchesPrefix to add. * @return This builder for chaining. @@ -9272,11 +9484,12 @@ public Builder addAllMatchesPrefix(java.lang.Iterable values) * * *
      -           * List of object name prefixes. If any prefix exactly matches the
      -           * beginning of the object name, the condition evaluates to true.
      +           * Optional. List of object name prefixes. If any prefix exactly matches
      +           * the beginning of the object name, the condition evaluates to true.
                  * 
      * - * repeated string matches_prefix = 11; + * repeated string matches_prefix = 11 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return This builder for chaining. */ @@ -9292,11 +9505,12 @@ public Builder clearMatchesPrefix() { * * *
      -           * List of object name prefixes. If any prefix exactly matches the
      -           * beginning of the object name, the condition evaluates to true.
      +           * Optional. List of object name prefixes. If any prefix exactly matches
      +           * the beginning of the object name, the condition evaluates to true.
                  * 
      * - * repeated string matches_prefix = 11; + * repeated string matches_prefix = 11 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param value The bytes of the matchesPrefix to add. * @return This builder for chaining. @@ -9327,11 +9541,12 @@ private void ensureMatchesSuffixIsMutable() { * * *
      -           * List of object name suffixes. If any suffix exactly matches the
      -           * end of the object name, the condition evaluates to true.
      +           * Optional. List of object name suffixes. If any suffix exactly matches
      +           * the end of the object name, the condition evaluates to true.
                  * 
      * - * repeated string matches_suffix = 12; + * repeated string matches_suffix = 12 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return A list containing the matchesSuffix. */ @@ -9344,11 +9559,12 @@ public com.google.protobuf.ProtocolStringList getMatchesSuffixList() { * * *
      -           * List of object name suffixes. If any suffix exactly matches the
      -           * end of the object name, the condition evaluates to true.
      +           * Optional. List of object name suffixes. If any suffix exactly matches
      +           * the end of the object name, the condition evaluates to true.
                  * 
      * - * repeated string matches_suffix = 12; + * repeated string matches_suffix = 12 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The count of matchesSuffix. */ @@ -9360,11 +9576,12 @@ public int getMatchesSuffixCount() { * * *
      -           * List of object name suffixes. If any suffix exactly matches the
      -           * end of the object name, the condition evaluates to true.
      +           * Optional. List of object name suffixes. If any suffix exactly matches
      +           * the end of the object name, the condition evaluates to true.
                  * 
      * - * repeated string matches_suffix = 12; + * repeated string matches_suffix = 12 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param index The index of the element to return. * @return The matchesSuffix at the given index. @@ -9377,11 +9594,12 @@ public java.lang.String getMatchesSuffix(int index) { * * *
      -           * List of object name suffixes. If any suffix exactly matches the
      -           * end of the object name, the condition evaluates to true.
      +           * Optional. List of object name suffixes. If any suffix exactly matches
      +           * the end of the object name, the condition evaluates to true.
                  * 
      * - * repeated string matches_suffix = 12; + * repeated string matches_suffix = 12 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param index The index of the value to return. * @return The bytes of the matchesSuffix at the given index. @@ -9394,11 +9612,12 @@ public com.google.protobuf.ByteString getMatchesSuffixBytes(int index) { * * *
      -           * List of object name suffixes. If any suffix exactly matches the
      -           * end of the object name, the condition evaluates to true.
      +           * Optional. List of object name suffixes. If any suffix exactly matches
      +           * the end of the object name, the condition evaluates to true.
                  * 
      * - * repeated string matches_suffix = 12; + * repeated string matches_suffix = 12 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param index The index to set the value at. * @param value The matchesSuffix to set. @@ -9419,11 +9638,12 @@ public Builder setMatchesSuffix(int index, java.lang.String value) { * * *
      -           * List of object name suffixes. If any suffix exactly matches the
      -           * end of the object name, the condition evaluates to true.
      +           * Optional. List of object name suffixes. If any suffix exactly matches
      +           * the end of the object name, the condition evaluates to true.
                  * 
      * - * repeated string matches_suffix = 12; + * repeated string matches_suffix = 12 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param value The matchesSuffix to add. * @return This builder for chaining. @@ -9443,11 +9663,12 @@ public Builder addMatchesSuffix(java.lang.String value) { * * *
      -           * List of object name suffixes. If any suffix exactly matches the
      -           * end of the object name, the condition evaluates to true.
      +           * Optional. List of object name suffixes. If any suffix exactly matches
      +           * the end of the object name, the condition evaluates to true.
                  * 
      * - * repeated string matches_suffix = 12; + * repeated string matches_suffix = 12 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param values The matchesSuffix to add. * @return This builder for chaining. @@ -9464,11 +9685,12 @@ public Builder addAllMatchesSuffix(java.lang.Iterable values) * * *
      -           * List of object name suffixes. If any suffix exactly matches the
      -           * end of the object name, the condition evaluates to true.
      +           * Optional. List of object name suffixes. If any suffix exactly matches
      +           * the end of the object name, the condition evaluates to true.
                  * 
      * - * repeated string matches_suffix = 12; + * repeated string matches_suffix = 12 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return This builder for chaining. */ @@ -9484,11 +9706,12 @@ public Builder clearMatchesSuffix() { * * *
      -           * List of object name suffixes. If any suffix exactly matches the
      -           * end of the object name, the condition evaluates to true.
      +           * Optional. List of object name suffixes. If any suffix exactly matches
      +           * the end of the object name, the condition evaluates to true.
                  * 
      * - * repeated string matches_suffix = 12; + * repeated string matches_suffix = 12 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param value The bytes of the matchesSuffix to add. * @return This builder for chaining. @@ -9577,10 +9800,12 @@ public com.google.storage.v2.Bucket.Lifecycle.Rule.Condition getDefaultInstanceF * * *
      -       * The action to take.
      +       * Optional. The action to take.
              * 
      * - * .google.storage.v2.Bucket.Lifecycle.Rule.Action action = 1; + * + * .google.storage.v2.Bucket.Lifecycle.Rule.Action action = 1 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the action field is set. */ @@ -9593,10 +9818,12 @@ public boolean hasAction() { * * *
      -       * The action to take.
      +       * Optional. The action to take.
              * 
      * - * .google.storage.v2.Bucket.Lifecycle.Rule.Action action = 1; + * + * .google.storage.v2.Bucket.Lifecycle.Rule.Action action = 1 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The action. */ @@ -9611,10 +9838,12 @@ public com.google.storage.v2.Bucket.Lifecycle.Rule.Action getAction() { * * *
      -       * The action to take.
      +       * Optional. The action to take.
              * 
      * - * .google.storage.v2.Bucket.Lifecycle.Rule.Action action = 1; + * + * .google.storage.v2.Bucket.Lifecycle.Rule.Action action = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.Bucket.Lifecycle.Rule.ActionOrBuilder getActionOrBuilder() { @@ -9630,10 +9859,12 @@ public com.google.storage.v2.Bucket.Lifecycle.Rule.ActionOrBuilder getActionOrBu * * *
      -       * The condition(s) under which the action will be taken.
      +       * Optional. The condition(s) under which the action will be taken.
              * 
      * - * .google.storage.v2.Bucket.Lifecycle.Rule.Condition condition = 2; + * + * .google.storage.v2.Bucket.Lifecycle.Rule.Condition condition = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the condition field is set. */ @@ -9646,10 +9877,12 @@ public boolean hasCondition() { * * *
      -       * The condition(s) under which the action will be taken.
      +       * Optional. The condition(s) under which the action will be taken.
              * 
      * - * .google.storage.v2.Bucket.Lifecycle.Rule.Condition condition = 2; + * + * .google.storage.v2.Bucket.Lifecycle.Rule.Condition condition = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The condition. */ @@ -9664,10 +9897,12 @@ public com.google.storage.v2.Bucket.Lifecycle.Rule.Condition getCondition() { * * *
      -       * The condition(s) under which the action will be taken.
      +       * Optional. The condition(s) under which the action will be taken.
              * 
      * - * .google.storage.v2.Bucket.Lifecycle.Rule.Condition condition = 2; + * + * .google.storage.v2.Bucket.Lifecycle.Rule.Condition condition = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.Bucket.Lifecycle.Rule.ConditionOrBuilder @@ -10088,10 +10323,12 @@ public Builder mergeFrom( * * *
      -         * The action to take.
      +         * Optional. The action to take.
                * 
      * - * .google.storage.v2.Bucket.Lifecycle.Rule.Action action = 1; + * + * .google.storage.v2.Bucket.Lifecycle.Rule.Action action = 1 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the action field is set. */ @@ -10103,10 +10340,12 @@ public boolean hasAction() { * * *
      -         * The action to take.
      +         * Optional. The action to take.
                * 
      * - * .google.storage.v2.Bucket.Lifecycle.Rule.Action action = 1; + * + * .google.storage.v2.Bucket.Lifecycle.Rule.Action action = 1 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The action. */ @@ -10124,10 +10363,12 @@ public com.google.storage.v2.Bucket.Lifecycle.Rule.Action getAction() { * * *
      -         * The action to take.
      +         * Optional. The action to take.
                * 
      * - * .google.storage.v2.Bucket.Lifecycle.Rule.Action action = 1; + * + * .google.storage.v2.Bucket.Lifecycle.Rule.Action action = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setAction(com.google.storage.v2.Bucket.Lifecycle.Rule.Action value) { if (actionBuilder_ == null) { @@ -10147,10 +10388,12 @@ public Builder setAction(com.google.storage.v2.Bucket.Lifecycle.Rule.Action valu * * *
      -         * The action to take.
      +         * Optional. The action to take.
                * 
      * - * .google.storage.v2.Bucket.Lifecycle.Rule.Action action = 1; + * + * .google.storage.v2.Bucket.Lifecycle.Rule.Action action = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setAction( com.google.storage.v2.Bucket.Lifecycle.Rule.Action.Builder builderForValue) { @@ -10168,10 +10411,12 @@ public Builder setAction( * * *
      -         * The action to take.
      +         * Optional. The action to take.
                * 
      * - * .google.storage.v2.Bucket.Lifecycle.Rule.Action action = 1; + * + * .google.storage.v2.Bucket.Lifecycle.Rule.Action action = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeAction(com.google.storage.v2.Bucket.Lifecycle.Rule.Action value) { if (actionBuilder_ == null) { @@ -10197,10 +10442,12 @@ public Builder mergeAction(com.google.storage.v2.Bucket.Lifecycle.Rule.Action va * * *
      -         * The action to take.
      +         * Optional. The action to take.
                * 
      * - * .google.storage.v2.Bucket.Lifecycle.Rule.Action action = 1; + * + * .google.storage.v2.Bucket.Lifecycle.Rule.Action action = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearAction() { bitField0_ = (bitField0_ & ~0x00000001); @@ -10217,10 +10464,12 @@ public Builder clearAction() { * * *
      -         * The action to take.
      +         * Optional. The action to take.
                * 
      * - * .google.storage.v2.Bucket.Lifecycle.Rule.Action action = 1; + * + * .google.storage.v2.Bucket.Lifecycle.Rule.Action action = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.Lifecycle.Rule.Action.Builder getActionBuilder() { bitField0_ |= 0x00000001; @@ -10232,10 +10481,12 @@ public com.google.storage.v2.Bucket.Lifecycle.Rule.Action.Builder getActionBuild * * *
      -         * The action to take.
      +         * Optional. The action to take.
                * 
      * - * .google.storage.v2.Bucket.Lifecycle.Rule.Action action = 1; + * + * .google.storage.v2.Bucket.Lifecycle.Rule.Action action = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.Lifecycle.Rule.ActionOrBuilder getActionOrBuilder() { if (actionBuilder_ != null) { @@ -10251,10 +10502,12 @@ public com.google.storage.v2.Bucket.Lifecycle.Rule.ActionOrBuilder getActionOrBu * * *
      -         * The action to take.
      +         * Optional. The action to take.
                * 
      * - * .google.storage.v2.Bucket.Lifecycle.Rule.Action action = 1; + * + * .google.storage.v2.Bucket.Lifecycle.Rule.Action action = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.Bucket.Lifecycle.Rule.Action, @@ -10284,10 +10537,12 @@ public com.google.storage.v2.Bucket.Lifecycle.Rule.ActionOrBuilder getActionOrBu * * *
      -         * The condition(s) under which the action will be taken.
      +         * Optional. The condition(s) under which the action will be taken.
                * 
      * - * .google.storage.v2.Bucket.Lifecycle.Rule.Condition condition = 2; + * + * .google.storage.v2.Bucket.Lifecycle.Rule.Condition condition = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the condition field is set. */ @@ -10299,10 +10554,12 @@ public boolean hasCondition() { * * *
      -         * The condition(s) under which the action will be taken.
      +         * Optional. The condition(s) under which the action will be taken.
                * 
      * - * .google.storage.v2.Bucket.Lifecycle.Rule.Condition condition = 2; + * + * .google.storage.v2.Bucket.Lifecycle.Rule.Condition condition = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The condition. */ @@ -10320,10 +10577,12 @@ public com.google.storage.v2.Bucket.Lifecycle.Rule.Condition getCondition() { * * *
      -         * The condition(s) under which the action will be taken.
      +         * Optional. The condition(s) under which the action will be taken.
                * 
      * - * .google.storage.v2.Bucket.Lifecycle.Rule.Condition condition = 2; + * + * .google.storage.v2.Bucket.Lifecycle.Rule.Condition condition = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCondition(com.google.storage.v2.Bucket.Lifecycle.Rule.Condition value) { if (conditionBuilder_ == null) { @@ -10343,10 +10602,12 @@ public Builder setCondition(com.google.storage.v2.Bucket.Lifecycle.Rule.Conditio * * *
      -         * The condition(s) under which the action will be taken.
      +         * Optional. The condition(s) under which the action will be taken.
                * 
      * - * .google.storage.v2.Bucket.Lifecycle.Rule.Condition condition = 2; + * + * .google.storage.v2.Bucket.Lifecycle.Rule.Condition condition = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCondition( com.google.storage.v2.Bucket.Lifecycle.Rule.Condition.Builder builderForValue) { @@ -10364,10 +10625,12 @@ public Builder setCondition( * * *
      -         * The condition(s) under which the action will be taken.
      +         * Optional. The condition(s) under which the action will be taken.
                * 
      * - * .google.storage.v2.Bucket.Lifecycle.Rule.Condition condition = 2; + * + * .google.storage.v2.Bucket.Lifecycle.Rule.Condition condition = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeCondition(com.google.storage.v2.Bucket.Lifecycle.Rule.Condition value) { if (conditionBuilder_ == null) { @@ -10393,10 +10656,12 @@ public Builder mergeCondition(com.google.storage.v2.Bucket.Lifecycle.Rule.Condit * * *
      -         * The condition(s) under which the action will be taken.
      +         * Optional. The condition(s) under which the action will be taken.
                * 
      * - * .google.storage.v2.Bucket.Lifecycle.Rule.Condition condition = 2; + * + * .google.storage.v2.Bucket.Lifecycle.Rule.Condition condition = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearCondition() { bitField0_ = (bitField0_ & ~0x00000002); @@ -10413,10 +10678,12 @@ public Builder clearCondition() { * * *
      -         * The condition(s) under which the action will be taken.
      +         * Optional. The condition(s) under which the action will be taken.
                * 
      * - * .google.storage.v2.Bucket.Lifecycle.Rule.Condition condition = 2; + * + * .google.storage.v2.Bucket.Lifecycle.Rule.Condition condition = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.Lifecycle.Rule.Condition.Builder getConditionBuilder() { bitField0_ |= 0x00000002; @@ -10428,10 +10695,12 @@ public com.google.storage.v2.Bucket.Lifecycle.Rule.Condition.Builder getConditio * * *
      -         * The condition(s) under which the action will be taken.
      +         * Optional. The condition(s) under which the action will be taken.
                * 
      * - * .google.storage.v2.Bucket.Lifecycle.Rule.Condition condition = 2; + * + * .google.storage.v2.Bucket.Lifecycle.Rule.Condition condition = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.Lifecycle.Rule.ConditionOrBuilder getConditionOrBuilder() { @@ -10448,10 +10717,12 @@ public com.google.storage.v2.Bucket.Lifecycle.Rule.Condition.Builder getConditio * * *
      -         * The condition(s) under which the action will be taken.
      +         * Optional. The condition(s) under which the action will be taken.
                * 
      * - * .google.storage.v2.Bucket.Lifecycle.Rule.Condition condition = 2; + * + * .google.storage.v2.Bucket.Lifecycle.Rule.Condition condition = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.Bucket.Lifecycle.Rule.Condition, @@ -10543,11 +10814,13 @@ public com.google.storage.v2.Bucket.Lifecycle.Rule getDefaultInstanceForType() { * * *
      -     * A lifecycle management rule, which is made of an action to take and the
      -     * condition(s) under which the action will be taken.
      +     * Optional. A lifecycle management rule, which is made of an action to take
      +     * and the condition(s) under which the action will be taken.
            * 
      * - * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1; + * + * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public java.util.List getRuleList() { @@ -10558,11 +10831,13 @@ public java.util.List getRuleList() * * *
      -     * A lifecycle management rule, which is made of an action to take and the
      -     * condition(s) under which the action will be taken.
      +     * Optional. A lifecycle management rule, which is made of an action to take
      +     * and the condition(s) under which the action will be taken.
            * 
      * - * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1; + * + * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public java.util.List @@ -10574,11 +10849,13 @@ public java.util.List getRuleList() * * *
      -     * A lifecycle management rule, which is made of an action to take and the
      -     * condition(s) under which the action will be taken.
      +     * Optional. A lifecycle management rule, which is made of an action to take
      +     * and the condition(s) under which the action will be taken.
            * 
      * - * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1; + * + * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public int getRuleCount() { @@ -10589,11 +10866,13 @@ public int getRuleCount() { * * *
      -     * A lifecycle management rule, which is made of an action to take and the
      -     * condition(s) under which the action will be taken.
      +     * Optional. A lifecycle management rule, which is made of an action to take
      +     * and the condition(s) under which the action will be taken.
            * 
      * - * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1; + * + * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.Bucket.Lifecycle.Rule getRule(int index) { @@ -10604,11 +10883,13 @@ public com.google.storage.v2.Bucket.Lifecycle.Rule getRule(int index) { * * *
      -     * A lifecycle management rule, which is made of an action to take and the
      -     * condition(s) under which the action will be taken.
      +     * Optional. A lifecycle management rule, which is made of an action to take
      +     * and the condition(s) under which the action will be taken.
            * 
      * - * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1; + * + * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.Bucket.Lifecycle.RuleOrBuilder getRuleOrBuilder(int index) { @@ -11028,11 +11309,13 @@ private void ensureRuleIsMutable() { * * *
      -       * A lifecycle management rule, which is made of an action to take and the
      -       * condition(s) under which the action will be taken.
      +       * Optional. A lifecycle management rule, which is made of an action to take
      +       * and the condition(s) under which the action will be taken.
              * 
      * - * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1; + * + * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public java.util.List getRuleList() { if (ruleBuilder_ == null) { @@ -11046,11 +11329,13 @@ public java.util.List getRuleList() * * *
      -       * A lifecycle management rule, which is made of an action to take and the
      -       * condition(s) under which the action will be taken.
      +       * Optional. A lifecycle management rule, which is made of an action to take
      +       * and the condition(s) under which the action will be taken.
              * 
      * - * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1; + * + * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public int getRuleCount() { if (ruleBuilder_ == null) { @@ -11064,11 +11349,13 @@ public int getRuleCount() { * * *
      -       * A lifecycle management rule, which is made of an action to take and the
      -       * condition(s) under which the action will be taken.
      +       * Optional. A lifecycle management rule, which is made of an action to take
      +       * and the condition(s) under which the action will be taken.
              * 
      * - * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1; + * + * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.Lifecycle.Rule getRule(int index) { if (ruleBuilder_ == null) { @@ -11082,11 +11369,13 @@ public com.google.storage.v2.Bucket.Lifecycle.Rule getRule(int index) { * * *
      -       * A lifecycle management rule, which is made of an action to take and the
      -       * condition(s) under which the action will be taken.
      +       * Optional. A lifecycle management rule, which is made of an action to take
      +       * and the condition(s) under which the action will be taken.
              * 
      * - * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1; + * + * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setRule(int index, com.google.storage.v2.Bucket.Lifecycle.Rule value) { if (ruleBuilder_ == null) { @@ -11106,11 +11395,13 @@ public Builder setRule(int index, com.google.storage.v2.Bucket.Lifecycle.Rule va * * *
      -       * A lifecycle management rule, which is made of an action to take and the
      -       * condition(s) under which the action will be taken.
      +       * Optional. A lifecycle management rule, which is made of an action to take
      +       * and the condition(s) under which the action will be taken.
              * 
      * - * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1; + * + * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setRule( int index, com.google.storage.v2.Bucket.Lifecycle.Rule.Builder builderForValue) { @@ -11128,11 +11419,13 @@ public Builder setRule( * * *
      -       * A lifecycle management rule, which is made of an action to take and the
      -       * condition(s) under which the action will be taken.
      +       * Optional. A lifecycle management rule, which is made of an action to take
      +       * and the condition(s) under which the action will be taken.
              * 
      * - * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1; + * + * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder addRule(com.google.storage.v2.Bucket.Lifecycle.Rule value) { if (ruleBuilder_ == null) { @@ -11152,11 +11445,13 @@ public Builder addRule(com.google.storage.v2.Bucket.Lifecycle.Rule value) { * * *
      -       * A lifecycle management rule, which is made of an action to take and the
      -       * condition(s) under which the action will be taken.
      +       * Optional. A lifecycle management rule, which is made of an action to take
      +       * and the condition(s) under which the action will be taken.
              * 
      * - * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1; + * + * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder addRule(int index, com.google.storage.v2.Bucket.Lifecycle.Rule value) { if (ruleBuilder_ == null) { @@ -11176,11 +11471,13 @@ public Builder addRule(int index, com.google.storage.v2.Bucket.Lifecycle.Rule va * * *
      -       * A lifecycle management rule, which is made of an action to take and the
      -       * condition(s) under which the action will be taken.
      +       * Optional. A lifecycle management rule, which is made of an action to take
      +       * and the condition(s) under which the action will be taken.
              * 
      * - * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1; + * + * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder addRule(com.google.storage.v2.Bucket.Lifecycle.Rule.Builder builderForValue) { if (ruleBuilder_ == null) { @@ -11197,11 +11494,13 @@ public Builder addRule(com.google.storage.v2.Bucket.Lifecycle.Rule.Builder build * * *
      -       * A lifecycle management rule, which is made of an action to take and the
      -       * condition(s) under which the action will be taken.
      +       * Optional. A lifecycle management rule, which is made of an action to take
      +       * and the condition(s) under which the action will be taken.
              * 
      * - * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1; + * + * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder addRule( int index, com.google.storage.v2.Bucket.Lifecycle.Rule.Builder builderForValue) { @@ -11219,11 +11518,13 @@ public Builder addRule( * * *
      -       * A lifecycle management rule, which is made of an action to take and the
      -       * condition(s) under which the action will be taken.
      +       * Optional. A lifecycle management rule, which is made of an action to take
      +       * and the condition(s) under which the action will be taken.
              * 
      * - * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1; + * + * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder addAllRule( java.lang.Iterable values) { @@ -11241,11 +11542,13 @@ public Builder addAllRule( * * *
      -       * A lifecycle management rule, which is made of an action to take and the
      -       * condition(s) under which the action will be taken.
      +       * Optional. A lifecycle management rule, which is made of an action to take
      +       * and the condition(s) under which the action will be taken.
              * 
      * - * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1; + * + * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearRule() { if (ruleBuilder_ == null) { @@ -11262,11 +11565,13 @@ public Builder clearRule() { * * *
      -       * A lifecycle management rule, which is made of an action to take and the
      -       * condition(s) under which the action will be taken.
      +       * Optional. A lifecycle management rule, which is made of an action to take
      +       * and the condition(s) under which the action will be taken.
              * 
      * - * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1; + * + * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder removeRule(int index) { if (ruleBuilder_ == null) { @@ -11283,11 +11588,13 @@ public Builder removeRule(int index) { * * *
      -       * A lifecycle management rule, which is made of an action to take and the
      -       * condition(s) under which the action will be taken.
      +       * Optional. A lifecycle management rule, which is made of an action to take
      +       * and the condition(s) under which the action will be taken.
              * 
      * - * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1; + * + * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.Lifecycle.Rule.Builder getRuleBuilder(int index) { return getRuleFieldBuilder().getBuilder(index); @@ -11297,11 +11604,13 @@ public com.google.storage.v2.Bucket.Lifecycle.Rule.Builder getRuleBuilder(int in * * *
      -       * A lifecycle management rule, which is made of an action to take and the
      -       * condition(s) under which the action will be taken.
      +       * Optional. A lifecycle management rule, which is made of an action to take
      +       * and the condition(s) under which the action will be taken.
              * 
      * - * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1; + * + * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.Lifecycle.RuleOrBuilder getRuleOrBuilder(int index) { if (ruleBuilder_ == null) { @@ -11315,11 +11624,13 @@ public com.google.storage.v2.Bucket.Lifecycle.RuleOrBuilder getRuleOrBuilder(int * * *
      -       * A lifecycle management rule, which is made of an action to take and the
      -       * condition(s) under which the action will be taken.
      +       * Optional. A lifecycle management rule, which is made of an action to take
      +       * and the condition(s) under which the action will be taken.
              * 
      * - * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1; + * + * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public java.util.List getRuleOrBuilderList() { @@ -11334,11 +11645,13 @@ public com.google.storage.v2.Bucket.Lifecycle.RuleOrBuilder getRuleOrBuilder(int * * *
      -       * A lifecycle management rule, which is made of an action to take and the
      -       * condition(s) under which the action will be taken.
      +       * Optional. A lifecycle management rule, which is made of an action to take
      +       * and the condition(s) under which the action will be taken.
              * 
      * - * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1; + * + * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.Lifecycle.Rule.Builder addRuleBuilder() { return getRuleFieldBuilder() @@ -11349,11 +11662,13 @@ public com.google.storage.v2.Bucket.Lifecycle.Rule.Builder addRuleBuilder() { * * *
      -       * A lifecycle management rule, which is made of an action to take and the
      -       * condition(s) under which the action will be taken.
      +       * Optional. A lifecycle management rule, which is made of an action to take
      +       * and the condition(s) under which the action will be taken.
              * 
      * - * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1; + * + * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.Lifecycle.Rule.Builder addRuleBuilder(int index) { return getRuleFieldBuilder() @@ -11364,11 +11679,13 @@ public com.google.storage.v2.Bucket.Lifecycle.Rule.Builder addRuleBuilder(int in * * *
      -       * A lifecycle management rule, which is made of an action to take and the
      -       * condition(s) under which the action will be taken.
      +       * Optional. A lifecycle management rule, which is made of an action to take
      +       * and the condition(s) under which the action will be taken.
              * 
      * - * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1; + * + * repeated .google.storage.v2.Bucket.Lifecycle.Rule rule = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public java.util.List getRuleBuilderList() { @@ -11465,11 +11782,11 @@ public interface LoggingOrBuilder * * *
      -     * The destination bucket where the current bucket's logs should be placed,
      -     * using path format (like `projects/123456/buckets/foo`).
      +     * Optional. The destination bucket where the current bucket's logs should
      +     * be placed, using path format (like `projects/123456/buckets/foo`).
            * 
      * - * string log_bucket = 1; + * string log_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The logBucket. */ @@ -11479,11 +11796,11 @@ public interface LoggingOrBuilder * * *
      -     * The destination bucket where the current bucket's logs should be placed,
      -     * using path format (like `projects/123456/buckets/foo`).
      +     * Optional. The destination bucket where the current bucket's logs should
      +     * be placed, using path format (like `projects/123456/buckets/foo`).
            * 
      * - * string log_bucket = 1; + * string log_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for logBucket. */ @@ -11493,10 +11810,10 @@ public interface LoggingOrBuilder * * *
      -     * A prefix for log object names.
      +     * Optional. A prefix for log object names.
            * 
      * - * string log_object_prefix = 2; + * string log_object_prefix = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The logObjectPrefix. */ @@ -11506,10 +11823,10 @@ public interface LoggingOrBuilder * * *
      -     * A prefix for log object names.
      +     * Optional. A prefix for log object names.
            * 
      * - * string log_object_prefix = 2; + * string log_object_prefix = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for logObjectPrefix. */ @@ -11571,11 +11888,11 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
      -     * The destination bucket where the current bucket's logs should be placed,
      -     * using path format (like `projects/123456/buckets/foo`).
      +     * Optional. The destination bucket where the current bucket's logs should
      +     * be placed, using path format (like `projects/123456/buckets/foo`).
            * 
      * - * string log_bucket = 1; + * string log_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The logBucket. */ @@ -11596,11 +11913,11 @@ public java.lang.String getLogBucket() { * * *
      -     * The destination bucket where the current bucket's logs should be placed,
      -     * using path format (like `projects/123456/buckets/foo`).
      +     * Optional. The destination bucket where the current bucket's logs should
      +     * be placed, using path format (like `projects/123456/buckets/foo`).
            * 
      * - * string log_bucket = 1; + * string log_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for logBucket. */ @@ -11626,10 +11943,10 @@ public com.google.protobuf.ByteString getLogBucketBytes() { * * *
      -     * A prefix for log object names.
      +     * Optional. A prefix for log object names.
            * 
      * - * string log_object_prefix = 2; + * string log_object_prefix = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The logObjectPrefix. */ @@ -11650,10 +11967,10 @@ public java.lang.String getLogObjectPrefix() { * * *
      -     * A prefix for log object names.
      +     * Optional. A prefix for log object names.
            * 
      * - * string log_object_prefix = 2; + * string log_object_prefix = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for logObjectPrefix. */ @@ -12045,11 +12362,11 @@ public Builder mergeFrom( * * *
      -       * The destination bucket where the current bucket's logs should be placed,
      -       * using path format (like `projects/123456/buckets/foo`).
      +       * Optional. The destination bucket where the current bucket's logs should
      +       * be placed, using path format (like `projects/123456/buckets/foo`).
              * 
      * - * string log_bucket = 1; + * string log_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The logBucket. */ @@ -12069,11 +12386,11 @@ public java.lang.String getLogBucket() { * * *
      -       * The destination bucket where the current bucket's logs should be placed,
      -       * using path format (like `projects/123456/buckets/foo`).
      +       * Optional. The destination bucket where the current bucket's logs should
      +       * be placed, using path format (like `projects/123456/buckets/foo`).
              * 
      * - * string log_bucket = 1; + * string log_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for logBucket. */ @@ -12093,11 +12410,11 @@ public com.google.protobuf.ByteString getLogBucketBytes() { * * *
      -       * The destination bucket where the current bucket's logs should be placed,
      -       * using path format (like `projects/123456/buckets/foo`).
      +       * Optional. The destination bucket where the current bucket's logs should
      +       * be placed, using path format (like `projects/123456/buckets/foo`).
              * 
      * - * string log_bucket = 1; + * string log_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The logBucket to set. * @return This builder for chaining. @@ -12116,11 +12433,11 @@ public Builder setLogBucket(java.lang.String value) { * * *
      -       * The destination bucket where the current bucket's logs should be placed,
      -       * using path format (like `projects/123456/buckets/foo`).
      +       * Optional. The destination bucket where the current bucket's logs should
      +       * be placed, using path format (like `projects/123456/buckets/foo`).
              * 
      * - * string log_bucket = 1; + * string log_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -12135,11 +12452,11 @@ public Builder clearLogBucket() { * * *
      -       * The destination bucket where the current bucket's logs should be placed,
      -       * using path format (like `projects/123456/buckets/foo`).
      +       * Optional. The destination bucket where the current bucket's logs should
      +       * be placed, using path format (like `projects/123456/buckets/foo`).
              * 
      * - * string log_bucket = 1; + * string log_bucket = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for logBucket to set. * @return This builder for chaining. @@ -12161,10 +12478,10 @@ public Builder setLogBucketBytes(com.google.protobuf.ByteString value) { * * *
      -       * A prefix for log object names.
      +       * Optional. A prefix for log object names.
              * 
      * - * string log_object_prefix = 2; + * string log_object_prefix = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The logObjectPrefix. */ @@ -12184,10 +12501,10 @@ public java.lang.String getLogObjectPrefix() { * * *
      -       * A prefix for log object names.
      +       * Optional. A prefix for log object names.
              * 
      * - * string log_object_prefix = 2; + * string log_object_prefix = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for logObjectPrefix. */ @@ -12207,10 +12524,10 @@ public com.google.protobuf.ByteString getLogObjectPrefixBytes() { * * *
      -       * A prefix for log object names.
      +       * Optional. A prefix for log object names.
              * 
      * - * string log_object_prefix = 2; + * string log_object_prefix = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The logObjectPrefix to set. * @return This builder for chaining. @@ -12229,10 +12546,10 @@ public Builder setLogObjectPrefix(java.lang.String value) { * * *
      -       * A prefix for log object names.
      +       * Optional. A prefix for log object names.
              * 
      * - * string log_object_prefix = 2; + * string log_object_prefix = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -12247,10 +12564,10 @@ public Builder clearLogObjectPrefix() { * * *
      -       * A prefix for log object names.
      +       * Optional. A prefix for log object names.
              * 
      * - * string log_object_prefix = 2; + * string log_object_prefix = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for logObjectPrefix to set. * @return This builder for chaining. @@ -12339,11 +12656,13 @@ public interface RetentionPolicyOrBuilder * * *
      -     * Server-determined value that indicates the time from which policy was
      -     * enforced and effective.
      +     * Optional. Server-determined value that indicates the time from which
      +     * policy was enforced and effective.
            * 
      * - * .google.protobuf.Timestamp effective_time = 1; + * + * .google.protobuf.Timestamp effective_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the effectiveTime field is set. */ @@ -12353,11 +12672,13 @@ public interface RetentionPolicyOrBuilder * * *
      -     * Server-determined value that indicates the time from which policy was
      -     * enforced and effective.
      +     * Optional. Server-determined value that indicates the time from which
      +     * policy was enforced and effective.
            * 
      * - * .google.protobuf.Timestamp effective_time = 1; + * + * .google.protobuf.Timestamp effective_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The effectiveTime. */ @@ -12367,11 +12688,13 @@ public interface RetentionPolicyOrBuilder * * *
      -     * Server-determined value that indicates the time from which policy was
      -     * enforced and effective.
      +     * Optional. Server-determined value that indicates the time from which
      +     * policy was enforced and effective.
            * 
      * - * .google.protobuf.Timestamp effective_time = 1; + * + * .google.protobuf.Timestamp effective_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.protobuf.TimestampOrBuilder getEffectiveTimeOrBuilder(); @@ -12379,10 +12702,10 @@ public interface RetentionPolicyOrBuilder * * *
      -     * Once locked, an object retention policy cannot be modified.
      +     * Optional. Once locked, an object retention policy cannot be modified.
            * 
      * - * bool is_locked = 2; + * bool is_locked = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The isLocked. */ @@ -12392,14 +12715,16 @@ public interface RetentionPolicyOrBuilder * * *
      -     * The duration that objects need to be retained. Retention duration must be
      -     * greater than zero and less than 100 years. Note that enforcement of
      -     * retention periods less than a day is not guaranteed. Such periods should
      -     * only be used for testing purposes. Any `nanos` value specified will be
      -     * rounded down to the nearest second.
      +     * Optional. The duration that objects need to be retained. Retention
      +     * duration must be greater than zero and less than 100 years. Note that
      +     * enforcement of retention periods less than a day is not guaranteed. Such
      +     * periods should only be used for testing purposes. Any `nanos` value
      +     * specified will be rounded down to the nearest second.
            * 
      * - * .google.protobuf.Duration retention_duration = 4; + * + * .google.protobuf.Duration retention_duration = 4 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the retentionDuration field is set. */ @@ -12409,14 +12734,16 @@ public interface RetentionPolicyOrBuilder * * *
      -     * The duration that objects need to be retained. Retention duration must be
      -     * greater than zero and less than 100 years. Note that enforcement of
      -     * retention periods less than a day is not guaranteed. Such periods should
      -     * only be used for testing purposes. Any `nanos` value specified will be
      -     * rounded down to the nearest second.
      +     * Optional. The duration that objects need to be retained. Retention
      +     * duration must be greater than zero and less than 100 years. Note that
      +     * enforcement of retention periods less than a day is not guaranteed. Such
      +     * periods should only be used for testing purposes. Any `nanos` value
      +     * specified will be rounded down to the nearest second.
            * 
      * - * .google.protobuf.Duration retention_duration = 4; + * + * .google.protobuf.Duration retention_duration = 4 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The retentionDuration. */ @@ -12426,14 +12753,16 @@ public interface RetentionPolicyOrBuilder * * *
      -     * The duration that objects need to be retained. Retention duration must be
      -     * greater than zero and less than 100 years. Note that enforcement of
      -     * retention periods less than a day is not guaranteed. Such periods should
      -     * only be used for testing purposes. Any `nanos` value specified will be
      -     * rounded down to the nearest second.
      +     * Optional. The duration that objects need to be retained. Retention
      +     * duration must be greater than zero and less than 100 years. Note that
      +     * enforcement of retention periods less than a day is not guaranteed. Such
      +     * periods should only be used for testing purposes. Any `nanos` value
      +     * specified will be rounded down to the nearest second.
            * 
      * - * .google.protobuf.Duration retention_duration = 4; + * + * .google.protobuf.Duration retention_duration = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.protobuf.DurationOrBuilder getRetentionDurationOrBuilder(); } @@ -12489,11 +12818,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
      -     * Server-determined value that indicates the time from which policy was
      -     * enforced and effective.
      +     * Optional. Server-determined value that indicates the time from which
      +     * policy was enforced and effective.
            * 
      * - * .google.protobuf.Timestamp effective_time = 1; + * + * .google.protobuf.Timestamp effective_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the effectiveTime field is set. */ @@ -12506,11 +12837,13 @@ public boolean hasEffectiveTime() { * * *
      -     * Server-determined value that indicates the time from which policy was
      -     * enforced and effective.
      +     * Optional. Server-determined value that indicates the time from which
      +     * policy was enforced and effective.
            * 
      * - * .google.protobuf.Timestamp effective_time = 1; + * + * .google.protobuf.Timestamp effective_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The effectiveTime. */ @@ -12525,11 +12858,13 @@ public com.google.protobuf.Timestamp getEffectiveTime() { * * *
      -     * Server-determined value that indicates the time from which policy was
      -     * enforced and effective.
      +     * Optional. Server-determined value that indicates the time from which
      +     * policy was enforced and effective.
            * 
      * - * .google.protobuf.Timestamp effective_time = 1; + * + * .google.protobuf.Timestamp effective_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getEffectiveTimeOrBuilder() { @@ -12545,10 +12880,10 @@ public com.google.protobuf.TimestampOrBuilder getEffectiveTimeOrBuilder() { * * *
      -     * Once locked, an object retention policy cannot be modified.
      +     * Optional. Once locked, an object retention policy cannot be modified.
            * 
      * - * bool is_locked = 2; + * bool is_locked = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The isLocked. */ @@ -12564,14 +12899,16 @@ public boolean getIsLocked() { * * *
      -     * The duration that objects need to be retained. Retention duration must be
      -     * greater than zero and less than 100 years. Note that enforcement of
      -     * retention periods less than a day is not guaranteed. Such periods should
      -     * only be used for testing purposes. Any `nanos` value specified will be
      -     * rounded down to the nearest second.
      +     * Optional. The duration that objects need to be retained. Retention
      +     * duration must be greater than zero and less than 100 years. Note that
      +     * enforcement of retention periods less than a day is not guaranteed. Such
      +     * periods should only be used for testing purposes. Any `nanos` value
      +     * specified will be rounded down to the nearest second.
            * 
      * - * .google.protobuf.Duration retention_duration = 4; + * + * .google.protobuf.Duration retention_duration = 4 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the retentionDuration field is set. */ @@ -12584,14 +12921,16 @@ public boolean hasRetentionDuration() { * * *
      -     * The duration that objects need to be retained. Retention duration must be
      -     * greater than zero and less than 100 years. Note that enforcement of
      -     * retention periods less than a day is not guaranteed. Such periods should
      -     * only be used for testing purposes. Any `nanos` value specified will be
      -     * rounded down to the nearest second.
      +     * Optional. The duration that objects need to be retained. Retention
      +     * duration must be greater than zero and less than 100 years. Note that
      +     * enforcement of retention periods less than a day is not guaranteed. Such
      +     * periods should only be used for testing purposes. Any `nanos` value
      +     * specified will be rounded down to the nearest second.
            * 
      * - * .google.protobuf.Duration retention_duration = 4; + * + * .google.protobuf.Duration retention_duration = 4 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The retentionDuration. */ @@ -12606,14 +12945,16 @@ public com.google.protobuf.Duration getRetentionDuration() { * * *
      -     * The duration that objects need to be retained. Retention duration must be
      -     * greater than zero and less than 100 years. Note that enforcement of
      -     * retention periods less than a day is not guaranteed. Such periods should
      -     * only be used for testing purposes. Any `nanos` value specified will be
      -     * rounded down to the nearest second.
      +     * Optional. The duration that objects need to be retained. Retention
      +     * duration must be greater than zero and less than 100 years. Note that
      +     * enforcement of retention periods less than a day is not guaranteed. Such
      +     * periods should only be used for testing purposes. Any `nanos` value
      +     * specified will be rounded down to the nearest second.
            * 
      * - * .google.protobuf.Duration retention_duration = 4; + * + * .google.protobuf.Duration retention_duration = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.protobuf.DurationOrBuilder getRetentionDurationOrBuilder() { @@ -13058,11 +13399,13 @@ public Builder mergeFrom( * * *
      -       * Server-determined value that indicates the time from which policy was
      -       * enforced and effective.
      +       * Optional. Server-determined value that indicates the time from which
      +       * policy was enforced and effective.
              * 
      * - * .google.protobuf.Timestamp effective_time = 1; + * + * .google.protobuf.Timestamp effective_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the effectiveTime field is set. */ @@ -13074,11 +13417,13 @@ public boolean hasEffectiveTime() { * * *
      -       * Server-determined value that indicates the time from which policy was
      -       * enforced and effective.
      +       * Optional. Server-determined value that indicates the time from which
      +       * policy was enforced and effective.
              * 
      * - * .google.protobuf.Timestamp effective_time = 1; + * + * .google.protobuf.Timestamp effective_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The effectiveTime. */ @@ -13096,11 +13441,13 @@ public com.google.protobuf.Timestamp getEffectiveTime() { * * *
      -       * Server-determined value that indicates the time from which policy was
      -       * enforced and effective.
      +       * Optional. Server-determined value that indicates the time from which
      +       * policy was enforced and effective.
              * 
      * - * .google.protobuf.Timestamp effective_time = 1; + * + * .google.protobuf.Timestamp effective_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setEffectiveTime(com.google.protobuf.Timestamp value) { if (effectiveTimeBuilder_ == null) { @@ -13120,11 +13467,13 @@ public Builder setEffectiveTime(com.google.protobuf.Timestamp value) { * * *
      -       * Server-determined value that indicates the time from which policy was
      -       * enforced and effective.
      +       * Optional. Server-determined value that indicates the time from which
      +       * policy was enforced and effective.
              * 
      * - * .google.protobuf.Timestamp effective_time = 1; + * + * .google.protobuf.Timestamp effective_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setEffectiveTime(com.google.protobuf.Timestamp.Builder builderForValue) { if (effectiveTimeBuilder_ == null) { @@ -13141,11 +13490,13 @@ public Builder setEffectiveTime(com.google.protobuf.Timestamp.Builder builderFor * * *
      -       * Server-determined value that indicates the time from which policy was
      -       * enforced and effective.
      +       * Optional. Server-determined value that indicates the time from which
      +       * policy was enforced and effective.
              * 
      * - * .google.protobuf.Timestamp effective_time = 1; + * + * .google.protobuf.Timestamp effective_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeEffectiveTime(com.google.protobuf.Timestamp value) { if (effectiveTimeBuilder_ == null) { @@ -13170,11 +13521,13 @@ public Builder mergeEffectiveTime(com.google.protobuf.Timestamp value) { * * *
      -       * Server-determined value that indicates the time from which policy was
      -       * enforced and effective.
      +       * Optional. Server-determined value that indicates the time from which
      +       * policy was enforced and effective.
              * 
      * - * .google.protobuf.Timestamp effective_time = 1; + * + * .google.protobuf.Timestamp effective_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearEffectiveTime() { bitField0_ = (bitField0_ & ~0x00000001); @@ -13191,11 +13544,13 @@ public Builder clearEffectiveTime() { * * *
      -       * Server-determined value that indicates the time from which policy was
      -       * enforced and effective.
      +       * Optional. Server-determined value that indicates the time from which
      +       * policy was enforced and effective.
              * 
      * - * .google.protobuf.Timestamp effective_time = 1; + * + * .google.protobuf.Timestamp effective_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.protobuf.Timestamp.Builder getEffectiveTimeBuilder() { bitField0_ |= 0x00000001; @@ -13207,11 +13562,13 @@ public com.google.protobuf.Timestamp.Builder getEffectiveTimeBuilder() { * * *
      -       * Server-determined value that indicates the time from which policy was
      -       * enforced and effective.
      +       * Optional. Server-determined value that indicates the time from which
      +       * policy was enforced and effective.
              * 
      * - * .google.protobuf.Timestamp effective_time = 1; + * + * .google.protobuf.Timestamp effective_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.protobuf.TimestampOrBuilder getEffectiveTimeOrBuilder() { if (effectiveTimeBuilder_ != null) { @@ -13227,11 +13584,13 @@ public com.google.protobuf.TimestampOrBuilder getEffectiveTimeOrBuilder() { * * *
      -       * Server-determined value that indicates the time from which policy was
      -       * enforced and effective.
      +       * Optional. Server-determined value that indicates the time from which
      +       * policy was enforced and effective.
              * 
      * - * .google.protobuf.Timestamp effective_time = 1; + * + * .google.protobuf.Timestamp effective_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, @@ -13256,10 +13615,10 @@ public com.google.protobuf.TimestampOrBuilder getEffectiveTimeOrBuilder() { * * *
      -       * Once locked, an object retention policy cannot be modified.
      +       * Optional. Once locked, an object retention policy cannot be modified.
              * 
      * - * bool is_locked = 2; + * bool is_locked = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The isLocked. */ @@ -13272,10 +13631,10 @@ public boolean getIsLocked() { * * *
      -       * Once locked, an object retention policy cannot be modified.
      +       * Optional. Once locked, an object retention policy cannot be modified.
              * 
      * - * bool is_locked = 2; + * bool is_locked = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The isLocked to set. * @return This builder for chaining. @@ -13292,10 +13651,10 @@ public Builder setIsLocked(boolean value) { * * *
      -       * Once locked, an object retention policy cannot be modified.
      +       * Optional. Once locked, an object retention policy cannot be modified.
              * 
      * - * bool is_locked = 2; + * bool is_locked = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -13317,14 +13676,16 @@ public Builder clearIsLocked() { * * *
      -       * The duration that objects need to be retained. Retention duration must be
      -       * greater than zero and less than 100 years. Note that enforcement of
      -       * retention periods less than a day is not guaranteed. Such periods should
      -       * only be used for testing purposes. Any `nanos` value specified will be
      -       * rounded down to the nearest second.
      +       * Optional. The duration that objects need to be retained. Retention
      +       * duration must be greater than zero and less than 100 years. Note that
      +       * enforcement of retention periods less than a day is not guaranteed. Such
      +       * periods should only be used for testing purposes. Any `nanos` value
      +       * specified will be rounded down to the nearest second.
              * 
      * - * .google.protobuf.Duration retention_duration = 4; + * + * .google.protobuf.Duration retention_duration = 4 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the retentionDuration field is set. */ @@ -13336,14 +13697,16 @@ public boolean hasRetentionDuration() { * * *
      -       * The duration that objects need to be retained. Retention duration must be
      -       * greater than zero and less than 100 years. Note that enforcement of
      -       * retention periods less than a day is not guaranteed. Such periods should
      -       * only be used for testing purposes. Any `nanos` value specified will be
      -       * rounded down to the nearest second.
      +       * Optional. The duration that objects need to be retained. Retention
      +       * duration must be greater than zero and less than 100 years. Note that
      +       * enforcement of retention periods less than a day is not guaranteed. Such
      +       * periods should only be used for testing purposes. Any `nanos` value
      +       * specified will be rounded down to the nearest second.
              * 
      * - * .google.protobuf.Duration retention_duration = 4; + * + * .google.protobuf.Duration retention_duration = 4 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The retentionDuration. */ @@ -13361,14 +13724,16 @@ public com.google.protobuf.Duration getRetentionDuration() { * * *
      -       * The duration that objects need to be retained. Retention duration must be
      -       * greater than zero and less than 100 years. Note that enforcement of
      -       * retention periods less than a day is not guaranteed. Such periods should
      -       * only be used for testing purposes. Any `nanos` value specified will be
      -       * rounded down to the nearest second.
      +       * Optional. The duration that objects need to be retained. Retention
      +       * duration must be greater than zero and less than 100 years. Note that
      +       * enforcement of retention periods less than a day is not guaranteed. Such
      +       * periods should only be used for testing purposes. Any `nanos` value
      +       * specified will be rounded down to the nearest second.
              * 
      * - * .google.protobuf.Duration retention_duration = 4; + * + * .google.protobuf.Duration retention_duration = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setRetentionDuration(com.google.protobuf.Duration value) { if (retentionDurationBuilder_ == null) { @@ -13388,14 +13753,16 @@ public Builder setRetentionDuration(com.google.protobuf.Duration value) { * * *
      -       * The duration that objects need to be retained. Retention duration must be
      -       * greater than zero and less than 100 years. Note that enforcement of
      -       * retention periods less than a day is not guaranteed. Such periods should
      -       * only be used for testing purposes. Any `nanos` value specified will be
      -       * rounded down to the nearest second.
      +       * Optional. The duration that objects need to be retained. Retention
      +       * duration must be greater than zero and less than 100 years. Note that
      +       * enforcement of retention periods less than a day is not guaranteed. Such
      +       * periods should only be used for testing purposes. Any `nanos` value
      +       * specified will be rounded down to the nearest second.
              * 
      * - * .google.protobuf.Duration retention_duration = 4; + * + * .google.protobuf.Duration retention_duration = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setRetentionDuration(com.google.protobuf.Duration.Builder builderForValue) { if (retentionDurationBuilder_ == null) { @@ -13412,14 +13779,16 @@ public Builder setRetentionDuration(com.google.protobuf.Duration.Builder builder * * *
      -       * The duration that objects need to be retained. Retention duration must be
      -       * greater than zero and less than 100 years. Note that enforcement of
      -       * retention periods less than a day is not guaranteed. Such periods should
      -       * only be used for testing purposes. Any `nanos` value specified will be
      -       * rounded down to the nearest second.
      +       * Optional. The duration that objects need to be retained. Retention
      +       * duration must be greater than zero and less than 100 years. Note that
      +       * enforcement of retention periods less than a day is not guaranteed. Such
      +       * periods should only be used for testing purposes. Any `nanos` value
      +       * specified will be rounded down to the nearest second.
              * 
      * - * .google.protobuf.Duration retention_duration = 4; + * + * .google.protobuf.Duration retention_duration = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeRetentionDuration(com.google.protobuf.Duration value) { if (retentionDurationBuilder_ == null) { @@ -13444,14 +13813,16 @@ public Builder mergeRetentionDuration(com.google.protobuf.Duration value) { * * *
      -       * The duration that objects need to be retained. Retention duration must be
      -       * greater than zero and less than 100 years. Note that enforcement of
      -       * retention periods less than a day is not guaranteed. Such periods should
      -       * only be used for testing purposes. Any `nanos` value specified will be
      -       * rounded down to the nearest second.
      +       * Optional. The duration that objects need to be retained. Retention
      +       * duration must be greater than zero and less than 100 years. Note that
      +       * enforcement of retention periods less than a day is not guaranteed. Such
      +       * periods should only be used for testing purposes. Any `nanos` value
      +       * specified will be rounded down to the nearest second.
              * 
      * - * .google.protobuf.Duration retention_duration = 4; + * + * .google.protobuf.Duration retention_duration = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearRetentionDuration() { bitField0_ = (bitField0_ & ~0x00000004); @@ -13468,14 +13839,16 @@ public Builder clearRetentionDuration() { * * *
      -       * The duration that objects need to be retained. Retention duration must be
      -       * greater than zero and less than 100 years. Note that enforcement of
      -       * retention periods less than a day is not guaranteed. Such periods should
      -       * only be used for testing purposes. Any `nanos` value specified will be
      -       * rounded down to the nearest second.
      +       * Optional. The duration that objects need to be retained. Retention
      +       * duration must be greater than zero and less than 100 years. Note that
      +       * enforcement of retention periods less than a day is not guaranteed. Such
      +       * periods should only be used for testing purposes. Any `nanos` value
      +       * specified will be rounded down to the nearest second.
              * 
      * - * .google.protobuf.Duration retention_duration = 4; + * + * .google.protobuf.Duration retention_duration = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.protobuf.Duration.Builder getRetentionDurationBuilder() { bitField0_ |= 0x00000004; @@ -13487,14 +13860,16 @@ public com.google.protobuf.Duration.Builder getRetentionDurationBuilder() { * * *
      -       * The duration that objects need to be retained. Retention duration must be
      -       * greater than zero and less than 100 years. Note that enforcement of
      -       * retention periods less than a day is not guaranteed. Such periods should
      -       * only be used for testing purposes. Any `nanos` value specified will be
      -       * rounded down to the nearest second.
      +       * Optional. The duration that objects need to be retained. Retention
      +       * duration must be greater than zero and less than 100 years. Note that
      +       * enforcement of retention periods less than a day is not guaranteed. Such
      +       * periods should only be used for testing purposes. Any `nanos` value
      +       * specified will be rounded down to the nearest second.
              * 
      * - * .google.protobuf.Duration retention_duration = 4; + * + * .google.protobuf.Duration retention_duration = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.protobuf.DurationOrBuilder getRetentionDurationOrBuilder() { if (retentionDurationBuilder_ != null) { @@ -13510,14 +13885,16 @@ public com.google.protobuf.DurationOrBuilder getRetentionDurationOrBuilder() { * * *
      -       * The duration that objects need to be retained. Retention duration must be
      -       * greater than zero and less than 100 years. Note that enforcement of
      -       * retention periods less than a day is not guaranteed. Such periods should
      -       * only be used for testing purposes. Any `nanos` value specified will be
      -       * rounded down to the nearest second.
      +       * Optional. The duration that objects need to be retained. Retention
      +       * duration must be greater than zero and less than 100 years. Note that
      +       * enforcement of retention periods less than a day is not guaranteed. Such
      +       * periods should only be used for testing purposes. Any `nanos` value
      +       * specified will be rounded down to the nearest second.
              * 
      * - * .google.protobuf.Duration retention_duration = 4; + * + * .google.protobuf.Duration retention_duration = 4 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, @@ -14725,10 +15102,10 @@ public interface VersioningOrBuilder * * *
      -     * While set to true, versioning is fully enabled for this bucket.
      +     * Optional. While set to true, versioning is fully enabled for this bucket.
            * 
      * - * bool enabled = 1; + * bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The enabled. */ @@ -14787,10 +15164,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
      -     * While set to true, versioning is fully enabled for this bucket.
      +     * Optional. While set to true, versioning is fully enabled for this bucket.
            * 
      * - * bool enabled = 1; + * bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The enabled. */ @@ -15150,10 +15527,10 @@ public Builder mergeFrom( * * *
      -       * While set to true, versioning is fully enabled for this bucket.
      +       * Optional. While set to true, versioning is fully enabled for this bucket.
              * 
      * - * bool enabled = 1; + * bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The enabled. */ @@ -15166,10 +15543,10 @@ public boolean getEnabled() { * * *
      -       * While set to true, versioning is fully enabled for this bucket.
      +       * Optional. While set to true, versioning is fully enabled for this bucket.
              * 
      * - * bool enabled = 1; + * bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The enabled to set. * @return This builder for chaining. @@ -15186,10 +15563,10 @@ public Builder setEnabled(boolean value) { * * *
      -       * While set to true, versioning is fully enabled for this bucket.
      +       * Optional. While set to true, versioning is fully enabled for this bucket.
              * 
      * - * bool enabled = 1; + * bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -15273,13 +15650,13 @@ public interface WebsiteOrBuilder * * *
      -     * If the requested object path is missing, the service will ensure the path
      -     * has a trailing '/', append this suffix, and attempt to retrieve the
      -     * resulting object. This allows the creation of `index.html`
      +     * Optional. If the requested object path is missing, the service will
      +     * ensure the path has a trailing '/', append this suffix, and attempt to
      +     * retrieve the resulting object. This allows the creation of `index.html`
            * objects to represent directory pages.
            * 
      * - * string main_page_suffix = 1; + * string main_page_suffix = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The mainPageSuffix. */ @@ -15289,13 +15666,13 @@ public interface WebsiteOrBuilder * * *
      -     * If the requested object path is missing, the service will ensure the path
      -     * has a trailing '/', append this suffix, and attempt to retrieve the
      -     * resulting object. This allows the creation of `index.html`
      +     * Optional. If the requested object path is missing, the service will
      +     * ensure the path has a trailing '/', append this suffix, and attempt to
      +     * retrieve the resulting object. This allows the creation of `index.html`
            * objects to represent directory pages.
            * 
      * - * string main_page_suffix = 1; + * string main_page_suffix = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for mainPageSuffix. */ @@ -15305,14 +15682,14 @@ public interface WebsiteOrBuilder * * *
      -     * If the requested object path is missing, and any
      +     * Optional. If the requested object path is missing, and any
            * `mainPageSuffix` object is missing, if applicable, the service
            * will return the named object from this bucket as the content for a
            * [https://tools.ietf.org/html/rfc7231#section-6.5.4][404 Not Found]
            * result.
            * 
      * - * string not_found_page = 2; + * string not_found_page = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The notFoundPage. */ @@ -15322,14 +15699,14 @@ public interface WebsiteOrBuilder * * *
      -     * If the requested object path is missing, and any
      +     * Optional. If the requested object path is missing, and any
            * `mainPageSuffix` object is missing, if applicable, the service
            * will return the named object from this bucket as the content for a
            * [https://tools.ietf.org/html/rfc7231#section-6.5.4][404 Not Found]
            * result.
            * 
      * - * string not_found_page = 2; + * string not_found_page = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for notFoundPage. */ @@ -15393,13 +15770,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
      -     * If the requested object path is missing, the service will ensure the path
      -     * has a trailing '/', append this suffix, and attempt to retrieve the
      -     * resulting object. This allows the creation of `index.html`
      +     * Optional. If the requested object path is missing, the service will
      +     * ensure the path has a trailing '/', append this suffix, and attempt to
      +     * retrieve the resulting object. This allows the creation of `index.html`
            * objects to represent directory pages.
            * 
      * - * string main_page_suffix = 1; + * string main_page_suffix = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The mainPageSuffix. */ @@ -15420,13 +15797,13 @@ public java.lang.String getMainPageSuffix() { * * *
      -     * If the requested object path is missing, the service will ensure the path
      -     * has a trailing '/', append this suffix, and attempt to retrieve the
      -     * resulting object. This allows the creation of `index.html`
      +     * Optional. If the requested object path is missing, the service will
      +     * ensure the path has a trailing '/', append this suffix, and attempt to
      +     * retrieve the resulting object. This allows the creation of `index.html`
            * objects to represent directory pages.
            * 
      * - * string main_page_suffix = 1; + * string main_page_suffix = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for mainPageSuffix. */ @@ -15452,14 +15829,14 @@ public com.google.protobuf.ByteString getMainPageSuffixBytes() { * * *
      -     * If the requested object path is missing, and any
      +     * Optional. If the requested object path is missing, and any
            * `mainPageSuffix` object is missing, if applicable, the service
            * will return the named object from this bucket as the content for a
            * [https://tools.ietf.org/html/rfc7231#section-6.5.4][404 Not Found]
            * result.
            * 
      * - * string not_found_page = 2; + * string not_found_page = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The notFoundPage. */ @@ -15480,14 +15857,14 @@ public java.lang.String getNotFoundPage() { * * *
      -     * If the requested object path is missing, and any
      +     * Optional. If the requested object path is missing, and any
            * `mainPageSuffix` object is missing, if applicable, the service
            * will return the named object from this bucket as the content for a
            * [https://tools.ietf.org/html/rfc7231#section-6.5.4][404 Not Found]
            * result.
            * 
      * - * string not_found_page = 2; + * string not_found_page = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for notFoundPage. */ @@ -15881,13 +16258,13 @@ public Builder mergeFrom( * * *
      -       * If the requested object path is missing, the service will ensure the path
      -       * has a trailing '/', append this suffix, and attempt to retrieve the
      -       * resulting object. This allows the creation of `index.html`
      +       * Optional. If the requested object path is missing, the service will
      +       * ensure the path has a trailing '/', append this suffix, and attempt to
      +       * retrieve the resulting object. This allows the creation of `index.html`
              * objects to represent directory pages.
              * 
      * - * string main_page_suffix = 1; + * string main_page_suffix = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The mainPageSuffix. */ @@ -15907,13 +16284,13 @@ public java.lang.String getMainPageSuffix() { * * *
      -       * If the requested object path is missing, the service will ensure the path
      -       * has a trailing '/', append this suffix, and attempt to retrieve the
      -       * resulting object. This allows the creation of `index.html`
      +       * Optional. If the requested object path is missing, the service will
      +       * ensure the path has a trailing '/', append this suffix, and attempt to
      +       * retrieve the resulting object. This allows the creation of `index.html`
              * objects to represent directory pages.
              * 
      * - * string main_page_suffix = 1; + * string main_page_suffix = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for mainPageSuffix. */ @@ -15933,13 +16310,13 @@ public com.google.protobuf.ByteString getMainPageSuffixBytes() { * * *
      -       * If the requested object path is missing, the service will ensure the path
      -       * has a trailing '/', append this suffix, and attempt to retrieve the
      -       * resulting object. This allows the creation of `index.html`
      +       * Optional. If the requested object path is missing, the service will
      +       * ensure the path has a trailing '/', append this suffix, and attempt to
      +       * retrieve the resulting object. This allows the creation of `index.html`
              * objects to represent directory pages.
              * 
      * - * string main_page_suffix = 1; + * string main_page_suffix = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The mainPageSuffix to set. * @return This builder for chaining. @@ -15958,13 +16335,13 @@ public Builder setMainPageSuffix(java.lang.String value) { * * *
      -       * If the requested object path is missing, the service will ensure the path
      -       * has a trailing '/', append this suffix, and attempt to retrieve the
      -       * resulting object. This allows the creation of `index.html`
      +       * Optional. If the requested object path is missing, the service will
      +       * ensure the path has a trailing '/', append this suffix, and attempt to
      +       * retrieve the resulting object. This allows the creation of `index.html`
              * objects to represent directory pages.
              * 
      * - * string main_page_suffix = 1; + * string main_page_suffix = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -15979,13 +16356,13 @@ public Builder clearMainPageSuffix() { * * *
      -       * If the requested object path is missing, the service will ensure the path
      -       * has a trailing '/', append this suffix, and attempt to retrieve the
      -       * resulting object. This allows the creation of `index.html`
      +       * Optional. If the requested object path is missing, the service will
      +       * ensure the path has a trailing '/', append this suffix, and attempt to
      +       * retrieve the resulting object. This allows the creation of `index.html`
              * objects to represent directory pages.
              * 
      * - * string main_page_suffix = 1; + * string main_page_suffix = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for mainPageSuffix to set. * @return This builder for chaining. @@ -16007,14 +16384,14 @@ public Builder setMainPageSuffixBytes(com.google.protobuf.ByteString value) { * * *
      -       * If the requested object path is missing, and any
      +       * Optional. If the requested object path is missing, and any
              * `mainPageSuffix` object is missing, if applicable, the service
              * will return the named object from this bucket as the content for a
              * [https://tools.ietf.org/html/rfc7231#section-6.5.4][404 Not Found]
              * result.
              * 
      * - * string not_found_page = 2; + * string not_found_page = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The notFoundPage. */ @@ -16034,14 +16411,14 @@ public java.lang.String getNotFoundPage() { * * *
      -       * If the requested object path is missing, and any
      +       * Optional. If the requested object path is missing, and any
              * `mainPageSuffix` object is missing, if applicable, the service
              * will return the named object from this bucket as the content for a
              * [https://tools.ietf.org/html/rfc7231#section-6.5.4][404 Not Found]
              * result.
              * 
      * - * string not_found_page = 2; + * string not_found_page = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for notFoundPage. */ @@ -16061,14 +16438,14 @@ public com.google.protobuf.ByteString getNotFoundPageBytes() { * * *
      -       * If the requested object path is missing, and any
      +       * Optional. If the requested object path is missing, and any
              * `mainPageSuffix` object is missing, if applicable, the service
              * will return the named object from this bucket as the content for a
              * [https://tools.ietf.org/html/rfc7231#section-6.5.4][404 Not Found]
              * result.
              * 
      * - * string not_found_page = 2; + * string not_found_page = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The notFoundPage to set. * @return This builder for chaining. @@ -16087,14 +16464,14 @@ public Builder setNotFoundPage(java.lang.String value) { * * *
      -       * If the requested object path is missing, and any
      +       * Optional. If the requested object path is missing, and any
              * `mainPageSuffix` object is missing, if applicable, the service
              * will return the named object from this bucket as the content for a
              * [https://tools.ietf.org/html/rfc7231#section-6.5.4][404 Not Found]
              * result.
              * 
      * - * string not_found_page = 2; + * string not_found_page = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -16109,14 +16486,14 @@ public Builder clearNotFoundPage() { * * *
      -       * If the requested object path is missing, and any
      +       * Optional. If the requested object path is missing, and any
              * `mainPageSuffix` object is missing, if applicable, the service
              * will return the named object from this bucket as the content for a
              * [https://tools.ietf.org/html/rfc7231#section-6.5.4][404 Not Found]
              * result.
              * 
      * - * string not_found_page = 2; + * string not_found_page = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for notFoundPage to set. * @return This builder for chaining. @@ -16205,10 +16582,10 @@ public interface CustomPlacementConfigOrBuilder * * *
      -     * List of locations to use for data placement.
      +     * Optional. List of locations to use for data placement.
            * 
      * - * repeated string data_locations = 1; + * repeated string data_locations = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return A list containing the dataLocations. */ @@ -16218,10 +16595,10 @@ public interface CustomPlacementConfigOrBuilder * * *
      -     * List of locations to use for data placement.
      +     * Optional. List of locations to use for data placement.
            * 
      * - * repeated string data_locations = 1; + * repeated string data_locations = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The count of dataLocations. */ @@ -16231,10 +16608,10 @@ public interface CustomPlacementConfigOrBuilder * * *
      -     * List of locations to use for data placement.
      +     * Optional. List of locations to use for data placement.
            * 
      * - * repeated string data_locations = 1; + * repeated string data_locations = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the element to return. * @return The dataLocations at the given index. @@ -16245,10 +16622,10 @@ public interface CustomPlacementConfigOrBuilder * * *
      -     * List of locations to use for data placement.
      +     * Optional. List of locations to use for data placement.
            * 
      * - * repeated string data_locations = 1; + * repeated string data_locations = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the value to return. * @return The bytes of the dataLocations at the given index. @@ -16313,10 +16690,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
      -     * List of locations to use for data placement.
      +     * Optional. List of locations to use for data placement.
            * 
      * - * repeated string data_locations = 1; + * repeated string data_locations = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return A list containing the dataLocations. */ @@ -16328,10 +16705,10 @@ public com.google.protobuf.ProtocolStringList getDataLocationsList() { * * *
      -     * List of locations to use for data placement.
      +     * Optional. List of locations to use for data placement.
            * 
      * - * repeated string data_locations = 1; + * repeated string data_locations = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The count of dataLocations. */ @@ -16343,10 +16720,10 @@ public int getDataLocationsCount() { * * *
      -     * List of locations to use for data placement.
      +     * Optional. List of locations to use for data placement.
            * 
      * - * repeated string data_locations = 1; + * repeated string data_locations = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the element to return. * @return The dataLocations at the given index. @@ -16359,10 +16736,10 @@ public java.lang.String getDataLocations(int index) { * * *
      -     * List of locations to use for data placement.
      +     * Optional. List of locations to use for data placement.
            * 
      * - * repeated string data_locations = 1; + * repeated string data_locations = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the value to return. * @return The bytes of the dataLocations at the given index. @@ -16748,10 +17125,10 @@ private void ensureDataLocationsIsMutable() { * * *
      -       * List of locations to use for data placement.
      +       * Optional. List of locations to use for data placement.
              * 
      * - * repeated string data_locations = 1; + * repeated string data_locations = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return A list containing the dataLocations. */ @@ -16764,10 +17141,10 @@ public com.google.protobuf.ProtocolStringList getDataLocationsList() { * * *
      -       * List of locations to use for data placement.
      +       * Optional. List of locations to use for data placement.
              * 
      * - * repeated string data_locations = 1; + * repeated string data_locations = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The count of dataLocations. */ @@ -16779,10 +17156,10 @@ public int getDataLocationsCount() { * * *
      -       * List of locations to use for data placement.
      +       * Optional. List of locations to use for data placement.
              * 
      * - * repeated string data_locations = 1; + * repeated string data_locations = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the element to return. * @return The dataLocations at the given index. @@ -16795,10 +17172,10 @@ public java.lang.String getDataLocations(int index) { * * *
      -       * List of locations to use for data placement.
      +       * Optional. List of locations to use for data placement.
              * 
      * - * repeated string data_locations = 1; + * repeated string data_locations = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the value to return. * @return The bytes of the dataLocations at the given index. @@ -16811,10 +17188,10 @@ public com.google.protobuf.ByteString getDataLocationsBytes(int index) { * * *
      -       * List of locations to use for data placement.
      +       * Optional. List of locations to use for data placement.
              * 
      * - * repeated string data_locations = 1; + * repeated string data_locations = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index to set the value at. * @param value The dataLocations to set. @@ -16835,10 +17212,10 @@ public Builder setDataLocations(int index, java.lang.String value) { * * *
      -       * List of locations to use for data placement.
      +       * Optional. List of locations to use for data placement.
              * 
      * - * repeated string data_locations = 1; + * repeated string data_locations = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The dataLocations to add. * @return This builder for chaining. @@ -16858,10 +17235,10 @@ public Builder addDataLocations(java.lang.String value) { * * *
      -       * List of locations to use for data placement.
      +       * Optional. List of locations to use for data placement.
              * 
      * - * repeated string data_locations = 1; + * repeated string data_locations = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param values The dataLocations to add. * @return This builder for chaining. @@ -16878,10 +17255,10 @@ public Builder addAllDataLocations(java.lang.Iterable values) * * *
      -       * List of locations to use for data placement.
      +       * Optional. List of locations to use for data placement.
              * 
      * - * repeated string data_locations = 1; + * repeated string data_locations = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -16897,10 +17274,10 @@ public Builder clearDataLocations() { * * *
      -       * List of locations to use for data placement.
      +       * Optional. List of locations to use for data placement.
              * 
      * - * repeated string data_locations = 1; + * repeated string data_locations = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes of the dataLocations to add. * @return This builder for chaining. @@ -16990,10 +17367,10 @@ public interface AutoclassOrBuilder * * *
      -     * Enables Autoclass.
      +     * Optional. Enables Autoclass.
            * 
      * - * bool enabled = 1; + * bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The enabled. */ @@ -17196,10 +17573,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
      -     * Enables Autoclass.
      +     * Optional. Enables Autoclass.
            * 
      * - * bool enabled = 1; + * bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The enabled. */ @@ -17874,10 +18251,10 @@ public Builder mergeFrom( * * *
      -       * Enables Autoclass.
      +       * Optional. Enables Autoclass.
              * 
      * - * bool enabled = 1; + * bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The enabled. */ @@ -17890,10 +18267,10 @@ public boolean getEnabled() { * * *
      -       * Enables Autoclass.
      +       * Optional. Enables Autoclass.
              * 
      * - * bool enabled = 1; + * bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The enabled to set. * @return This builder for chaining. @@ -17910,10 +18287,10 @@ public Builder setEnabled(boolean value) { * * *
      -       * Enables Autoclass.
      +       * Optional. Enables Autoclass.
              * 
      * - * bool enabled = 1; + * bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -18588,92 +18965,4051 @@ public com.google.storage.v2.Bucket.Autoclass getDefaultInstanceForType() { } } - public interface HierarchicalNamespaceOrBuilder + public interface IpFilterOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.storage.v2.Bucket.HierarchicalNamespace) + // @@protoc_insertion_point(interface_extends:google.storage.v2.Bucket.IpFilter) com.google.protobuf.MessageOrBuilder { /** * * *
      -     * Optional. Enables the hierarchical namespace feature.
      +     * The state of the IP filter configuration. Valid values are `Enabled` and
      +     * `Disabled`. When set to `Enabled`, IP filtering rules are applied to a
      +     * bucket and all incoming requests to the bucket are evaluated against
      +     * these rules. When set to `Disabled`, IP filtering rules are not applied
      +     * to a bucket.".
            * 
      * - * bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * optional string mode = 1; * - * @return The enabled. + * @return Whether the mode field is set. */ - boolean getEnabled(); - } - - /** - * - * - *
      -   * Configuration for a bucket's hierarchical namespace feature.
      -   * 
      - * - * Protobuf type {@code google.storage.v2.Bucket.HierarchicalNamespace} - */ - public static final class HierarchicalNamespace extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.storage.v2.Bucket.HierarchicalNamespace) - HierarchicalNamespaceOrBuilder { - private static final long serialVersionUID = 0L; - - // Use HierarchicalNamespace.newBuilder() to construct. - private HierarchicalNamespace(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private HierarchicalNamespace() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new HierarchicalNamespace(); - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_Bucket_HierarchicalNamespace_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.storage.v2.StorageProto - .internal_static_google_storage_v2_Bucket_HierarchicalNamespace_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.storage.v2.Bucket.HierarchicalNamespace.class, - com.google.storage.v2.Bucket.HierarchicalNamespace.Builder.class); - } - - public static final int ENABLED_FIELD_NUMBER = 1; - private boolean enabled_ = false; + boolean hasMode(); /** * * *
      -     * Optional. Enables the hierarchical namespace feature.
      +     * The state of the IP filter configuration. Valid values are `Enabled` and
      +     * `Disabled`. When set to `Enabled`, IP filtering rules are applied to a
      +     * bucket and all incoming requests to the bucket are evaluated against
      +     * these rules. When set to `Disabled`, IP filtering rules are not applied
      +     * to a bucket.".
            * 
      * - * bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * optional string mode = 1; * - * @return The enabled. + * @return The mode. */ - @java.lang.Override - public boolean getEnabled() { - return enabled_; - } - - private byte memoizedIsInitialized = -1; + java.lang.String getMode(); - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; + /** + * + * + *
      +     * The state of the IP filter configuration. Valid values are `Enabled` and
      +     * `Disabled`. When set to `Enabled`, IP filtering rules are applied to a
      +     * bucket and all incoming requests to the bucket are evaluated against
      +     * these rules. When set to `Disabled`, IP filtering rules are not applied
      +     * to a bucket.".
      +     * 
      + * + * optional string mode = 1; + * + * @return The bytes for mode. + */ + com.google.protobuf.ByteString getModeBytes(); + + /** + * + * + *
      +     * Public IPs allowed to operate or access the bucket.
      +     * 
      + * + * + * optional .google.storage.v2.Bucket.IpFilter.PublicNetworkSource public_network_source = 2; + * + * + * @return Whether the publicNetworkSource field is set. + */ + boolean hasPublicNetworkSource(); + + /** + * + * + *
      +     * Public IPs allowed to operate or access the bucket.
      +     * 
      + * + * + * optional .google.storage.v2.Bucket.IpFilter.PublicNetworkSource public_network_source = 2; + * + * + * @return The publicNetworkSource. + */ + com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource getPublicNetworkSource(); + + /** + * + * + *
      +     * Public IPs allowed to operate or access the bucket.
      +     * 
      + * + * + * optional .google.storage.v2.Bucket.IpFilter.PublicNetworkSource public_network_source = 2; + * + */ + com.google.storage.v2.Bucket.IpFilter.PublicNetworkSourceOrBuilder + getPublicNetworkSourceOrBuilder(); + + /** + * + * + *
      +     * Optional. The list of network sources that are allowed to access
      +     * operations on the bucket or the underlying objects.
      +     * 
      + * + * + * repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getVpcNetworkSourcesList(); + + /** + * + * + *
      +     * Optional. The list of network sources that are allowed to access
      +     * operations on the bucket or the underlying objects.
      +     * 
      + * + * + * repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource getVpcNetworkSources(int index); + + /** + * + * + *
      +     * Optional. The list of network sources that are allowed to access
      +     * operations on the bucket or the underlying objects.
      +     * 
      + * + * + * repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getVpcNetworkSourcesCount(); + + /** + * + * + *
      +     * Optional. The list of network sources that are allowed to access
      +     * operations on the bucket or the underlying objects.
      +     * 
      + * + * + * repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getVpcNetworkSourcesOrBuilderList(); + + /** + * + * + *
      +     * Optional. The list of network sources that are allowed to access
      +     * operations on the bucket or the underlying objects.
      +     * 
      + * + * + * repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.storage.v2.Bucket.IpFilter.VpcNetworkSourceOrBuilder getVpcNetworkSourcesOrBuilder( + int index); + + /** + * + * + *
      +     * Optional. Whether or not to allow VPCs from orgs different than the
      +     * bucket's parent org to access the bucket. When set to true, validations
      +     * on the existence of the VPCs won't be performed. If set to false, each
      +     * VPC network source will be checked to belong to the same org as the
      +     * bucket as well as validated for existence.
      +     * 
      + * + * bool allow_cross_org_vpcs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowCrossOrgVpcs. + */ + boolean getAllowCrossOrgVpcs(); + } + + /** + * + * + *
      +   * The [bucket IP
      +   * filtering](https://cloud.google.com/storage/docs/ip-filtering-overview)
      +   * configuration. Specifies the network sources that can access the bucket, as
      +   * well as its underlying objects.
      +   * 
      + * + * Protobuf type {@code google.storage.v2.Bucket.IpFilter} + */ + public static final class IpFilter extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storage.v2.Bucket.IpFilter) + IpFilterOrBuilder { + private static final long serialVersionUID = 0L; + + // Use IpFilter.newBuilder() to construct. + private IpFilter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IpFilter() { + mode_ = ""; + vpcNetworkSources_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IpFilter(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.v2.StorageProto + .internal_static_google_storage_v2_Bucket_IpFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.v2.StorageProto + .internal_static_google_storage_v2_Bucket_IpFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.v2.Bucket.IpFilter.class, + com.google.storage.v2.Bucket.IpFilter.Builder.class); + } + + public interface PublicNetworkSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storage.v2.Bucket.IpFilter.PublicNetworkSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +       * Optional. The list of IPv4 and IPv6 cidr blocks that are allowed to
      +       * operate or access the bucket and its underlying objects.
      +       * 
      + * + * repeated string allowed_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the allowedIpCidrRanges. + */ + java.util.List getAllowedIpCidrRangesList(); + + /** + * + * + *
      +       * Optional. The list of IPv4 and IPv6 cidr blocks that are allowed to
      +       * operate or access the bucket and its underlying objects.
      +       * 
      + * + * repeated string allowed_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of allowedIpCidrRanges. + */ + int getAllowedIpCidrRangesCount(); + + /** + * + * + *
      +       * Optional. The list of IPv4 and IPv6 cidr blocks that are allowed to
      +       * operate or access the bucket and its underlying objects.
      +       * 
      + * + * repeated string allowed_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The allowedIpCidrRanges at the given index. + */ + java.lang.String getAllowedIpCidrRanges(int index); + + /** + * + * + *
      +       * Optional. The list of IPv4 and IPv6 cidr blocks that are allowed to
      +       * operate or access the bucket and its underlying objects.
      +       * 
      + * + * repeated string allowed_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the allowedIpCidrRanges at the given index. + */ + com.google.protobuf.ByteString getAllowedIpCidrRangesBytes(int index); + } + + /** + * + * + *
      +     * The public network IP address ranges that can access the bucket and its
      +     * data.
      +     * 
      + * + * Protobuf type {@code google.storage.v2.Bucket.IpFilter.PublicNetworkSource} + */ + public static final class PublicNetworkSource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storage.v2.Bucket.IpFilter.PublicNetworkSource) + PublicNetworkSourceOrBuilder { + private static final long serialVersionUID = 0L; + + // Use PublicNetworkSource.newBuilder() to construct. + private PublicNetworkSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PublicNetworkSource() { + allowedIpCidrRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PublicNetworkSource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.v2.StorageProto + .internal_static_google_storage_v2_Bucket_IpFilter_PublicNetworkSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.v2.StorageProto + .internal_static_google_storage_v2_Bucket_IpFilter_PublicNetworkSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource.class, + com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource.Builder.class); + } + + public static final int ALLOWED_IP_CIDR_RANGES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList allowedIpCidrRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
      +       * Optional. The list of IPv4 and IPv6 cidr blocks that are allowed to
      +       * operate or access the bucket and its underlying objects.
      +       * 
      + * + * repeated string allowed_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the allowedIpCidrRanges. + */ + public com.google.protobuf.ProtocolStringList getAllowedIpCidrRangesList() { + return allowedIpCidrRanges_; + } + + /** + * + * + *
      +       * Optional. The list of IPv4 and IPv6 cidr blocks that are allowed to
      +       * operate or access the bucket and its underlying objects.
      +       * 
      + * + * repeated string allowed_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of allowedIpCidrRanges. + */ + public int getAllowedIpCidrRangesCount() { + return allowedIpCidrRanges_.size(); + } + + /** + * + * + *
      +       * Optional. The list of IPv4 and IPv6 cidr blocks that are allowed to
      +       * operate or access the bucket and its underlying objects.
      +       * 
      + * + * repeated string allowed_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The allowedIpCidrRanges at the given index. + */ + public java.lang.String getAllowedIpCidrRanges(int index) { + return allowedIpCidrRanges_.get(index); + } + + /** + * + * + *
      +       * Optional. The list of IPv4 and IPv6 cidr blocks that are allowed to
      +       * operate or access the bucket and its underlying objects.
      +       * 
      + * + * repeated string allowed_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the allowedIpCidrRanges at the given index. + */ + public com.google.protobuf.ByteString getAllowedIpCidrRangesBytes(int index) { + return allowedIpCidrRanges_.getByteString(index); + } + + 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 < allowedIpCidrRanges_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 1, allowedIpCidrRanges_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < allowedIpCidrRanges_.size(); i++) { + dataSize += computeStringSizeNoTag(allowedIpCidrRanges_.getRaw(i)); + } + size += dataSize; + size += 1 * getAllowedIpCidrRangesList().size(); + } + 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.Bucket.IpFilter.PublicNetworkSource)) { + return super.equals(obj); + } + com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource other = + (com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource) obj; + + if (!getAllowedIpCidrRangesList().equals(other.getAllowedIpCidrRangesList())) 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 (getAllowedIpCidrRangesCount() > 0) { + hash = (37 * hash) + ALLOWED_IP_CIDR_RANGES_FIELD_NUMBER; + hash = (53 * hash) + getAllowedIpCidrRangesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource 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.Bucket.IpFilter.PublicNetworkSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource 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.Bucket.IpFilter.PublicNetworkSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource 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.Bucket.IpFilter.PublicNetworkSource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource 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.Bucket.IpFilter.PublicNetworkSource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource 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.Bucket.IpFilter.PublicNetworkSource 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 public network IP address ranges that can access the bucket and its
      +       * data.
      +       * 
      + * + * Protobuf type {@code google.storage.v2.Bucket.IpFilter.PublicNetworkSource} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storage.v2.Bucket.IpFilter.PublicNetworkSource) + com.google.storage.v2.Bucket.IpFilter.PublicNetworkSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.v2.StorageProto + .internal_static_google_storage_v2_Bucket_IpFilter_PublicNetworkSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.v2.StorageProto + .internal_static_google_storage_v2_Bucket_IpFilter_PublicNetworkSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource.class, + com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource.Builder.class); + } + + // Construct using com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + allowedIpCidrRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storage.v2.StorageProto + .internal_static_google_storage_v2_Bucket_IpFilter_PublicNetworkSource_descriptor; + } + + @java.lang.Override + public com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource + getDefaultInstanceForType() { + return com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource build() { + com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource buildPartial() { + com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource result = + new com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + allowedIpCidrRanges_.makeImmutable(); + result.allowedIpCidrRanges_ = allowedIpCidrRanges_; + } + } + + @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.Bucket.IpFilter.PublicNetworkSource) { + return mergeFrom((com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource other) { + if (other + == com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource.getDefaultInstance()) + return this; + if (!other.allowedIpCidrRanges_.isEmpty()) { + if (allowedIpCidrRanges_.isEmpty()) { + allowedIpCidrRanges_ = other.allowedIpCidrRanges_; + bitField0_ |= 0x00000001; + } else { + ensureAllowedIpCidrRangesIsMutable(); + allowedIpCidrRanges_.addAll(other.allowedIpCidrRanges_); + } + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAllowedIpCidrRangesIsMutable(); + allowedIpCidrRanges_.add(s); + 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 com.google.protobuf.LazyStringArrayList allowedIpCidrRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureAllowedIpCidrRangesIsMutable() { + if (!allowedIpCidrRanges_.isModifiable()) { + allowedIpCidrRanges_ = + new com.google.protobuf.LazyStringArrayList(allowedIpCidrRanges_); + } + bitField0_ |= 0x00000001; + } + + /** + * + * + *
      +         * Optional. The list of IPv4 and IPv6 cidr blocks that are allowed to
      +         * operate or access the bucket and its underlying objects.
      +         * 
      + * + * + * repeated string allowed_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the allowedIpCidrRanges. + */ + public com.google.protobuf.ProtocolStringList getAllowedIpCidrRangesList() { + allowedIpCidrRanges_.makeImmutable(); + return allowedIpCidrRanges_; + } + + /** + * + * + *
      +         * Optional. The list of IPv4 and IPv6 cidr blocks that are allowed to
      +         * operate or access the bucket and its underlying objects.
      +         * 
      + * + * + * repeated string allowed_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of allowedIpCidrRanges. + */ + public int getAllowedIpCidrRangesCount() { + return allowedIpCidrRanges_.size(); + } + + /** + * + * + *
      +         * Optional. The list of IPv4 and IPv6 cidr blocks that are allowed to
      +         * operate or access the bucket and its underlying objects.
      +         * 
      + * + * + * repeated string allowed_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The allowedIpCidrRanges at the given index. + */ + public java.lang.String getAllowedIpCidrRanges(int index) { + return allowedIpCidrRanges_.get(index); + } + + /** + * + * + *
      +         * Optional. The list of IPv4 and IPv6 cidr blocks that are allowed to
      +         * operate or access the bucket and its underlying objects.
      +         * 
      + * + * + * repeated string allowed_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the allowedIpCidrRanges at the given index. + */ + public com.google.protobuf.ByteString getAllowedIpCidrRangesBytes(int index) { + return allowedIpCidrRanges_.getByteString(index); + } + + /** + * + * + *
      +         * Optional. The list of IPv4 and IPv6 cidr blocks that are allowed to
      +         * operate or access the bucket and its underlying objects.
      +         * 
      + * + * + * repeated string allowed_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The allowedIpCidrRanges to set. + * @return This builder for chaining. + */ + public Builder setAllowedIpCidrRanges(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedIpCidrRangesIsMutable(); + allowedIpCidrRanges_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +         * Optional. The list of IPv4 and IPv6 cidr blocks that are allowed to
      +         * operate or access the bucket and its underlying objects.
      +         * 
      + * + * + * repeated string allowed_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The allowedIpCidrRanges to add. + * @return This builder for chaining. + */ + public Builder addAllowedIpCidrRanges(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedIpCidrRangesIsMutable(); + allowedIpCidrRanges_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +         * Optional. The list of IPv4 and IPv6 cidr blocks that are allowed to
      +         * operate or access the bucket and its underlying objects.
      +         * 
      + * + * + * repeated string allowed_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The allowedIpCidrRanges to add. + * @return This builder for chaining. + */ + public Builder addAllAllowedIpCidrRanges(java.lang.Iterable values) { + ensureAllowedIpCidrRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedIpCidrRanges_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +         * Optional. The list of IPv4 and IPv6 cidr blocks that are allowed to
      +         * operate or access the bucket and its underlying objects.
      +         * 
      + * + * + * repeated string allowed_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAllowedIpCidrRanges() { + allowedIpCidrRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + + /** + * + * + *
      +         * Optional. The list of IPv4 and IPv6 cidr blocks that are allowed to
      +         * operate or access the bucket and its underlying objects.
      +         * 
      + * + * + * repeated string allowed_ip_cidr_ranges = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the allowedIpCidrRanges to add. + * @return This builder for chaining. + */ + public Builder addAllowedIpCidrRangesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAllowedIpCidrRangesIsMutable(); + allowedIpCidrRanges_.add(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.Bucket.IpFilter.PublicNetworkSource) + } + + // @@protoc_insertion_point(class_scope:google.storage.v2.Bucket.IpFilter.PublicNetworkSource) + private static final com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource(); + } + + public static com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PublicNetworkSource 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.Bucket.IpFilter.PublicNetworkSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface VpcNetworkSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storage.v2.Bucket.IpFilter.VpcNetworkSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +       * Name of the network.
      +       *
      +       * Format: `projects/PROJECT_ID/global/networks/NETWORK_NAME`
      +       * 
      + * + * optional string network = 1; + * + * @return Whether the network field is set. + */ + boolean hasNetwork(); + + /** + * + * + *
      +       * Name of the network.
      +       *
      +       * Format: `projects/PROJECT_ID/global/networks/NETWORK_NAME`
      +       * 
      + * + * optional string network = 1; + * + * @return The network. + */ + java.lang.String getNetwork(); + + /** + * + * + *
      +       * Name of the network.
      +       *
      +       * Format: `projects/PROJECT_ID/global/networks/NETWORK_NAME`
      +       * 
      + * + * optional string network = 1; + * + * @return The bytes for network. + */ + com.google.protobuf.ByteString getNetworkBytes(); + + /** + * + * + *
      +       * Optional. The list of public or private IPv4 and IPv6 CIDR ranges that
      +       * can access the bucket. In the CIDR IP address block, the specified IP
      +       * address must be properly truncated, meaning all the host bits must be
      +       * zero or else the input is considered malformed. For example,
      +       * `192.0.2.0/24` is accepted but `192.0.2.1/24` is not. Similarly, for
      +       * IPv6, `2001:db8::/32` is accepted whereas `2001:db8::1/32` is not.
      +       * 
      + * + * repeated string allowed_ip_cidr_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the allowedIpCidrRanges. + */ + java.util.List getAllowedIpCidrRangesList(); + + /** + * + * + *
      +       * Optional. The list of public or private IPv4 and IPv6 CIDR ranges that
      +       * can access the bucket. In the CIDR IP address block, the specified IP
      +       * address must be properly truncated, meaning all the host bits must be
      +       * zero or else the input is considered malformed. For example,
      +       * `192.0.2.0/24` is accepted but `192.0.2.1/24` is not. Similarly, for
      +       * IPv6, `2001:db8::/32` is accepted whereas `2001:db8::1/32` is not.
      +       * 
      + * + * repeated string allowed_ip_cidr_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of allowedIpCidrRanges. + */ + int getAllowedIpCidrRangesCount(); + + /** + * + * + *
      +       * Optional. The list of public or private IPv4 and IPv6 CIDR ranges that
      +       * can access the bucket. In the CIDR IP address block, the specified IP
      +       * address must be properly truncated, meaning all the host bits must be
      +       * zero or else the input is considered malformed. For example,
      +       * `192.0.2.0/24` is accepted but `192.0.2.1/24` is not. Similarly, for
      +       * IPv6, `2001:db8::/32` is accepted whereas `2001:db8::1/32` is not.
      +       * 
      + * + * repeated string allowed_ip_cidr_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The allowedIpCidrRanges at the given index. + */ + java.lang.String getAllowedIpCidrRanges(int index); + + /** + * + * + *
      +       * Optional. The list of public or private IPv4 and IPv6 CIDR ranges that
      +       * can access the bucket. In the CIDR IP address block, the specified IP
      +       * address must be properly truncated, meaning all the host bits must be
      +       * zero or else the input is considered malformed. For example,
      +       * `192.0.2.0/24` is accepted but `192.0.2.1/24` is not. Similarly, for
      +       * IPv6, `2001:db8::/32` is accepted whereas `2001:db8::1/32` is not.
      +       * 
      + * + * repeated string allowed_ip_cidr_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the allowedIpCidrRanges at the given index. + */ + com.google.protobuf.ByteString getAllowedIpCidrRangesBytes(int index); + } + + /** + * + * + *
      +     * The list of VPC networks that can access the bucket.
      +     * 
      + * + * Protobuf type {@code google.storage.v2.Bucket.IpFilter.VpcNetworkSource} + */ + public static final class VpcNetworkSource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storage.v2.Bucket.IpFilter.VpcNetworkSource) + VpcNetworkSourceOrBuilder { + private static final long serialVersionUID = 0L; + + // Use VpcNetworkSource.newBuilder() to construct. + private VpcNetworkSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private VpcNetworkSource() { + network_ = ""; + allowedIpCidrRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new VpcNetworkSource(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.v2.StorageProto + .internal_static_google_storage_v2_Bucket_IpFilter_VpcNetworkSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.v2.StorageProto + .internal_static_google_storage_v2_Bucket_IpFilter_VpcNetworkSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource.class, + com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource.Builder.class); + } + + private int bitField0_; + public static final int NETWORK_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object network_ = ""; + + /** + * + * + *
      +       * Name of the network.
      +       *
      +       * Format: `projects/PROJECT_ID/global/networks/NETWORK_NAME`
      +       * 
      + * + * optional string network = 1; + * + * @return Whether the network field is set. + */ + @java.lang.Override + public boolean hasNetwork() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
      +       * Name of the network.
      +       *
      +       * Format: `projects/PROJECT_ID/global/networks/NETWORK_NAME`
      +       * 
      + * + * optional string network = 1; + * + * @return The network. + */ + @java.lang.Override + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + 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(); + network_ = s; + return s; + } + } + + /** + * + * + *
      +       * Name of the network.
      +       *
      +       * Format: `projects/PROJECT_ID/global/networks/NETWORK_NAME`
      +       * 
      + * + * optional string network = 1; + * + * @return The bytes for network. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ALLOWED_IP_CIDR_RANGES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList allowedIpCidrRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + /** + * + * + *
      +       * Optional. The list of public or private IPv4 and IPv6 CIDR ranges that
      +       * can access the bucket. In the CIDR IP address block, the specified IP
      +       * address must be properly truncated, meaning all the host bits must be
      +       * zero or else the input is considered malformed. For example,
      +       * `192.0.2.0/24` is accepted but `192.0.2.1/24` is not. Similarly, for
      +       * IPv6, `2001:db8::/32` is accepted whereas `2001:db8::1/32` is not.
      +       * 
      + * + * repeated string allowed_ip_cidr_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the allowedIpCidrRanges. + */ + public com.google.protobuf.ProtocolStringList getAllowedIpCidrRangesList() { + return allowedIpCidrRanges_; + } + + /** + * + * + *
      +       * Optional. The list of public or private IPv4 and IPv6 CIDR ranges that
      +       * can access the bucket. In the CIDR IP address block, the specified IP
      +       * address must be properly truncated, meaning all the host bits must be
      +       * zero or else the input is considered malformed. For example,
      +       * `192.0.2.0/24` is accepted but `192.0.2.1/24` is not. Similarly, for
      +       * IPv6, `2001:db8::/32` is accepted whereas `2001:db8::1/32` is not.
      +       * 
      + * + * repeated string allowed_ip_cidr_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of allowedIpCidrRanges. + */ + public int getAllowedIpCidrRangesCount() { + return allowedIpCidrRanges_.size(); + } + + /** + * + * + *
      +       * Optional. The list of public or private IPv4 and IPv6 CIDR ranges that
      +       * can access the bucket. In the CIDR IP address block, the specified IP
      +       * address must be properly truncated, meaning all the host bits must be
      +       * zero or else the input is considered malformed. For example,
      +       * `192.0.2.0/24` is accepted but `192.0.2.1/24` is not. Similarly, for
      +       * IPv6, `2001:db8::/32` is accepted whereas `2001:db8::1/32` is not.
      +       * 
      + * + * repeated string allowed_ip_cidr_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The allowedIpCidrRanges at the given index. + */ + public java.lang.String getAllowedIpCidrRanges(int index) { + return allowedIpCidrRanges_.get(index); + } + + /** + * + * + *
      +       * Optional. The list of public or private IPv4 and IPv6 CIDR ranges that
      +       * can access the bucket. In the CIDR IP address block, the specified IP
      +       * address must be properly truncated, meaning all the host bits must be
      +       * zero or else the input is considered malformed. For example,
      +       * `192.0.2.0/24` is accepted but `192.0.2.1/24` is not. Similarly, for
      +       * IPv6, `2001:db8::/32` is accepted whereas `2001:db8::1/32` is not.
      +       * 
      + * + * repeated string allowed_ip_cidr_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the allowedIpCidrRanges at the given index. + */ + public com.google.protobuf.ByteString getAllowedIpCidrRangesBytes(int index) { + return allowedIpCidrRanges_.getByteString(index); + } + + 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)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, network_); + } + for (int i = 0; i < allowedIpCidrRanges_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 2, allowedIpCidrRanges_.getRaw(i)); + } + 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.GeneratedMessageV3.computeStringSize(1, network_); + } + { + int dataSize = 0; + for (int i = 0; i < allowedIpCidrRanges_.size(); i++) { + dataSize += computeStringSizeNoTag(allowedIpCidrRanges_.getRaw(i)); + } + size += dataSize; + size += 1 * getAllowedIpCidrRangesList().size(); + } + 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.Bucket.IpFilter.VpcNetworkSource)) { + return super.equals(obj); + } + com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource other = + (com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource) obj; + + if (hasNetwork() != other.hasNetwork()) return false; + if (hasNetwork()) { + if (!getNetwork().equals(other.getNetwork())) return false; + } + if (!getAllowedIpCidrRangesList().equals(other.getAllowedIpCidrRangesList())) 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 (hasNetwork()) { + hash = (37 * hash) + NETWORK_FIELD_NUMBER; + hash = (53 * hash) + getNetwork().hashCode(); + } + if (getAllowedIpCidrRangesCount() > 0) { + hash = (37 * hash) + ALLOWED_IP_CIDR_RANGES_FIELD_NUMBER; + hash = (53 * hash) + getAllowedIpCidrRangesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource 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.Bucket.IpFilter.VpcNetworkSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource 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.Bucket.IpFilter.VpcNetworkSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource 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.Bucket.IpFilter.VpcNetworkSource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource 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.Bucket.IpFilter.VpcNetworkSource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource 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.Bucket.IpFilter.VpcNetworkSource 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 list of VPC networks that can access the bucket.
      +       * 
      + * + * Protobuf type {@code google.storage.v2.Bucket.IpFilter.VpcNetworkSource} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storage.v2.Bucket.IpFilter.VpcNetworkSource) + com.google.storage.v2.Bucket.IpFilter.VpcNetworkSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.v2.StorageProto + .internal_static_google_storage_v2_Bucket_IpFilter_VpcNetworkSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.v2.StorageProto + .internal_static_google_storage_v2_Bucket_IpFilter_VpcNetworkSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource.class, + com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource.Builder.class); + } + + // Construct using com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + network_ = ""; + allowedIpCidrRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storage.v2.StorageProto + .internal_static_google_storage_v2_Bucket_IpFilter_VpcNetworkSource_descriptor; + } + + @java.lang.Override + public com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource getDefaultInstanceForType() { + return com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource build() { + com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource buildPartial() { + com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource result = + new com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.network_ = network_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + allowedIpCidrRanges_.makeImmutable(); + result.allowedIpCidrRanges_ = allowedIpCidrRanges_; + } + 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.Bucket.IpFilter.VpcNetworkSource) { + return mergeFrom((com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource other) { + if (other == com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource.getDefaultInstance()) + return this; + if (other.hasNetwork()) { + network_ = other.network_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.allowedIpCidrRanges_.isEmpty()) { + if (allowedIpCidrRanges_.isEmpty()) { + allowedIpCidrRanges_ = other.allowedIpCidrRanges_; + bitField0_ |= 0x00000002; + } else { + ensureAllowedIpCidrRangesIsMutable(); + allowedIpCidrRanges_.addAll(other.allowedIpCidrRanges_); + } + 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: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAllowedIpCidrRangesIsMutable(); + allowedIpCidrRanges_.add(s); + 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 network_ = ""; + + /** + * + * + *
      +         * Name of the network.
      +         *
      +         * Format: `projects/PROJECT_ID/global/networks/NETWORK_NAME`
      +         * 
      + * + * optional string network = 1; + * + * @return Whether the network field is set. + */ + public boolean hasNetwork() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
      +         * Name of the network.
      +         *
      +         * Format: `projects/PROJECT_ID/global/networks/NETWORK_NAME`
      +         * 
      + * + * optional string network = 1; + * + * @return The network. + */ + public java.lang.String getNetwork() { + java.lang.Object ref = network_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + network_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +         * Name of the network.
      +         *
      +         * Format: `projects/PROJECT_ID/global/networks/NETWORK_NAME`
      +         * 
      + * + * optional string network = 1; + * + * @return The bytes for network. + */ + public com.google.protobuf.ByteString getNetworkBytes() { + java.lang.Object ref = network_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + network_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +         * Name of the network.
      +         *
      +         * Format: `projects/PROJECT_ID/global/networks/NETWORK_NAME`
      +         * 
      + * + * optional string network = 1; + * + * @param value The network to set. + * @return This builder for chaining. + */ + public Builder setNetwork(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + network_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +         * Name of the network.
      +         *
      +         * Format: `projects/PROJECT_ID/global/networks/NETWORK_NAME`
      +         * 
      + * + * optional string network = 1; + * + * @return This builder for chaining. + */ + public Builder clearNetwork() { + network_ = getDefaultInstance().getNetwork(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
      +         * Name of the network.
      +         *
      +         * Format: `projects/PROJECT_ID/global/networks/NETWORK_NAME`
      +         * 
      + * + * optional string network = 1; + * + * @param value The bytes for network to set. + * @return This builder for chaining. + */ + public Builder setNetworkBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + network_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList allowedIpCidrRanges_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureAllowedIpCidrRangesIsMutable() { + if (!allowedIpCidrRanges_.isModifiable()) { + allowedIpCidrRanges_ = + new com.google.protobuf.LazyStringArrayList(allowedIpCidrRanges_); + } + bitField0_ |= 0x00000002; + } + + /** + * + * + *
      +         * Optional. The list of public or private IPv4 and IPv6 CIDR ranges that
      +         * can access the bucket. In the CIDR IP address block, the specified IP
      +         * address must be properly truncated, meaning all the host bits must be
      +         * zero or else the input is considered malformed. For example,
      +         * `192.0.2.0/24` is accepted but `192.0.2.1/24` is not. Similarly, for
      +         * IPv6, `2001:db8::/32` is accepted whereas `2001:db8::1/32` is not.
      +         * 
      + * + * + * repeated string allowed_ip_cidr_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the allowedIpCidrRanges. + */ + public com.google.protobuf.ProtocolStringList getAllowedIpCidrRangesList() { + allowedIpCidrRanges_.makeImmutable(); + return allowedIpCidrRanges_; + } + + /** + * + * + *
      +         * Optional. The list of public or private IPv4 and IPv6 CIDR ranges that
      +         * can access the bucket. In the CIDR IP address block, the specified IP
      +         * address must be properly truncated, meaning all the host bits must be
      +         * zero or else the input is considered malformed. For example,
      +         * `192.0.2.0/24` is accepted but `192.0.2.1/24` is not. Similarly, for
      +         * IPv6, `2001:db8::/32` is accepted whereas `2001:db8::1/32` is not.
      +         * 
      + * + * + * repeated string allowed_ip_cidr_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of allowedIpCidrRanges. + */ + public int getAllowedIpCidrRangesCount() { + return allowedIpCidrRanges_.size(); + } + + /** + * + * + *
      +         * Optional. The list of public or private IPv4 and IPv6 CIDR ranges that
      +         * can access the bucket. In the CIDR IP address block, the specified IP
      +         * address must be properly truncated, meaning all the host bits must be
      +         * zero or else the input is considered malformed. For example,
      +         * `192.0.2.0/24` is accepted but `192.0.2.1/24` is not. Similarly, for
      +         * IPv6, `2001:db8::/32` is accepted whereas `2001:db8::1/32` is not.
      +         * 
      + * + * + * repeated string allowed_ip_cidr_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The allowedIpCidrRanges at the given index. + */ + public java.lang.String getAllowedIpCidrRanges(int index) { + return allowedIpCidrRanges_.get(index); + } + + /** + * + * + *
      +         * Optional. The list of public or private IPv4 and IPv6 CIDR ranges that
      +         * can access the bucket. In the CIDR IP address block, the specified IP
      +         * address must be properly truncated, meaning all the host bits must be
      +         * zero or else the input is considered malformed. For example,
      +         * `192.0.2.0/24` is accepted but `192.0.2.1/24` is not. Similarly, for
      +         * IPv6, `2001:db8::/32` is accepted whereas `2001:db8::1/32` is not.
      +         * 
      + * + * + * repeated string allowed_ip_cidr_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the allowedIpCidrRanges at the given index. + */ + public com.google.protobuf.ByteString getAllowedIpCidrRangesBytes(int index) { + return allowedIpCidrRanges_.getByteString(index); + } + + /** + * + * + *
      +         * Optional. The list of public or private IPv4 and IPv6 CIDR ranges that
      +         * can access the bucket. In the CIDR IP address block, the specified IP
      +         * address must be properly truncated, meaning all the host bits must be
      +         * zero or else the input is considered malformed. For example,
      +         * `192.0.2.0/24` is accepted but `192.0.2.1/24` is not. Similarly, for
      +         * IPv6, `2001:db8::/32` is accepted whereas `2001:db8::1/32` is not.
      +         * 
      + * + * + * repeated string allowed_ip_cidr_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The allowedIpCidrRanges to set. + * @return This builder for chaining. + */ + public Builder setAllowedIpCidrRanges(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedIpCidrRangesIsMutable(); + allowedIpCidrRanges_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +         * Optional. The list of public or private IPv4 and IPv6 CIDR ranges that
      +         * can access the bucket. In the CIDR IP address block, the specified IP
      +         * address must be properly truncated, meaning all the host bits must be
      +         * zero or else the input is considered malformed. For example,
      +         * `192.0.2.0/24` is accepted but `192.0.2.1/24` is not. Similarly, for
      +         * IPv6, `2001:db8::/32` is accepted whereas `2001:db8::1/32` is not.
      +         * 
      + * + * + * repeated string allowed_ip_cidr_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The allowedIpCidrRanges to add. + * @return This builder for chaining. + */ + public Builder addAllowedIpCidrRanges(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedIpCidrRangesIsMutable(); + allowedIpCidrRanges_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +         * Optional. The list of public or private IPv4 and IPv6 CIDR ranges that
      +         * can access the bucket. In the CIDR IP address block, the specified IP
      +         * address must be properly truncated, meaning all the host bits must be
      +         * zero or else the input is considered malformed. For example,
      +         * `192.0.2.0/24` is accepted but `192.0.2.1/24` is not. Similarly, for
      +         * IPv6, `2001:db8::/32` is accepted whereas `2001:db8::1/32` is not.
      +         * 
      + * + * + * repeated string allowed_ip_cidr_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The allowedIpCidrRanges to add. + * @return This builder for chaining. + */ + public Builder addAllAllowedIpCidrRanges(java.lang.Iterable values) { + ensureAllowedIpCidrRangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedIpCidrRanges_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +         * Optional. The list of public or private IPv4 and IPv6 CIDR ranges that
      +         * can access the bucket. In the CIDR IP address block, the specified IP
      +         * address must be properly truncated, meaning all the host bits must be
      +         * zero or else the input is considered malformed. For example,
      +         * `192.0.2.0/24` is accepted but `192.0.2.1/24` is not. Similarly, for
      +         * IPv6, `2001:db8::/32` is accepted whereas `2001:db8::1/32` is not.
      +         * 
      + * + * + * repeated string allowed_ip_cidr_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAllowedIpCidrRanges() { + allowedIpCidrRanges_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + + /** + * + * + *
      +         * Optional. The list of public or private IPv4 and IPv6 CIDR ranges that
      +         * can access the bucket. In the CIDR IP address block, the specified IP
      +         * address must be properly truncated, meaning all the host bits must be
      +         * zero or else the input is considered malformed. For example,
      +         * `192.0.2.0/24` is accepted but `192.0.2.1/24` is not. Similarly, for
      +         * IPv6, `2001:db8::/32` is accepted whereas `2001:db8::1/32` is not.
      +         * 
      + * + * + * repeated string allowed_ip_cidr_ranges = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the allowedIpCidrRanges to add. + * @return This builder for chaining. + */ + public Builder addAllowedIpCidrRangesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAllowedIpCidrRangesIsMutable(); + allowedIpCidrRanges_.add(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.Bucket.IpFilter.VpcNetworkSource) + } + + // @@protoc_insertion_point(class_scope:google.storage.v2.Bucket.IpFilter.VpcNetworkSource) + private static final com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource(); + } + + public static com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VpcNetworkSource 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.Bucket.IpFilter.VpcNetworkSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int bitField0_; + public static final int MODE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object mode_ = ""; + + /** + * + * + *
      +     * The state of the IP filter configuration. Valid values are `Enabled` and
      +     * `Disabled`. When set to `Enabled`, IP filtering rules are applied to a
      +     * bucket and all incoming requests to the bucket are evaluated against
      +     * these rules. When set to `Disabled`, IP filtering rules are not applied
      +     * to a bucket.".
      +     * 
      + * + * optional string mode = 1; + * + * @return Whether the mode field is set. + */ + @java.lang.Override + public boolean hasMode() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
      +     * The state of the IP filter configuration. Valid values are `Enabled` and
      +     * `Disabled`. When set to `Enabled`, IP filtering rules are applied to a
      +     * bucket and all incoming requests to the bucket are evaluated against
      +     * these rules. When set to `Disabled`, IP filtering rules are not applied
      +     * to a bucket.".
      +     * 
      + * + * optional string mode = 1; + * + * @return The mode. + */ + @java.lang.Override + public java.lang.String getMode() { + java.lang.Object ref = mode_; + 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(); + mode_ = s; + return s; + } + } + + /** + * + * + *
      +     * The state of the IP filter configuration. Valid values are `Enabled` and
      +     * `Disabled`. When set to `Enabled`, IP filtering rules are applied to a
      +     * bucket and all incoming requests to the bucket are evaluated against
      +     * these rules. When set to `Disabled`, IP filtering rules are not applied
      +     * to a bucket.".
      +     * 
      + * + * optional string mode = 1; + * + * @return The bytes for mode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getModeBytes() { + java.lang.Object ref = mode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUBLIC_NETWORK_SOURCE_FIELD_NUMBER = 2; + private com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource publicNetworkSource_; + + /** + * + * + *
      +     * Public IPs allowed to operate or access the bucket.
      +     * 
      + * + * + * optional .google.storage.v2.Bucket.IpFilter.PublicNetworkSource public_network_source = 2; + * + * + * @return Whether the publicNetworkSource field is set. + */ + @java.lang.Override + public boolean hasPublicNetworkSource() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
      +     * Public IPs allowed to operate or access the bucket.
      +     * 
      + * + * + * optional .google.storage.v2.Bucket.IpFilter.PublicNetworkSource public_network_source = 2; + * + * + * @return The publicNetworkSource. + */ + @java.lang.Override + public com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource getPublicNetworkSource() { + return publicNetworkSource_ == null + ? com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource.getDefaultInstance() + : publicNetworkSource_; + } + + /** + * + * + *
      +     * Public IPs allowed to operate or access the bucket.
      +     * 
      + * + * + * optional .google.storage.v2.Bucket.IpFilter.PublicNetworkSource public_network_source = 2; + * + */ + @java.lang.Override + public com.google.storage.v2.Bucket.IpFilter.PublicNetworkSourceOrBuilder + getPublicNetworkSourceOrBuilder() { + return publicNetworkSource_ == null + ? com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource.getDefaultInstance() + : publicNetworkSource_; + } + + public static final int VPC_NETWORK_SOURCES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List + vpcNetworkSources_; + + /** + * + * + *
      +     * Optional. The list of network sources that are allowed to access
      +     * operations on the bucket or the underlying objects.
      +     * 
      + * + * + * repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getVpcNetworkSourcesList() { + return vpcNetworkSources_; + } + + /** + * + * + *
      +     * Optional. The list of network sources that are allowed to access
      +     * operations on the bucket or the underlying objects.
      +     * 
      + * + * + * repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getVpcNetworkSourcesOrBuilderList() { + return vpcNetworkSources_; + } + + /** + * + * + *
      +     * Optional. The list of network sources that are allowed to access
      +     * operations on the bucket or the underlying objects.
      +     * 
      + * + * + * repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getVpcNetworkSourcesCount() { + return vpcNetworkSources_.size(); + } + + /** + * + * + *
      +     * Optional. The list of network sources that are allowed to access
      +     * operations on the bucket or the underlying objects.
      +     * 
      + * + * + * repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource getVpcNetworkSources(int index) { + return vpcNetworkSources_.get(index); + } + + /** + * + * + *
      +     * Optional. The list of network sources that are allowed to access
      +     * operations on the bucket or the underlying objects.
      +     * 
      + * + * + * repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.storage.v2.Bucket.IpFilter.VpcNetworkSourceOrBuilder + getVpcNetworkSourcesOrBuilder(int index) { + return vpcNetworkSources_.get(index); + } + + public static final int ALLOW_CROSS_ORG_VPCS_FIELD_NUMBER = 4; + private boolean allowCrossOrgVpcs_ = false; + + /** + * + * + *
      +     * Optional. Whether or not to allow VPCs from orgs different than the
      +     * bucket's parent org to access the bucket. When set to true, validations
      +     * on the existence of the VPCs won't be performed. If set to false, each
      +     * VPC network source will be checked to belong to the same org as the
      +     * bucket as well as validated for existence.
      +     * 
      + * + * bool allow_cross_org_vpcs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowCrossOrgVpcs. + */ + @java.lang.Override + public boolean getAllowCrossOrgVpcs() { + return allowCrossOrgVpcs_; + } + + 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)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, mode_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(2, getPublicNetworkSource()); + } + for (int i = 0; i < vpcNetworkSources_.size(); i++) { + output.writeMessage(3, vpcNetworkSources_.get(i)); + } + if (allowCrossOrgVpcs_ != false) { + output.writeBool(4, allowCrossOrgVpcs_); + } + 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.GeneratedMessageV3.computeStringSize(1, mode_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPublicNetworkSource()); + } + for (int i = 0; i < vpcNetworkSources_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, vpcNetworkSources_.get(i)); + } + if (allowCrossOrgVpcs_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, allowCrossOrgVpcs_); + } + 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.Bucket.IpFilter)) { + return super.equals(obj); + } + com.google.storage.v2.Bucket.IpFilter other = (com.google.storage.v2.Bucket.IpFilter) obj; + + if (hasMode() != other.hasMode()) return false; + if (hasMode()) { + if (!getMode().equals(other.getMode())) return false; + } + if (hasPublicNetworkSource() != other.hasPublicNetworkSource()) return false; + if (hasPublicNetworkSource()) { + if (!getPublicNetworkSource().equals(other.getPublicNetworkSource())) return false; + } + if (!getVpcNetworkSourcesList().equals(other.getVpcNetworkSourcesList())) return false; + if (getAllowCrossOrgVpcs() != other.getAllowCrossOrgVpcs()) 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 (hasMode()) { + hash = (37 * hash) + MODE_FIELD_NUMBER; + hash = (53 * hash) + getMode().hashCode(); + } + if (hasPublicNetworkSource()) { + hash = (37 * hash) + PUBLIC_NETWORK_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getPublicNetworkSource().hashCode(); + } + if (getVpcNetworkSourcesCount() > 0) { + hash = (37 * hash) + VPC_NETWORK_SOURCES_FIELD_NUMBER; + hash = (53 * hash) + getVpcNetworkSourcesList().hashCode(); + } + hash = (37 * hash) + ALLOW_CROSS_ORG_VPCS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowCrossOrgVpcs()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storage.v2.Bucket.IpFilter parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.v2.Bucket.IpFilter 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.Bucket.IpFilter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.v2.Bucket.IpFilter 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.Bucket.IpFilter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.v2.Bucket.IpFilter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storage.v2.Bucket.IpFilter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.v2.Bucket.IpFilter 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.Bucket.IpFilter parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storage.v2.Bucket.IpFilter 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.Bucket.IpFilter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.v2.Bucket.IpFilter 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.Bucket.IpFilter 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 [bucket IP
      +     * filtering](https://cloud.google.com/storage/docs/ip-filtering-overview)
      +     * configuration. Specifies the network sources that can access the bucket, as
      +     * well as its underlying objects.
      +     * 
      + * + * Protobuf type {@code google.storage.v2.Bucket.IpFilter} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storage.v2.Bucket.IpFilter) + com.google.storage.v2.Bucket.IpFilterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.v2.StorageProto + .internal_static_google_storage_v2_Bucket_IpFilter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.v2.StorageProto + .internal_static_google_storage_v2_Bucket_IpFilter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.v2.Bucket.IpFilter.class, + com.google.storage.v2.Bucket.IpFilter.Builder.class); + } + + // Construct using com.google.storage.v2.Bucket.IpFilter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPublicNetworkSourceFieldBuilder(); + getVpcNetworkSourcesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + mode_ = ""; + publicNetworkSource_ = null; + if (publicNetworkSourceBuilder_ != null) { + publicNetworkSourceBuilder_.dispose(); + publicNetworkSourceBuilder_ = null; + } + if (vpcNetworkSourcesBuilder_ == null) { + vpcNetworkSources_ = java.util.Collections.emptyList(); + } else { + vpcNetworkSources_ = null; + vpcNetworkSourcesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + allowCrossOrgVpcs_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storage.v2.StorageProto + .internal_static_google_storage_v2_Bucket_IpFilter_descriptor; + } + + @java.lang.Override + public com.google.storage.v2.Bucket.IpFilter getDefaultInstanceForType() { + return com.google.storage.v2.Bucket.IpFilter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.storage.v2.Bucket.IpFilter build() { + com.google.storage.v2.Bucket.IpFilter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storage.v2.Bucket.IpFilter buildPartial() { + com.google.storage.v2.Bucket.IpFilter result = + new com.google.storage.v2.Bucket.IpFilter(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.google.storage.v2.Bucket.IpFilter result) { + if (vpcNetworkSourcesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + vpcNetworkSources_ = java.util.Collections.unmodifiableList(vpcNetworkSources_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.vpcNetworkSources_ = vpcNetworkSources_; + } else { + result.vpcNetworkSources_ = vpcNetworkSourcesBuilder_.build(); + } + } + + private void buildPartial0(com.google.storage.v2.Bucket.IpFilter result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.mode_ = mode_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.publicNetworkSource_ = + publicNetworkSourceBuilder_ == null + ? publicNetworkSource_ + : publicNetworkSourceBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.allowCrossOrgVpcs_ = allowCrossOrgVpcs_; + } + 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.Bucket.IpFilter) { + return mergeFrom((com.google.storage.v2.Bucket.IpFilter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.storage.v2.Bucket.IpFilter other) { + if (other == com.google.storage.v2.Bucket.IpFilter.getDefaultInstance()) return this; + if (other.hasMode()) { + mode_ = other.mode_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasPublicNetworkSource()) { + mergePublicNetworkSource(other.getPublicNetworkSource()); + } + if (vpcNetworkSourcesBuilder_ == null) { + if (!other.vpcNetworkSources_.isEmpty()) { + if (vpcNetworkSources_.isEmpty()) { + vpcNetworkSources_ = other.vpcNetworkSources_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureVpcNetworkSourcesIsMutable(); + vpcNetworkSources_.addAll(other.vpcNetworkSources_); + } + onChanged(); + } + } else { + if (!other.vpcNetworkSources_.isEmpty()) { + if (vpcNetworkSourcesBuilder_.isEmpty()) { + vpcNetworkSourcesBuilder_.dispose(); + vpcNetworkSourcesBuilder_ = null; + vpcNetworkSources_ = other.vpcNetworkSources_; + bitField0_ = (bitField0_ & ~0x00000004); + vpcNetworkSourcesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getVpcNetworkSourcesFieldBuilder() + : null; + } else { + vpcNetworkSourcesBuilder_.addAllMessages(other.vpcNetworkSources_); + } + } + } + if (other.getAllowCrossOrgVpcs() != false) { + setAllowCrossOrgVpcs(other.getAllowCrossOrgVpcs()); + } + 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: + { + mode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + getPublicNetworkSourceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource m = + input.readMessage( + com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource.parser(), + extensionRegistry); + if (vpcNetworkSourcesBuilder_ == null) { + ensureVpcNetworkSourcesIsMutable(); + vpcNetworkSources_.add(m); + } else { + vpcNetworkSourcesBuilder_.addMessage(m); + } + break; + } // case 26 + case 32: + { + allowCrossOrgVpcs_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + 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 mode_ = ""; + + /** + * + * + *
      +       * The state of the IP filter configuration. Valid values are `Enabled` and
      +       * `Disabled`. When set to `Enabled`, IP filtering rules are applied to a
      +       * bucket and all incoming requests to the bucket are evaluated against
      +       * these rules. When set to `Disabled`, IP filtering rules are not applied
      +       * to a bucket.".
      +       * 
      + * + * optional string mode = 1; + * + * @return Whether the mode field is set. + */ + public boolean hasMode() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
      +       * The state of the IP filter configuration. Valid values are `Enabled` and
      +       * `Disabled`. When set to `Enabled`, IP filtering rules are applied to a
      +       * bucket and all incoming requests to the bucket are evaluated against
      +       * these rules. When set to `Disabled`, IP filtering rules are not applied
      +       * to a bucket.".
      +       * 
      + * + * optional string mode = 1; + * + * @return The mode. + */ + public java.lang.String getMode() { + java.lang.Object ref = mode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
      +       * The state of the IP filter configuration. Valid values are `Enabled` and
      +       * `Disabled`. When set to `Enabled`, IP filtering rules are applied to a
      +       * bucket and all incoming requests to the bucket are evaluated against
      +       * these rules. When set to `Disabled`, IP filtering rules are not applied
      +       * to a bucket.".
      +       * 
      + * + * optional string mode = 1; + * + * @return The bytes for mode. + */ + public com.google.protobuf.ByteString getModeBytes() { + java.lang.Object ref = mode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + mode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
      +       * The state of the IP filter configuration. Valid values are `Enabled` and
      +       * `Disabled`. When set to `Enabled`, IP filtering rules are applied to a
      +       * bucket and all incoming requests to the bucket are evaluated against
      +       * these rules. When set to `Disabled`, IP filtering rules are not applied
      +       * to a bucket.".
      +       * 
      + * + * optional string mode = 1; + * + * @param value The mode to set. + * @return This builder for chaining. + */ + public Builder setMode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + mode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +       * The state of the IP filter configuration. Valid values are `Enabled` and
      +       * `Disabled`. When set to `Enabled`, IP filtering rules are applied to a
      +       * bucket and all incoming requests to the bucket are evaluated against
      +       * these rules. When set to `Disabled`, IP filtering rules are not applied
      +       * to a bucket.".
      +       * 
      + * + * optional string mode = 1; + * + * @return This builder for chaining. + */ + public Builder clearMode() { + mode_ = getDefaultInstance().getMode(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
      +       * The state of the IP filter configuration. Valid values are `Enabled` and
      +       * `Disabled`. When set to `Enabled`, IP filtering rules are applied to a
      +       * bucket and all incoming requests to the bucket are evaluated against
      +       * these rules. When set to `Disabled`, IP filtering rules are not applied
      +       * to a bucket.".
      +       * 
      + * + * optional string mode = 1; + * + * @param value The bytes for mode to set. + * @return This builder for chaining. + */ + public Builder setModeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + mode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource publicNetworkSource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource, + com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource.Builder, + com.google.storage.v2.Bucket.IpFilter.PublicNetworkSourceOrBuilder> + publicNetworkSourceBuilder_; + + /** + * + * + *
      +       * Public IPs allowed to operate or access the bucket.
      +       * 
      + * + * + * optional .google.storage.v2.Bucket.IpFilter.PublicNetworkSource public_network_source = 2; + * + * + * @return Whether the publicNetworkSource field is set. + */ + public boolean hasPublicNetworkSource() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
      +       * Public IPs allowed to operate or access the bucket.
      +       * 
      + * + * + * optional .google.storage.v2.Bucket.IpFilter.PublicNetworkSource public_network_source = 2; + * + * + * @return The publicNetworkSource. + */ + public com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource getPublicNetworkSource() { + if (publicNetworkSourceBuilder_ == null) { + return publicNetworkSource_ == null + ? com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource.getDefaultInstance() + : publicNetworkSource_; + } else { + return publicNetworkSourceBuilder_.getMessage(); + } + } + + /** + * + * + *
      +       * Public IPs allowed to operate or access the bucket.
      +       * 
      + * + * + * optional .google.storage.v2.Bucket.IpFilter.PublicNetworkSource public_network_source = 2; + * + */ + public Builder setPublicNetworkSource( + com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource value) { + if (publicNetworkSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + publicNetworkSource_ = value; + } else { + publicNetworkSourceBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +       * Public IPs allowed to operate or access the bucket.
      +       * 
      + * + * + * optional .google.storage.v2.Bucket.IpFilter.PublicNetworkSource public_network_source = 2; + * + */ + public Builder setPublicNetworkSource( + com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource.Builder builderForValue) { + if (publicNetworkSourceBuilder_ == null) { + publicNetworkSource_ = builderForValue.build(); + } else { + publicNetworkSourceBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +       * Public IPs allowed to operate or access the bucket.
      +       * 
      + * + * + * optional .google.storage.v2.Bucket.IpFilter.PublicNetworkSource public_network_source = 2; + * + */ + public Builder mergePublicNetworkSource( + com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource value) { + if (publicNetworkSourceBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && publicNetworkSource_ != null + && publicNetworkSource_ + != com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource + .getDefaultInstance()) { + getPublicNetworkSourceBuilder().mergeFrom(value); + } else { + publicNetworkSource_ = value; + } + } else { + publicNetworkSourceBuilder_.mergeFrom(value); + } + if (publicNetworkSource_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
      +       * Public IPs allowed to operate or access the bucket.
      +       * 
      + * + * + * optional .google.storage.v2.Bucket.IpFilter.PublicNetworkSource public_network_source = 2; + * + */ + public Builder clearPublicNetworkSource() { + bitField0_ = (bitField0_ & ~0x00000002); + publicNetworkSource_ = null; + if (publicNetworkSourceBuilder_ != null) { + publicNetworkSourceBuilder_.dispose(); + publicNetworkSourceBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +       * Public IPs allowed to operate or access the bucket.
      +       * 
      + * + * + * optional .google.storage.v2.Bucket.IpFilter.PublicNetworkSource public_network_source = 2; + * + */ + public com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource.Builder + getPublicNetworkSourceBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getPublicNetworkSourceFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +       * Public IPs allowed to operate or access the bucket.
      +       * 
      + * + * + * optional .google.storage.v2.Bucket.IpFilter.PublicNetworkSource public_network_source = 2; + * + */ + public com.google.storage.v2.Bucket.IpFilter.PublicNetworkSourceOrBuilder + getPublicNetworkSourceOrBuilder() { + if (publicNetworkSourceBuilder_ != null) { + return publicNetworkSourceBuilder_.getMessageOrBuilder(); + } else { + return publicNetworkSource_ == null + ? com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource.getDefaultInstance() + : publicNetworkSource_; + } + } + + /** + * + * + *
      +       * Public IPs allowed to operate or access the bucket.
      +       * 
      + * + * + * optional .google.storage.v2.Bucket.IpFilter.PublicNetworkSource public_network_source = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource, + com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource.Builder, + com.google.storage.v2.Bucket.IpFilter.PublicNetworkSourceOrBuilder> + getPublicNetworkSourceFieldBuilder() { + if (publicNetworkSourceBuilder_ == null) { + publicNetworkSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource, + com.google.storage.v2.Bucket.IpFilter.PublicNetworkSource.Builder, + com.google.storage.v2.Bucket.IpFilter.PublicNetworkSourceOrBuilder>( + getPublicNetworkSource(), getParentForChildren(), isClean()); + publicNetworkSource_ = null; + } + return publicNetworkSourceBuilder_; + } + + private java.util.List + vpcNetworkSources_ = java.util.Collections.emptyList(); + + private void ensureVpcNetworkSourcesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + vpcNetworkSources_ = + new java.util.ArrayList( + vpcNetworkSources_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource, + com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource.Builder, + com.google.storage.v2.Bucket.IpFilter.VpcNetworkSourceOrBuilder> + vpcNetworkSourcesBuilder_; + + /** + * + * + *
      +       * Optional. The list of network sources that are allowed to access
      +       * operations on the bucket or the underlying objects.
      +       * 
      + * + * + * repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getVpcNetworkSourcesList() { + if (vpcNetworkSourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(vpcNetworkSources_); + } else { + return vpcNetworkSourcesBuilder_.getMessageList(); + } + } + + /** + * + * + *
      +       * Optional. The list of network sources that are allowed to access
      +       * operations on the bucket or the underlying objects.
      +       * 
      + * + * + * repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getVpcNetworkSourcesCount() { + if (vpcNetworkSourcesBuilder_ == null) { + return vpcNetworkSources_.size(); + } else { + return vpcNetworkSourcesBuilder_.getCount(); + } + } + + /** + * + * + *
      +       * Optional. The list of network sources that are allowed to access
      +       * operations on the bucket or the underlying objects.
      +       * 
      + * + * + * repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource getVpcNetworkSources( + int index) { + if (vpcNetworkSourcesBuilder_ == null) { + return vpcNetworkSources_.get(index); + } else { + return vpcNetworkSourcesBuilder_.getMessage(index); + } + } + + /** + * + * + *
      +       * Optional. The list of network sources that are allowed to access
      +       * operations on the bucket or the underlying objects.
      +       * 
      + * + * + * repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setVpcNetworkSources( + int index, com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource value) { + if (vpcNetworkSourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVpcNetworkSourcesIsMutable(); + vpcNetworkSources_.set(index, value); + onChanged(); + } else { + vpcNetworkSourcesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
      +       * Optional. The list of network sources that are allowed to access
      +       * operations on the bucket or the underlying objects.
      +       * 
      + * + * + * repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setVpcNetworkSources( + int index, + com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource.Builder builderForValue) { + if (vpcNetworkSourcesBuilder_ == null) { + ensureVpcNetworkSourcesIsMutable(); + vpcNetworkSources_.set(index, builderForValue.build()); + onChanged(); + } else { + vpcNetworkSourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
      +       * Optional. The list of network sources that are allowed to access
      +       * operations on the bucket or the underlying objects.
      +       * 
      + * + * + * repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addVpcNetworkSources( + com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource value) { + if (vpcNetworkSourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVpcNetworkSourcesIsMutable(); + vpcNetworkSources_.add(value); + onChanged(); + } else { + vpcNetworkSourcesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
      +       * Optional. The list of network sources that are allowed to access
      +       * operations on the bucket or the underlying objects.
      +       * 
      + * + * + * repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addVpcNetworkSources( + int index, com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource value) { + if (vpcNetworkSourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureVpcNetworkSourcesIsMutable(); + vpcNetworkSources_.add(index, value); + onChanged(); + } else { + vpcNetworkSourcesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
      +       * Optional. The list of network sources that are allowed to access
      +       * operations on the bucket or the underlying objects.
      +       * 
      + * + * + * repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addVpcNetworkSources( + com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource.Builder builderForValue) { + if (vpcNetworkSourcesBuilder_ == null) { + ensureVpcNetworkSourcesIsMutable(); + vpcNetworkSources_.add(builderForValue.build()); + onChanged(); + } else { + vpcNetworkSourcesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
      +       * Optional. The list of network sources that are allowed to access
      +       * operations on the bucket or the underlying objects.
      +       * 
      + * + * + * repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addVpcNetworkSources( + int index, + com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource.Builder builderForValue) { + if (vpcNetworkSourcesBuilder_ == null) { + ensureVpcNetworkSourcesIsMutable(); + vpcNetworkSources_.add(index, builderForValue.build()); + onChanged(); + } else { + vpcNetworkSourcesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
      +       * Optional. The list of network sources that are allowed to access
      +       * operations on the bucket or the underlying objects.
      +       * 
      + * + * + * repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllVpcNetworkSources( + java.lang.Iterable + values) { + if (vpcNetworkSourcesBuilder_ == null) { + ensureVpcNetworkSourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, vpcNetworkSources_); + onChanged(); + } else { + vpcNetworkSourcesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
      +       * Optional. The list of network sources that are allowed to access
      +       * operations on the bucket or the underlying objects.
      +       * 
      + * + * + * repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearVpcNetworkSources() { + if (vpcNetworkSourcesBuilder_ == null) { + vpcNetworkSources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + vpcNetworkSourcesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
      +       * Optional. The list of network sources that are allowed to access
      +       * operations on the bucket or the underlying objects.
      +       * 
      + * + * + * repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeVpcNetworkSources(int index) { + if (vpcNetworkSourcesBuilder_ == null) { + ensureVpcNetworkSourcesIsMutable(); + vpcNetworkSources_.remove(index); + onChanged(); + } else { + vpcNetworkSourcesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
      +       * Optional. The list of network sources that are allowed to access
      +       * operations on the bucket or the underlying objects.
      +       * 
      + * + * + * repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource.Builder + getVpcNetworkSourcesBuilder(int index) { + return getVpcNetworkSourcesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
      +       * Optional. The list of network sources that are allowed to access
      +       * operations on the bucket or the underlying objects.
      +       * 
      + * + * + * repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.storage.v2.Bucket.IpFilter.VpcNetworkSourceOrBuilder + getVpcNetworkSourcesOrBuilder(int index) { + if (vpcNetworkSourcesBuilder_ == null) { + return vpcNetworkSources_.get(index); + } else { + return vpcNetworkSourcesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
      +       * Optional. The list of network sources that are allowed to access
      +       * operations on the bucket or the underlying objects.
      +       * 
      + * + * + * repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends com.google.storage.v2.Bucket.IpFilter.VpcNetworkSourceOrBuilder> + getVpcNetworkSourcesOrBuilderList() { + if (vpcNetworkSourcesBuilder_ != null) { + return vpcNetworkSourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(vpcNetworkSources_); + } + } + + /** + * + * + *
      +       * Optional. The list of network sources that are allowed to access
      +       * operations on the bucket or the underlying objects.
      +       * 
      + * + * + * repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource.Builder + addVpcNetworkSourcesBuilder() { + return getVpcNetworkSourcesFieldBuilder() + .addBuilder( + com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource.getDefaultInstance()); + } + + /** + * + * + *
      +       * Optional. The list of network sources that are allowed to access
      +       * operations on the bucket or the underlying objects.
      +       * 
      + * + * + * repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource.Builder + addVpcNetworkSourcesBuilder(int index) { + return getVpcNetworkSourcesFieldBuilder() + .addBuilder( + index, com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource.getDefaultInstance()); + } + + /** + * + * + *
      +       * Optional. The list of network sources that are allowed to access
      +       * operations on the bucket or the underlying objects.
      +       * 
      + * + * + * repeated .google.storage.v2.Bucket.IpFilter.VpcNetworkSource vpc_network_sources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getVpcNetworkSourcesBuilderList() { + return getVpcNetworkSourcesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource, + com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource.Builder, + com.google.storage.v2.Bucket.IpFilter.VpcNetworkSourceOrBuilder> + getVpcNetworkSourcesFieldBuilder() { + if (vpcNetworkSourcesBuilder_ == null) { + vpcNetworkSourcesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource, + com.google.storage.v2.Bucket.IpFilter.VpcNetworkSource.Builder, + com.google.storage.v2.Bucket.IpFilter.VpcNetworkSourceOrBuilder>( + vpcNetworkSources_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + vpcNetworkSources_ = null; + } + return vpcNetworkSourcesBuilder_; + } + + private boolean allowCrossOrgVpcs_; + + /** + * + * + *
      +       * Optional. Whether or not to allow VPCs from orgs different than the
      +       * bucket's parent org to access the bucket. When set to true, validations
      +       * on the existence of the VPCs won't be performed. If set to false, each
      +       * VPC network source will be checked to belong to the same org as the
      +       * bucket as well as validated for existence.
      +       * 
      + * + * bool allow_cross_org_vpcs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The allowCrossOrgVpcs. + */ + @java.lang.Override + public boolean getAllowCrossOrgVpcs() { + return allowCrossOrgVpcs_; + } + + /** + * + * + *
      +       * Optional. Whether or not to allow VPCs from orgs different than the
      +       * bucket's parent org to access the bucket. When set to true, validations
      +       * on the existence of the VPCs won't be performed. If set to false, each
      +       * VPC network source will be checked to belong to the same org as the
      +       * bucket as well as validated for existence.
      +       * 
      + * + * bool allow_cross_org_vpcs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The allowCrossOrgVpcs to set. + * @return This builder for chaining. + */ + public Builder setAllowCrossOrgVpcs(boolean value) { + + allowCrossOrgVpcs_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
      +       * Optional. Whether or not to allow VPCs from orgs different than the
      +       * bucket's parent org to access the bucket. When set to true, validations
      +       * on the existence of the VPCs won't be performed. If set to false, each
      +       * VPC network source will be checked to belong to the same org as the
      +       * bucket as well as validated for existence.
      +       * 
      + * + * bool allow_cross_org_vpcs = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearAllowCrossOrgVpcs() { + bitField0_ = (bitField0_ & ~0x00000008); + allowCrossOrgVpcs_ = 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.Bucket.IpFilter) + } + + // @@protoc_insertion_point(class_scope:google.storage.v2.Bucket.IpFilter) + private static final com.google.storage.v2.Bucket.IpFilter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storage.v2.Bucket.IpFilter(); + } + + public static com.google.storage.v2.Bucket.IpFilter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IpFilter 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.Bucket.IpFilter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface HierarchicalNamespaceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storage.v2.Bucket.HierarchicalNamespace) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +     * Optional. Enables the hierarchical namespace feature.
      +     * 
      + * + * bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enabled. + */ + boolean getEnabled(); + } + + /** + * + * + *
      +   * Configuration for a bucket's hierarchical namespace feature.
      +   * 
      + * + * Protobuf type {@code google.storage.v2.Bucket.HierarchicalNamespace} + */ + public static final class HierarchicalNamespace extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storage.v2.Bucket.HierarchicalNamespace) + HierarchicalNamespaceOrBuilder { + private static final long serialVersionUID = 0L; + + // Use HierarchicalNamespace.newBuilder() to construct. + private HierarchicalNamespace(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private HierarchicalNamespace() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new HierarchicalNamespace(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.v2.StorageProto + .internal_static_google_storage_v2_Bucket_HierarchicalNamespace_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.v2.StorageProto + .internal_static_google_storage_v2_Bucket_HierarchicalNamespace_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.v2.Bucket.HierarchicalNamespace.class, + com.google.storage.v2.Bucket.HierarchicalNamespace.Builder.class); + } + + public static final int ENABLED_FIELD_NUMBER = 1; + private boolean enabled_ = false; + + /** + * + * + *
      +     * Optional. Enables the hierarchical namespace feature.
      +     * 
      + * + * bool enabled = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The enabled. + */ + @java.lang.Override + public boolean getEnabled() { + return enabled_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; @@ -19144,11 +23480,11 @@ public com.google.storage.v2.Bucket.HierarchicalNamespace getDefaultInstanceForT * * *
      -   * Immutable. The name of the bucket.
      +   * Identifier. The name of the bucket.
          * Format: `projects/{project}/buckets/{bucket}`
          * 
      * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The name. */ @@ -19169,11 +23505,11 @@ public java.lang.String getName() { * * *
      -   * Immutable. The name of the bucket.
      +   * Identifier. The name of the bucket.
          * Format: `projects/{project}/buckets/{bucket}`
          * 
      * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The bytes for name. */ @@ -19316,6 +23652,7 @@ public com.google.protobuf.ByteString getEtagBytes() { * Immutable. The project which owns this bucket, in the format of * "projects/{projectIdentifier}". * {projectIdentifier} can be the project ID or project number. + * Output values will always be in project number format. * * * @@ -19344,6 +23681,7 @@ public java.lang.String getProject() { * Immutable. The project which owns this bucket, in the format of * "projects/{projectIdentifier}". * {projectIdentifier} can be the project ID or project number. + * Output values will always be in project number format. * * * @@ -19511,15 +23849,15 @@ public com.google.protobuf.ByteString getLocationTypeBytes() { * * *
      -   * The bucket's default storage class, used whenever no storageClass is
      -   * specified for a newly-created object. This defines how objects in the
      +   * Optional. The bucket's default storage class, used whenever no storageClass
      +   * is specified for a newly-created object. This defines how objects in the
          * bucket are stored and determines the SLA and the cost of storage.
          * If this value is not specified when the bucket is created, it will default
          * to `STANDARD`. For more information, see
          * https://developers.google.com/storage/docs/storage-classes.
          * 
      * - * string storage_class = 7; + * string storage_class = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The storageClass. */ @@ -19540,15 +23878,15 @@ public java.lang.String getStorageClass() { * * *
      -   * The bucket's default storage class, used whenever no storageClass is
      -   * specified for a newly-created object. This defines how objects in the
      +   * Optional. The bucket's default storage class, used whenever no storageClass
      +   * is specified for a newly-created object. This defines how objects in the
          * bucket are stored and determines the SLA and the cost of storage.
          * If this value is not specified when the bucket is created, it will default
          * to `STANDARD`. For more information, see
          * https://developers.google.com/storage/docs/storage-classes.
          * 
      * - * string storage_class = 7; + * string storage_class = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for storageClass. */ @@ -19574,15 +23912,15 @@ public com.google.protobuf.ByteString getStorageClassBytes() { * * *
      -   * The recovery point objective for cross-region replication of the bucket.
      -   * Applicable only for dual- and multi-region buckets. "DEFAULT" uses default
      -   * replication. "ASYNC_TURBO" enables turbo replication, valid for dual-region
      -   * buckets only. If rpo is not specified when the bucket is created, it
      -   * defaults to "DEFAULT". For more information, see
      +   * Optional. The recovery point objective for cross-region replication of the
      +   * bucket. Applicable only for dual- and multi-region buckets. "DEFAULT" uses
      +   * default replication. "ASYNC_TURBO" enables turbo replication, valid for
      +   * dual-region buckets only. If rpo is not specified when the bucket is
      +   * created, it defaults to "DEFAULT". For more information, see
          * https://cloud.google.com/storage/docs/availability-durability#turbo-replication.
          * 
      * - * string rpo = 27; + * string rpo = 27 [(.google.api.field_behavior) = OPTIONAL]; * * @return The rpo. */ @@ -19603,15 +23941,15 @@ public java.lang.String getRpo() { * * *
      -   * The recovery point objective for cross-region replication of the bucket.
      -   * Applicable only for dual- and multi-region buckets. "DEFAULT" uses default
      -   * replication. "ASYNC_TURBO" enables turbo replication, valid for dual-region
      -   * buckets only. If rpo is not specified when the bucket is created, it
      -   * defaults to "DEFAULT". For more information, see
      +   * Optional. The recovery point objective for cross-region replication of the
      +   * bucket. Applicable only for dual- and multi-region buckets. "DEFAULT" uses
      +   * default replication. "ASYNC_TURBO" enables turbo replication, valid for
      +   * dual-region buckets only. If rpo is not specified when the bucket is
      +   * created, it defaults to "DEFAULT". For more information, see
          * https://cloud.google.com/storage/docs/availability-durability#turbo-replication.
          * 
      * - * string rpo = 27; + * string rpo = 27 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for rpo. */ @@ -19637,12 +23975,14 @@ public com.google.protobuf.ByteString getRpoBytes() { * * *
      -   * Access controls on the bucket.
      +   * Optional. Access controls on the bucket.
          * If iam_config.uniform_bucket_level_access is enabled on this bucket,
          * requests to set, read, or modify acl is an error.
          * 
      * - * repeated .google.storage.v2.BucketAccessControl acl = 8; + * + * repeated .google.storage.v2.BucketAccessControl acl = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public java.util.List getAclList() { @@ -19653,12 +23993,14 @@ public java.util.List getAclList() { * * *
      -   * Access controls on the bucket.
      +   * Optional. Access controls on the bucket.
          * If iam_config.uniform_bucket_level_access is enabled on this bucket,
          * requests to set, read, or modify acl is an error.
          * 
      * - * repeated .google.storage.v2.BucketAccessControl acl = 8; + * + * repeated .google.storage.v2.BucketAccessControl acl = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public java.util.List @@ -19670,12 +24012,14 @@ public java.util.List getAclList() { * * *
      -   * Access controls on the bucket.
      +   * Optional. Access controls on the bucket.
          * If iam_config.uniform_bucket_level_access is enabled on this bucket,
          * requests to set, read, or modify acl is an error.
          * 
      * - * repeated .google.storage.v2.BucketAccessControl acl = 8; + * + * repeated .google.storage.v2.BucketAccessControl acl = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public int getAclCount() { @@ -19686,12 +24030,14 @@ public int getAclCount() { * * *
      -   * Access controls on the bucket.
      +   * Optional. Access controls on the bucket.
          * If iam_config.uniform_bucket_level_access is enabled on this bucket,
          * requests to set, read, or modify acl is an error.
          * 
      * - * repeated .google.storage.v2.BucketAccessControl acl = 8; + * + * repeated .google.storage.v2.BucketAccessControl acl = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.BucketAccessControl getAcl(int index) { @@ -19702,12 +24048,14 @@ public com.google.storage.v2.BucketAccessControl getAcl(int index) { * * *
      -   * Access controls on the bucket.
      +   * Optional. Access controls on the bucket.
          * If iam_config.uniform_bucket_level_access is enabled on this bucket,
          * requests to set, read, or modify acl is an error.
          * 
      * - * repeated .google.storage.v2.BucketAccessControl acl = 8; + * + * repeated .google.storage.v2.BucketAccessControl acl = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.BucketAccessControlOrBuilder getAclOrBuilder(int index) { @@ -19723,12 +24071,14 @@ public com.google.storage.v2.BucketAccessControlOrBuilder getAclOrBuilder(int in * * *
      -   * Default access controls to apply to new objects when no ACL is provided.
      -   * If iam_config.uniform_bucket_level_access is enabled on this bucket,
      -   * requests to set, read, or modify acl is an error.
      +   * Optional. Default access controls to apply to new objects when no ACL is
      +   * provided. If iam_config.uniform_bucket_level_access is enabled on this
      +   * bucket, requests to set, read, or modify acl is an error.
          * 
      * - * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9; + * + * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public java.util.List getDefaultObjectAclList() { @@ -19739,12 +24089,14 @@ public java.util.List getDefaultObjec * * *
      -   * Default access controls to apply to new objects when no ACL is provided.
      -   * If iam_config.uniform_bucket_level_access is enabled on this bucket,
      -   * requests to set, read, or modify acl is an error.
      +   * Optional. Default access controls to apply to new objects when no ACL is
      +   * provided. If iam_config.uniform_bucket_level_access is enabled on this
      +   * bucket, requests to set, read, or modify acl is an error.
          * 
      * - * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9; + * + * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public java.util.List @@ -19756,12 +24108,14 @@ public java.util.List getDefaultObjec * * *
      -   * Default access controls to apply to new objects when no ACL is provided.
      -   * If iam_config.uniform_bucket_level_access is enabled on this bucket,
      -   * requests to set, read, or modify acl is an error.
      +   * Optional. Default access controls to apply to new objects when no ACL is
      +   * provided. If iam_config.uniform_bucket_level_access is enabled on this
      +   * bucket, requests to set, read, or modify acl is an error.
          * 
      * - * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9; + * + * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public int getDefaultObjectAclCount() { @@ -19772,12 +24126,14 @@ public int getDefaultObjectAclCount() { * * *
      -   * Default access controls to apply to new objects when no ACL is provided.
      -   * If iam_config.uniform_bucket_level_access is enabled on this bucket,
      -   * requests to set, read, or modify acl is an error.
      +   * Optional. Default access controls to apply to new objects when no ACL is
      +   * provided. If iam_config.uniform_bucket_level_access is enabled on this
      +   * bucket, requests to set, read, or modify acl is an error.
          * 
      * - * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9; + * + * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.ObjectAccessControl getDefaultObjectAcl(int index) { @@ -19788,12 +24144,14 @@ public com.google.storage.v2.ObjectAccessControl getDefaultObjectAcl(int index) * * *
      -   * Default access controls to apply to new objects when no ACL is provided.
      -   * If iam_config.uniform_bucket_level_access is enabled on this bucket,
      -   * requests to set, read, or modify acl is an error.
      +   * Optional. Default access controls to apply to new objects when no ACL is
      +   * provided. If iam_config.uniform_bucket_level_access is enabled on this
      +   * bucket, requests to set, read, or modify acl is an error.
          * 
      * - * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9; + * + * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.ObjectAccessControlOrBuilder getDefaultObjectAclOrBuilder( @@ -19808,12 +24166,14 @@ public com.google.storage.v2.ObjectAccessControlOrBuilder getDefaultObjectAclOrB * * *
      -   * The bucket's lifecycle config. See
      +   * Optional. The bucket's lifecycle config. See
          * [https://developers.google.com/storage/docs/lifecycle]Lifecycle Management]
          * for more information.
          * 
      * - * .google.storage.v2.Bucket.Lifecycle lifecycle = 10; + * + * .google.storage.v2.Bucket.Lifecycle lifecycle = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the lifecycle field is set. */ @@ -19826,12 +24186,14 @@ public boolean hasLifecycle() { * * *
      -   * The bucket's lifecycle config. See
      +   * Optional. The bucket's lifecycle config. See
          * [https://developers.google.com/storage/docs/lifecycle]Lifecycle Management]
          * for more information.
          * 
      * - * .google.storage.v2.Bucket.Lifecycle lifecycle = 10; + * + * .google.storage.v2.Bucket.Lifecycle lifecycle = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The lifecycle. */ @@ -19846,12 +24208,14 @@ public com.google.storage.v2.Bucket.Lifecycle getLifecycle() { * * *
      -   * The bucket's lifecycle config. See
      +   * Optional. The bucket's lifecycle config. See
          * [https://developers.google.com/storage/docs/lifecycle]Lifecycle Management]
          * for more information.
          * 
      * - * .google.storage.v2.Bucket.Lifecycle lifecycle = 10; + * + * .google.storage.v2.Bucket.Lifecycle lifecycle = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.Bucket.LifecycleOrBuilder getLifecycleOrBuilder() { @@ -19921,11 +24285,13 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * * *
      -   * The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing]
      -   * (CORS) config.
      +   * Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource
      +   * Sharing] (CORS) config.
          * 
      * - * repeated .google.storage.v2.Bucket.Cors cors = 12; + * + * repeated .google.storage.v2.Bucket.Cors cors = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public java.util.List getCorsList() { @@ -19936,11 +24302,13 @@ public java.util.List getCorsList() { * * *
      -   * The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing]
      -   * (CORS) config.
      +   * Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource
      +   * Sharing] (CORS) config.
          * 
      * - * repeated .google.storage.v2.Bucket.Cors cors = 12; + * + * repeated .google.storage.v2.Bucket.Cors cors = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public java.util.List @@ -19952,11 +24320,13 @@ public java.util.List getCorsList() { * * *
      -   * The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing]
      -   * (CORS) config.
      +   * Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource
      +   * Sharing] (CORS) config.
          * 
      * - * repeated .google.storage.v2.Bucket.Cors cors = 12; + * + * repeated .google.storage.v2.Bucket.Cors cors = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public int getCorsCount() { @@ -19967,11 +24337,13 @@ public int getCorsCount() { * * *
      -   * The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing]
      -   * (CORS) config.
      +   * Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource
      +   * Sharing] (CORS) config.
          * 
      * - * repeated .google.storage.v2.Bucket.Cors cors = 12; + * + * repeated .google.storage.v2.Bucket.Cors cors = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.Bucket.Cors getCors(int index) { @@ -19982,11 +24354,13 @@ public com.google.storage.v2.Bucket.Cors getCors(int index) { * * *
      -   * The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing]
      -   * (CORS) config.
      +   * Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource
      +   * Sharing] (CORS) config.
          * 
      * - * repeated .google.storage.v2.Bucket.Cors cors = 12; + * + * repeated .google.storage.v2.Bucket.Cors cors = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.Bucket.CorsOrBuilder getCorsOrBuilder(int index) { @@ -20052,22 +24426,22 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * * *
      -   * The default value for event-based hold on newly created objects in this
      -   * bucket.  Event-based hold is a way to retain objects indefinitely until an
      -   * event occurs, signified by the
      -   * hold's release. After being released, such objects will be subject to
      -   * bucket-level retention (if any).  One sample use case of this flag is for
      -   * banks to hold loan documents for at least 3 years after loan is paid in
      -   * full. Here, bucket-level retention is 3 years and the event is loan being
      -   * paid in full. In this example, these objects will be held intact for any
      -   * number of years until the event has occurred (event-based hold on the
      -   * object is released) and then 3 more years after that. That means retention
      -   * duration of the objects begins from the moment event-based hold
      -   * transitioned from true to false.  Objects under event-based hold cannot be
      -   * deleted, overwritten or archived until the hold is removed.
      +   * Optional. The default value for event-based hold on newly created objects
      +   * in this bucket.  Event-based hold is a way to retain objects indefinitely
      +   * until an event occurs, signified by the hold's release. After being
      +   * released, such objects will be subject to bucket-level retention (if any).
      +   * One sample use case of this flag is for banks to hold loan documents for at
      +   * least 3 years after loan is paid in full. Here, bucket-level retention is 3
      +   * years and the event is loan being paid in full. In this example, these
      +   * objects will be held intact for any number of years until the event has
      +   * occurred (event-based hold on the object is released) and then 3 more years
      +   * after that. That means retention duration of the objects begins from the
      +   * moment event-based hold transitioned from true to false.  Objects under
      +   * event-based hold cannot be deleted, overwritten or archived until the hold
      +   * is removed.
          * 
      * - * bool default_event_based_hold = 14; + * bool default_event_based_hold = 14 [(.google.api.field_behavior) = OPTIONAL]; * * @return The defaultEventBasedHold. */ @@ -20107,10 +24481,10 @@ public int getLabelsCount() { * * *
      -   * User-provided labels, in key/value pairs.
      +   * Optional. User-provided labels, in key/value pairs.
          * 
      * - * map<string, string> labels = 15; + * map<string, string> labels = 15 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public boolean containsLabels(java.lang.String key) { @@ -20131,10 +24505,10 @@ public java.util.Map getLabels() { * * *
      -   * User-provided labels, in key/value pairs.
      +   * Optional. User-provided labels, in key/value pairs.
          * 
      * - * map<string, string> labels = 15; + * map<string, string> labels = 15 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public java.util.Map getLabelsMap() { @@ -20145,10 +24519,10 @@ public java.util.Map getLabelsMap() { * * *
      -   * User-provided labels, in key/value pairs.
      +   * Optional. User-provided labels, in key/value pairs.
          * 
      * - * map<string, string> labels = 15; + * map<string, string> labels = 15 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public /* nullable */ java.lang.String getLabelsOrDefault( @@ -20166,10 +24540,10 @@ public java.util.Map getLabelsMap() { * * *
      -   * User-provided labels, in key/value pairs.
      +   * Optional. User-provided labels, in key/value pairs.
          * 
      * - * map<string, string> labels = 15; + * map<string, string> labels = 15 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { @@ -20190,13 +24564,14 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) { * * *
      -   * The bucket's website config, controlling how the service behaves
      +   * Optional. The bucket's website config, controlling how the service behaves
          * when accessing bucket contents as a web site. See the
          * [https://cloud.google.com/storage/docs/static-website][Static Website
          * Examples] for more information.
          * 
      * - * .google.storage.v2.Bucket.Website website = 16; + * .google.storage.v2.Bucket.Website website = 16 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the website field is set. */ @@ -20209,13 +24584,14 @@ public boolean hasWebsite() { * * *
      -   * The bucket's website config, controlling how the service behaves
      +   * Optional. The bucket's website config, controlling how the service behaves
          * when accessing bucket contents as a web site. See the
          * [https://cloud.google.com/storage/docs/static-website][Static Website
          * Examples] for more information.
          * 
      * - * .google.storage.v2.Bucket.Website website = 16; + * .google.storage.v2.Bucket.Website website = 16 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The website. */ @@ -20228,13 +24604,14 @@ public com.google.storage.v2.Bucket.Website getWebsite() { * * *
      -   * The bucket's website config, controlling how the service behaves
      +   * Optional. The bucket's website config, controlling how the service behaves
          * when accessing bucket contents as a web site. See the
          * [https://cloud.google.com/storage/docs/static-website][Static Website
          * Examples] for more information.
          * 
      * - * .google.storage.v2.Bucket.Website website = 16; + * .google.storage.v2.Bucket.Website website = 16 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.Bucket.WebsiteOrBuilder getWebsiteOrBuilder() { @@ -20248,10 +24625,12 @@ public com.google.storage.v2.Bucket.WebsiteOrBuilder getWebsiteOrBuilder() { * * *
      -   * The bucket's versioning config.
      +   * Optional. The bucket's versioning config.
          * 
      * - * .google.storage.v2.Bucket.Versioning versioning = 17; + * + * .google.storage.v2.Bucket.Versioning versioning = 17 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the versioning field is set. */ @@ -20264,10 +24643,12 @@ public boolean hasVersioning() { * * *
      -   * The bucket's versioning config.
      +   * Optional. The bucket's versioning config.
          * 
      * - * .google.storage.v2.Bucket.Versioning versioning = 17; + * + * .google.storage.v2.Bucket.Versioning versioning = 17 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The versioning. */ @@ -20282,10 +24663,12 @@ public com.google.storage.v2.Bucket.Versioning getVersioning() { * * *
      -   * The bucket's versioning config.
      +   * Optional. The bucket's versioning config.
          * 
      * - * .google.storage.v2.Bucket.Versioning versioning = 17; + * + * .google.storage.v2.Bucket.Versioning versioning = 17 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.Bucket.VersioningOrBuilder getVersioningOrBuilder() { @@ -20301,11 +24684,12 @@ public com.google.storage.v2.Bucket.VersioningOrBuilder getVersioningOrBuilder() * * *
      -   * The bucket's logging config, which defines the destination bucket
      +   * Optional. The bucket's logging config, which defines the destination bucket
          * and name prefix (if any) for the current bucket's logs.
          * 
      * - * .google.storage.v2.Bucket.Logging logging = 18; + * .google.storage.v2.Bucket.Logging logging = 18 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the logging field is set. */ @@ -20318,11 +24702,12 @@ public boolean hasLogging() { * * *
      -   * The bucket's logging config, which defines the destination bucket
      +   * Optional. The bucket's logging config, which defines the destination bucket
          * and name prefix (if any) for the current bucket's logs.
          * 
      * - * .google.storage.v2.Bucket.Logging logging = 18; + * .google.storage.v2.Bucket.Logging logging = 18 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The logging. */ @@ -20335,11 +24720,12 @@ public com.google.storage.v2.Bucket.Logging getLogging() { * * *
      -   * The bucket's logging config, which defines the destination bucket
      +   * Optional. The bucket's logging config, which defines the destination bucket
          * and name prefix (if any) for the current bucket's logs.
          * 
      * - * .google.storage.v2.Bucket.Logging logging = 18; + * .google.storage.v2.Bucket.Logging logging = 18 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.Bucket.LoggingOrBuilder getLoggingOrBuilder() { @@ -20405,10 +24791,12 @@ public com.google.storage.v2.OwnerOrBuilder getOwnerOrBuilder() { * * *
      -   * Encryption config for a bucket.
      +   * Optional. Encryption config for a bucket.
          * 
      * - * .google.storage.v2.Bucket.Encryption encryption = 20; + * + * .google.storage.v2.Bucket.Encryption encryption = 20 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the encryption field is set. */ @@ -20421,10 +24809,12 @@ public boolean hasEncryption() { * * *
      -   * Encryption config for a bucket.
      +   * Optional. Encryption config for a bucket.
          * 
      * - * .google.storage.v2.Bucket.Encryption encryption = 20; + * + * .google.storage.v2.Bucket.Encryption encryption = 20 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The encryption. */ @@ -20439,10 +24829,12 @@ public com.google.storage.v2.Bucket.Encryption getEncryption() { * * *
      -   * Encryption config for a bucket.
      +   * Optional. Encryption config for a bucket.
          * 
      * - * .google.storage.v2.Bucket.Encryption encryption = 20; + * + * .google.storage.v2.Bucket.Encryption encryption = 20 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.Bucket.EncryptionOrBuilder getEncryptionOrBuilder() { @@ -20458,10 +24850,11 @@ public com.google.storage.v2.Bucket.EncryptionOrBuilder getEncryptionOrBuilder() * * *
      -   * The bucket's billing config.
      +   * Optional. The bucket's billing config.
          * 
      * - * .google.storage.v2.Bucket.Billing billing = 21; + * .google.storage.v2.Bucket.Billing billing = 21 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the billing field is set. */ @@ -20474,10 +24867,11 @@ public boolean hasBilling() { * * *
      -   * The bucket's billing config.
      +   * Optional. The bucket's billing config.
          * 
      * - * .google.storage.v2.Bucket.Billing billing = 21; + * .google.storage.v2.Bucket.Billing billing = 21 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The billing. */ @@ -20490,10 +24884,11 @@ public com.google.storage.v2.Bucket.Billing getBilling() { * * *
      -   * The bucket's billing config.
      +   * Optional. The bucket's billing config.
          * 
      * - * .google.storage.v2.Bucket.Billing billing = 21; + * .google.storage.v2.Bucket.Billing billing = 21 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.Bucket.BillingOrBuilder getBillingOrBuilder() { @@ -20507,18 +24902,20 @@ public com.google.storage.v2.Bucket.BillingOrBuilder getBillingOrBuilder() { * * *
      -   * The bucket's retention policy. The retention policy enforces a minimum
      -   * retention time for all objects contained in the bucket, based on their
      -   * creation time. Any attempt to overwrite or delete objects younger than the
      -   * retention period will result in a PERMISSION_DENIED error.  An unlocked
      -   * retention policy can be modified or removed from the bucket via a
      +   * Optional. The bucket's retention policy. The retention policy enforces a
      +   * minimum retention time for all objects contained in the bucket, based on
      +   * their creation time. Any attempt to overwrite or delete objects younger
      +   * than the retention period will result in a PERMISSION_DENIED error.  An
      +   * unlocked retention policy can be modified or removed from the bucket via a
          * storage.buckets.update operation. A locked retention policy cannot be
          * removed or shortened in duration for the lifetime of the bucket.
          * Attempting to remove or decrease period of a locked retention policy will
          * result in a PERMISSION_DENIED error.
          * 
      * - * .google.storage.v2.Bucket.RetentionPolicy retention_policy = 22; + * + * .google.storage.v2.Bucket.RetentionPolicy retention_policy = 22 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the retentionPolicy field is set. */ @@ -20531,18 +24928,20 @@ public boolean hasRetentionPolicy() { * * *
      -   * The bucket's retention policy. The retention policy enforces a minimum
      -   * retention time for all objects contained in the bucket, based on their
      -   * creation time. Any attempt to overwrite or delete objects younger than the
      -   * retention period will result in a PERMISSION_DENIED error.  An unlocked
      -   * retention policy can be modified or removed from the bucket via a
      +   * Optional. The bucket's retention policy. The retention policy enforces a
      +   * minimum retention time for all objects contained in the bucket, based on
      +   * their creation time. Any attempt to overwrite or delete objects younger
      +   * than the retention period will result in a PERMISSION_DENIED error.  An
      +   * unlocked retention policy can be modified or removed from the bucket via a
          * storage.buckets.update operation. A locked retention policy cannot be
          * removed or shortened in duration for the lifetime of the bucket.
          * Attempting to remove or decrease period of a locked retention policy will
          * result in a PERMISSION_DENIED error.
          * 
      * - * .google.storage.v2.Bucket.RetentionPolicy retention_policy = 22; + * + * .google.storage.v2.Bucket.RetentionPolicy retention_policy = 22 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The retentionPolicy. */ @@ -20557,18 +24956,20 @@ public com.google.storage.v2.Bucket.RetentionPolicy getRetentionPolicy() { * * *
      -   * The bucket's retention policy. The retention policy enforces a minimum
      -   * retention time for all objects contained in the bucket, based on their
      -   * creation time. Any attempt to overwrite or delete objects younger than the
      -   * retention period will result in a PERMISSION_DENIED error.  An unlocked
      -   * retention policy can be modified or removed from the bucket via a
      +   * Optional. The bucket's retention policy. The retention policy enforces a
      +   * minimum retention time for all objects contained in the bucket, based on
      +   * their creation time. Any attempt to overwrite or delete objects younger
      +   * than the retention period will result in a PERMISSION_DENIED error.  An
      +   * unlocked retention policy can be modified or removed from the bucket via a
          * storage.buckets.update operation. A locked retention policy cannot be
          * removed or shortened in duration for the lifetime of the bucket.
          * Attempting to remove or decrease period of a locked retention policy will
          * result in a PERMISSION_DENIED error.
          * 
      * - * .google.storage.v2.Bucket.RetentionPolicy retention_policy = 22; + * + * .google.storage.v2.Bucket.RetentionPolicy retention_policy = 22 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.Bucket.RetentionPolicyOrBuilder getRetentionPolicyOrBuilder() { @@ -20584,10 +24985,12 @@ public com.google.storage.v2.Bucket.RetentionPolicyOrBuilder getRetentionPolicyO * * *
      -   * The bucket's IAM config.
      +   * Optional. The bucket's IAM config.
          * 
      * - * .google.storage.v2.Bucket.IamConfig iam_config = 23; + * + * .google.storage.v2.Bucket.IamConfig iam_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the iamConfig field is set. */ @@ -20600,10 +25003,12 @@ public boolean hasIamConfig() { * * *
      -   * The bucket's IAM config.
      +   * Optional. The bucket's IAM config.
          * 
      * - * .google.storage.v2.Bucket.IamConfig iam_config = 23; + * + * .google.storage.v2.Bucket.IamConfig iam_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The iamConfig. */ @@ -20618,10 +25023,12 @@ public com.google.storage.v2.Bucket.IamConfig getIamConfig() { * * *
      -   * The bucket's IAM config.
      +   * Optional. The bucket's IAM config.
          * 
      * - * .google.storage.v2.Bucket.IamConfig iam_config = 23; + * + * .google.storage.v2.Bucket.IamConfig iam_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.Bucket.IamConfigOrBuilder getIamConfigOrBuilder() { @@ -20637,10 +25044,10 @@ public com.google.storage.v2.Bucket.IamConfigOrBuilder getIamConfigOrBuilder() { * * *
      -   * Reserved for future use.
      +   * Optional. Reserved for future use.
          * 
      * - * bool satisfies_pzs = 25; + * bool satisfies_pzs = 25 [(.google.api.field_behavior) = OPTIONAL]; * * @return The satisfiesPzs. */ @@ -20656,12 +25063,15 @@ public boolean getSatisfiesPzs() { * * *
      -   * Configuration that, if present, specifies the data placement for a
      +   * Optional. Configuration that, if present, specifies the data placement for
      +   * a
          * [https://cloud.google.com/storage/docs/locations#location-dr][configurable
          * dual-region].
          * 
      * - * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26; + * + * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the customPlacementConfig field is set. */ @@ -20674,12 +25084,15 @@ public boolean hasCustomPlacementConfig() { * * *
      -   * Configuration that, if present, specifies the data placement for a
      +   * Optional. Configuration that, if present, specifies the data placement for
      +   * a
          * [https://cloud.google.com/storage/docs/locations#location-dr][configurable
          * dual-region].
          * 
      * - * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26; + * + * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The customPlacementConfig. */ @@ -20694,12 +25107,15 @@ public com.google.storage.v2.Bucket.CustomPlacementConfig getCustomPlacementConf * * *
      -   * Configuration that, if present, specifies the data placement for a
      +   * Optional. Configuration that, if present, specifies the data placement for
      +   * a
          * [https://cloud.google.com/storage/docs/locations#location-dr][configurable
          * dual-region].
          * 
      * - * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26; + * + * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.Bucket.CustomPlacementConfigOrBuilder @@ -20716,11 +25132,14 @@ public com.google.storage.v2.Bucket.CustomPlacementConfig getCustomPlacementConf * * *
      -   * The bucket's Autoclass configuration. If there is no configuration, the
      -   * Autoclass feature will be disabled and have no effect on the bucket.
      +   * Optional. The bucket's Autoclass configuration. If there is no
      +   * configuration, the Autoclass feature will be disabled and have no effect on
      +   * the bucket.
          * 
      * - * .google.storage.v2.Bucket.Autoclass autoclass = 28; + * + * .google.storage.v2.Bucket.Autoclass autoclass = 28 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the autoclass field is set. */ @@ -20733,11 +25152,14 @@ public boolean hasAutoclass() { * * *
      -   * The bucket's Autoclass configuration. If there is no configuration, the
      -   * Autoclass feature will be disabled and have no effect on the bucket.
      +   * Optional. The bucket's Autoclass configuration. If there is no
      +   * configuration, the Autoclass feature will be disabled and have no effect on
      +   * the bucket.
          * 
      * - * .google.storage.v2.Bucket.Autoclass autoclass = 28; + * + * .google.storage.v2.Bucket.Autoclass autoclass = 28 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The autoclass. */ @@ -20752,11 +25174,14 @@ public com.google.storage.v2.Bucket.Autoclass getAutoclass() { * * *
      -   * The bucket's Autoclass configuration. If there is no configuration, the
      -   * Autoclass feature will be disabled and have no effect on the bucket.
      +   * Optional. The bucket's Autoclass configuration. If there is no
      +   * configuration, the Autoclass feature will be disabled and have no effect on
      +   * the bucket.
          * 
      * - * .google.storage.v2.Bucket.Autoclass autoclass = 28; + * + * .google.storage.v2.Bucket.Autoclass autoclass = 28 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.Bucket.AutoclassOrBuilder getAutoclassOrBuilder() { @@ -20893,6 +25318,65 @@ public com.google.storage.v2.Bucket.SoftDeletePolicyOrBuilder getSoftDeletePolic : softDeletePolicy_; } + public static final int IP_FILTER_FIELD_NUMBER = 38; + private com.google.storage.v2.Bucket.IpFilter ipFilter_; + + /** + * + * + *
      +   * Optional. The bucket's IP filter configuration.
      +   * 
      + * + * + * optional .google.storage.v2.Bucket.IpFilter ip_filter = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the ipFilter field is set. + */ + @java.lang.Override + public boolean hasIpFilter() { + return ((bitField0_ & 0x00008000) != 0); + } + + /** + * + * + *
      +   * Optional. The bucket's IP filter configuration.
      +   * 
      + * + * + * optional .google.storage.v2.Bucket.IpFilter ip_filter = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ipFilter. + */ + @java.lang.Override + public com.google.storage.v2.Bucket.IpFilter getIpFilter() { + return ipFilter_ == null + ? com.google.storage.v2.Bucket.IpFilter.getDefaultInstance() + : ipFilter_; + } + + /** + * + * + *
      +   * Optional. The bucket's IP filter configuration.
      +   * 
      + * + * + * optional .google.storage.v2.Bucket.IpFilter ip_filter = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.storage.v2.Bucket.IpFilterOrBuilder getIpFilterOrBuilder() { + return ipFilter_ == null + ? com.google.storage.v2.Bucket.IpFilter.getDefaultInstance() + : ipFilter_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -20996,6 +25480,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00002000) != 0)) { output.writeMessage(32, getHierarchicalNamespace()); } + if (((bitField0_ & 0x00008000) != 0)) { + output.writeMessage(38, getIpFilter()); + } getUnknownFields().writeTo(output); } @@ -21104,6 +25591,9 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(32, getHierarchicalNamespace()); } + if (((bitField0_ & 0x00008000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(38, getIpFilter()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -21194,6 +25684,10 @@ public boolean equals(final java.lang.Object obj) { if (hasSoftDeletePolicy()) { if (!getSoftDeletePolicy().equals(other.getSoftDeletePolicy())) return false; } + if (hasIpFilter() != other.hasIpFilter()) return false; + if (hasIpFilter()) { + if (!getIpFilter().equals(other.getIpFilter())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -21303,6 +25797,10 @@ public int hashCode() { hash = (37 * hash) + SOFT_DELETE_POLICY_FIELD_NUMBER; hash = (53 * hash) + getSoftDeletePolicy().hashCode(); } + if (hasIpFilter()) { + hash = (37 * hash) + IP_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getIpFilter().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -21481,6 +25979,7 @@ private void maybeForceBuilderInitialization() { getAutoclassFieldBuilder(); getHierarchicalNamespaceFieldBuilder(); getSoftDeletePolicyFieldBuilder(); + getIpFilterFieldBuilder(); } } @@ -21596,6 +26095,11 @@ public Builder clear() { softDeletePolicyBuilder_.dispose(); softDeletePolicyBuilder_ = null; } + ipFilter_ = null; + if (ipFilterBuilder_ != null) { + ipFilterBuilder_.dispose(); + ipFilterBuilder_ = null; + } return this; } @@ -21767,6 +26271,10 @@ private void buildPartial0(com.google.storage.v2.Bucket result) { softDeletePolicyBuilder_ == null ? softDeletePolicy_ : softDeletePolicyBuilder_.build(); to_bitField0_ |= 0x00004000; } + if (((from_bitField0_ & 0x40000000) != 0)) { + result.ipFilter_ = ipFilterBuilder_ == null ? ipFilter_ : ipFilterBuilder_.build(); + to_bitField0_ |= 0x00008000; + } result.bitField0_ |= to_bitField0_; } @@ -21992,6 +26500,9 @@ public Builder mergeFrom(com.google.storage.v2.Bucket other) { if (other.hasSoftDeletePolicy()) { mergeSoftDeletePolicy(other.getSoftDeletePolicy()); } + if (other.hasIpFilter()) { + mergeIpFilter(other.getIpFilter()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -22228,6 +26739,12 @@ public Builder mergeFrom( bitField0_ |= 0x10000000; break; } // case 258 + case 306: + { + input.readMessage(getIpFilterFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x40000000; + break; + } // case 306 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -22253,11 +26770,11 @@ public Builder mergeFrom( * * *
      -     * Immutable. The name of the bucket.
      +     * Identifier. The name of the bucket.
            * Format: `projects/{project}/buckets/{bucket}`
            * 
      * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The name. */ @@ -22277,11 +26794,11 @@ public java.lang.String getName() { * * *
      -     * Immutable. The name of the bucket.
      +     * Identifier. The name of the bucket.
            * Format: `projects/{project}/buckets/{bucket}`
            * 
      * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The bytes for name. */ @@ -22301,11 +26818,11 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
      -     * Immutable. The name of the bucket.
      +     * Identifier. The name of the bucket.
            * Format: `projects/{project}/buckets/{bucket}`
            * 
      * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @param value The name to set. * @return This builder for chaining. @@ -22324,11 +26841,11 @@ public Builder setName(java.lang.String value) { * * *
      -     * Immutable. The name of the bucket.
      +     * Identifier. The name of the bucket.
            * Format: `projects/{project}/buckets/{bucket}`
            * 
      * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return This builder for chaining. */ @@ -22343,11 +26860,11 @@ public Builder clearName() { * * *
      -     * Immutable. The name of the bucket.
      +     * Identifier. The name of the bucket.
            * Format: `projects/{project}/buckets/{bucket}`
            * 
      * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @param value The bytes for name to set. * @return This builder for chaining. @@ -22614,6 +27131,7 @@ public Builder setEtagBytes(com.google.protobuf.ByteString value) { * Immutable. The project which owns this bucket, in the format of * "projects/{projectIdentifier}". * {projectIdentifier} can be the project ID or project number. + * Output values will always be in project number format. * * * @@ -22641,6 +27159,7 @@ public java.lang.String getProject() { * Immutable. The project which owns this bucket, in the format of * "projects/{projectIdentifier}". * {projectIdentifier} can be the project ID or project number. + * Output values will always be in project number format. * * * @@ -22668,6 +27187,7 @@ public com.google.protobuf.ByteString getProjectBytes() { * Immutable. The project which owns this bucket, in the format of * "projects/{projectIdentifier}". * {projectIdentifier} can be the project ID or project number. + * Output values will always be in project number format. * * * @@ -22694,6 +27214,7 @@ public Builder setProject(java.lang.String value) { * Immutable. The project which owns this bucket, in the format of * "projects/{projectIdentifier}". * {projectIdentifier} can be the project ID or project number. + * Output values will always be in project number format. * * * @@ -22716,6 +27237,7 @@ public Builder clearProject() { * Immutable. The project which owns this bucket, in the format of * "projects/{projectIdentifier}". * {projectIdentifier} can be the project ID or project number. + * Output values will always be in project number format. * * * @@ -23050,15 +27572,15 @@ public Builder setLocationTypeBytes(com.google.protobuf.ByteString value) { * * *
      -     * The bucket's default storage class, used whenever no storageClass is
      -     * specified for a newly-created object. This defines how objects in the
      +     * Optional. The bucket's default storage class, used whenever no storageClass
      +     * is specified for a newly-created object. This defines how objects in the
            * bucket are stored and determines the SLA and the cost of storage.
            * If this value is not specified when the bucket is created, it will default
            * to `STANDARD`. For more information, see
            * https://developers.google.com/storage/docs/storage-classes.
            * 
      * - * string storage_class = 7; + * string storage_class = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The storageClass. */ @@ -23078,15 +27600,15 @@ public java.lang.String getStorageClass() { * * *
      -     * The bucket's default storage class, used whenever no storageClass is
      -     * specified for a newly-created object. This defines how objects in the
      +     * Optional. The bucket's default storage class, used whenever no storageClass
      +     * is specified for a newly-created object. This defines how objects in the
            * bucket are stored and determines the SLA and the cost of storage.
            * If this value is not specified when the bucket is created, it will default
            * to `STANDARD`. For more information, see
            * https://developers.google.com/storage/docs/storage-classes.
            * 
      * - * string storage_class = 7; + * string storage_class = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for storageClass. */ @@ -23106,15 +27628,15 @@ public com.google.protobuf.ByteString getStorageClassBytes() { * * *
      -     * The bucket's default storage class, used whenever no storageClass is
      -     * specified for a newly-created object. This defines how objects in the
      +     * Optional. The bucket's default storage class, used whenever no storageClass
      +     * is specified for a newly-created object. This defines how objects in the
            * bucket are stored and determines the SLA and the cost of storage.
            * If this value is not specified when the bucket is created, it will default
            * to `STANDARD`. For more information, see
            * https://developers.google.com/storage/docs/storage-classes.
            * 
      * - * string storage_class = 7; + * string storage_class = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The storageClass to set. * @return This builder for chaining. @@ -23133,15 +27655,15 @@ public Builder setStorageClass(java.lang.String value) { * * *
      -     * The bucket's default storage class, used whenever no storageClass is
      -     * specified for a newly-created object. This defines how objects in the
      +     * Optional. The bucket's default storage class, used whenever no storageClass
      +     * is specified for a newly-created object. This defines how objects in the
            * bucket are stored and determines the SLA and the cost of storage.
            * If this value is not specified when the bucket is created, it will default
            * to `STANDARD`. For more information, see
            * https://developers.google.com/storage/docs/storage-classes.
            * 
      * - * string storage_class = 7; + * string storage_class = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -23156,15 +27678,15 @@ public Builder clearStorageClass() { * * *
      -     * The bucket's default storage class, used whenever no storageClass is
      -     * specified for a newly-created object. This defines how objects in the
      +     * Optional. The bucket's default storage class, used whenever no storageClass
      +     * is specified for a newly-created object. This defines how objects in the
            * bucket are stored and determines the SLA and the cost of storage.
            * If this value is not specified when the bucket is created, it will default
            * to `STANDARD`. For more information, see
            * https://developers.google.com/storage/docs/storage-classes.
            * 
      * - * string storage_class = 7; + * string storage_class = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for storageClass to set. * @return This builder for chaining. @@ -23186,15 +27708,15 @@ public Builder setStorageClassBytes(com.google.protobuf.ByteString value) { * * *
      -     * The recovery point objective for cross-region replication of the bucket.
      -     * Applicable only for dual- and multi-region buckets. "DEFAULT" uses default
      -     * replication. "ASYNC_TURBO" enables turbo replication, valid for dual-region
      -     * buckets only. If rpo is not specified when the bucket is created, it
      -     * defaults to "DEFAULT". For more information, see
      +     * Optional. The recovery point objective for cross-region replication of the
      +     * bucket. Applicable only for dual- and multi-region buckets. "DEFAULT" uses
      +     * default replication. "ASYNC_TURBO" enables turbo replication, valid for
      +     * dual-region buckets only. If rpo is not specified when the bucket is
      +     * created, it defaults to "DEFAULT". For more information, see
            * https://cloud.google.com/storage/docs/availability-durability#turbo-replication.
            * 
      * - * string rpo = 27; + * string rpo = 27 [(.google.api.field_behavior) = OPTIONAL]; * * @return The rpo. */ @@ -23214,15 +27736,15 @@ public java.lang.String getRpo() { * * *
      -     * The recovery point objective for cross-region replication of the bucket.
      -     * Applicable only for dual- and multi-region buckets. "DEFAULT" uses default
      -     * replication. "ASYNC_TURBO" enables turbo replication, valid for dual-region
      -     * buckets only. If rpo is not specified when the bucket is created, it
      -     * defaults to "DEFAULT". For more information, see
      +     * Optional. The recovery point objective for cross-region replication of the
      +     * bucket. Applicable only for dual- and multi-region buckets. "DEFAULT" uses
      +     * default replication. "ASYNC_TURBO" enables turbo replication, valid for
      +     * dual-region buckets only. If rpo is not specified when the bucket is
      +     * created, it defaults to "DEFAULT". For more information, see
            * https://cloud.google.com/storage/docs/availability-durability#turbo-replication.
            * 
      * - * string rpo = 27; + * string rpo = 27 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for rpo. */ @@ -23242,15 +27764,15 @@ public com.google.protobuf.ByteString getRpoBytes() { * * *
      -     * The recovery point objective for cross-region replication of the bucket.
      -     * Applicable only for dual- and multi-region buckets. "DEFAULT" uses default
      -     * replication. "ASYNC_TURBO" enables turbo replication, valid for dual-region
      -     * buckets only. If rpo is not specified when the bucket is created, it
      -     * defaults to "DEFAULT". For more information, see
      +     * Optional. The recovery point objective for cross-region replication of the
      +     * bucket. Applicable only for dual- and multi-region buckets. "DEFAULT" uses
      +     * default replication. "ASYNC_TURBO" enables turbo replication, valid for
      +     * dual-region buckets only. If rpo is not specified when the bucket is
      +     * created, it defaults to "DEFAULT". For more information, see
            * https://cloud.google.com/storage/docs/availability-durability#turbo-replication.
            * 
      * - * string rpo = 27; + * string rpo = 27 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The rpo to set. * @return This builder for chaining. @@ -23269,15 +27791,15 @@ public Builder setRpo(java.lang.String value) { * * *
      -     * The recovery point objective for cross-region replication of the bucket.
      -     * Applicable only for dual- and multi-region buckets. "DEFAULT" uses default
      -     * replication. "ASYNC_TURBO" enables turbo replication, valid for dual-region
      -     * buckets only. If rpo is not specified when the bucket is created, it
      -     * defaults to "DEFAULT". For more information, see
      +     * Optional. The recovery point objective for cross-region replication of the
      +     * bucket. Applicable only for dual- and multi-region buckets. "DEFAULT" uses
      +     * default replication. "ASYNC_TURBO" enables turbo replication, valid for
      +     * dual-region buckets only. If rpo is not specified when the bucket is
      +     * created, it defaults to "DEFAULT". For more information, see
            * https://cloud.google.com/storage/docs/availability-durability#turbo-replication.
            * 
      * - * string rpo = 27; + * string rpo = 27 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -23292,15 +27814,15 @@ public Builder clearRpo() { * * *
      -     * The recovery point objective for cross-region replication of the bucket.
      -     * Applicable only for dual- and multi-region buckets. "DEFAULT" uses default
      -     * replication. "ASYNC_TURBO" enables turbo replication, valid for dual-region
      -     * buckets only. If rpo is not specified when the bucket is created, it
      -     * defaults to "DEFAULT". For more information, see
      +     * Optional. The recovery point objective for cross-region replication of the
      +     * bucket. Applicable only for dual- and multi-region buckets. "DEFAULT" uses
      +     * default replication. "ASYNC_TURBO" enables turbo replication, valid for
      +     * dual-region buckets only. If rpo is not specified when the bucket is
      +     * created, it defaults to "DEFAULT". For more information, see
            * https://cloud.google.com/storage/docs/availability-durability#turbo-replication.
            * 
      * - * string rpo = 27; + * string rpo = 27 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for rpo to set. * @return This builder for chaining. @@ -23336,12 +27858,14 @@ private void ensureAclIsMutable() { * * *
      -     * Access controls on the bucket.
      +     * Optional. Access controls on the bucket.
            * If iam_config.uniform_bucket_level_access is enabled on this bucket,
            * requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.BucketAccessControl acl = 8; + * + * repeated .google.storage.v2.BucketAccessControl acl = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public java.util.List getAclList() { if (aclBuilder_ == null) { @@ -23355,12 +27879,14 @@ public java.util.List getAclList() { * * *
      -     * Access controls on the bucket.
      +     * Optional. Access controls on the bucket.
            * If iam_config.uniform_bucket_level_access is enabled on this bucket,
            * requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.BucketAccessControl acl = 8; + * + * repeated .google.storage.v2.BucketAccessControl acl = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public int getAclCount() { if (aclBuilder_ == null) { @@ -23374,12 +27900,14 @@ public int getAclCount() { * * *
      -     * Access controls on the bucket.
      +     * Optional. Access controls on the bucket.
            * If iam_config.uniform_bucket_level_access is enabled on this bucket,
            * requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.BucketAccessControl acl = 8; + * + * repeated .google.storage.v2.BucketAccessControl acl = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.BucketAccessControl getAcl(int index) { if (aclBuilder_ == null) { @@ -23393,12 +27921,14 @@ public com.google.storage.v2.BucketAccessControl getAcl(int index) { * * *
      -     * Access controls on the bucket.
      +     * Optional. Access controls on the bucket.
            * If iam_config.uniform_bucket_level_access is enabled on this bucket,
            * requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.BucketAccessControl acl = 8; + * + * repeated .google.storage.v2.BucketAccessControl acl = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setAcl(int index, com.google.storage.v2.BucketAccessControl value) { if (aclBuilder_ == null) { @@ -23418,12 +27948,14 @@ public Builder setAcl(int index, com.google.storage.v2.BucketAccessControl value * * *
      -     * Access controls on the bucket.
      +     * Optional. Access controls on the bucket.
            * If iam_config.uniform_bucket_level_access is enabled on this bucket,
            * requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.BucketAccessControl acl = 8; + * + * repeated .google.storage.v2.BucketAccessControl acl = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setAcl( int index, com.google.storage.v2.BucketAccessControl.Builder builderForValue) { @@ -23441,12 +27973,14 @@ public Builder setAcl( * * *
      -     * Access controls on the bucket.
      +     * Optional. Access controls on the bucket.
            * If iam_config.uniform_bucket_level_access is enabled on this bucket,
            * requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.BucketAccessControl acl = 8; + * + * repeated .google.storage.v2.BucketAccessControl acl = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder addAcl(com.google.storage.v2.BucketAccessControl value) { if (aclBuilder_ == null) { @@ -23466,12 +28000,14 @@ public Builder addAcl(com.google.storage.v2.BucketAccessControl value) { * * *
      -     * Access controls on the bucket.
      +     * Optional. Access controls on the bucket.
            * If iam_config.uniform_bucket_level_access is enabled on this bucket,
            * requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.BucketAccessControl acl = 8; + * + * repeated .google.storage.v2.BucketAccessControl acl = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder addAcl(int index, com.google.storage.v2.BucketAccessControl value) { if (aclBuilder_ == null) { @@ -23491,12 +28027,14 @@ public Builder addAcl(int index, com.google.storage.v2.BucketAccessControl value * * *
      -     * Access controls on the bucket.
      +     * Optional. Access controls on the bucket.
            * If iam_config.uniform_bucket_level_access is enabled on this bucket,
            * requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.BucketAccessControl acl = 8; + * + * repeated .google.storage.v2.BucketAccessControl acl = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder addAcl(com.google.storage.v2.BucketAccessControl.Builder builderForValue) { if (aclBuilder_ == null) { @@ -23513,12 +28051,14 @@ public Builder addAcl(com.google.storage.v2.BucketAccessControl.Builder builderF * * *
      -     * Access controls on the bucket.
      +     * Optional. Access controls on the bucket.
            * If iam_config.uniform_bucket_level_access is enabled on this bucket,
            * requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.BucketAccessControl acl = 8; + * + * repeated .google.storage.v2.BucketAccessControl acl = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder addAcl( int index, com.google.storage.v2.BucketAccessControl.Builder builderForValue) { @@ -23536,12 +28076,14 @@ public Builder addAcl( * * *
      -     * Access controls on the bucket.
      +     * Optional. Access controls on the bucket.
            * If iam_config.uniform_bucket_level_access is enabled on this bucket,
            * requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.BucketAccessControl acl = 8; + * + * repeated .google.storage.v2.BucketAccessControl acl = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder addAllAcl( java.lang.Iterable values) { @@ -23559,12 +28101,14 @@ public Builder addAllAcl( * * *
      -     * Access controls on the bucket.
      +     * Optional. Access controls on the bucket.
            * If iam_config.uniform_bucket_level_access is enabled on this bucket,
            * requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.BucketAccessControl acl = 8; + * + * repeated .google.storage.v2.BucketAccessControl acl = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearAcl() { if (aclBuilder_ == null) { @@ -23581,12 +28125,14 @@ public Builder clearAcl() { * * *
      -     * Access controls on the bucket.
      +     * Optional. Access controls on the bucket.
            * If iam_config.uniform_bucket_level_access is enabled on this bucket,
            * requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.BucketAccessControl acl = 8; + * + * repeated .google.storage.v2.BucketAccessControl acl = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder removeAcl(int index) { if (aclBuilder_ == null) { @@ -23603,12 +28149,14 @@ public Builder removeAcl(int index) { * * *
      -     * Access controls on the bucket.
      +     * Optional. Access controls on the bucket.
            * If iam_config.uniform_bucket_level_access is enabled on this bucket,
            * requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.BucketAccessControl acl = 8; + * + * repeated .google.storage.v2.BucketAccessControl acl = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.BucketAccessControl.Builder getAclBuilder(int index) { return getAclFieldBuilder().getBuilder(index); @@ -23618,12 +28166,14 @@ public com.google.storage.v2.BucketAccessControl.Builder getAclBuilder(int index * * *
      -     * Access controls on the bucket.
      +     * Optional. Access controls on the bucket.
            * If iam_config.uniform_bucket_level_access is enabled on this bucket,
            * requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.BucketAccessControl acl = 8; + * + * repeated .google.storage.v2.BucketAccessControl acl = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.BucketAccessControlOrBuilder getAclOrBuilder(int index) { if (aclBuilder_ == null) { @@ -23637,12 +28187,14 @@ public com.google.storage.v2.BucketAccessControlOrBuilder getAclOrBuilder(int in * * *
      -     * Access controls on the bucket.
      +     * Optional. Access controls on the bucket.
            * If iam_config.uniform_bucket_level_access is enabled on this bucket,
            * requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.BucketAccessControl acl = 8; + * + * repeated .google.storage.v2.BucketAccessControl acl = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public java.util.List getAclOrBuilderList() { @@ -23657,12 +28209,14 @@ public com.google.storage.v2.BucketAccessControlOrBuilder getAclOrBuilder(int in * * *
      -     * Access controls on the bucket.
      +     * Optional. Access controls on the bucket.
            * If iam_config.uniform_bucket_level_access is enabled on this bucket,
            * requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.BucketAccessControl acl = 8; + * + * repeated .google.storage.v2.BucketAccessControl acl = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.BucketAccessControl.Builder addAclBuilder() { return getAclFieldBuilder() @@ -23673,12 +28227,14 @@ public com.google.storage.v2.BucketAccessControl.Builder addAclBuilder() { * * *
      -     * Access controls on the bucket.
      +     * Optional. Access controls on the bucket.
            * If iam_config.uniform_bucket_level_access is enabled on this bucket,
            * requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.BucketAccessControl acl = 8; + * + * repeated .google.storage.v2.BucketAccessControl acl = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.BucketAccessControl.Builder addAclBuilder(int index) { return getAclFieldBuilder() @@ -23689,12 +28245,14 @@ public com.google.storage.v2.BucketAccessControl.Builder addAclBuilder(int index * * *
      -     * Access controls on the bucket.
      +     * Optional. Access controls on the bucket.
            * If iam_config.uniform_bucket_level_access is enabled on this bucket,
            * requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.BucketAccessControl acl = 8; + * + * repeated .google.storage.v2.BucketAccessControl acl = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public java.util.List getAclBuilderList() { return getAclFieldBuilder().getBuilderList(); @@ -23738,12 +28296,14 @@ private void ensureDefaultObjectAclIsMutable() { * * *
      -     * Default access controls to apply to new objects when no ACL is provided.
      -     * If iam_config.uniform_bucket_level_access is enabled on this bucket,
      -     * requests to set, read, or modify acl is an error.
      +     * Optional. Default access controls to apply to new objects when no ACL is
      +     * provided. If iam_config.uniform_bucket_level_access is enabled on this
      +     * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9; + * + * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ public java.util.List getDefaultObjectAclList() { if (defaultObjectAclBuilder_ == null) { @@ -23757,12 +28317,14 @@ public java.util.List getDefaultObjec * * *
      -     * Default access controls to apply to new objects when no ACL is provided.
      -     * If iam_config.uniform_bucket_level_access is enabled on this bucket,
      -     * requests to set, read, or modify acl is an error.
      +     * Optional. Default access controls to apply to new objects when no ACL is
      +     * provided. If iam_config.uniform_bucket_level_access is enabled on this
      +     * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9; + * + * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ public int getDefaultObjectAclCount() { if (defaultObjectAclBuilder_ == null) { @@ -23776,12 +28338,14 @@ public int getDefaultObjectAclCount() { * * *
      -     * Default access controls to apply to new objects when no ACL is provided.
      -     * If iam_config.uniform_bucket_level_access is enabled on this bucket,
      -     * requests to set, read, or modify acl is an error.
      +     * Optional. Default access controls to apply to new objects when no ACL is
      +     * provided. If iam_config.uniform_bucket_level_access is enabled on this
      +     * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9; + * + * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.ObjectAccessControl getDefaultObjectAcl(int index) { if (defaultObjectAclBuilder_ == null) { @@ -23795,12 +28359,14 @@ public com.google.storage.v2.ObjectAccessControl getDefaultObjectAcl(int index) * * *
      -     * Default access controls to apply to new objects when no ACL is provided.
      -     * If iam_config.uniform_bucket_level_access is enabled on this bucket,
      -     * requests to set, read, or modify acl is an error.
      +     * Optional. Default access controls to apply to new objects when no ACL is
      +     * provided. If iam_config.uniform_bucket_level_access is enabled on this
      +     * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9; + * + * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setDefaultObjectAcl(int index, com.google.storage.v2.ObjectAccessControl value) { if (defaultObjectAclBuilder_ == null) { @@ -23820,12 +28386,14 @@ public Builder setDefaultObjectAcl(int index, com.google.storage.v2.ObjectAccess * * *
      -     * Default access controls to apply to new objects when no ACL is provided.
      -     * If iam_config.uniform_bucket_level_access is enabled on this bucket,
      -     * requests to set, read, or modify acl is an error.
      +     * Optional. Default access controls to apply to new objects when no ACL is
      +     * provided. If iam_config.uniform_bucket_level_access is enabled on this
      +     * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9; + * + * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setDefaultObjectAcl( int index, com.google.storage.v2.ObjectAccessControl.Builder builderForValue) { @@ -23843,12 +28411,14 @@ public Builder setDefaultObjectAcl( * * *
      -     * Default access controls to apply to new objects when no ACL is provided.
      -     * If iam_config.uniform_bucket_level_access is enabled on this bucket,
      -     * requests to set, read, or modify acl is an error.
      +     * Optional. Default access controls to apply to new objects when no ACL is
      +     * provided. If iam_config.uniform_bucket_level_access is enabled on this
      +     * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9; + * + * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder addDefaultObjectAcl(com.google.storage.v2.ObjectAccessControl value) { if (defaultObjectAclBuilder_ == null) { @@ -23868,12 +28438,14 @@ public Builder addDefaultObjectAcl(com.google.storage.v2.ObjectAccessControl val * * *
      -     * Default access controls to apply to new objects when no ACL is provided.
      -     * If iam_config.uniform_bucket_level_access is enabled on this bucket,
      -     * requests to set, read, or modify acl is an error.
      +     * Optional. Default access controls to apply to new objects when no ACL is
      +     * provided. If iam_config.uniform_bucket_level_access is enabled on this
      +     * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9; + * + * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder addDefaultObjectAcl(int index, com.google.storage.v2.ObjectAccessControl value) { if (defaultObjectAclBuilder_ == null) { @@ -23893,12 +28465,14 @@ public Builder addDefaultObjectAcl(int index, com.google.storage.v2.ObjectAccess * * *
      -     * Default access controls to apply to new objects when no ACL is provided.
      -     * If iam_config.uniform_bucket_level_access is enabled on this bucket,
      -     * requests to set, read, or modify acl is an error.
      +     * Optional. Default access controls to apply to new objects when no ACL is
      +     * provided. If iam_config.uniform_bucket_level_access is enabled on this
      +     * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9; + * + * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder addDefaultObjectAcl( com.google.storage.v2.ObjectAccessControl.Builder builderForValue) { @@ -23916,12 +28490,14 @@ public Builder addDefaultObjectAcl( * * *
      -     * Default access controls to apply to new objects when no ACL is provided.
      -     * If iam_config.uniform_bucket_level_access is enabled on this bucket,
      -     * requests to set, read, or modify acl is an error.
      +     * Optional. Default access controls to apply to new objects when no ACL is
      +     * provided. If iam_config.uniform_bucket_level_access is enabled on this
      +     * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9; + * + * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder addDefaultObjectAcl( int index, com.google.storage.v2.ObjectAccessControl.Builder builderForValue) { @@ -23939,12 +28515,14 @@ public Builder addDefaultObjectAcl( * * *
      -     * Default access controls to apply to new objects when no ACL is provided.
      -     * If iam_config.uniform_bucket_level_access is enabled on this bucket,
      -     * requests to set, read, or modify acl is an error.
      +     * Optional. Default access controls to apply to new objects when no ACL is
      +     * provided. If iam_config.uniform_bucket_level_access is enabled on this
      +     * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9; + * + * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder addAllDefaultObjectAcl( java.lang.Iterable values) { @@ -23962,12 +28540,14 @@ public Builder addAllDefaultObjectAcl( * * *
      -     * Default access controls to apply to new objects when no ACL is provided.
      -     * If iam_config.uniform_bucket_level_access is enabled on this bucket,
      -     * requests to set, read, or modify acl is an error.
      +     * Optional. Default access controls to apply to new objects when no ACL is
      +     * provided. If iam_config.uniform_bucket_level_access is enabled on this
      +     * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9; + * + * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearDefaultObjectAcl() { if (defaultObjectAclBuilder_ == null) { @@ -23984,12 +28564,14 @@ public Builder clearDefaultObjectAcl() { * * *
      -     * Default access controls to apply to new objects when no ACL is provided.
      -     * If iam_config.uniform_bucket_level_access is enabled on this bucket,
      -     * requests to set, read, or modify acl is an error.
      +     * Optional. Default access controls to apply to new objects when no ACL is
      +     * provided. If iam_config.uniform_bucket_level_access is enabled on this
      +     * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9; + * + * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder removeDefaultObjectAcl(int index) { if (defaultObjectAclBuilder_ == null) { @@ -24006,12 +28588,14 @@ public Builder removeDefaultObjectAcl(int index) { * * *
      -     * Default access controls to apply to new objects when no ACL is provided.
      -     * If iam_config.uniform_bucket_level_access is enabled on this bucket,
      -     * requests to set, read, or modify acl is an error.
      +     * Optional. Default access controls to apply to new objects when no ACL is
      +     * provided. If iam_config.uniform_bucket_level_access is enabled on this
      +     * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9; + * + * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.ObjectAccessControl.Builder getDefaultObjectAclBuilder(int index) { return getDefaultObjectAclFieldBuilder().getBuilder(index); @@ -24021,12 +28605,14 @@ public com.google.storage.v2.ObjectAccessControl.Builder getDefaultObjectAclBuil * * *
      -     * Default access controls to apply to new objects when no ACL is provided.
      -     * If iam_config.uniform_bucket_level_access is enabled on this bucket,
      -     * requests to set, read, or modify acl is an error.
      +     * Optional. Default access controls to apply to new objects when no ACL is
      +     * provided. If iam_config.uniform_bucket_level_access is enabled on this
      +     * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9; + * + * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.ObjectAccessControlOrBuilder getDefaultObjectAclOrBuilder( int index) { @@ -24041,12 +28627,14 @@ public com.google.storage.v2.ObjectAccessControlOrBuilder getDefaultObjectAclOrB * * *
      -     * Default access controls to apply to new objects when no ACL is provided.
      -     * If iam_config.uniform_bucket_level_access is enabled on this bucket,
      -     * requests to set, read, or modify acl is an error.
      +     * Optional. Default access controls to apply to new objects when no ACL is
      +     * provided. If iam_config.uniform_bucket_level_access is enabled on this
      +     * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9; + * + * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ public java.util.List getDefaultObjectAclOrBuilderList() { @@ -24061,12 +28649,14 @@ public com.google.storage.v2.ObjectAccessControlOrBuilder getDefaultObjectAclOrB * * *
      -     * Default access controls to apply to new objects when no ACL is provided.
      -     * If iam_config.uniform_bucket_level_access is enabled on this bucket,
      -     * requests to set, read, or modify acl is an error.
      +     * Optional. Default access controls to apply to new objects when no ACL is
      +     * provided. If iam_config.uniform_bucket_level_access is enabled on this
      +     * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9; + * + * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.ObjectAccessControl.Builder addDefaultObjectAclBuilder() { return getDefaultObjectAclFieldBuilder() @@ -24077,12 +28667,14 @@ public com.google.storage.v2.ObjectAccessControl.Builder addDefaultObjectAclBuil * * *
      -     * Default access controls to apply to new objects when no ACL is provided.
      -     * If iam_config.uniform_bucket_level_access is enabled on this bucket,
      -     * requests to set, read, or modify acl is an error.
      +     * Optional. Default access controls to apply to new objects when no ACL is
      +     * provided. If iam_config.uniform_bucket_level_access is enabled on this
      +     * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9; + * + * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.ObjectAccessControl.Builder addDefaultObjectAclBuilder(int index) { return getDefaultObjectAclFieldBuilder() @@ -24093,12 +28685,14 @@ public com.google.storage.v2.ObjectAccessControl.Builder addDefaultObjectAclBuil * * *
      -     * Default access controls to apply to new objects when no ACL is provided.
      -     * If iam_config.uniform_bucket_level_access is enabled on this bucket,
      -     * requests to set, read, or modify acl is an error.
      +     * Optional. Default access controls to apply to new objects when no ACL is
      +     * provided. If iam_config.uniform_bucket_level_access is enabled on this
      +     * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9; + * + * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ public java.util.List getDefaultObjectAclBuilderList() { @@ -24136,12 +28730,14 @@ public com.google.storage.v2.ObjectAccessControl.Builder addDefaultObjectAclBuil * * *
      -     * The bucket's lifecycle config. See
      +     * Optional. The bucket's lifecycle config. See
            * [https://developers.google.com/storage/docs/lifecycle]Lifecycle Management]
            * for more information.
            * 
      * - * .google.storage.v2.Bucket.Lifecycle lifecycle = 10; + * + * .google.storage.v2.Bucket.Lifecycle lifecycle = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the lifecycle field is set. */ @@ -24153,12 +28749,14 @@ public boolean hasLifecycle() { * * *
      -     * The bucket's lifecycle config. See
      +     * Optional. The bucket's lifecycle config. See
            * [https://developers.google.com/storage/docs/lifecycle]Lifecycle Management]
            * for more information.
            * 
      * - * .google.storage.v2.Bucket.Lifecycle lifecycle = 10; + * + * .google.storage.v2.Bucket.Lifecycle lifecycle = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The lifecycle. */ @@ -24176,12 +28774,14 @@ public com.google.storage.v2.Bucket.Lifecycle getLifecycle() { * * *
      -     * The bucket's lifecycle config. See
      +     * Optional. The bucket's lifecycle config. See
            * [https://developers.google.com/storage/docs/lifecycle]Lifecycle Management]
            * for more information.
            * 
      * - * .google.storage.v2.Bucket.Lifecycle lifecycle = 10; + * + * .google.storage.v2.Bucket.Lifecycle lifecycle = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setLifecycle(com.google.storage.v2.Bucket.Lifecycle value) { if (lifecycleBuilder_ == null) { @@ -24201,12 +28801,14 @@ public Builder setLifecycle(com.google.storage.v2.Bucket.Lifecycle value) { * * *
      -     * The bucket's lifecycle config. See
      +     * Optional. The bucket's lifecycle config. See
            * [https://developers.google.com/storage/docs/lifecycle]Lifecycle Management]
            * for more information.
            * 
      * - * .google.storage.v2.Bucket.Lifecycle lifecycle = 10; + * + * .google.storage.v2.Bucket.Lifecycle lifecycle = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setLifecycle(com.google.storage.v2.Bucket.Lifecycle.Builder builderForValue) { if (lifecycleBuilder_ == null) { @@ -24223,12 +28825,14 @@ public Builder setLifecycle(com.google.storage.v2.Bucket.Lifecycle.Builder build * * *
      -     * The bucket's lifecycle config. See
      +     * Optional. The bucket's lifecycle config. See
            * [https://developers.google.com/storage/docs/lifecycle]Lifecycle Management]
            * for more information.
            * 
      * - * .google.storage.v2.Bucket.Lifecycle lifecycle = 10; + * + * .google.storage.v2.Bucket.Lifecycle lifecycle = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeLifecycle(com.google.storage.v2.Bucket.Lifecycle value) { if (lifecycleBuilder_ == null) { @@ -24253,12 +28857,14 @@ public Builder mergeLifecycle(com.google.storage.v2.Bucket.Lifecycle value) { * * *
      -     * The bucket's lifecycle config. See
      +     * Optional. The bucket's lifecycle config. See
            * [https://developers.google.com/storage/docs/lifecycle]Lifecycle Management]
            * for more information.
            * 
      * - * .google.storage.v2.Bucket.Lifecycle lifecycle = 10; + * + * .google.storage.v2.Bucket.Lifecycle lifecycle = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearLifecycle() { bitField0_ = (bitField0_ & ~0x00000800); @@ -24275,12 +28881,14 @@ public Builder clearLifecycle() { * * *
      -     * The bucket's lifecycle config. See
      +     * Optional. The bucket's lifecycle config. See
            * [https://developers.google.com/storage/docs/lifecycle]Lifecycle Management]
            * for more information.
            * 
      * - * .google.storage.v2.Bucket.Lifecycle lifecycle = 10; + * + * .google.storage.v2.Bucket.Lifecycle lifecycle = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.Lifecycle.Builder getLifecycleBuilder() { bitField0_ |= 0x00000800; @@ -24292,12 +28900,14 @@ public com.google.storage.v2.Bucket.Lifecycle.Builder getLifecycleBuilder() { * * *
      -     * The bucket's lifecycle config. See
      +     * Optional. The bucket's lifecycle config. See
            * [https://developers.google.com/storage/docs/lifecycle]Lifecycle Management]
            * for more information.
            * 
      * - * .google.storage.v2.Bucket.Lifecycle lifecycle = 10; + * + * .google.storage.v2.Bucket.Lifecycle lifecycle = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.LifecycleOrBuilder getLifecycleOrBuilder() { if (lifecycleBuilder_ != null) { @@ -24313,12 +28923,14 @@ public com.google.storage.v2.Bucket.LifecycleOrBuilder getLifecycleOrBuilder() { * * *
      -     * The bucket's lifecycle config. See
      +     * Optional. The bucket's lifecycle config. See
            * [https://developers.google.com/storage/docs/lifecycle]Lifecycle Management]
            * for more information.
            * 
      * - * .google.storage.v2.Bucket.Lifecycle lifecycle = 10; + * + * .google.storage.v2.Bucket.Lifecycle lifecycle = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.Bucket.Lifecycle, @@ -24569,11 +29181,13 @@ private void ensureCorsIsMutable() { * * *
      -     * The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing]
      -     * (CORS) config.
      +     * Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource
      +     * Sharing] (CORS) config.
            * 
      * - * repeated .google.storage.v2.Bucket.Cors cors = 12; + * + * repeated .google.storage.v2.Bucket.Cors cors = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ public java.util.List getCorsList() { if (corsBuilder_ == null) { @@ -24587,11 +29201,13 @@ public java.util.List getCorsList() { * * *
      -     * The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing]
      -     * (CORS) config.
      +     * Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource
      +     * Sharing] (CORS) config.
            * 
      * - * repeated .google.storage.v2.Bucket.Cors cors = 12; + * + * repeated .google.storage.v2.Bucket.Cors cors = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ public int getCorsCount() { if (corsBuilder_ == null) { @@ -24605,11 +29221,13 @@ public int getCorsCount() { * * *
      -     * The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing]
      -     * (CORS) config.
      +     * Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource
      +     * Sharing] (CORS) config.
            * 
      * - * repeated .google.storage.v2.Bucket.Cors cors = 12; + * + * repeated .google.storage.v2.Bucket.Cors cors = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.Cors getCors(int index) { if (corsBuilder_ == null) { @@ -24623,11 +29241,13 @@ public com.google.storage.v2.Bucket.Cors getCors(int index) { * * *
      -     * The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing]
      -     * (CORS) config.
      +     * Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource
      +     * Sharing] (CORS) config.
            * 
      * - * repeated .google.storage.v2.Bucket.Cors cors = 12; + * + * repeated .google.storage.v2.Bucket.Cors cors = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCors(int index, com.google.storage.v2.Bucket.Cors value) { if (corsBuilder_ == null) { @@ -24647,11 +29267,13 @@ public Builder setCors(int index, com.google.storage.v2.Bucket.Cors value) { * * *
      -     * The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing]
      -     * (CORS) config.
      +     * Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource
      +     * Sharing] (CORS) config.
            * 
      * - * repeated .google.storage.v2.Bucket.Cors cors = 12; + * + * repeated .google.storage.v2.Bucket.Cors cors = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCors(int index, com.google.storage.v2.Bucket.Cors.Builder builderForValue) { if (corsBuilder_ == null) { @@ -24668,11 +29290,13 @@ public Builder setCors(int index, com.google.storage.v2.Bucket.Cors.Builder buil * * *
      -     * The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing]
      -     * (CORS) config.
      +     * Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource
      +     * Sharing] (CORS) config.
            * 
      * - * repeated .google.storage.v2.Bucket.Cors cors = 12; + * + * repeated .google.storage.v2.Bucket.Cors cors = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder addCors(com.google.storage.v2.Bucket.Cors value) { if (corsBuilder_ == null) { @@ -24692,11 +29316,13 @@ public Builder addCors(com.google.storage.v2.Bucket.Cors value) { * * *
      -     * The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing]
      -     * (CORS) config.
      +     * Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource
      +     * Sharing] (CORS) config.
            * 
      * - * repeated .google.storage.v2.Bucket.Cors cors = 12; + * + * repeated .google.storage.v2.Bucket.Cors cors = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder addCors(int index, com.google.storage.v2.Bucket.Cors value) { if (corsBuilder_ == null) { @@ -24716,11 +29342,13 @@ public Builder addCors(int index, com.google.storage.v2.Bucket.Cors value) { * * *
      -     * The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing]
      -     * (CORS) config.
      +     * Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource
      +     * Sharing] (CORS) config.
            * 
      * - * repeated .google.storage.v2.Bucket.Cors cors = 12; + * + * repeated .google.storage.v2.Bucket.Cors cors = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder addCors(com.google.storage.v2.Bucket.Cors.Builder builderForValue) { if (corsBuilder_ == null) { @@ -24737,11 +29365,13 @@ public Builder addCors(com.google.storage.v2.Bucket.Cors.Builder builderForValue * * *
      -     * The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing]
      -     * (CORS) config.
      +     * Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource
      +     * Sharing] (CORS) config.
            * 
      * - * repeated .google.storage.v2.Bucket.Cors cors = 12; + * + * repeated .google.storage.v2.Bucket.Cors cors = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder addCors(int index, com.google.storage.v2.Bucket.Cors.Builder builderForValue) { if (corsBuilder_ == null) { @@ -24758,11 +29388,13 @@ public Builder addCors(int index, com.google.storage.v2.Bucket.Cors.Builder buil * * *
      -     * The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing]
      -     * (CORS) config.
      +     * Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource
      +     * Sharing] (CORS) config.
            * 
      * - * repeated .google.storage.v2.Bucket.Cors cors = 12; + * + * repeated .google.storage.v2.Bucket.Cors cors = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder addAllCors( java.lang.Iterable values) { @@ -24780,11 +29412,13 @@ public Builder addAllCors( * * *
      -     * The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing]
      -     * (CORS) config.
      +     * Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource
      +     * Sharing] (CORS) config.
            * 
      * - * repeated .google.storage.v2.Bucket.Cors cors = 12; + * + * repeated .google.storage.v2.Bucket.Cors cors = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearCors() { if (corsBuilder_ == null) { @@ -24801,11 +29435,13 @@ public Builder clearCors() { * * *
      -     * The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing]
      -     * (CORS) config.
      +     * Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource
      +     * Sharing] (CORS) config.
            * 
      * - * repeated .google.storage.v2.Bucket.Cors cors = 12; + * + * repeated .google.storage.v2.Bucket.Cors cors = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder removeCors(int index) { if (corsBuilder_ == null) { @@ -24822,11 +29458,13 @@ public Builder removeCors(int index) { * * *
      -     * The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing]
      -     * (CORS) config.
      +     * Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource
      +     * Sharing] (CORS) config.
            * 
      * - * repeated .google.storage.v2.Bucket.Cors cors = 12; + * + * repeated .google.storage.v2.Bucket.Cors cors = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.Cors.Builder getCorsBuilder(int index) { return getCorsFieldBuilder().getBuilder(index); @@ -24836,11 +29474,13 @@ public com.google.storage.v2.Bucket.Cors.Builder getCorsBuilder(int index) { * * *
      -     * The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing]
      -     * (CORS) config.
      +     * Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource
      +     * Sharing] (CORS) config.
            * 
      * - * repeated .google.storage.v2.Bucket.Cors cors = 12; + * + * repeated .google.storage.v2.Bucket.Cors cors = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.CorsOrBuilder getCorsOrBuilder(int index) { if (corsBuilder_ == null) { @@ -24854,11 +29494,13 @@ public com.google.storage.v2.Bucket.CorsOrBuilder getCorsOrBuilder(int index) { * * *
      -     * The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing]
      -     * (CORS) config.
      +     * Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource
      +     * Sharing] (CORS) config.
            * 
      * - * repeated .google.storage.v2.Bucket.Cors cors = 12; + * + * repeated .google.storage.v2.Bucket.Cors cors = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ public java.util.List getCorsOrBuilderList() { @@ -24873,11 +29515,13 @@ public com.google.storage.v2.Bucket.CorsOrBuilder getCorsOrBuilder(int index) { * * *
      -     * The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing]
      -     * (CORS) config.
      +     * Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource
      +     * Sharing] (CORS) config.
            * 
      * - * repeated .google.storage.v2.Bucket.Cors cors = 12; + * + * repeated .google.storage.v2.Bucket.Cors cors = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.Cors.Builder addCorsBuilder() { return getCorsFieldBuilder() @@ -24888,11 +29532,13 @@ public com.google.storage.v2.Bucket.Cors.Builder addCorsBuilder() { * * *
      -     * The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing]
      -     * (CORS) config.
      +     * Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource
      +     * Sharing] (CORS) config.
            * 
      * - * repeated .google.storage.v2.Bucket.Cors cors = 12; + * + * repeated .google.storage.v2.Bucket.Cors cors = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.Cors.Builder addCorsBuilder(int index) { return getCorsFieldBuilder() @@ -24903,11 +29549,13 @@ public com.google.storage.v2.Bucket.Cors.Builder addCorsBuilder(int index) { * * *
      -     * The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing]
      -     * (CORS) config.
      +     * Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource
      +     * Sharing] (CORS) config.
            * 
      * - * repeated .google.storage.v2.Bucket.Cors cors = 12; + * + * repeated .google.storage.v2.Bucket.Cors cors = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ public java.util.List getCorsBuilderList() { return getCorsFieldBuilder().getBuilderList(); @@ -25148,22 +29796,22 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * * *
      -     * The default value for event-based hold on newly created objects in this
      -     * bucket.  Event-based hold is a way to retain objects indefinitely until an
      -     * event occurs, signified by the
      -     * hold's release. After being released, such objects will be subject to
      -     * bucket-level retention (if any).  One sample use case of this flag is for
      -     * banks to hold loan documents for at least 3 years after loan is paid in
      -     * full. Here, bucket-level retention is 3 years and the event is loan being
      -     * paid in full. In this example, these objects will be held intact for any
      -     * number of years until the event has occurred (event-based hold on the
      -     * object is released) and then 3 more years after that. That means retention
      -     * duration of the objects begins from the moment event-based hold
      -     * transitioned from true to false.  Objects under event-based hold cannot be
      -     * deleted, overwritten or archived until the hold is removed.
      +     * Optional. The default value for event-based hold on newly created objects
      +     * in this bucket.  Event-based hold is a way to retain objects indefinitely
      +     * until an event occurs, signified by the hold's release. After being
      +     * released, such objects will be subject to bucket-level retention (if any).
      +     * One sample use case of this flag is for banks to hold loan documents for at
      +     * least 3 years after loan is paid in full. Here, bucket-level retention is 3
      +     * years and the event is loan being paid in full. In this example, these
      +     * objects will be held intact for any number of years until the event has
      +     * occurred (event-based hold on the object is released) and then 3 more years
      +     * after that. That means retention duration of the objects begins from the
      +     * moment event-based hold transitioned from true to false.  Objects under
      +     * event-based hold cannot be deleted, overwritten or archived until the hold
      +     * is removed.
            * 
      * - * bool default_event_based_hold = 14; + * bool default_event_based_hold = 14 [(.google.api.field_behavior) = OPTIONAL]; * * @return The defaultEventBasedHold. */ @@ -25176,22 +29824,22 @@ public boolean getDefaultEventBasedHold() { * * *
      -     * The default value for event-based hold on newly created objects in this
      -     * bucket.  Event-based hold is a way to retain objects indefinitely until an
      -     * event occurs, signified by the
      -     * hold's release. After being released, such objects will be subject to
      -     * bucket-level retention (if any).  One sample use case of this flag is for
      -     * banks to hold loan documents for at least 3 years after loan is paid in
      -     * full. Here, bucket-level retention is 3 years and the event is loan being
      -     * paid in full. In this example, these objects will be held intact for any
      -     * number of years until the event has occurred (event-based hold on the
      -     * object is released) and then 3 more years after that. That means retention
      -     * duration of the objects begins from the moment event-based hold
      -     * transitioned from true to false.  Objects under event-based hold cannot be
      -     * deleted, overwritten or archived until the hold is removed.
      +     * Optional. The default value for event-based hold on newly created objects
      +     * in this bucket.  Event-based hold is a way to retain objects indefinitely
      +     * until an event occurs, signified by the hold's release. After being
      +     * released, such objects will be subject to bucket-level retention (if any).
      +     * One sample use case of this flag is for banks to hold loan documents for at
      +     * least 3 years after loan is paid in full. Here, bucket-level retention is 3
      +     * years and the event is loan being paid in full. In this example, these
      +     * objects will be held intact for any number of years until the event has
      +     * occurred (event-based hold on the object is released) and then 3 more years
      +     * after that. That means retention duration of the objects begins from the
      +     * moment event-based hold transitioned from true to false.  Objects under
      +     * event-based hold cannot be deleted, overwritten or archived until the hold
      +     * is removed.
            * 
      * - * bool default_event_based_hold = 14; + * bool default_event_based_hold = 14 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The defaultEventBasedHold to set. * @return This builder for chaining. @@ -25208,22 +29856,22 @@ public Builder setDefaultEventBasedHold(boolean value) { * * *
      -     * The default value for event-based hold on newly created objects in this
      -     * bucket.  Event-based hold is a way to retain objects indefinitely until an
      -     * event occurs, signified by the
      -     * hold's release. After being released, such objects will be subject to
      -     * bucket-level retention (if any).  One sample use case of this flag is for
      -     * banks to hold loan documents for at least 3 years after loan is paid in
      -     * full. Here, bucket-level retention is 3 years and the event is loan being
      -     * paid in full. In this example, these objects will be held intact for any
      -     * number of years until the event has occurred (event-based hold on the
      -     * object is released) and then 3 more years after that. That means retention
      -     * duration of the objects begins from the moment event-based hold
      -     * transitioned from true to false.  Objects under event-based hold cannot be
      -     * deleted, overwritten or archived until the hold is removed.
      +     * Optional. The default value for event-based hold on newly created objects
      +     * in this bucket.  Event-based hold is a way to retain objects indefinitely
      +     * until an event occurs, signified by the hold's release. After being
      +     * released, such objects will be subject to bucket-level retention (if any).
      +     * One sample use case of this flag is for banks to hold loan documents for at
      +     * least 3 years after loan is paid in full. Here, bucket-level retention is 3
      +     * years and the event is loan being paid in full. In this example, these
      +     * objects will be held intact for any number of years until the event has
      +     * occurred (event-based hold on the object is released) and then 3 more years
      +     * after that. That means retention duration of the objects begins from the
      +     * moment event-based hold transitioned from true to false.  Objects under
      +     * event-based hold cannot be deleted, overwritten or archived until the hold
      +     * is removed.
            * 
      * - * bool default_event_based_hold = 14; + * bool default_event_based_hold = 14 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -25264,10 +29912,10 @@ public int getLabelsCount() { * * *
      -     * User-provided labels, in key/value pairs.
      +     * Optional. User-provided labels, in key/value pairs.
            * 
      * - * map<string, string> labels = 15; + * map<string, string> labels = 15 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public boolean containsLabels(java.lang.String key) { @@ -25288,10 +29936,10 @@ public java.util.Map getLabels() { * * *
      -     * User-provided labels, in key/value pairs.
      +     * Optional. User-provided labels, in key/value pairs.
            * 
      * - * map<string, string> labels = 15; + * map<string, string> labels = 15 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public java.util.Map getLabelsMap() { @@ -25302,10 +29950,10 @@ public java.util.Map getLabelsMap() { * * *
      -     * User-provided labels, in key/value pairs.
      +     * Optional. User-provided labels, in key/value pairs.
            * 
      * - * map<string, string> labels = 15; + * map<string, string> labels = 15 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public /* nullable */ java.lang.String getLabelsOrDefault( @@ -25323,10 +29971,10 @@ public java.util.Map getLabelsMap() { * * *
      -     * User-provided labels, in key/value pairs.
      +     * Optional. User-provided labels, in key/value pairs.
            * 
      * - * map<string, string> labels = 15; + * map<string, string> labels = 15 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { @@ -25350,10 +29998,10 @@ public Builder clearLabels() { * * *
      -     * User-provided labels, in key/value pairs.
      +     * Optional. User-provided labels, in key/value pairs.
            * 
      * - * map<string, string> labels = 15; + * map<string, string> labels = 15 [(.google.api.field_behavior) = OPTIONAL]; */ public Builder removeLabels(java.lang.String key) { if (key == null) { @@ -25374,10 +30022,10 @@ public java.util.Map getMutableLabels() { * * *
      -     * User-provided labels, in key/value pairs.
      +     * Optional. User-provided labels, in key/value pairs.
            * 
      * - * map<string, string> labels = 15; + * map<string, string> labels = 15 [(.google.api.field_behavior) = OPTIONAL]; */ public Builder putLabels(java.lang.String key, java.lang.String value) { if (key == null) { @@ -25395,10 +30043,10 @@ public Builder putLabels(java.lang.String key, java.lang.String value) { * * *
      -     * User-provided labels, in key/value pairs.
      +     * Optional. User-provided labels, in key/value pairs.
            * 
      * - * map<string, string> labels = 15; + * map<string, string> labels = 15 [(.google.api.field_behavior) = OPTIONAL]; */ public Builder putAllLabels(java.util.Map values) { internalGetMutableLabels().getMutableMap().putAll(values); @@ -25417,13 +30065,15 @@ public Builder putAllLabels(java.util.Map va * * *
      -     * The bucket's website config, controlling how the service behaves
      +     * Optional. The bucket's website config, controlling how the service behaves
            * when accessing bucket contents as a web site. See the
            * [https://cloud.google.com/storage/docs/static-website][Static Website
            * Examples] for more information.
            * 
      * - * .google.storage.v2.Bucket.Website website = 16; + * + * .google.storage.v2.Bucket.Website website = 16 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the website field is set. */ @@ -25435,13 +30085,15 @@ public boolean hasWebsite() { * * *
      -     * The bucket's website config, controlling how the service behaves
      +     * Optional. The bucket's website config, controlling how the service behaves
            * when accessing bucket contents as a web site. See the
            * [https://cloud.google.com/storage/docs/static-website][Static Website
            * Examples] for more information.
            * 
      * - * .google.storage.v2.Bucket.Website website = 16; + * + * .google.storage.v2.Bucket.Website website = 16 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The website. */ @@ -25459,13 +30111,15 @@ public com.google.storage.v2.Bucket.Website getWebsite() { * * *
      -     * The bucket's website config, controlling how the service behaves
      +     * Optional. The bucket's website config, controlling how the service behaves
            * when accessing bucket contents as a web site. See the
            * [https://cloud.google.com/storage/docs/static-website][Static Website
            * Examples] for more information.
            * 
      * - * .google.storage.v2.Bucket.Website website = 16; + * + * .google.storage.v2.Bucket.Website website = 16 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setWebsite(com.google.storage.v2.Bucket.Website value) { if (websiteBuilder_ == null) { @@ -25485,13 +30139,15 @@ public Builder setWebsite(com.google.storage.v2.Bucket.Website value) { * * *
      -     * The bucket's website config, controlling how the service behaves
      +     * Optional. The bucket's website config, controlling how the service behaves
            * when accessing bucket contents as a web site. See the
            * [https://cloud.google.com/storage/docs/static-website][Static Website
            * Examples] for more information.
            * 
      * - * .google.storage.v2.Bucket.Website website = 16; + * + * .google.storage.v2.Bucket.Website website = 16 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setWebsite(com.google.storage.v2.Bucket.Website.Builder builderForValue) { if (websiteBuilder_ == null) { @@ -25508,13 +30164,15 @@ public Builder setWebsite(com.google.storage.v2.Bucket.Website.Builder builderFo * * *
      -     * The bucket's website config, controlling how the service behaves
      +     * Optional. The bucket's website config, controlling how the service behaves
            * when accessing bucket contents as a web site. See the
            * [https://cloud.google.com/storage/docs/static-website][Static Website
            * Examples] for more information.
            * 
      * - * .google.storage.v2.Bucket.Website website = 16; + * + * .google.storage.v2.Bucket.Website website = 16 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeWebsite(com.google.storage.v2.Bucket.Website value) { if (websiteBuilder_ == null) { @@ -25539,13 +30197,15 @@ public Builder mergeWebsite(com.google.storage.v2.Bucket.Website value) { * * *
      -     * The bucket's website config, controlling how the service behaves
      +     * Optional. The bucket's website config, controlling how the service behaves
            * when accessing bucket contents as a web site. See the
            * [https://cloud.google.com/storage/docs/static-website][Static Website
            * Examples] for more information.
            * 
      * - * .google.storage.v2.Bucket.Website website = 16; + * + * .google.storage.v2.Bucket.Website website = 16 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearWebsite() { bitField0_ = (bitField0_ & ~0x00020000); @@ -25562,13 +30222,15 @@ public Builder clearWebsite() { * * *
      -     * The bucket's website config, controlling how the service behaves
      +     * Optional. The bucket's website config, controlling how the service behaves
            * when accessing bucket contents as a web site. See the
            * [https://cloud.google.com/storage/docs/static-website][Static Website
            * Examples] for more information.
            * 
      * - * .google.storage.v2.Bucket.Website website = 16; + * + * .google.storage.v2.Bucket.Website website = 16 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.Website.Builder getWebsiteBuilder() { bitField0_ |= 0x00020000; @@ -25580,13 +30242,15 @@ public com.google.storage.v2.Bucket.Website.Builder getWebsiteBuilder() { * * *
      -     * The bucket's website config, controlling how the service behaves
      +     * Optional. The bucket's website config, controlling how the service behaves
            * when accessing bucket contents as a web site. See the
            * [https://cloud.google.com/storage/docs/static-website][Static Website
            * Examples] for more information.
            * 
      * - * .google.storage.v2.Bucket.Website website = 16; + * + * .google.storage.v2.Bucket.Website website = 16 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.WebsiteOrBuilder getWebsiteOrBuilder() { if (websiteBuilder_ != null) { @@ -25602,13 +30266,15 @@ public com.google.storage.v2.Bucket.WebsiteOrBuilder getWebsiteOrBuilder() { * * *
      -     * The bucket's website config, controlling how the service behaves
      +     * Optional. The bucket's website config, controlling how the service behaves
            * when accessing bucket contents as a web site. See the
            * [https://cloud.google.com/storage/docs/static-website][Static Website
            * Examples] for more information.
            * 
      * - * .google.storage.v2.Bucket.Website website = 16; + * + * .google.storage.v2.Bucket.Website website = 16 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.Bucket.Website, @@ -25638,10 +30304,12 @@ public com.google.storage.v2.Bucket.WebsiteOrBuilder getWebsiteOrBuilder() { * * *
      -     * The bucket's versioning config.
      +     * Optional. The bucket's versioning config.
            * 
      * - * .google.storage.v2.Bucket.Versioning versioning = 17; + * + * .google.storage.v2.Bucket.Versioning versioning = 17 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the versioning field is set. */ @@ -25653,10 +30321,12 @@ public boolean hasVersioning() { * * *
      -     * The bucket's versioning config.
      +     * Optional. The bucket's versioning config.
            * 
      * - * .google.storage.v2.Bucket.Versioning versioning = 17; + * + * .google.storage.v2.Bucket.Versioning versioning = 17 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The versioning. */ @@ -25674,10 +30344,12 @@ public com.google.storage.v2.Bucket.Versioning getVersioning() { * * *
      -     * The bucket's versioning config.
      +     * Optional. The bucket's versioning config.
            * 
      * - * .google.storage.v2.Bucket.Versioning versioning = 17; + * + * .google.storage.v2.Bucket.Versioning versioning = 17 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setVersioning(com.google.storage.v2.Bucket.Versioning value) { if (versioningBuilder_ == null) { @@ -25697,10 +30369,12 @@ public Builder setVersioning(com.google.storage.v2.Bucket.Versioning value) { * * *
      -     * The bucket's versioning config.
      +     * Optional. The bucket's versioning config.
            * 
      * - * .google.storage.v2.Bucket.Versioning versioning = 17; + * + * .google.storage.v2.Bucket.Versioning versioning = 17 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setVersioning(com.google.storage.v2.Bucket.Versioning.Builder builderForValue) { if (versioningBuilder_ == null) { @@ -25717,10 +30391,12 @@ public Builder setVersioning(com.google.storage.v2.Bucket.Versioning.Builder bui * * *
      -     * The bucket's versioning config.
      +     * Optional. The bucket's versioning config.
            * 
      * - * .google.storage.v2.Bucket.Versioning versioning = 17; + * + * .google.storage.v2.Bucket.Versioning versioning = 17 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeVersioning(com.google.storage.v2.Bucket.Versioning value) { if (versioningBuilder_ == null) { @@ -25745,10 +30421,12 @@ public Builder mergeVersioning(com.google.storage.v2.Bucket.Versioning value) { * * *
      -     * The bucket's versioning config.
      +     * Optional. The bucket's versioning config.
            * 
      * - * .google.storage.v2.Bucket.Versioning versioning = 17; + * + * .google.storage.v2.Bucket.Versioning versioning = 17 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearVersioning() { bitField0_ = (bitField0_ & ~0x00040000); @@ -25765,10 +30443,12 @@ public Builder clearVersioning() { * * *
      -     * The bucket's versioning config.
      +     * Optional. The bucket's versioning config.
            * 
      * - * .google.storage.v2.Bucket.Versioning versioning = 17; + * + * .google.storage.v2.Bucket.Versioning versioning = 17 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.Versioning.Builder getVersioningBuilder() { bitField0_ |= 0x00040000; @@ -25780,10 +30460,12 @@ public com.google.storage.v2.Bucket.Versioning.Builder getVersioningBuilder() { * * *
      -     * The bucket's versioning config.
      +     * Optional. The bucket's versioning config.
            * 
      * - * .google.storage.v2.Bucket.Versioning versioning = 17; + * + * .google.storage.v2.Bucket.Versioning versioning = 17 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.VersioningOrBuilder getVersioningOrBuilder() { if (versioningBuilder_ != null) { @@ -25799,10 +30481,12 @@ public com.google.storage.v2.Bucket.VersioningOrBuilder getVersioningOrBuilder() * * *
      -     * The bucket's versioning config.
      +     * Optional. The bucket's versioning config.
            * 
      * - * .google.storage.v2.Bucket.Versioning versioning = 17; + * + * .google.storage.v2.Bucket.Versioning versioning = 17 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.Bucket.Versioning, @@ -25832,11 +30516,13 @@ public com.google.storage.v2.Bucket.VersioningOrBuilder getVersioningOrBuilder() * * *
      -     * The bucket's logging config, which defines the destination bucket
      +     * Optional. The bucket's logging config, which defines the destination bucket
            * and name prefix (if any) for the current bucket's logs.
            * 
      * - * .google.storage.v2.Bucket.Logging logging = 18; + * + * .google.storage.v2.Bucket.Logging logging = 18 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the logging field is set. */ @@ -25848,11 +30534,13 @@ public boolean hasLogging() { * * *
      -     * The bucket's logging config, which defines the destination bucket
      +     * Optional. The bucket's logging config, which defines the destination bucket
            * and name prefix (if any) for the current bucket's logs.
            * 
      * - * .google.storage.v2.Bucket.Logging logging = 18; + * + * .google.storage.v2.Bucket.Logging logging = 18 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The logging. */ @@ -25870,11 +30558,13 @@ public com.google.storage.v2.Bucket.Logging getLogging() { * * *
      -     * The bucket's logging config, which defines the destination bucket
      +     * Optional. The bucket's logging config, which defines the destination bucket
            * and name prefix (if any) for the current bucket's logs.
            * 
      * - * .google.storage.v2.Bucket.Logging logging = 18; + * + * .google.storage.v2.Bucket.Logging logging = 18 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setLogging(com.google.storage.v2.Bucket.Logging value) { if (loggingBuilder_ == null) { @@ -25894,11 +30584,13 @@ public Builder setLogging(com.google.storage.v2.Bucket.Logging value) { * * *
      -     * The bucket's logging config, which defines the destination bucket
      +     * Optional. The bucket's logging config, which defines the destination bucket
            * and name prefix (if any) for the current bucket's logs.
            * 
      * - * .google.storage.v2.Bucket.Logging logging = 18; + * + * .google.storage.v2.Bucket.Logging logging = 18 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setLogging(com.google.storage.v2.Bucket.Logging.Builder builderForValue) { if (loggingBuilder_ == null) { @@ -25915,11 +30607,13 @@ public Builder setLogging(com.google.storage.v2.Bucket.Logging.Builder builderFo * * *
      -     * The bucket's logging config, which defines the destination bucket
      +     * Optional. The bucket's logging config, which defines the destination bucket
            * and name prefix (if any) for the current bucket's logs.
            * 
      * - * .google.storage.v2.Bucket.Logging logging = 18; + * + * .google.storage.v2.Bucket.Logging logging = 18 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeLogging(com.google.storage.v2.Bucket.Logging value) { if (loggingBuilder_ == null) { @@ -25944,11 +30638,13 @@ public Builder mergeLogging(com.google.storage.v2.Bucket.Logging value) { * * *
      -     * The bucket's logging config, which defines the destination bucket
      +     * Optional. The bucket's logging config, which defines the destination bucket
            * and name prefix (if any) for the current bucket's logs.
            * 
      * - * .google.storage.v2.Bucket.Logging logging = 18; + * + * .google.storage.v2.Bucket.Logging logging = 18 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearLogging() { bitField0_ = (bitField0_ & ~0x00080000); @@ -25965,11 +30661,13 @@ public Builder clearLogging() { * * *
      -     * The bucket's logging config, which defines the destination bucket
      +     * Optional. The bucket's logging config, which defines the destination bucket
            * and name prefix (if any) for the current bucket's logs.
            * 
      * - * .google.storage.v2.Bucket.Logging logging = 18; + * + * .google.storage.v2.Bucket.Logging logging = 18 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.Logging.Builder getLoggingBuilder() { bitField0_ |= 0x00080000; @@ -25981,11 +30679,13 @@ public com.google.storage.v2.Bucket.Logging.Builder getLoggingBuilder() { * * *
      -     * The bucket's logging config, which defines the destination bucket
      +     * Optional. The bucket's logging config, which defines the destination bucket
            * and name prefix (if any) for the current bucket's logs.
            * 
      * - * .google.storage.v2.Bucket.Logging logging = 18; + * + * .google.storage.v2.Bucket.Logging logging = 18 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.LoggingOrBuilder getLoggingOrBuilder() { if (loggingBuilder_ != null) { @@ -26001,11 +30701,13 @@ public com.google.storage.v2.Bucket.LoggingOrBuilder getLoggingOrBuilder() { * * *
      -     * The bucket's logging config, which defines the destination bucket
      +     * Optional. The bucket's logging config, which defines the destination bucket
            * and name prefix (if any) for the current bucket's logs.
            * 
      * - * .google.storage.v2.Bucket.Logging logging = 18; + * + * .google.storage.v2.Bucket.Logging logging = 18 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.Bucket.Logging, @@ -26243,10 +30945,12 @@ public com.google.storage.v2.OwnerOrBuilder getOwnerOrBuilder() { * * *
      -     * Encryption config for a bucket.
      +     * Optional. Encryption config for a bucket.
            * 
      * - * .google.storage.v2.Bucket.Encryption encryption = 20; + * + * .google.storage.v2.Bucket.Encryption encryption = 20 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the encryption field is set. */ @@ -26258,10 +30962,12 @@ public boolean hasEncryption() { * * *
      -     * Encryption config for a bucket.
      +     * Optional. Encryption config for a bucket.
            * 
      * - * .google.storage.v2.Bucket.Encryption encryption = 20; + * + * .google.storage.v2.Bucket.Encryption encryption = 20 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The encryption. */ @@ -26279,10 +30985,12 @@ public com.google.storage.v2.Bucket.Encryption getEncryption() { * * *
      -     * Encryption config for a bucket.
      +     * Optional. Encryption config for a bucket.
            * 
      * - * .google.storage.v2.Bucket.Encryption encryption = 20; + * + * .google.storage.v2.Bucket.Encryption encryption = 20 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setEncryption(com.google.storage.v2.Bucket.Encryption value) { if (encryptionBuilder_ == null) { @@ -26302,10 +31010,12 @@ public Builder setEncryption(com.google.storage.v2.Bucket.Encryption value) { * * *
      -     * Encryption config for a bucket.
      +     * Optional. Encryption config for a bucket.
            * 
      * - * .google.storage.v2.Bucket.Encryption encryption = 20; + * + * .google.storage.v2.Bucket.Encryption encryption = 20 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setEncryption(com.google.storage.v2.Bucket.Encryption.Builder builderForValue) { if (encryptionBuilder_ == null) { @@ -26322,10 +31032,12 @@ public Builder setEncryption(com.google.storage.v2.Bucket.Encryption.Builder bui * * *
      -     * Encryption config for a bucket.
      +     * Optional. Encryption config for a bucket.
            * 
      * - * .google.storage.v2.Bucket.Encryption encryption = 20; + * + * .google.storage.v2.Bucket.Encryption encryption = 20 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeEncryption(com.google.storage.v2.Bucket.Encryption value) { if (encryptionBuilder_ == null) { @@ -26350,10 +31062,12 @@ public Builder mergeEncryption(com.google.storage.v2.Bucket.Encryption value) { * * *
      -     * Encryption config for a bucket.
      +     * Optional. Encryption config for a bucket.
            * 
      * - * .google.storage.v2.Bucket.Encryption encryption = 20; + * + * .google.storage.v2.Bucket.Encryption encryption = 20 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearEncryption() { bitField0_ = (bitField0_ & ~0x00200000); @@ -26370,10 +31084,12 @@ public Builder clearEncryption() { * * *
      -     * Encryption config for a bucket.
      +     * Optional. Encryption config for a bucket.
            * 
      * - * .google.storage.v2.Bucket.Encryption encryption = 20; + * + * .google.storage.v2.Bucket.Encryption encryption = 20 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.Encryption.Builder getEncryptionBuilder() { bitField0_ |= 0x00200000; @@ -26385,10 +31101,12 @@ public com.google.storage.v2.Bucket.Encryption.Builder getEncryptionBuilder() { * * *
      -     * Encryption config for a bucket.
      +     * Optional. Encryption config for a bucket.
            * 
      * - * .google.storage.v2.Bucket.Encryption encryption = 20; + * + * .google.storage.v2.Bucket.Encryption encryption = 20 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.EncryptionOrBuilder getEncryptionOrBuilder() { if (encryptionBuilder_ != null) { @@ -26404,10 +31122,12 @@ public com.google.storage.v2.Bucket.EncryptionOrBuilder getEncryptionOrBuilder() * * *
      -     * Encryption config for a bucket.
      +     * Optional. Encryption config for a bucket.
            * 
      * - * .google.storage.v2.Bucket.Encryption encryption = 20; + * + * .google.storage.v2.Bucket.Encryption encryption = 20 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.Bucket.Encryption, @@ -26437,10 +31157,12 @@ public com.google.storage.v2.Bucket.EncryptionOrBuilder getEncryptionOrBuilder() * * *
      -     * The bucket's billing config.
      +     * Optional. The bucket's billing config.
            * 
      * - * .google.storage.v2.Bucket.Billing billing = 21; + * + * .google.storage.v2.Bucket.Billing billing = 21 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the billing field is set. */ @@ -26452,10 +31174,12 @@ public boolean hasBilling() { * * *
      -     * The bucket's billing config.
      +     * Optional. The bucket's billing config.
            * 
      * - * .google.storage.v2.Bucket.Billing billing = 21; + * + * .google.storage.v2.Bucket.Billing billing = 21 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The billing. */ @@ -26473,10 +31197,12 @@ public com.google.storage.v2.Bucket.Billing getBilling() { * * *
      -     * The bucket's billing config.
      +     * Optional. The bucket's billing config.
            * 
      * - * .google.storage.v2.Bucket.Billing billing = 21; + * + * .google.storage.v2.Bucket.Billing billing = 21 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setBilling(com.google.storage.v2.Bucket.Billing value) { if (billingBuilder_ == null) { @@ -26496,10 +31222,12 @@ public Builder setBilling(com.google.storage.v2.Bucket.Billing value) { * * *
      -     * The bucket's billing config.
      +     * Optional. The bucket's billing config.
            * 
      * - * .google.storage.v2.Bucket.Billing billing = 21; + * + * .google.storage.v2.Bucket.Billing billing = 21 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setBilling(com.google.storage.v2.Bucket.Billing.Builder builderForValue) { if (billingBuilder_ == null) { @@ -26516,10 +31244,12 @@ public Builder setBilling(com.google.storage.v2.Bucket.Billing.Builder builderFo * * *
      -     * The bucket's billing config.
      +     * Optional. The bucket's billing config.
            * 
      * - * .google.storage.v2.Bucket.Billing billing = 21; + * + * .google.storage.v2.Bucket.Billing billing = 21 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeBilling(com.google.storage.v2.Bucket.Billing value) { if (billingBuilder_ == null) { @@ -26544,10 +31274,12 @@ public Builder mergeBilling(com.google.storage.v2.Bucket.Billing value) { * * *
      -     * The bucket's billing config.
      +     * Optional. The bucket's billing config.
            * 
      * - * .google.storage.v2.Bucket.Billing billing = 21; + * + * .google.storage.v2.Bucket.Billing billing = 21 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearBilling() { bitField0_ = (bitField0_ & ~0x00400000); @@ -26564,10 +31296,12 @@ public Builder clearBilling() { * * *
      -     * The bucket's billing config.
      +     * Optional. The bucket's billing config.
            * 
      * - * .google.storage.v2.Bucket.Billing billing = 21; + * + * .google.storage.v2.Bucket.Billing billing = 21 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.Billing.Builder getBillingBuilder() { bitField0_ |= 0x00400000; @@ -26579,10 +31313,12 @@ public com.google.storage.v2.Bucket.Billing.Builder getBillingBuilder() { * * *
      -     * The bucket's billing config.
      +     * Optional. The bucket's billing config.
            * 
      * - * .google.storage.v2.Bucket.Billing billing = 21; + * + * .google.storage.v2.Bucket.Billing billing = 21 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.BillingOrBuilder getBillingOrBuilder() { if (billingBuilder_ != null) { @@ -26598,10 +31334,12 @@ public com.google.storage.v2.Bucket.BillingOrBuilder getBillingOrBuilder() { * * *
      -     * The bucket's billing config.
      +     * Optional. The bucket's billing config.
            * 
      * - * .google.storage.v2.Bucket.Billing billing = 21; + * + * .google.storage.v2.Bucket.Billing billing = 21 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.Bucket.Billing, @@ -26631,18 +31369,20 @@ public com.google.storage.v2.Bucket.BillingOrBuilder getBillingOrBuilder() { * * *
      -     * The bucket's retention policy. The retention policy enforces a minimum
      -     * retention time for all objects contained in the bucket, based on their
      -     * creation time. Any attempt to overwrite or delete objects younger than the
      -     * retention period will result in a PERMISSION_DENIED error.  An unlocked
      -     * retention policy can be modified or removed from the bucket via a
      +     * Optional. The bucket's retention policy. The retention policy enforces a
      +     * minimum retention time for all objects contained in the bucket, based on
      +     * their creation time. Any attempt to overwrite or delete objects younger
      +     * than the retention period will result in a PERMISSION_DENIED error.  An
      +     * unlocked retention policy can be modified or removed from the bucket via a
            * storage.buckets.update operation. A locked retention policy cannot be
            * removed or shortened in duration for the lifetime of the bucket.
            * Attempting to remove or decrease period of a locked retention policy will
            * result in a PERMISSION_DENIED error.
            * 
      * - * .google.storage.v2.Bucket.RetentionPolicy retention_policy = 22; + * + * .google.storage.v2.Bucket.RetentionPolicy retention_policy = 22 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the retentionPolicy field is set. */ @@ -26654,18 +31394,20 @@ public boolean hasRetentionPolicy() { * * *
      -     * The bucket's retention policy. The retention policy enforces a minimum
      -     * retention time for all objects contained in the bucket, based on their
      -     * creation time. Any attempt to overwrite or delete objects younger than the
      -     * retention period will result in a PERMISSION_DENIED error.  An unlocked
      -     * retention policy can be modified or removed from the bucket via a
      +     * Optional. The bucket's retention policy. The retention policy enforces a
      +     * minimum retention time for all objects contained in the bucket, based on
      +     * their creation time. Any attempt to overwrite or delete objects younger
      +     * than the retention period will result in a PERMISSION_DENIED error.  An
      +     * unlocked retention policy can be modified or removed from the bucket via a
            * storage.buckets.update operation. A locked retention policy cannot be
            * removed or shortened in duration for the lifetime of the bucket.
            * Attempting to remove or decrease period of a locked retention policy will
            * result in a PERMISSION_DENIED error.
            * 
      * - * .google.storage.v2.Bucket.RetentionPolicy retention_policy = 22; + * + * .google.storage.v2.Bucket.RetentionPolicy retention_policy = 22 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The retentionPolicy. */ @@ -26683,18 +31425,20 @@ public com.google.storage.v2.Bucket.RetentionPolicy getRetentionPolicy() { * * *
      -     * The bucket's retention policy. The retention policy enforces a minimum
      -     * retention time for all objects contained in the bucket, based on their
      -     * creation time. Any attempt to overwrite or delete objects younger than the
      -     * retention period will result in a PERMISSION_DENIED error.  An unlocked
      -     * retention policy can be modified or removed from the bucket via a
      +     * Optional. The bucket's retention policy. The retention policy enforces a
      +     * minimum retention time for all objects contained in the bucket, based on
      +     * their creation time. Any attempt to overwrite or delete objects younger
      +     * than the retention period will result in a PERMISSION_DENIED error.  An
      +     * unlocked retention policy can be modified or removed from the bucket via a
            * storage.buckets.update operation. A locked retention policy cannot be
            * removed or shortened in duration for the lifetime of the bucket.
            * Attempting to remove or decrease period of a locked retention policy will
            * result in a PERMISSION_DENIED error.
            * 
      * - * .google.storage.v2.Bucket.RetentionPolicy retention_policy = 22; + * + * .google.storage.v2.Bucket.RetentionPolicy retention_policy = 22 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setRetentionPolicy(com.google.storage.v2.Bucket.RetentionPolicy value) { if (retentionPolicyBuilder_ == null) { @@ -26714,18 +31458,20 @@ public Builder setRetentionPolicy(com.google.storage.v2.Bucket.RetentionPolicy v * * *
      -     * The bucket's retention policy. The retention policy enforces a minimum
      -     * retention time for all objects contained in the bucket, based on their
      -     * creation time. Any attempt to overwrite or delete objects younger than the
      -     * retention period will result in a PERMISSION_DENIED error.  An unlocked
      -     * retention policy can be modified or removed from the bucket via a
      +     * Optional. The bucket's retention policy. The retention policy enforces a
      +     * minimum retention time for all objects contained in the bucket, based on
      +     * their creation time. Any attempt to overwrite or delete objects younger
      +     * than the retention period will result in a PERMISSION_DENIED error.  An
      +     * unlocked retention policy can be modified or removed from the bucket via a
            * storage.buckets.update operation. A locked retention policy cannot be
            * removed or shortened in duration for the lifetime of the bucket.
            * Attempting to remove or decrease period of a locked retention policy will
            * result in a PERMISSION_DENIED error.
            * 
      * - * .google.storage.v2.Bucket.RetentionPolicy retention_policy = 22; + * + * .google.storage.v2.Bucket.RetentionPolicy retention_policy = 22 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setRetentionPolicy( com.google.storage.v2.Bucket.RetentionPolicy.Builder builderForValue) { @@ -26743,18 +31489,20 @@ public Builder setRetentionPolicy( * * *
      -     * The bucket's retention policy. The retention policy enforces a minimum
      -     * retention time for all objects contained in the bucket, based on their
      -     * creation time. Any attempt to overwrite or delete objects younger than the
      -     * retention period will result in a PERMISSION_DENIED error.  An unlocked
      -     * retention policy can be modified or removed from the bucket via a
      +     * Optional. The bucket's retention policy. The retention policy enforces a
      +     * minimum retention time for all objects contained in the bucket, based on
      +     * their creation time. Any attempt to overwrite or delete objects younger
      +     * than the retention period will result in a PERMISSION_DENIED error.  An
      +     * unlocked retention policy can be modified or removed from the bucket via a
            * storage.buckets.update operation. A locked retention policy cannot be
            * removed or shortened in duration for the lifetime of the bucket.
            * Attempting to remove or decrease period of a locked retention policy will
            * result in a PERMISSION_DENIED error.
            * 
      * - * .google.storage.v2.Bucket.RetentionPolicy retention_policy = 22; + * + * .google.storage.v2.Bucket.RetentionPolicy retention_policy = 22 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeRetentionPolicy(com.google.storage.v2.Bucket.RetentionPolicy value) { if (retentionPolicyBuilder_ == null) { @@ -26780,18 +31528,20 @@ public Builder mergeRetentionPolicy(com.google.storage.v2.Bucket.RetentionPolicy * * *
      -     * The bucket's retention policy. The retention policy enforces a minimum
      -     * retention time for all objects contained in the bucket, based on their
      -     * creation time. Any attempt to overwrite or delete objects younger than the
      -     * retention period will result in a PERMISSION_DENIED error.  An unlocked
      -     * retention policy can be modified or removed from the bucket via a
      +     * Optional. The bucket's retention policy. The retention policy enforces a
      +     * minimum retention time for all objects contained in the bucket, based on
      +     * their creation time. Any attempt to overwrite or delete objects younger
      +     * than the retention period will result in a PERMISSION_DENIED error.  An
      +     * unlocked retention policy can be modified or removed from the bucket via a
            * storage.buckets.update operation. A locked retention policy cannot be
            * removed or shortened in duration for the lifetime of the bucket.
            * Attempting to remove or decrease period of a locked retention policy will
            * result in a PERMISSION_DENIED error.
            * 
      * - * .google.storage.v2.Bucket.RetentionPolicy retention_policy = 22; + * + * .google.storage.v2.Bucket.RetentionPolicy retention_policy = 22 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearRetentionPolicy() { bitField0_ = (bitField0_ & ~0x00800000); @@ -26808,18 +31558,20 @@ public Builder clearRetentionPolicy() { * * *
      -     * The bucket's retention policy. The retention policy enforces a minimum
      -     * retention time for all objects contained in the bucket, based on their
      -     * creation time. Any attempt to overwrite or delete objects younger than the
      -     * retention period will result in a PERMISSION_DENIED error.  An unlocked
      -     * retention policy can be modified or removed from the bucket via a
      +     * Optional. The bucket's retention policy. The retention policy enforces a
      +     * minimum retention time for all objects contained in the bucket, based on
      +     * their creation time. Any attempt to overwrite or delete objects younger
      +     * than the retention period will result in a PERMISSION_DENIED error.  An
      +     * unlocked retention policy can be modified or removed from the bucket via a
            * storage.buckets.update operation. A locked retention policy cannot be
            * removed or shortened in duration for the lifetime of the bucket.
            * Attempting to remove or decrease period of a locked retention policy will
            * result in a PERMISSION_DENIED error.
            * 
      * - * .google.storage.v2.Bucket.RetentionPolicy retention_policy = 22; + * + * .google.storage.v2.Bucket.RetentionPolicy retention_policy = 22 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.RetentionPolicy.Builder getRetentionPolicyBuilder() { bitField0_ |= 0x00800000; @@ -26831,18 +31583,20 @@ public com.google.storage.v2.Bucket.RetentionPolicy.Builder getRetentionPolicyBu * * *
      -     * The bucket's retention policy. The retention policy enforces a minimum
      -     * retention time for all objects contained in the bucket, based on their
      -     * creation time. Any attempt to overwrite or delete objects younger than the
      -     * retention period will result in a PERMISSION_DENIED error.  An unlocked
      -     * retention policy can be modified or removed from the bucket via a
      +     * Optional. The bucket's retention policy. The retention policy enforces a
      +     * minimum retention time for all objects contained in the bucket, based on
      +     * their creation time. Any attempt to overwrite or delete objects younger
      +     * than the retention period will result in a PERMISSION_DENIED error.  An
      +     * unlocked retention policy can be modified or removed from the bucket via a
            * storage.buckets.update operation. A locked retention policy cannot be
            * removed or shortened in duration for the lifetime of the bucket.
            * Attempting to remove or decrease period of a locked retention policy will
            * result in a PERMISSION_DENIED error.
            * 
      * - * .google.storage.v2.Bucket.RetentionPolicy retention_policy = 22; + * + * .google.storage.v2.Bucket.RetentionPolicy retention_policy = 22 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.RetentionPolicyOrBuilder getRetentionPolicyOrBuilder() { if (retentionPolicyBuilder_ != null) { @@ -26858,18 +31612,20 @@ public com.google.storage.v2.Bucket.RetentionPolicyOrBuilder getRetentionPolicyO * * *
      -     * The bucket's retention policy. The retention policy enforces a minimum
      -     * retention time for all objects contained in the bucket, based on their
      -     * creation time. Any attempt to overwrite or delete objects younger than the
      -     * retention period will result in a PERMISSION_DENIED error.  An unlocked
      -     * retention policy can be modified or removed from the bucket via a
      +     * Optional. The bucket's retention policy. The retention policy enforces a
      +     * minimum retention time for all objects contained in the bucket, based on
      +     * their creation time. Any attempt to overwrite or delete objects younger
      +     * than the retention period will result in a PERMISSION_DENIED error.  An
      +     * unlocked retention policy can be modified or removed from the bucket via a
            * storage.buckets.update operation. A locked retention policy cannot be
            * removed or shortened in duration for the lifetime of the bucket.
            * Attempting to remove or decrease period of a locked retention policy will
            * result in a PERMISSION_DENIED error.
            * 
      * - * .google.storage.v2.Bucket.RetentionPolicy retention_policy = 22; + * + * .google.storage.v2.Bucket.RetentionPolicy retention_policy = 22 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.Bucket.RetentionPolicy, @@ -26899,10 +31655,12 @@ public com.google.storage.v2.Bucket.RetentionPolicyOrBuilder getRetentionPolicyO * * *
      -     * The bucket's IAM config.
      +     * Optional. The bucket's IAM config.
            * 
      * - * .google.storage.v2.Bucket.IamConfig iam_config = 23; + * + * .google.storage.v2.Bucket.IamConfig iam_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the iamConfig field is set. */ @@ -26914,10 +31672,12 @@ public boolean hasIamConfig() { * * *
      -     * The bucket's IAM config.
      +     * Optional. The bucket's IAM config.
            * 
      * - * .google.storage.v2.Bucket.IamConfig iam_config = 23; + * + * .google.storage.v2.Bucket.IamConfig iam_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The iamConfig. */ @@ -26935,10 +31695,12 @@ public com.google.storage.v2.Bucket.IamConfig getIamConfig() { * * *
      -     * The bucket's IAM config.
      +     * Optional. The bucket's IAM config.
            * 
      * - * .google.storage.v2.Bucket.IamConfig iam_config = 23; + * + * .google.storage.v2.Bucket.IamConfig iam_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setIamConfig(com.google.storage.v2.Bucket.IamConfig value) { if (iamConfigBuilder_ == null) { @@ -26958,10 +31720,12 @@ public Builder setIamConfig(com.google.storage.v2.Bucket.IamConfig value) { * * *
      -     * The bucket's IAM config.
      +     * Optional. The bucket's IAM config.
            * 
      * - * .google.storage.v2.Bucket.IamConfig iam_config = 23; + * + * .google.storage.v2.Bucket.IamConfig iam_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setIamConfig(com.google.storage.v2.Bucket.IamConfig.Builder builderForValue) { if (iamConfigBuilder_ == null) { @@ -26978,10 +31742,12 @@ public Builder setIamConfig(com.google.storage.v2.Bucket.IamConfig.Builder build * * *
      -     * The bucket's IAM config.
      +     * Optional. The bucket's IAM config.
            * 
      * - * .google.storage.v2.Bucket.IamConfig iam_config = 23; + * + * .google.storage.v2.Bucket.IamConfig iam_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeIamConfig(com.google.storage.v2.Bucket.IamConfig value) { if (iamConfigBuilder_ == null) { @@ -27006,10 +31772,12 @@ public Builder mergeIamConfig(com.google.storage.v2.Bucket.IamConfig value) { * * *
      -     * The bucket's IAM config.
      +     * Optional. The bucket's IAM config.
            * 
      * - * .google.storage.v2.Bucket.IamConfig iam_config = 23; + * + * .google.storage.v2.Bucket.IamConfig iam_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearIamConfig() { bitField0_ = (bitField0_ & ~0x01000000); @@ -27026,10 +31794,12 @@ public Builder clearIamConfig() { * * *
      -     * The bucket's IAM config.
      +     * Optional. The bucket's IAM config.
            * 
      * - * .google.storage.v2.Bucket.IamConfig iam_config = 23; + * + * .google.storage.v2.Bucket.IamConfig iam_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.IamConfig.Builder getIamConfigBuilder() { bitField0_ |= 0x01000000; @@ -27041,10 +31811,12 @@ public com.google.storage.v2.Bucket.IamConfig.Builder getIamConfigBuilder() { * * *
      -     * The bucket's IAM config.
      +     * Optional. The bucket's IAM config.
            * 
      * - * .google.storage.v2.Bucket.IamConfig iam_config = 23; + * + * .google.storage.v2.Bucket.IamConfig iam_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.IamConfigOrBuilder getIamConfigOrBuilder() { if (iamConfigBuilder_ != null) { @@ -27060,10 +31832,12 @@ public com.google.storage.v2.Bucket.IamConfigOrBuilder getIamConfigOrBuilder() { * * *
      -     * The bucket's IAM config.
      +     * Optional. The bucket's IAM config.
            * 
      * - * .google.storage.v2.Bucket.IamConfig iam_config = 23; + * + * .google.storage.v2.Bucket.IamConfig iam_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.Bucket.IamConfig, @@ -27088,10 +31862,10 @@ public com.google.storage.v2.Bucket.IamConfigOrBuilder getIamConfigOrBuilder() { * * *
      -     * Reserved for future use.
      +     * Optional. Reserved for future use.
            * 
      * - * bool satisfies_pzs = 25; + * bool satisfies_pzs = 25 [(.google.api.field_behavior) = OPTIONAL]; * * @return The satisfiesPzs. */ @@ -27104,10 +31878,10 @@ public boolean getSatisfiesPzs() { * * *
      -     * Reserved for future use.
      +     * Optional. Reserved for future use.
            * 
      * - * bool satisfies_pzs = 25; + * bool satisfies_pzs = 25 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The satisfiesPzs to set. * @return This builder for chaining. @@ -27124,10 +31898,10 @@ public Builder setSatisfiesPzs(boolean value) { * * *
      -     * Reserved for future use.
      +     * Optional. Reserved for future use.
            * 
      * - * bool satisfies_pzs = 25; + * bool satisfies_pzs = 25 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -27149,12 +31923,15 @@ public Builder clearSatisfiesPzs() { * * *
      -     * Configuration that, if present, specifies the data placement for a
      +     * Optional. Configuration that, if present, specifies the data placement for
      +     * a
            * [https://cloud.google.com/storage/docs/locations#location-dr][configurable
            * dual-region].
            * 
      * - * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26; + * + * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the customPlacementConfig field is set. */ @@ -27166,12 +31943,15 @@ public boolean hasCustomPlacementConfig() { * * *
      -     * Configuration that, if present, specifies the data placement for a
      +     * Optional. Configuration that, if present, specifies the data placement for
      +     * a
            * [https://cloud.google.com/storage/docs/locations#location-dr][configurable
            * dual-region].
            * 
      * - * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26; + * + * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The customPlacementConfig. */ @@ -27189,12 +31969,15 @@ public com.google.storage.v2.Bucket.CustomPlacementConfig getCustomPlacementConf * * *
      -     * Configuration that, if present, specifies the data placement for a
      +     * Optional. Configuration that, if present, specifies the data placement for
      +     * a
            * [https://cloud.google.com/storage/docs/locations#location-dr][configurable
            * dual-region].
            * 
      * - * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26; + * + * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCustomPlacementConfig( com.google.storage.v2.Bucket.CustomPlacementConfig value) { @@ -27215,12 +31998,15 @@ public Builder setCustomPlacementConfig( * * *
      -     * Configuration that, if present, specifies the data placement for a
      +     * Optional. Configuration that, if present, specifies the data placement for
      +     * a
            * [https://cloud.google.com/storage/docs/locations#location-dr][configurable
            * dual-region].
            * 
      * - * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26; + * + * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCustomPlacementConfig( com.google.storage.v2.Bucket.CustomPlacementConfig.Builder builderForValue) { @@ -27238,12 +32024,15 @@ public Builder setCustomPlacementConfig( * * *
      -     * Configuration that, if present, specifies the data placement for a
      +     * Optional. Configuration that, if present, specifies the data placement for
      +     * a
            * [https://cloud.google.com/storage/docs/locations#location-dr][configurable
            * dual-region].
            * 
      * - * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26; + * + * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeCustomPlacementConfig( com.google.storage.v2.Bucket.CustomPlacementConfig value) { @@ -27270,12 +32059,15 @@ public Builder mergeCustomPlacementConfig( * * *
      -     * Configuration that, if present, specifies the data placement for a
      +     * Optional. Configuration that, if present, specifies the data placement for
      +     * a
            * [https://cloud.google.com/storage/docs/locations#location-dr][configurable
            * dual-region].
            * 
      * - * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26; + * + * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearCustomPlacementConfig() { bitField0_ = (bitField0_ & ~0x04000000); @@ -27292,12 +32084,15 @@ public Builder clearCustomPlacementConfig() { * * *
      -     * Configuration that, if present, specifies the data placement for a
      +     * Optional. Configuration that, if present, specifies the data placement for
      +     * a
            * [https://cloud.google.com/storage/docs/locations#location-dr][configurable
            * dual-region].
            * 
      * - * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26; + * + * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.CustomPlacementConfig.Builder getCustomPlacementConfigBuilder() { @@ -27310,12 +32105,15 @@ public Builder clearCustomPlacementConfig() { * * *
      -     * Configuration that, if present, specifies the data placement for a
      +     * Optional. Configuration that, if present, specifies the data placement for
      +     * a
            * [https://cloud.google.com/storage/docs/locations#location-dr][configurable
            * dual-region].
            * 
      * - * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26; + * + * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.CustomPlacementConfigOrBuilder getCustomPlacementConfigOrBuilder() { @@ -27332,12 +32130,15 @@ public Builder clearCustomPlacementConfig() { * * *
      -     * Configuration that, if present, specifies the data placement for a
      +     * Optional. Configuration that, if present, specifies the data placement for
      +     * a
            * [https://cloud.google.com/storage/docs/locations#location-dr][configurable
            * dual-region].
            * 
      * - * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26; + * + * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.Bucket.CustomPlacementConfig, @@ -27367,11 +32168,14 @@ public Builder clearCustomPlacementConfig() { * * *
      -     * The bucket's Autoclass configuration. If there is no configuration, the
      -     * Autoclass feature will be disabled and have no effect on the bucket.
      +     * Optional. The bucket's Autoclass configuration. If there is no
      +     * configuration, the Autoclass feature will be disabled and have no effect on
      +     * the bucket.
            * 
      * - * .google.storage.v2.Bucket.Autoclass autoclass = 28; + * + * .google.storage.v2.Bucket.Autoclass autoclass = 28 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the autoclass field is set. */ @@ -27383,11 +32187,14 @@ public boolean hasAutoclass() { * * *
      -     * The bucket's Autoclass configuration. If there is no configuration, the
      -     * Autoclass feature will be disabled and have no effect on the bucket.
      +     * Optional. The bucket's Autoclass configuration. If there is no
      +     * configuration, the Autoclass feature will be disabled and have no effect on
      +     * the bucket.
            * 
      * - * .google.storage.v2.Bucket.Autoclass autoclass = 28; + * + * .google.storage.v2.Bucket.Autoclass autoclass = 28 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The autoclass. */ @@ -27405,11 +32212,14 @@ public com.google.storage.v2.Bucket.Autoclass getAutoclass() { * * *
      -     * The bucket's Autoclass configuration. If there is no configuration, the
      -     * Autoclass feature will be disabled and have no effect on the bucket.
      +     * Optional. The bucket's Autoclass configuration. If there is no
      +     * configuration, the Autoclass feature will be disabled and have no effect on
      +     * the bucket.
            * 
      * - * .google.storage.v2.Bucket.Autoclass autoclass = 28; + * + * .google.storage.v2.Bucket.Autoclass autoclass = 28 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setAutoclass(com.google.storage.v2.Bucket.Autoclass value) { if (autoclassBuilder_ == null) { @@ -27429,11 +32239,14 @@ public Builder setAutoclass(com.google.storage.v2.Bucket.Autoclass value) { * * *
      -     * The bucket's Autoclass configuration. If there is no configuration, the
      -     * Autoclass feature will be disabled and have no effect on the bucket.
      +     * Optional. The bucket's Autoclass configuration. If there is no
      +     * configuration, the Autoclass feature will be disabled and have no effect on
      +     * the bucket.
            * 
      * - * .google.storage.v2.Bucket.Autoclass autoclass = 28; + * + * .google.storage.v2.Bucket.Autoclass autoclass = 28 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setAutoclass(com.google.storage.v2.Bucket.Autoclass.Builder builderForValue) { if (autoclassBuilder_ == null) { @@ -27450,11 +32263,14 @@ public Builder setAutoclass(com.google.storage.v2.Bucket.Autoclass.Builder build * * *
      -     * The bucket's Autoclass configuration. If there is no configuration, the
      -     * Autoclass feature will be disabled and have no effect on the bucket.
      +     * Optional. The bucket's Autoclass configuration. If there is no
      +     * configuration, the Autoclass feature will be disabled and have no effect on
      +     * the bucket.
            * 
      * - * .google.storage.v2.Bucket.Autoclass autoclass = 28; + * + * .google.storage.v2.Bucket.Autoclass autoclass = 28 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeAutoclass(com.google.storage.v2.Bucket.Autoclass value) { if (autoclassBuilder_ == null) { @@ -27479,11 +32295,14 @@ public Builder mergeAutoclass(com.google.storage.v2.Bucket.Autoclass value) { * * *
      -     * The bucket's Autoclass configuration. If there is no configuration, the
      -     * Autoclass feature will be disabled and have no effect on the bucket.
      +     * Optional. The bucket's Autoclass configuration. If there is no
      +     * configuration, the Autoclass feature will be disabled and have no effect on
      +     * the bucket.
            * 
      * - * .google.storage.v2.Bucket.Autoclass autoclass = 28; + * + * .google.storage.v2.Bucket.Autoclass autoclass = 28 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearAutoclass() { bitField0_ = (bitField0_ & ~0x08000000); @@ -27500,11 +32319,14 @@ public Builder clearAutoclass() { * * *
      -     * The bucket's Autoclass configuration. If there is no configuration, the
      -     * Autoclass feature will be disabled and have no effect on the bucket.
      +     * Optional. The bucket's Autoclass configuration. If there is no
      +     * configuration, the Autoclass feature will be disabled and have no effect on
      +     * the bucket.
            * 
      * - * .google.storage.v2.Bucket.Autoclass autoclass = 28; + * + * .google.storage.v2.Bucket.Autoclass autoclass = 28 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.Autoclass.Builder getAutoclassBuilder() { bitField0_ |= 0x08000000; @@ -27516,11 +32338,14 @@ public com.google.storage.v2.Bucket.Autoclass.Builder getAutoclassBuilder() { * * *
      -     * The bucket's Autoclass configuration. If there is no configuration, the
      -     * Autoclass feature will be disabled and have no effect on the bucket.
      +     * Optional. The bucket's Autoclass configuration. If there is no
      +     * configuration, the Autoclass feature will be disabled and have no effect on
      +     * the bucket.
            * 
      * - * .google.storage.v2.Bucket.Autoclass autoclass = 28; + * + * .google.storage.v2.Bucket.Autoclass autoclass = 28 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Bucket.AutoclassOrBuilder getAutoclassOrBuilder() { if (autoclassBuilder_ != null) { @@ -27536,11 +32361,14 @@ public com.google.storage.v2.Bucket.AutoclassOrBuilder getAutoclassOrBuilder() { * * *
      -     * The bucket's Autoclass configuration. If there is no configuration, the
      -     * Autoclass feature will be disabled and have no effect on the bucket.
      +     * Optional. The bucket's Autoclass configuration. If there is no
      +     * configuration, the Autoclass feature will be disabled and have no effect on
      +     * the bucket.
            * 
      * - * .google.storage.v2.Bucket.Autoclass autoclass = 28; + * + * .google.storage.v2.Bucket.Autoclass autoclass = 28 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.Bucket.Autoclass, @@ -28018,6 +32846,218 @@ public com.google.storage.v2.Bucket.SoftDeletePolicyOrBuilder getSoftDeletePolic return softDeletePolicyBuilder_; } + private com.google.storage.v2.Bucket.IpFilter ipFilter_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.v2.Bucket.IpFilter, + com.google.storage.v2.Bucket.IpFilter.Builder, + com.google.storage.v2.Bucket.IpFilterOrBuilder> + ipFilterBuilder_; + + /** + * + * + *
      +     * Optional. The bucket's IP filter configuration.
      +     * 
      + * + * + * optional .google.storage.v2.Bucket.IpFilter ip_filter = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the ipFilter field is set. + */ + public boolean hasIpFilter() { + return ((bitField0_ & 0x40000000) != 0); + } + + /** + * + * + *
      +     * Optional. The bucket's IP filter configuration.
      +     * 
      + * + * + * optional .google.storage.v2.Bucket.IpFilter ip_filter = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ipFilter. + */ + public com.google.storage.v2.Bucket.IpFilter getIpFilter() { + if (ipFilterBuilder_ == null) { + return ipFilter_ == null + ? com.google.storage.v2.Bucket.IpFilter.getDefaultInstance() + : ipFilter_; + } else { + return ipFilterBuilder_.getMessage(); + } + } + + /** + * + * + *
      +     * Optional. The bucket's IP filter configuration.
      +     * 
      + * + * + * optional .google.storage.v2.Bucket.IpFilter ip_filter = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setIpFilter(com.google.storage.v2.Bucket.IpFilter value) { + if (ipFilterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ipFilter_ = value; + } else { + ipFilterBuilder_.setMessage(value); + } + bitField0_ |= 0x40000000; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. The bucket's IP filter configuration.
      +     * 
      + * + * + * optional .google.storage.v2.Bucket.IpFilter ip_filter = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setIpFilter(com.google.storage.v2.Bucket.IpFilter.Builder builderForValue) { + if (ipFilterBuilder_ == null) { + ipFilter_ = builderForValue.build(); + } else { + ipFilterBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x40000000; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. The bucket's IP filter configuration.
      +     * 
      + * + * + * optional .google.storage.v2.Bucket.IpFilter ip_filter = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeIpFilter(com.google.storage.v2.Bucket.IpFilter value) { + if (ipFilterBuilder_ == null) { + if (((bitField0_ & 0x40000000) != 0) + && ipFilter_ != null + && ipFilter_ != com.google.storage.v2.Bucket.IpFilter.getDefaultInstance()) { + getIpFilterBuilder().mergeFrom(value); + } else { + ipFilter_ = value; + } + } else { + ipFilterBuilder_.mergeFrom(value); + } + if (ipFilter_ != null) { + bitField0_ |= 0x40000000; + onChanged(); + } + return this; + } + + /** + * + * + *
      +     * Optional. The bucket's IP filter configuration.
      +     * 
      + * + * + * optional .google.storage.v2.Bucket.IpFilter ip_filter = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearIpFilter() { + bitField0_ = (bitField0_ & ~0x40000000); + ipFilter_ = null; + if (ipFilterBuilder_ != null) { + ipFilterBuilder_.dispose(); + ipFilterBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. The bucket's IP filter configuration.
      +     * 
      + * + * + * optional .google.storage.v2.Bucket.IpFilter ip_filter = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.storage.v2.Bucket.IpFilter.Builder getIpFilterBuilder() { + bitField0_ |= 0x40000000; + onChanged(); + return getIpFilterFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * Optional. The bucket's IP filter configuration.
      +     * 
      + * + * + * optional .google.storage.v2.Bucket.IpFilter ip_filter = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.storage.v2.Bucket.IpFilterOrBuilder getIpFilterOrBuilder() { + if (ipFilterBuilder_ != null) { + return ipFilterBuilder_.getMessageOrBuilder(); + } else { + return ipFilter_ == null + ? com.google.storage.v2.Bucket.IpFilter.getDefaultInstance() + : ipFilter_; + } + } + + /** + * + * + *
      +     * Optional. The bucket's IP filter configuration.
      +     * 
      + * + * + * optional .google.storage.v2.Bucket.IpFilter ip_filter = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.v2.Bucket.IpFilter, + com.google.storage.v2.Bucket.IpFilter.Builder, + com.google.storage.v2.Bucket.IpFilterOrBuilder> + getIpFilterFieldBuilder() { + if (ipFilterBuilder_ == null) { + ipFilterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.v2.Bucket.IpFilter, + com.google.storage.v2.Bucket.IpFilter.Builder, + com.google.storage.v2.Bucket.IpFilterOrBuilder>( + getIpFilter(), getParentForChildren(), isClean()); + ipFilter_ = null; + } + return ipFilterBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketAccessControl.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketAccessControl.java index 43e425403d..ca503fb7ab 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketAccessControl.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketAccessControl.java @@ -81,10 +81,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
      -   * The access permission for the entity.
      +   * Optional. The access permission for the entity.
          * 
      * - * string role = 1; + * string role = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The role. */ @@ -105,10 +105,10 @@ public java.lang.String getRole() { * * *
      -   * The access permission for the entity.
      +   * Optional. The access permission for the entity.
          * 
      * - * string role = 1; + * string role = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for role. */ @@ -134,10 +134,10 @@ public com.google.protobuf.ByteString getRoleBytes() { * * *
      -   * The ID of the access-control entry.
      +   * Optional. The ID of the access-control entry.
          * 
      * - * string id = 2; + * string id = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The id. */ @@ -158,10 +158,10 @@ public java.lang.String getId() { * * *
      -   * The ID of the access-control entry.
      +   * Optional. The ID of the access-control entry.
          * 
      * - * string id = 2; + * string id = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for id. */ @@ -187,7 +187,7 @@ public com.google.protobuf.ByteString getIdBytes() { * * *
      -   * The entity holding the permission, in one of the following forms:
      +   * Optional. The entity holding the permission, in one of the following forms:
          * * `user-{userid}`
          * * `user-{email}`
          * * `group-{groupid}`
      @@ -207,7 +207,7 @@ public com.google.protobuf.ByteString getIdBytes() {
          * returned on response.
          * 
      * - * string entity = 3; + * string entity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The entity. */ @@ -228,7 +228,7 @@ public java.lang.String getEntity() { * * *
      -   * The entity holding the permission, in one of the following forms:
      +   * Optional. The entity holding the permission, in one of the following forms:
          * * `user-{userid}`
          * * `user-{email}`
          * * `group-{groupid}`
      @@ -248,7 +248,7 @@ public java.lang.String getEntity() {
          * returned on response.
          * 
      * - * string entity = 3; + * string entity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for entity. */ @@ -329,10 +329,10 @@ public com.google.protobuf.ByteString getEntityAltBytes() { * * *
      -   * The ID for the entity, if any.
      +   * Optional. The ID for the entity, if any.
          * 
      * - * string entity_id = 4; + * string entity_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The entityId. */ @@ -353,10 +353,10 @@ public java.lang.String getEntityId() { * * *
      -   * The ID for the entity, if any.
      +   * Optional. The ID for the entity, if any.
          * 
      * - * string entity_id = 4; + * string entity_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for entityId. */ @@ -382,13 +382,13 @@ public com.google.protobuf.ByteString getEntityIdBytes() { * * *
      -   * The etag of the BucketAccessControl.
      +   * Optional. The etag of the BucketAccessControl.
          * If included in the metadata of an update or delete request message, the
          * operation operation will only be performed if the etag matches that of the
          * bucket's BucketAccessControl.
          * 
      * - * string etag = 8; + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The etag. */ @@ -409,13 +409,13 @@ public java.lang.String getEtag() { * * *
      -   * The etag of the BucketAccessControl.
      +   * Optional. The etag of the BucketAccessControl.
          * If included in the metadata of an update or delete request message, the
          * operation operation will only be performed if the etag matches that of the
          * bucket's BucketAccessControl.
          * 
      * - * string etag = 8; + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for etag. */ @@ -441,10 +441,10 @@ public com.google.protobuf.ByteString getEtagBytes() { * * *
      -   * The email address associated with the entity, if any.
      +   * Optional. The email address associated with the entity, if any.
          * 
      * - * string email = 5; + * string email = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The email. */ @@ -465,10 +465,10 @@ public java.lang.String getEmail() { * * *
      -   * The email address associated with the entity, if any.
      +   * Optional. The email address associated with the entity, if any.
          * 
      * - * string email = 5; + * string email = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for email. */ @@ -494,10 +494,10 @@ public com.google.protobuf.ByteString getEmailBytes() { * * *
      -   * The domain associated with the entity, if any.
      +   * Optional. The domain associated with the entity, if any.
          * 
      * - * string domain = 6; + * string domain = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The domain. */ @@ -518,10 +518,10 @@ public java.lang.String getDomain() { * * *
      -   * The domain associated with the entity, if any.
      +   * Optional. The domain associated with the entity, if any.
          * 
      * - * string domain = 6; + * string domain = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for domain. */ @@ -545,10 +545,12 @@ public com.google.protobuf.ByteString getDomainBytes() { * * *
      -   * The project team associated with the entity, if any.
      +   * Optional. The project team associated with the entity, if any.
          * 
      * - * .google.storage.v2.ProjectTeam project_team = 7; + * + * .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the projectTeam field is set. */ @@ -561,10 +563,12 @@ public boolean hasProjectTeam() { * * *
      -   * The project team associated with the entity, if any.
      +   * Optional. The project team associated with the entity, if any.
          * 
      * - * .google.storage.v2.ProjectTeam project_team = 7; + * + * .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The projectTeam. */ @@ -579,10 +583,12 @@ public com.google.storage.v2.ProjectTeam getProjectTeam() { * * *
      -   * The project team associated with the entity, if any.
      +   * Optional. The project team associated with the entity, if any.
          * 
      * - * .google.storage.v2.ProjectTeam project_team = 7; + * + * .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.ProjectTeamOrBuilder getProjectTeamOrBuilder() { @@ -1151,10 +1157,10 @@ public Builder mergeFrom( * * *
      -     * The access permission for the entity.
      +     * Optional. The access permission for the entity.
            * 
      * - * string role = 1; + * string role = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The role. */ @@ -1174,10 +1180,10 @@ public java.lang.String getRole() { * * *
      -     * The access permission for the entity.
      +     * Optional. The access permission for the entity.
            * 
      * - * string role = 1; + * string role = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for role. */ @@ -1197,10 +1203,10 @@ public com.google.protobuf.ByteString getRoleBytes() { * * *
      -     * The access permission for the entity.
      +     * Optional. The access permission for the entity.
            * 
      * - * string role = 1; + * string role = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The role to set. * @return This builder for chaining. @@ -1219,10 +1225,10 @@ public Builder setRole(java.lang.String value) { * * *
      -     * The access permission for the entity.
      +     * Optional. The access permission for the entity.
            * 
      * - * string role = 1; + * string role = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1237,10 +1243,10 @@ public Builder clearRole() { * * *
      -     * The access permission for the entity.
      +     * Optional. The access permission for the entity.
            * 
      * - * string role = 1; + * string role = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for role to set. * @return This builder for chaining. @@ -1262,10 +1268,10 @@ public Builder setRoleBytes(com.google.protobuf.ByteString value) { * * *
      -     * The ID of the access-control entry.
      +     * Optional. The ID of the access-control entry.
            * 
      * - * string id = 2; + * string id = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The id. */ @@ -1285,10 +1291,10 @@ public java.lang.String getId() { * * *
      -     * The ID of the access-control entry.
      +     * Optional. The ID of the access-control entry.
            * 
      * - * string id = 2; + * string id = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for id. */ @@ -1308,10 +1314,10 @@ public com.google.protobuf.ByteString getIdBytes() { * * *
      -     * The ID of the access-control entry.
      +     * Optional. The ID of the access-control entry.
            * 
      * - * string id = 2; + * string id = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The id to set. * @return This builder for chaining. @@ -1330,10 +1336,10 @@ public Builder setId(java.lang.String value) { * * *
      -     * The ID of the access-control entry.
      +     * Optional. The ID of the access-control entry.
            * 
      * - * string id = 2; + * string id = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1348,10 +1354,10 @@ public Builder clearId() { * * *
      -     * The ID of the access-control entry.
      +     * Optional. The ID of the access-control entry.
            * 
      * - * string id = 2; + * string id = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for id to set. * @return This builder for chaining. @@ -1373,7 +1379,7 @@ public Builder setIdBytes(com.google.protobuf.ByteString value) { * * *
      -     * The entity holding the permission, in one of the following forms:
      +     * Optional. The entity holding the permission, in one of the following forms:
            * * `user-{userid}`
            * * `user-{email}`
            * * `group-{groupid}`
      @@ -1393,7 +1399,7 @@ public Builder setIdBytes(com.google.protobuf.ByteString value) {
            * returned on response.
            * 
      * - * string entity = 3; + * string entity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The entity. */ @@ -1413,7 +1419,7 @@ public java.lang.String getEntity() { * * *
      -     * The entity holding the permission, in one of the following forms:
      +     * Optional. The entity holding the permission, in one of the following forms:
            * * `user-{userid}`
            * * `user-{email}`
            * * `group-{groupid}`
      @@ -1433,7 +1439,7 @@ public java.lang.String getEntity() {
            * returned on response.
            * 
      * - * string entity = 3; + * string entity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for entity. */ @@ -1453,7 +1459,7 @@ public com.google.protobuf.ByteString getEntityBytes() { * * *
      -     * The entity holding the permission, in one of the following forms:
      +     * Optional. The entity holding the permission, in one of the following forms:
            * * `user-{userid}`
            * * `user-{email}`
            * * `group-{groupid}`
      @@ -1473,7 +1479,7 @@ public com.google.protobuf.ByteString getEntityBytes() {
            * returned on response.
            * 
      * - * string entity = 3; + * string entity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The entity to set. * @return This builder for chaining. @@ -1492,7 +1498,7 @@ public Builder setEntity(java.lang.String value) { * * *
      -     * The entity holding the permission, in one of the following forms:
      +     * Optional. The entity holding the permission, in one of the following forms:
            * * `user-{userid}`
            * * `user-{email}`
            * * `group-{groupid}`
      @@ -1512,7 +1518,7 @@ public Builder setEntity(java.lang.String value) {
            * returned on response.
            * 
      * - * string entity = 3; + * string entity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1527,7 +1533,7 @@ public Builder clearEntity() { * * *
      -     * The entity holding the permission, in one of the following forms:
      +     * Optional. The entity holding the permission, in one of the following forms:
            * * `user-{userid}`
            * * `user-{email}`
            * * `group-{groupid}`
      @@ -1547,7 +1553,7 @@ public Builder clearEntity() {
            * returned on response.
            * 
      * - * string entity = 3; + * string entity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for entity to set. * @return This builder for chaining. @@ -1685,10 +1691,10 @@ public Builder setEntityAltBytes(com.google.protobuf.ByteString value) { * * *
      -     * The ID for the entity, if any.
      +     * Optional. The ID for the entity, if any.
            * 
      * - * string entity_id = 4; + * string entity_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The entityId. */ @@ -1708,10 +1714,10 @@ public java.lang.String getEntityId() { * * *
      -     * The ID for the entity, if any.
      +     * Optional. The ID for the entity, if any.
            * 
      * - * string entity_id = 4; + * string entity_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for entityId. */ @@ -1731,10 +1737,10 @@ public com.google.protobuf.ByteString getEntityIdBytes() { * * *
      -     * The ID for the entity, if any.
      +     * Optional. The ID for the entity, if any.
            * 
      * - * string entity_id = 4; + * string entity_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The entityId to set. * @return This builder for chaining. @@ -1753,10 +1759,10 @@ public Builder setEntityId(java.lang.String value) { * * *
      -     * The ID for the entity, if any.
      +     * Optional. The ID for the entity, if any.
            * 
      * - * string entity_id = 4; + * string entity_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1771,10 +1777,10 @@ public Builder clearEntityId() { * * *
      -     * The ID for the entity, if any.
      +     * Optional. The ID for the entity, if any.
            * 
      * - * string entity_id = 4; + * string entity_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for entityId to set. * @return This builder for chaining. @@ -1796,13 +1802,13 @@ public Builder setEntityIdBytes(com.google.protobuf.ByteString value) { * * *
      -     * The etag of the BucketAccessControl.
      +     * Optional. The etag of the BucketAccessControl.
            * If included in the metadata of an update or delete request message, the
            * operation operation will only be performed if the etag matches that of the
            * bucket's BucketAccessControl.
            * 
      * - * string etag = 8; + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The etag. */ @@ -1822,13 +1828,13 @@ public java.lang.String getEtag() { * * *
      -     * The etag of the BucketAccessControl.
      +     * Optional. The etag of the BucketAccessControl.
            * If included in the metadata of an update or delete request message, the
            * operation operation will only be performed if the etag matches that of the
            * bucket's BucketAccessControl.
            * 
      * - * string etag = 8; + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for etag. */ @@ -1848,13 +1854,13 @@ public com.google.protobuf.ByteString getEtagBytes() { * * *
      -     * The etag of the BucketAccessControl.
      +     * Optional. The etag of the BucketAccessControl.
            * If included in the metadata of an update or delete request message, the
            * operation operation will only be performed if the etag matches that of the
            * bucket's BucketAccessControl.
            * 
      * - * string etag = 8; + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The etag to set. * @return This builder for chaining. @@ -1873,13 +1879,13 @@ public Builder setEtag(java.lang.String value) { * * *
      -     * The etag of the BucketAccessControl.
      +     * Optional. The etag of the BucketAccessControl.
            * If included in the metadata of an update or delete request message, the
            * operation operation will only be performed if the etag matches that of the
            * bucket's BucketAccessControl.
            * 
      * - * string etag = 8; + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1894,13 +1900,13 @@ public Builder clearEtag() { * * *
      -     * The etag of the BucketAccessControl.
      +     * Optional. The etag of the BucketAccessControl.
            * If included in the metadata of an update or delete request message, the
            * operation operation will only be performed if the etag matches that of the
            * bucket's BucketAccessControl.
            * 
      * - * string etag = 8; + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for etag to set. * @return This builder for chaining. @@ -1922,10 +1928,10 @@ public Builder setEtagBytes(com.google.protobuf.ByteString value) { * * *
      -     * The email address associated with the entity, if any.
      +     * Optional. The email address associated with the entity, if any.
            * 
      * - * string email = 5; + * string email = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The email. */ @@ -1945,10 +1951,10 @@ public java.lang.String getEmail() { * * *
      -     * The email address associated with the entity, if any.
      +     * Optional. The email address associated with the entity, if any.
            * 
      * - * string email = 5; + * string email = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for email. */ @@ -1968,10 +1974,10 @@ public com.google.protobuf.ByteString getEmailBytes() { * * *
      -     * The email address associated with the entity, if any.
      +     * Optional. The email address associated with the entity, if any.
            * 
      * - * string email = 5; + * string email = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The email to set. * @return This builder for chaining. @@ -1990,10 +1996,10 @@ public Builder setEmail(java.lang.String value) { * * *
      -     * The email address associated with the entity, if any.
      +     * Optional. The email address associated with the entity, if any.
            * 
      * - * string email = 5; + * string email = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -2008,10 +2014,10 @@ public Builder clearEmail() { * * *
      -     * The email address associated with the entity, if any.
      +     * Optional. The email address associated with the entity, if any.
            * 
      * - * string email = 5; + * string email = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for email to set. * @return This builder for chaining. @@ -2033,10 +2039,10 @@ public Builder setEmailBytes(com.google.protobuf.ByteString value) { * * *
      -     * The domain associated with the entity, if any.
      +     * Optional. The domain associated with the entity, if any.
            * 
      * - * string domain = 6; + * string domain = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The domain. */ @@ -2056,10 +2062,10 @@ public java.lang.String getDomain() { * * *
      -     * The domain associated with the entity, if any.
      +     * Optional. The domain associated with the entity, if any.
            * 
      * - * string domain = 6; + * string domain = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for domain. */ @@ -2079,10 +2085,10 @@ public com.google.protobuf.ByteString getDomainBytes() { * * *
      -     * The domain associated with the entity, if any.
      +     * Optional. The domain associated with the entity, if any.
            * 
      * - * string domain = 6; + * string domain = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The domain to set. * @return This builder for chaining. @@ -2101,10 +2107,10 @@ public Builder setDomain(java.lang.String value) { * * *
      -     * The domain associated with the entity, if any.
      +     * Optional. The domain associated with the entity, if any.
            * 
      * - * string domain = 6; + * string domain = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -2119,10 +2125,10 @@ public Builder clearDomain() { * * *
      -     * The domain associated with the entity, if any.
      +     * Optional. The domain associated with the entity, if any.
            * 
      * - * string domain = 6; + * string domain = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for domain to set. * @return This builder for chaining. @@ -2149,10 +2155,12 @@ public Builder setDomainBytes(com.google.protobuf.ByteString value) { * * *
      -     * The project team associated with the entity, if any.
      +     * Optional. The project team associated with the entity, if any.
            * 
      * - * .google.storage.v2.ProjectTeam project_team = 7; + * + * .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the projectTeam field is set. */ @@ -2164,10 +2172,12 @@ public boolean hasProjectTeam() { * * *
      -     * The project team associated with the entity, if any.
      +     * Optional. The project team associated with the entity, if any.
            * 
      * - * .google.storage.v2.ProjectTeam project_team = 7; + * + * .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The projectTeam. */ @@ -2185,10 +2195,12 @@ public com.google.storage.v2.ProjectTeam getProjectTeam() { * * *
      -     * The project team associated with the entity, if any.
      +     * Optional. The project team associated with the entity, if any.
            * 
      * - * .google.storage.v2.ProjectTeam project_team = 7; + * + * .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setProjectTeam(com.google.storage.v2.ProjectTeam value) { if (projectTeamBuilder_ == null) { @@ -2208,10 +2220,12 @@ public Builder setProjectTeam(com.google.storage.v2.ProjectTeam value) { * * *
      -     * The project team associated with the entity, if any.
      +     * Optional. The project team associated with the entity, if any.
            * 
      * - * .google.storage.v2.ProjectTeam project_team = 7; + * + * .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setProjectTeam(com.google.storage.v2.ProjectTeam.Builder builderForValue) { if (projectTeamBuilder_ == null) { @@ -2228,10 +2242,12 @@ public Builder setProjectTeam(com.google.storage.v2.ProjectTeam.Builder builderF * * *
      -     * The project team associated with the entity, if any.
      +     * Optional. The project team associated with the entity, if any.
            * 
      * - * .google.storage.v2.ProjectTeam project_team = 7; + * + * .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeProjectTeam(com.google.storage.v2.ProjectTeam value) { if (projectTeamBuilder_ == null) { @@ -2256,10 +2272,12 @@ public Builder mergeProjectTeam(com.google.storage.v2.ProjectTeam value) { * * *
      -     * The project team associated with the entity, if any.
      +     * Optional. The project team associated with the entity, if any.
            * 
      * - * .google.storage.v2.ProjectTeam project_team = 7; + * + * .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearProjectTeam() { bitField0_ = (bitField0_ & ~0x00000100); @@ -2276,10 +2294,12 @@ public Builder clearProjectTeam() { * * *
      -     * The project team associated with the entity, if any.
      +     * Optional. The project team associated with the entity, if any.
            * 
      * - * .google.storage.v2.ProjectTeam project_team = 7; + * + * .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.ProjectTeam.Builder getProjectTeamBuilder() { bitField0_ |= 0x00000100; @@ -2291,10 +2311,12 @@ public com.google.storage.v2.ProjectTeam.Builder getProjectTeamBuilder() { * * *
      -     * The project team associated with the entity, if any.
      +     * Optional. The project team associated with the entity, if any.
            * 
      * - * .google.storage.v2.ProjectTeam project_team = 7; + * + * .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.ProjectTeamOrBuilder getProjectTeamOrBuilder() { if (projectTeamBuilder_ != null) { @@ -2310,10 +2332,12 @@ public com.google.storage.v2.ProjectTeamOrBuilder getProjectTeamOrBuilder() { * * *
      -     * The project team associated with the entity, if any.
      +     * Optional. The project team associated with the entity, if any.
            * 
      * - * .google.storage.v2.ProjectTeam project_team = 7; + * + * .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.ProjectTeam, diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketAccessControlOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketAccessControlOrBuilder.java index 6f64bf7a5e..c0df1af4c9 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketAccessControlOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketAccessControlOrBuilder.java @@ -28,10 +28,10 @@ public interface BucketAccessControlOrBuilder * * *
      -   * The access permission for the entity.
      +   * Optional. The access permission for the entity.
          * 
      * - * string role = 1; + * string role = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The role. */ @@ -41,10 +41,10 @@ public interface BucketAccessControlOrBuilder * * *
      -   * The access permission for the entity.
      +   * Optional. The access permission for the entity.
          * 
      * - * string role = 1; + * string role = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for role. */ @@ -54,10 +54,10 @@ public interface BucketAccessControlOrBuilder * * *
      -   * The ID of the access-control entry.
      +   * Optional. The ID of the access-control entry.
          * 
      * - * string id = 2; + * string id = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The id. */ @@ -67,10 +67,10 @@ public interface BucketAccessControlOrBuilder * * *
      -   * The ID of the access-control entry.
      +   * Optional. The ID of the access-control entry.
          * 
      * - * string id = 2; + * string id = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for id. */ @@ -80,7 +80,7 @@ public interface BucketAccessControlOrBuilder * * *
      -   * The entity holding the permission, in one of the following forms:
      +   * Optional. The entity holding the permission, in one of the following forms:
          * * `user-{userid}`
          * * `user-{email}`
          * * `group-{groupid}`
      @@ -100,7 +100,7 @@ public interface BucketAccessControlOrBuilder
          * returned on response.
          * 
      * - * string entity = 3; + * string entity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The entity. */ @@ -110,7 +110,7 @@ public interface BucketAccessControlOrBuilder * * *
      -   * The entity holding the permission, in one of the following forms:
      +   * Optional. The entity holding the permission, in one of the following forms:
          * * `user-{userid}`
          * * `user-{email}`
          * * `group-{groupid}`
      @@ -130,7 +130,7 @@ public interface BucketAccessControlOrBuilder
          * returned on response.
          * 
      * - * string entity = 3; + * string entity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for entity. */ @@ -168,10 +168,10 @@ public interface BucketAccessControlOrBuilder * * *
      -   * The ID for the entity, if any.
      +   * Optional. The ID for the entity, if any.
          * 
      * - * string entity_id = 4; + * string entity_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The entityId. */ @@ -181,10 +181,10 @@ public interface BucketAccessControlOrBuilder * * *
      -   * The ID for the entity, if any.
      +   * Optional. The ID for the entity, if any.
          * 
      * - * string entity_id = 4; + * string entity_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for entityId. */ @@ -194,13 +194,13 @@ public interface BucketAccessControlOrBuilder * * *
      -   * The etag of the BucketAccessControl.
      +   * Optional. The etag of the BucketAccessControl.
          * If included in the metadata of an update or delete request message, the
          * operation operation will only be performed if the etag matches that of the
          * bucket's BucketAccessControl.
          * 
      * - * string etag = 8; + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The etag. */ @@ -210,13 +210,13 @@ public interface BucketAccessControlOrBuilder * * *
      -   * The etag of the BucketAccessControl.
      +   * Optional. The etag of the BucketAccessControl.
          * If included in the metadata of an update or delete request message, the
          * operation operation will only be performed if the etag matches that of the
          * bucket's BucketAccessControl.
          * 
      * - * string etag = 8; + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for etag. */ @@ -226,10 +226,10 @@ public interface BucketAccessControlOrBuilder * * *
      -   * The email address associated with the entity, if any.
      +   * Optional. The email address associated with the entity, if any.
          * 
      * - * string email = 5; + * string email = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The email. */ @@ -239,10 +239,10 @@ public interface BucketAccessControlOrBuilder * * *
      -   * The email address associated with the entity, if any.
      +   * Optional. The email address associated with the entity, if any.
          * 
      * - * string email = 5; + * string email = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for email. */ @@ -252,10 +252,10 @@ public interface BucketAccessControlOrBuilder * * *
      -   * The domain associated with the entity, if any.
      +   * Optional. The domain associated with the entity, if any.
          * 
      * - * string domain = 6; + * string domain = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The domain. */ @@ -265,10 +265,10 @@ public interface BucketAccessControlOrBuilder * * *
      -   * The domain associated with the entity, if any.
      +   * Optional. The domain associated with the entity, if any.
          * 
      * - * string domain = 6; + * string domain = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for domain. */ @@ -278,10 +278,12 @@ public interface BucketAccessControlOrBuilder * * *
      -   * The project team associated with the entity, if any.
      +   * Optional. The project team associated with the entity, if any.
          * 
      * - * .google.storage.v2.ProjectTeam project_team = 7; + * + * .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the projectTeam field is set. */ @@ -291,10 +293,12 @@ public interface BucketAccessControlOrBuilder * * *
      -   * The project team associated with the entity, if any.
      +   * Optional. The project team associated with the entity, if any.
          * 
      * - * .google.storage.v2.ProjectTeam project_team = 7; + * + * .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The projectTeam. */ @@ -304,10 +308,12 @@ public interface BucketAccessControlOrBuilder * * *
      -   * The project team associated with the entity, if any.
      +   * Optional. The project team associated with the entity, if any.
          * 
      * - * .google.storage.v2.ProjectTeam project_team = 7; + * + * .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.ProjectTeamOrBuilder getProjectTeamOrBuilder(); } diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketOrBuilder.java index a9716781fa..0a20b340e3 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/BucketOrBuilder.java @@ -28,11 +28,11 @@ public interface BucketOrBuilder * * *
      -   * Immutable. The name of the bucket.
      +   * Identifier. The name of the bucket.
          * Format: `projects/{project}/buckets/{bucket}`
          * 
      * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The name. */ @@ -42,11 +42,11 @@ public interface BucketOrBuilder * * *
      -   * Immutable. The name of the bucket.
      +   * Identifier. The name of the bucket.
          * Format: `projects/{project}/buckets/{bucket}`
          * 
      * - * string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; * * @return The bytes for name. */ @@ -119,6 +119,7 @@ public interface BucketOrBuilder * Immutable. The project which owns this bucket, in the format of * "projects/{projectIdentifier}". * {projectIdentifier} can be the project ID or project number. + * Output values will always be in project number format. * * * @@ -136,6 +137,7 @@ public interface BucketOrBuilder * Immutable. The project which owns this bucket, in the format of * "projects/{projectIdentifier}". * {projectIdentifier} can be the project ID or project number. + * Output values will always be in project number format. * * * @@ -227,15 +229,15 @@ public interface BucketOrBuilder * * *
      -   * The bucket's default storage class, used whenever no storageClass is
      -   * specified for a newly-created object. This defines how objects in the
      +   * Optional. The bucket's default storage class, used whenever no storageClass
      +   * is specified for a newly-created object. This defines how objects in the
          * bucket are stored and determines the SLA and the cost of storage.
          * If this value is not specified when the bucket is created, it will default
          * to `STANDARD`. For more information, see
          * https://developers.google.com/storage/docs/storage-classes.
          * 
      * - * string storage_class = 7; + * string storage_class = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The storageClass. */ @@ -245,15 +247,15 @@ public interface BucketOrBuilder * * *
      -   * The bucket's default storage class, used whenever no storageClass is
      -   * specified for a newly-created object. This defines how objects in the
      +   * Optional. The bucket's default storage class, used whenever no storageClass
      +   * is specified for a newly-created object. This defines how objects in the
          * bucket are stored and determines the SLA and the cost of storage.
          * If this value is not specified when the bucket is created, it will default
          * to `STANDARD`. For more information, see
          * https://developers.google.com/storage/docs/storage-classes.
          * 
      * - * string storage_class = 7; + * string storage_class = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for storageClass. */ @@ -263,15 +265,15 @@ public interface BucketOrBuilder * * *
      -   * The recovery point objective for cross-region replication of the bucket.
      -   * Applicable only for dual- and multi-region buckets. "DEFAULT" uses default
      -   * replication. "ASYNC_TURBO" enables turbo replication, valid for dual-region
      -   * buckets only. If rpo is not specified when the bucket is created, it
      -   * defaults to "DEFAULT". For more information, see
      +   * Optional. The recovery point objective for cross-region replication of the
      +   * bucket. Applicable only for dual- and multi-region buckets. "DEFAULT" uses
      +   * default replication. "ASYNC_TURBO" enables turbo replication, valid for
      +   * dual-region buckets only. If rpo is not specified when the bucket is
      +   * created, it defaults to "DEFAULT". For more information, see
          * https://cloud.google.com/storage/docs/availability-durability#turbo-replication.
          * 
      * - * string rpo = 27; + * string rpo = 27 [(.google.api.field_behavior) = OPTIONAL]; * * @return The rpo. */ @@ -281,15 +283,15 @@ public interface BucketOrBuilder * * *
      -   * The recovery point objective for cross-region replication of the bucket.
      -   * Applicable only for dual- and multi-region buckets. "DEFAULT" uses default
      -   * replication. "ASYNC_TURBO" enables turbo replication, valid for dual-region
      -   * buckets only. If rpo is not specified when the bucket is created, it
      -   * defaults to "DEFAULT". For more information, see
      +   * Optional. The recovery point objective for cross-region replication of the
      +   * bucket. Applicable only for dual- and multi-region buckets. "DEFAULT" uses
      +   * default replication. "ASYNC_TURBO" enables turbo replication, valid for
      +   * dual-region buckets only. If rpo is not specified when the bucket is
      +   * created, it defaults to "DEFAULT". For more information, see
          * https://cloud.google.com/storage/docs/availability-durability#turbo-replication.
          * 
      * - * string rpo = 27; + * string rpo = 27 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for rpo. */ @@ -299,12 +301,14 @@ public interface BucketOrBuilder * * *
      -   * Access controls on the bucket.
      +   * Optional. Access controls on the bucket.
          * If iam_config.uniform_bucket_level_access is enabled on this bucket,
          * requests to set, read, or modify acl is an error.
          * 
      * - * repeated .google.storage.v2.BucketAccessControl acl = 8; + * + * repeated .google.storage.v2.BucketAccessControl acl = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ java.util.List getAclList(); @@ -312,12 +316,14 @@ public interface BucketOrBuilder * * *
      -   * Access controls on the bucket.
      +   * Optional. Access controls on the bucket.
          * If iam_config.uniform_bucket_level_access is enabled on this bucket,
          * requests to set, read, or modify acl is an error.
          * 
      * - * repeated .google.storage.v2.BucketAccessControl acl = 8; + * + * repeated .google.storage.v2.BucketAccessControl acl = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.BucketAccessControl getAcl(int index); @@ -325,12 +331,14 @@ public interface BucketOrBuilder * * *
      -   * Access controls on the bucket.
      +   * Optional. Access controls on the bucket.
          * If iam_config.uniform_bucket_level_access is enabled on this bucket,
          * requests to set, read, or modify acl is an error.
          * 
      * - * repeated .google.storage.v2.BucketAccessControl acl = 8; + * + * repeated .google.storage.v2.BucketAccessControl acl = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ int getAclCount(); @@ -338,12 +346,14 @@ public interface BucketOrBuilder * * *
      -   * Access controls on the bucket.
      +   * Optional. Access controls on the bucket.
          * If iam_config.uniform_bucket_level_access is enabled on this bucket,
          * requests to set, read, or modify acl is an error.
          * 
      * - * repeated .google.storage.v2.BucketAccessControl acl = 8; + * + * repeated .google.storage.v2.BucketAccessControl acl = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ java.util.List getAclOrBuilderList(); @@ -352,12 +362,14 @@ public interface BucketOrBuilder * * *
      -   * Access controls on the bucket.
      +   * Optional. Access controls on the bucket.
          * If iam_config.uniform_bucket_level_access is enabled on this bucket,
          * requests to set, read, or modify acl is an error.
          * 
      * - * repeated .google.storage.v2.BucketAccessControl acl = 8; + * + * repeated .google.storage.v2.BucketAccessControl acl = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.BucketAccessControlOrBuilder getAclOrBuilder(int index); @@ -365,12 +377,14 @@ public interface BucketOrBuilder * * *
      -   * Default access controls to apply to new objects when no ACL is provided.
      -   * If iam_config.uniform_bucket_level_access is enabled on this bucket,
      -   * requests to set, read, or modify acl is an error.
      +   * Optional. Default access controls to apply to new objects when no ACL is
      +   * provided. If iam_config.uniform_bucket_level_access is enabled on this
      +   * bucket, requests to set, read, or modify acl is an error.
          * 
      * - * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9; + * + * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ java.util.List getDefaultObjectAclList(); @@ -378,12 +392,14 @@ public interface BucketOrBuilder * * *
      -   * Default access controls to apply to new objects when no ACL is provided.
      -   * If iam_config.uniform_bucket_level_access is enabled on this bucket,
      -   * requests to set, read, or modify acl is an error.
      +   * Optional. Default access controls to apply to new objects when no ACL is
      +   * provided. If iam_config.uniform_bucket_level_access is enabled on this
      +   * bucket, requests to set, read, or modify acl is an error.
          * 
      * - * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9; + * + * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.ObjectAccessControl getDefaultObjectAcl(int index); @@ -391,12 +407,14 @@ public interface BucketOrBuilder * * *
      -   * Default access controls to apply to new objects when no ACL is provided.
      -   * If iam_config.uniform_bucket_level_access is enabled on this bucket,
      -   * requests to set, read, or modify acl is an error.
      +   * Optional. Default access controls to apply to new objects when no ACL is
      +   * provided. If iam_config.uniform_bucket_level_access is enabled on this
      +   * bucket, requests to set, read, or modify acl is an error.
          * 
      * - * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9; + * + * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ int getDefaultObjectAclCount(); @@ -404,12 +422,14 @@ public interface BucketOrBuilder * * *
      -   * Default access controls to apply to new objects when no ACL is provided.
      -   * If iam_config.uniform_bucket_level_access is enabled on this bucket,
      -   * requests to set, read, or modify acl is an error.
      +   * Optional. Default access controls to apply to new objects when no ACL is
      +   * provided. If iam_config.uniform_bucket_level_access is enabled on this
      +   * bucket, requests to set, read, or modify acl is an error.
          * 
      * - * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9; + * + * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ java.util.List getDefaultObjectAclOrBuilderList(); @@ -418,12 +438,14 @@ public interface BucketOrBuilder * * *
      -   * Default access controls to apply to new objects when no ACL is provided.
      -   * If iam_config.uniform_bucket_level_access is enabled on this bucket,
      -   * requests to set, read, or modify acl is an error.
      +   * Optional. Default access controls to apply to new objects when no ACL is
      +   * provided. If iam_config.uniform_bucket_level_access is enabled on this
      +   * bucket, requests to set, read, or modify acl is an error.
          * 
      * - * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9; + * + * repeated .google.storage.v2.ObjectAccessControl default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.ObjectAccessControlOrBuilder getDefaultObjectAclOrBuilder(int index); @@ -431,12 +453,14 @@ public interface BucketOrBuilder * * *
      -   * The bucket's lifecycle config. See
      +   * Optional. The bucket's lifecycle config. See
          * [https://developers.google.com/storage/docs/lifecycle]Lifecycle Management]
          * for more information.
          * 
      * - * .google.storage.v2.Bucket.Lifecycle lifecycle = 10; + * + * .google.storage.v2.Bucket.Lifecycle lifecycle = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the lifecycle field is set. */ @@ -446,12 +470,14 @@ public interface BucketOrBuilder * * *
      -   * The bucket's lifecycle config. See
      +   * Optional. The bucket's lifecycle config. See
          * [https://developers.google.com/storage/docs/lifecycle]Lifecycle Management]
          * for more information.
          * 
      * - * .google.storage.v2.Bucket.Lifecycle lifecycle = 10; + * + * .google.storage.v2.Bucket.Lifecycle lifecycle = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The lifecycle. */ @@ -461,12 +487,14 @@ public interface BucketOrBuilder * * *
      -   * The bucket's lifecycle config. See
      +   * Optional. The bucket's lifecycle config. See
          * [https://developers.google.com/storage/docs/lifecycle]Lifecycle Management]
          * for more information.
          * 
      * - * .google.storage.v2.Bucket.Lifecycle lifecycle = 10; + * + * .google.storage.v2.Bucket.Lifecycle lifecycle = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.Bucket.LifecycleOrBuilder getLifecycleOrBuilder(); @@ -514,11 +542,13 @@ public interface BucketOrBuilder * * *
      -   * The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing]
      -   * (CORS) config.
      +   * Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource
      +   * Sharing] (CORS) config.
          * 
      * - * repeated .google.storage.v2.Bucket.Cors cors = 12; + * + * repeated .google.storage.v2.Bucket.Cors cors = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ java.util.List getCorsList(); @@ -526,11 +556,13 @@ public interface BucketOrBuilder * * *
      -   * The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing]
      -   * (CORS) config.
      +   * Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource
      +   * Sharing] (CORS) config.
          * 
      * - * repeated .google.storage.v2.Bucket.Cors cors = 12; + * + * repeated .google.storage.v2.Bucket.Cors cors = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.Bucket.Cors getCors(int index); @@ -538,11 +570,13 @@ public interface BucketOrBuilder * * *
      -   * The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing]
      -   * (CORS) config.
      +   * Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource
      +   * Sharing] (CORS) config.
          * 
      * - * repeated .google.storage.v2.Bucket.Cors cors = 12; + * + * repeated .google.storage.v2.Bucket.Cors cors = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ int getCorsCount(); @@ -550,11 +584,13 @@ public interface BucketOrBuilder * * *
      -   * The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing]
      -   * (CORS) config.
      +   * Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource
      +   * Sharing] (CORS) config.
          * 
      * - * repeated .google.storage.v2.Bucket.Cors cors = 12; + * + * repeated .google.storage.v2.Bucket.Cors cors = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ java.util.List getCorsOrBuilderList(); @@ -562,11 +598,13 @@ public interface BucketOrBuilder * * *
      -   * The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing]
      -   * (CORS) config.
      +   * Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource
      +   * Sharing] (CORS) config.
          * 
      * - * repeated .google.storage.v2.Bucket.Cors cors = 12; + * + * repeated .google.storage.v2.Bucket.Cors cors = 12 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.Bucket.CorsOrBuilder getCorsOrBuilder(int index); @@ -614,22 +652,22 @@ public interface BucketOrBuilder * * *
      -   * The default value for event-based hold on newly created objects in this
      -   * bucket.  Event-based hold is a way to retain objects indefinitely until an
      -   * event occurs, signified by the
      -   * hold's release. After being released, such objects will be subject to
      -   * bucket-level retention (if any).  One sample use case of this flag is for
      -   * banks to hold loan documents for at least 3 years after loan is paid in
      -   * full. Here, bucket-level retention is 3 years and the event is loan being
      -   * paid in full. In this example, these objects will be held intact for any
      -   * number of years until the event has occurred (event-based hold on the
      -   * object is released) and then 3 more years after that. That means retention
      -   * duration of the objects begins from the moment event-based hold
      -   * transitioned from true to false.  Objects under event-based hold cannot be
      -   * deleted, overwritten or archived until the hold is removed.
      +   * Optional. The default value for event-based hold on newly created objects
      +   * in this bucket.  Event-based hold is a way to retain objects indefinitely
      +   * until an event occurs, signified by the hold's release. After being
      +   * released, such objects will be subject to bucket-level retention (if any).
      +   * One sample use case of this flag is for banks to hold loan documents for at
      +   * least 3 years after loan is paid in full. Here, bucket-level retention is 3
      +   * years and the event is loan being paid in full. In this example, these
      +   * objects will be held intact for any number of years until the event has
      +   * occurred (event-based hold on the object is released) and then 3 more years
      +   * after that. That means retention duration of the objects begins from the
      +   * moment event-based hold transitioned from true to false.  Objects under
      +   * event-based hold cannot be deleted, overwritten or archived until the hold
      +   * is removed.
          * 
      * - * bool default_event_based_hold = 14; + * bool default_event_based_hold = 14 [(.google.api.field_behavior) = OPTIONAL]; * * @return The defaultEventBasedHold. */ @@ -639,10 +677,10 @@ public interface BucketOrBuilder * * *
      -   * User-provided labels, in key/value pairs.
      +   * Optional. User-provided labels, in key/value pairs.
          * 
      * - * map<string, string> labels = 15; + * map<string, string> labels = 15 [(.google.api.field_behavior) = OPTIONAL]; */ int getLabelsCount(); @@ -650,10 +688,10 @@ public interface BucketOrBuilder * * *
      -   * User-provided labels, in key/value pairs.
      +   * Optional. User-provided labels, in key/value pairs.
          * 
      * - * map<string, string> labels = 15; + * map<string, string> labels = 15 [(.google.api.field_behavior) = OPTIONAL]; */ boolean containsLabels(java.lang.String key); @@ -665,10 +703,10 @@ public interface BucketOrBuilder * * *
      -   * User-provided labels, in key/value pairs.
      +   * Optional. User-provided labels, in key/value pairs.
          * 
      * - * map<string, string> labels = 15; + * map<string, string> labels = 15 [(.google.api.field_behavior) = OPTIONAL]; */ java.util.Map getLabelsMap(); @@ -676,10 +714,10 @@ public interface BucketOrBuilder * * *
      -   * User-provided labels, in key/value pairs.
      +   * Optional. User-provided labels, in key/value pairs.
          * 
      * - * map<string, string> labels = 15; + * map<string, string> labels = 15 [(.google.api.field_behavior) = OPTIONAL]; */ /* nullable */ java.lang.String getLabelsOrDefault( @@ -691,10 +729,10 @@ java.lang.String getLabelsOrDefault( * * *
      -   * User-provided labels, in key/value pairs.
      +   * Optional. User-provided labels, in key/value pairs.
          * 
      * - * map<string, string> labels = 15; + * map<string, string> labels = 15 [(.google.api.field_behavior) = OPTIONAL]; */ java.lang.String getLabelsOrThrow(java.lang.String key); @@ -702,13 +740,14 @@ java.lang.String getLabelsOrDefault( * * *
      -   * The bucket's website config, controlling how the service behaves
      +   * Optional. The bucket's website config, controlling how the service behaves
          * when accessing bucket contents as a web site. See the
          * [https://cloud.google.com/storage/docs/static-website][Static Website
          * Examples] for more information.
          * 
      * - * .google.storage.v2.Bucket.Website website = 16; + * .google.storage.v2.Bucket.Website website = 16 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the website field is set. */ @@ -718,13 +757,14 @@ java.lang.String getLabelsOrDefault( * * *
      -   * The bucket's website config, controlling how the service behaves
      +   * Optional. The bucket's website config, controlling how the service behaves
          * when accessing bucket contents as a web site. See the
          * [https://cloud.google.com/storage/docs/static-website][Static Website
          * Examples] for more information.
          * 
      * - * .google.storage.v2.Bucket.Website website = 16; + * .google.storage.v2.Bucket.Website website = 16 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The website. */ @@ -734,13 +774,14 @@ java.lang.String getLabelsOrDefault( * * *
      -   * The bucket's website config, controlling how the service behaves
      +   * Optional. The bucket's website config, controlling how the service behaves
          * when accessing bucket contents as a web site. See the
          * [https://cloud.google.com/storage/docs/static-website][Static Website
          * Examples] for more information.
          * 
      * - * .google.storage.v2.Bucket.Website website = 16; + * .google.storage.v2.Bucket.Website website = 16 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.Bucket.WebsiteOrBuilder getWebsiteOrBuilder(); @@ -748,10 +789,12 @@ java.lang.String getLabelsOrDefault( * * *
      -   * The bucket's versioning config.
      +   * Optional. The bucket's versioning config.
          * 
      * - * .google.storage.v2.Bucket.Versioning versioning = 17; + * + * .google.storage.v2.Bucket.Versioning versioning = 17 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the versioning field is set. */ @@ -761,10 +804,12 @@ java.lang.String getLabelsOrDefault( * * *
      -   * The bucket's versioning config.
      +   * Optional. The bucket's versioning config.
          * 
      * - * .google.storage.v2.Bucket.Versioning versioning = 17; + * + * .google.storage.v2.Bucket.Versioning versioning = 17 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The versioning. */ @@ -774,10 +819,12 @@ java.lang.String getLabelsOrDefault( * * *
      -   * The bucket's versioning config.
      +   * Optional. The bucket's versioning config.
          * 
      * - * .google.storage.v2.Bucket.Versioning versioning = 17; + * + * .google.storage.v2.Bucket.Versioning versioning = 17 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.Bucket.VersioningOrBuilder getVersioningOrBuilder(); @@ -785,11 +832,12 @@ java.lang.String getLabelsOrDefault( * * *
      -   * The bucket's logging config, which defines the destination bucket
      +   * Optional. The bucket's logging config, which defines the destination bucket
          * and name prefix (if any) for the current bucket's logs.
          * 
      * - * .google.storage.v2.Bucket.Logging logging = 18; + * .google.storage.v2.Bucket.Logging logging = 18 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the logging field is set. */ @@ -799,11 +847,12 @@ java.lang.String getLabelsOrDefault( * * *
      -   * The bucket's logging config, which defines the destination bucket
      +   * Optional. The bucket's logging config, which defines the destination bucket
          * and name prefix (if any) for the current bucket's logs.
          * 
      * - * .google.storage.v2.Bucket.Logging logging = 18; + * .google.storage.v2.Bucket.Logging logging = 18 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The logging. */ @@ -813,11 +862,12 @@ java.lang.String getLabelsOrDefault( * * *
      -   * The bucket's logging config, which defines the destination bucket
      +   * Optional. The bucket's logging config, which defines the destination bucket
          * and name prefix (if any) for the current bucket's logs.
          * 
      * - * .google.storage.v2.Bucket.Logging logging = 18; + * .google.storage.v2.Bucket.Logging logging = 18 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.Bucket.LoggingOrBuilder getLoggingOrBuilder(); @@ -865,10 +915,12 @@ java.lang.String getLabelsOrDefault( * * *
      -   * Encryption config for a bucket.
      +   * Optional. Encryption config for a bucket.
          * 
      * - * .google.storage.v2.Bucket.Encryption encryption = 20; + * + * .google.storage.v2.Bucket.Encryption encryption = 20 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the encryption field is set. */ @@ -878,10 +930,12 @@ java.lang.String getLabelsOrDefault( * * *
      -   * Encryption config for a bucket.
      +   * Optional. Encryption config for a bucket.
          * 
      * - * .google.storage.v2.Bucket.Encryption encryption = 20; + * + * .google.storage.v2.Bucket.Encryption encryption = 20 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The encryption. */ @@ -891,10 +945,12 @@ java.lang.String getLabelsOrDefault( * * *
      -   * Encryption config for a bucket.
      +   * Optional. Encryption config for a bucket.
          * 
      * - * .google.storage.v2.Bucket.Encryption encryption = 20; + * + * .google.storage.v2.Bucket.Encryption encryption = 20 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.Bucket.EncryptionOrBuilder getEncryptionOrBuilder(); @@ -902,10 +958,11 @@ java.lang.String getLabelsOrDefault( * * *
      -   * The bucket's billing config.
      +   * Optional. The bucket's billing config.
          * 
      * - * .google.storage.v2.Bucket.Billing billing = 21; + * .google.storage.v2.Bucket.Billing billing = 21 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the billing field is set. */ @@ -915,10 +972,11 @@ java.lang.String getLabelsOrDefault( * * *
      -   * The bucket's billing config.
      +   * Optional. The bucket's billing config.
          * 
      * - * .google.storage.v2.Bucket.Billing billing = 21; + * .google.storage.v2.Bucket.Billing billing = 21 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The billing. */ @@ -928,10 +986,11 @@ java.lang.String getLabelsOrDefault( * * *
      -   * The bucket's billing config.
      +   * Optional. The bucket's billing config.
          * 
      * - * .google.storage.v2.Bucket.Billing billing = 21; + * .google.storage.v2.Bucket.Billing billing = 21 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.Bucket.BillingOrBuilder getBillingOrBuilder(); @@ -939,18 +998,20 @@ java.lang.String getLabelsOrDefault( * * *
      -   * The bucket's retention policy. The retention policy enforces a minimum
      -   * retention time for all objects contained in the bucket, based on their
      -   * creation time. Any attempt to overwrite or delete objects younger than the
      -   * retention period will result in a PERMISSION_DENIED error.  An unlocked
      -   * retention policy can be modified or removed from the bucket via a
      +   * Optional. The bucket's retention policy. The retention policy enforces a
      +   * minimum retention time for all objects contained in the bucket, based on
      +   * their creation time. Any attempt to overwrite or delete objects younger
      +   * than the retention period will result in a PERMISSION_DENIED error.  An
      +   * unlocked retention policy can be modified or removed from the bucket via a
          * storage.buckets.update operation. A locked retention policy cannot be
          * removed or shortened in duration for the lifetime of the bucket.
          * Attempting to remove or decrease period of a locked retention policy will
          * result in a PERMISSION_DENIED error.
          * 
      * - * .google.storage.v2.Bucket.RetentionPolicy retention_policy = 22; + * + * .google.storage.v2.Bucket.RetentionPolicy retention_policy = 22 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the retentionPolicy field is set. */ @@ -960,18 +1021,20 @@ java.lang.String getLabelsOrDefault( * * *
      -   * The bucket's retention policy. The retention policy enforces a minimum
      -   * retention time for all objects contained in the bucket, based on their
      -   * creation time. Any attempt to overwrite or delete objects younger than the
      -   * retention period will result in a PERMISSION_DENIED error.  An unlocked
      -   * retention policy can be modified or removed from the bucket via a
      +   * Optional. The bucket's retention policy. The retention policy enforces a
      +   * minimum retention time for all objects contained in the bucket, based on
      +   * their creation time. Any attempt to overwrite or delete objects younger
      +   * than the retention period will result in a PERMISSION_DENIED error.  An
      +   * unlocked retention policy can be modified or removed from the bucket via a
          * storage.buckets.update operation. A locked retention policy cannot be
          * removed or shortened in duration for the lifetime of the bucket.
          * Attempting to remove or decrease period of a locked retention policy will
          * result in a PERMISSION_DENIED error.
          * 
      * - * .google.storage.v2.Bucket.RetentionPolicy retention_policy = 22; + * + * .google.storage.v2.Bucket.RetentionPolicy retention_policy = 22 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The retentionPolicy. */ @@ -981,18 +1044,20 @@ java.lang.String getLabelsOrDefault( * * *
      -   * The bucket's retention policy. The retention policy enforces a minimum
      -   * retention time for all objects contained in the bucket, based on their
      -   * creation time. Any attempt to overwrite or delete objects younger than the
      -   * retention period will result in a PERMISSION_DENIED error.  An unlocked
      -   * retention policy can be modified or removed from the bucket via a
      +   * Optional. The bucket's retention policy. The retention policy enforces a
      +   * minimum retention time for all objects contained in the bucket, based on
      +   * their creation time. Any attempt to overwrite or delete objects younger
      +   * than the retention period will result in a PERMISSION_DENIED error.  An
      +   * unlocked retention policy can be modified or removed from the bucket via a
          * storage.buckets.update operation. A locked retention policy cannot be
          * removed or shortened in duration for the lifetime of the bucket.
          * Attempting to remove or decrease period of a locked retention policy will
          * result in a PERMISSION_DENIED error.
          * 
      * - * .google.storage.v2.Bucket.RetentionPolicy retention_policy = 22; + * + * .google.storage.v2.Bucket.RetentionPolicy retention_policy = 22 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.Bucket.RetentionPolicyOrBuilder getRetentionPolicyOrBuilder(); @@ -1000,10 +1065,12 @@ java.lang.String getLabelsOrDefault( * * *
      -   * The bucket's IAM config.
      +   * Optional. The bucket's IAM config.
          * 
      * - * .google.storage.v2.Bucket.IamConfig iam_config = 23; + * + * .google.storage.v2.Bucket.IamConfig iam_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the iamConfig field is set. */ @@ -1013,10 +1080,12 @@ java.lang.String getLabelsOrDefault( * * *
      -   * The bucket's IAM config.
      +   * Optional. The bucket's IAM config.
          * 
      * - * .google.storage.v2.Bucket.IamConfig iam_config = 23; + * + * .google.storage.v2.Bucket.IamConfig iam_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The iamConfig. */ @@ -1026,10 +1095,12 @@ java.lang.String getLabelsOrDefault( * * *
      -   * The bucket's IAM config.
      +   * Optional. The bucket's IAM config.
          * 
      * - * .google.storage.v2.Bucket.IamConfig iam_config = 23; + * + * .google.storage.v2.Bucket.IamConfig iam_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.Bucket.IamConfigOrBuilder getIamConfigOrBuilder(); @@ -1037,10 +1108,10 @@ java.lang.String getLabelsOrDefault( * * *
      -   * Reserved for future use.
      +   * Optional. Reserved for future use.
          * 
      * - * bool satisfies_pzs = 25; + * bool satisfies_pzs = 25 [(.google.api.field_behavior) = OPTIONAL]; * * @return The satisfiesPzs. */ @@ -1050,12 +1121,15 @@ java.lang.String getLabelsOrDefault( * * *
      -   * Configuration that, if present, specifies the data placement for a
      +   * Optional. Configuration that, if present, specifies the data placement for
      +   * a
          * [https://cloud.google.com/storage/docs/locations#location-dr][configurable
          * dual-region].
          * 
      * - * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26; + * + * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the customPlacementConfig field is set. */ @@ -1065,12 +1139,15 @@ java.lang.String getLabelsOrDefault( * * *
      -   * Configuration that, if present, specifies the data placement for a
      +   * Optional. Configuration that, if present, specifies the data placement for
      +   * a
          * [https://cloud.google.com/storage/docs/locations#location-dr][configurable
          * dual-region].
          * 
      * - * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26; + * + * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The customPlacementConfig. */ @@ -1080,12 +1157,15 @@ java.lang.String getLabelsOrDefault( * * *
      -   * Configuration that, if present, specifies the data placement for a
      +   * Optional. Configuration that, if present, specifies the data placement for
      +   * a
          * [https://cloud.google.com/storage/docs/locations#location-dr][configurable
          * dual-region].
          * 
      * - * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26; + * + * .google.storage.v2.Bucket.CustomPlacementConfig custom_placement_config = 26 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.Bucket.CustomPlacementConfigOrBuilder getCustomPlacementConfigOrBuilder(); @@ -1093,11 +1173,14 @@ java.lang.String getLabelsOrDefault( * * *
      -   * The bucket's Autoclass configuration. If there is no configuration, the
      -   * Autoclass feature will be disabled and have no effect on the bucket.
      +   * Optional. The bucket's Autoclass configuration. If there is no
      +   * configuration, the Autoclass feature will be disabled and have no effect on
      +   * the bucket.
          * 
      * - * .google.storage.v2.Bucket.Autoclass autoclass = 28; + * + * .google.storage.v2.Bucket.Autoclass autoclass = 28 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the autoclass field is set. */ @@ -1107,11 +1190,14 @@ java.lang.String getLabelsOrDefault( * * *
      -   * The bucket's Autoclass configuration. If there is no configuration, the
      -   * Autoclass feature will be disabled and have no effect on the bucket.
      +   * Optional. The bucket's Autoclass configuration. If there is no
      +   * configuration, the Autoclass feature will be disabled and have no effect on
      +   * the bucket.
          * 
      * - * .google.storage.v2.Bucket.Autoclass autoclass = 28; + * + * .google.storage.v2.Bucket.Autoclass autoclass = 28 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The autoclass. */ @@ -1121,11 +1207,14 @@ java.lang.String getLabelsOrDefault( * * *
      -   * The bucket's Autoclass configuration. If there is no configuration, the
      -   * Autoclass feature will be disabled and have no effect on the bucket.
      +   * Optional. The bucket's Autoclass configuration. If there is no
      +   * configuration, the Autoclass feature will be disabled and have no effect on
      +   * the bucket.
          * 
      * - * .google.storage.v2.Bucket.Autoclass autoclass = 28; + * + * .google.storage.v2.Bucket.Autoclass autoclass = 28 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.Bucket.AutoclassOrBuilder getAutoclassOrBuilder(); @@ -1223,4 +1312,47 @@ java.lang.String getLabelsOrDefault( *
      */ com.google.storage.v2.Bucket.SoftDeletePolicyOrBuilder getSoftDeletePolicyOrBuilder(); + + /** + * + * + *
      +   * Optional. The bucket's IP filter configuration.
      +   * 
      + * + * + * optional .google.storage.v2.Bucket.IpFilter ip_filter = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the ipFilter field is set. + */ + boolean hasIpFilter(); + + /** + * + * + *
      +   * Optional. The bucket's IP filter configuration.
      +   * 
      + * + * + * optional .google.storage.v2.Bucket.IpFilter ip_filter = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The ipFilter. + */ + com.google.storage.v2.Bucket.IpFilter getIpFilter(); + + /** + * + * + *
      +   * Optional. The bucket's IP filter configuration.
      +   * 
      + * + * + * optional .google.storage.v2.Bucket.IpFilter ip_filter = 38 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.storage.v2.Bucket.IpFilterOrBuilder getIpFilterOrBuilder(); } diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CommonObjectRequestParams.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CommonObjectRequestParams.java index 77516bcd45..b60850cf0b 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CommonObjectRequestParams.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CommonObjectRequestParams.java @@ -75,11 +75,11 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
      -   * Encryption algorithm used with the Customer-Supplied Encryption Keys
      -   * feature.
      +   * Optional. Encryption algorithm used with the Customer-Supplied Encryption
      +   * Keys feature.
          * 
      * - * string encryption_algorithm = 1; + * string encryption_algorithm = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The encryptionAlgorithm. */ @@ -100,11 +100,11 @@ public java.lang.String getEncryptionAlgorithm() { * * *
      -   * Encryption algorithm used with the Customer-Supplied Encryption Keys
      -   * feature.
      +   * Optional. Encryption algorithm used with the Customer-Supplied Encryption
      +   * Keys feature.
          * 
      * - * string encryption_algorithm = 1; + * string encryption_algorithm = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for encryptionAlgorithm. */ @@ -128,11 +128,11 @@ public com.google.protobuf.ByteString getEncryptionAlgorithmBytes() { * * *
      -   * Encryption key used with the Customer-Supplied Encryption Keys feature.
      -   * In raw bytes format (not base64-encoded).
      +   * Optional. Encryption key used with the Customer-Supplied Encryption Keys
      +   * feature. In raw bytes format (not base64-encoded).
          * 
      * - * bytes encryption_key_bytes = 4; + * bytes encryption_key_bytes = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The encryptionKeyBytes. */ @@ -149,11 +149,11 @@ public com.google.protobuf.ByteString getEncryptionKeyBytes() { * * *
      -   * SHA256 hash of encryption key used with the Customer-Supplied Encryption
      -   * Keys feature.
      +   * Optional. SHA256 hash of encryption key used with the Customer-Supplied
      +   * Encryption Keys feature.
          * 
      * - * bytes encryption_key_sha256_bytes = 5; + * bytes encryption_key_sha256_bytes = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The encryptionKeySha256Bytes. */ @@ -555,11 +555,11 @@ public Builder mergeFrom( * * *
      -     * Encryption algorithm used with the Customer-Supplied Encryption Keys
      -     * feature.
      +     * Optional. Encryption algorithm used with the Customer-Supplied Encryption
      +     * Keys feature.
            * 
      * - * string encryption_algorithm = 1; + * string encryption_algorithm = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The encryptionAlgorithm. */ @@ -579,11 +579,11 @@ public java.lang.String getEncryptionAlgorithm() { * * *
      -     * Encryption algorithm used with the Customer-Supplied Encryption Keys
      -     * feature.
      +     * Optional. Encryption algorithm used with the Customer-Supplied Encryption
      +     * Keys feature.
            * 
      * - * string encryption_algorithm = 1; + * string encryption_algorithm = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for encryptionAlgorithm. */ @@ -603,11 +603,11 @@ public com.google.protobuf.ByteString getEncryptionAlgorithmBytes() { * * *
      -     * Encryption algorithm used with the Customer-Supplied Encryption Keys
      -     * feature.
      +     * Optional. Encryption algorithm used with the Customer-Supplied Encryption
      +     * Keys feature.
            * 
      * - * string encryption_algorithm = 1; + * string encryption_algorithm = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The encryptionAlgorithm to set. * @return This builder for chaining. @@ -626,11 +626,11 @@ public Builder setEncryptionAlgorithm(java.lang.String value) { * * *
      -     * Encryption algorithm used with the Customer-Supplied Encryption Keys
      -     * feature.
      +     * Optional. Encryption algorithm used with the Customer-Supplied Encryption
      +     * Keys feature.
            * 
      * - * string encryption_algorithm = 1; + * string encryption_algorithm = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -645,11 +645,11 @@ public Builder clearEncryptionAlgorithm() { * * *
      -     * Encryption algorithm used with the Customer-Supplied Encryption Keys
      -     * feature.
      +     * Optional. Encryption algorithm used with the Customer-Supplied Encryption
      +     * Keys feature.
            * 
      * - * string encryption_algorithm = 1; + * string encryption_algorithm = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for encryptionAlgorithm to set. * @return This builder for chaining. @@ -672,11 +672,11 @@ public Builder setEncryptionAlgorithmBytes(com.google.protobuf.ByteString value) * * *
      -     * Encryption key used with the Customer-Supplied Encryption Keys feature.
      -     * In raw bytes format (not base64-encoded).
      +     * Optional. Encryption key used with the Customer-Supplied Encryption Keys
      +     * feature. In raw bytes format (not base64-encoded).
            * 
      * - * bytes encryption_key_bytes = 4; + * bytes encryption_key_bytes = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The encryptionKeyBytes. */ @@ -689,11 +689,11 @@ public com.google.protobuf.ByteString getEncryptionKeyBytes() { * * *
      -     * Encryption key used with the Customer-Supplied Encryption Keys feature.
      -     * In raw bytes format (not base64-encoded).
      +     * Optional. Encryption key used with the Customer-Supplied Encryption Keys
      +     * feature. In raw bytes format (not base64-encoded).
            * 
      * - * bytes encryption_key_bytes = 4; + * bytes encryption_key_bytes = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The encryptionKeyBytes to set. * @return This builder for chaining. @@ -712,11 +712,11 @@ public Builder setEncryptionKeyBytes(com.google.protobuf.ByteString value) { * * *
      -     * Encryption key used with the Customer-Supplied Encryption Keys feature.
      -     * In raw bytes format (not base64-encoded).
      +     * Optional. Encryption key used with the Customer-Supplied Encryption Keys
      +     * feature. In raw bytes format (not base64-encoded).
            * 
      * - * bytes encryption_key_bytes = 4; + * bytes encryption_key_bytes = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -734,11 +734,11 @@ public Builder clearEncryptionKeyBytes() { * * *
      -     * SHA256 hash of encryption key used with the Customer-Supplied Encryption
      -     * Keys feature.
      +     * Optional. SHA256 hash of encryption key used with the Customer-Supplied
      +     * Encryption Keys feature.
            * 
      * - * bytes encryption_key_sha256_bytes = 5; + * bytes encryption_key_sha256_bytes = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The encryptionKeySha256Bytes. */ @@ -751,11 +751,11 @@ public com.google.protobuf.ByteString getEncryptionKeySha256Bytes() { * * *
      -     * SHA256 hash of encryption key used with the Customer-Supplied Encryption
      -     * Keys feature.
      +     * Optional. SHA256 hash of encryption key used with the Customer-Supplied
      +     * Encryption Keys feature.
            * 
      * - * bytes encryption_key_sha256_bytes = 5; + * bytes encryption_key_sha256_bytes = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The encryptionKeySha256Bytes to set. * @return This builder for chaining. @@ -774,11 +774,11 @@ public Builder setEncryptionKeySha256Bytes(com.google.protobuf.ByteString value) * * *
      -     * SHA256 hash of encryption key used with the Customer-Supplied Encryption
      -     * Keys feature.
      +     * Optional. SHA256 hash of encryption key used with the Customer-Supplied
      +     * Encryption Keys feature.
            * 
      * - * bytes encryption_key_sha256_bytes = 5; + * bytes encryption_key_sha256_bytes = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CommonObjectRequestParamsOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CommonObjectRequestParamsOrBuilder.java index 56b5ed1eea..b1a9d49779 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CommonObjectRequestParamsOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CommonObjectRequestParamsOrBuilder.java @@ -28,11 +28,11 @@ public interface CommonObjectRequestParamsOrBuilder * * *
      -   * Encryption algorithm used with the Customer-Supplied Encryption Keys
      -   * feature.
      +   * Optional. Encryption algorithm used with the Customer-Supplied Encryption
      +   * Keys feature.
          * 
      * - * string encryption_algorithm = 1; + * string encryption_algorithm = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The encryptionAlgorithm. */ @@ -42,11 +42,11 @@ public interface CommonObjectRequestParamsOrBuilder * * *
      -   * Encryption algorithm used with the Customer-Supplied Encryption Keys
      -   * feature.
      +   * Optional. Encryption algorithm used with the Customer-Supplied Encryption
      +   * Keys feature.
          * 
      * - * string encryption_algorithm = 1; + * string encryption_algorithm = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for encryptionAlgorithm. */ @@ -56,11 +56,11 @@ public interface CommonObjectRequestParamsOrBuilder * * *
      -   * Encryption key used with the Customer-Supplied Encryption Keys feature.
      -   * In raw bytes format (not base64-encoded).
      +   * Optional. Encryption key used with the Customer-Supplied Encryption Keys
      +   * feature. In raw bytes format (not base64-encoded).
          * 
      * - * bytes encryption_key_bytes = 4; + * bytes encryption_key_bytes = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The encryptionKeyBytes. */ @@ -70,11 +70,11 @@ public interface CommonObjectRequestParamsOrBuilder * * *
      -   * SHA256 hash of encryption key used with the Customer-Supplied Encryption
      -   * Keys feature.
      +   * Optional. SHA256 hash of encryption key used with the Customer-Supplied
      +   * Encryption Keys feature.
          * 
      * - * bytes encryption_key_sha256_bytes = 5; + * bytes encryption_key_sha256_bytes = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The encryptionKeySha256Bytes. */ diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ComposeObjectRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ComposeObjectRequest.java index b1424ae201..e399ad3ad6 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ComposeObjectRequest.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ComposeObjectRequest.java @@ -103,10 +103,10 @@ public interface SourceObjectOrBuilder * * *
      -     * The generation of this object to use as the source.
      +     * Optional. The generation of this object to use as the source.
            * 
      * - * int64 generation = 2; + * int64 generation = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The generation. */ @@ -116,11 +116,11 @@ public interface SourceObjectOrBuilder * * *
      -     * Conditions that must be met for this operation to execute.
      +     * Optional. Conditions that must be met for this operation to execute.
            * 
      * * - * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3; + * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the objectPreconditions field is set. @@ -131,11 +131,11 @@ public interface SourceObjectOrBuilder * * *
      -     * Conditions that must be met for this operation to execute.
      +     * Optional. Conditions that must be met for this operation to execute.
            * 
      * * - * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3; + * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The objectPreconditions. @@ -147,11 +147,11 @@ public interface SourceObjectOrBuilder * * *
      -     * Conditions that must be met for this operation to execute.
      +     * Optional. Conditions that must be met for this operation to execute.
            * 
      * * - * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3; + * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditionsOrBuilder @@ -913,10 +913,10 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
      -     * The generation of this object to use as the source.
      +     * Optional. The generation of this object to use as the source.
            * 
      * - * int64 generation = 2; + * int64 generation = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The generation. */ @@ -933,11 +933,11 @@ public long getGeneration() { * * *
      -     * Conditions that must be met for this operation to execute.
      +     * Optional. Conditions that must be met for this operation to execute.
            * 
      * * - * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3; + * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the objectPreconditions field is set. @@ -951,11 +951,11 @@ public boolean hasObjectPreconditions() { * * *
      -     * Conditions that must be met for this operation to execute.
      +     * Optional. Conditions that must be met for this operation to execute.
            * 
      * * - * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3; + * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The objectPreconditions. @@ -973,11 +973,11 @@ public boolean hasObjectPreconditions() { * * *
      -     * Conditions that must be met for this operation to execute.
      +     * Optional. Conditions that must be met for this operation to execute.
            * 
      * * - * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3; + * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override @@ -1529,10 +1529,10 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * *
      -       * The generation of this object to use as the source.
      +       * Optional. The generation of this object to use as the source.
              * 
      * - * int64 generation = 2; + * int64 generation = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The generation. */ @@ -1545,10 +1545,10 @@ public long getGeneration() { * * *
      -       * The generation of this object to use as the source.
      +       * Optional. The generation of this object to use as the source.
              * 
      * - * int64 generation = 2; + * int64 generation = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The generation to set. * @return This builder for chaining. @@ -1565,10 +1565,10 @@ public Builder setGeneration(long value) { * * *
      -       * The generation of this object to use as the source.
      +       * Optional. The generation of this object to use as the source.
              * 
      * - * int64 generation = 2; + * int64 generation = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1591,11 +1591,11 @@ public Builder clearGeneration() { * * *
      -       * Conditions that must be met for this operation to execute.
      +       * Optional. Conditions that must be met for this operation to execute.
              * 
      * * - * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3; + * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the objectPreconditions field is set. @@ -1608,11 +1608,11 @@ public boolean hasObjectPreconditions() { * * *
      -       * Conditions that must be met for this operation to execute.
      +       * Optional. Conditions that must be met for this operation to execute.
              * 
      * * - * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3; + * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The objectPreconditions. @@ -1633,11 +1633,11 @@ public boolean hasObjectPreconditions() { * * *
      -       * Conditions that must be met for this operation to execute.
      +       * Optional. Conditions that must be met for this operation to execute.
              * 
      * * - * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3; + * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setObjectPreconditions( @@ -1659,11 +1659,11 @@ public Builder setObjectPreconditions( * * *
      -       * Conditions that must be met for this operation to execute.
      +       * Optional. Conditions that must be met for this operation to execute.
              * 
      * * - * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3; + * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setObjectPreconditions( @@ -1683,11 +1683,11 @@ public Builder setObjectPreconditions( * * *
      -       * Conditions that must be met for this operation to execute.
      +       * Optional. Conditions that must be met for this operation to execute.
              * 
      * * - * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3; + * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder mergeObjectPreconditions( @@ -1716,11 +1716,11 @@ public Builder mergeObjectPreconditions( * * *
      -       * Conditions that must be met for this operation to execute.
      +       * Optional. Conditions that must be met for this operation to execute.
              * 
      * * - * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3; + * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder clearObjectPreconditions() { @@ -1738,11 +1738,11 @@ public Builder clearObjectPreconditions() { * * *
      -       * Conditions that must be met for this operation to execute.
      +       * Optional. Conditions that must be met for this operation to execute.
              * 
      * * - * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3; + * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions.Builder @@ -1756,11 +1756,11 @@ public Builder clearObjectPreconditions() { * * *
      -       * Conditions that must be met for this operation to execute.
      +       * Optional. Conditions that must be met for this operation to execute.
              * 
      * * - * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3; + * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditionsOrBuilder @@ -1779,11 +1779,11 @@ public Builder clearObjectPreconditions() { * * *
      -       * Conditions that must be met for this operation to execute.
      +       * Optional. Conditions that must be met for this operation to execute.
              * 
      * * - * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3; + * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ private com.google.protobuf.SingleFieldBuilderV3< @@ -1931,10 +1931,13 @@ public com.google.storage.v2.ObjectOrBuilder getDestinationOrBuilder() { * * *
      -   * The list of source objects that will be concatenated into a single object.
      +   * Optional. The list of source objects that will be concatenated into a
      +   * single object.
          * 
      * - * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; + * + * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public java.util.List @@ -1946,10 +1949,13 @@ public com.google.storage.v2.ObjectOrBuilder getDestinationOrBuilder() { * * *
      -   * The list of source objects that will be concatenated into a single object.
      +   * Optional. The list of source objects that will be concatenated into a
      +   * single object.
          * 
      * - * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; + * + * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public java.util.List @@ -1961,10 +1967,13 @@ public com.google.storage.v2.ObjectOrBuilder getDestinationOrBuilder() { * * *
      -   * The list of source objects that will be concatenated into a single object.
      +   * Optional. The list of source objects that will be concatenated into a
      +   * single object.
          * 
      * - * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; + * + * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public int getSourceObjectsCount() { @@ -1975,10 +1984,13 @@ public int getSourceObjectsCount() { * * *
      -   * The list of source objects that will be concatenated into a single object.
      +   * Optional. The list of source objects that will be concatenated into a
      +   * single object.
          * 
      * - * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; + * + * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.ComposeObjectRequest.SourceObject getSourceObjects(int index) { @@ -1989,10 +2001,13 @@ public com.google.storage.v2.ComposeObjectRequest.SourceObject getSourceObjects( * * *
      -   * The list of source objects that will be concatenated into a single object.
      +   * Optional. The list of source objects that will be concatenated into a
      +   * single object.
          * 
      * - * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; + * + * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.ComposeObjectRequest.SourceObjectOrBuilder getSourceObjectsOrBuilder( @@ -2009,12 +2024,12 @@ public com.google.storage.v2.ComposeObjectRequest.SourceObjectOrBuilder getSourc * * *
      -   * Apply a predefined set of access controls to the destination object.
      -   * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +   * Optional. Apply a predefined set of access controls to the destination
      +   * object. Valid values are "authenticatedRead", "bucketOwnerFullControl",
          * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
          * 
      * - * string destination_predefined_acl = 9; + * string destination_predefined_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return The destinationPredefinedAcl. */ @@ -2035,12 +2050,12 @@ public java.lang.String getDestinationPredefinedAcl() { * * *
      -   * Apply a predefined set of access controls to the destination object.
      -   * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +   * Optional. Apply a predefined set of access controls to the destination
      +   * object. Valid values are "authenticatedRead", "bucketOwnerFullControl",
          * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
          * 
      * - * string destination_predefined_acl = 9; + * string destination_predefined_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for destinationPredefinedAcl. */ @@ -2142,13 +2157,15 @@ public long getIfMetagenerationMatch() { * * *
      -   * Resource name of the Cloud KMS key, of the form
      +   * Optional. Resource name of the Cloud KMS key, of the form
          * `projects/my-project/locations/my-location/keyRings/my-kr/cryptoKeys/my-key`,
          * that will be used to encrypt the object. Overrides the object
          * metadata's `kms_key_name` value, if any.
          * 
      * - * string kms_key = 6 [(.google.api.resource_reference) = { ... } + * + * string kms_key = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The kmsKey. */ @@ -2169,13 +2186,15 @@ public java.lang.String getKmsKey() { * * *
      -   * Resource name of the Cloud KMS key, of the form
      +   * Optional. Resource name of the Cloud KMS key, of the form
          * `projects/my-project/locations/my-location/keyRings/my-kr/cryptoKeys/my-key`,
          * that will be used to encrypt the object. Overrides the object
          * metadata's `kms_key_name` value, if any.
          * 
      * - * string kms_key = 6 [(.google.api.resource_reference) = { ... } + * + * string kms_key = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for kmsKey. */ @@ -2199,10 +2218,13 @@ public com.google.protobuf.ByteString getKmsKeyBytes() { * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -2215,10 +2237,13 @@ public boolean hasCommonObjectRequestParams() { * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -2233,10 +2258,13 @@ public com.google.storage.v2.CommonObjectRequestParams getCommonObjectRequestPar * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.CommonObjectRequestParamsOrBuilder @@ -2253,11 +2281,13 @@ public com.google.storage.v2.CommonObjectRequestParams getCommonObjectRequestPar * * *
      -   * The checksums of the complete object. This will be validated against the
      -   * combined checksums of the component objects.
      +   * Optional. The checksums of the complete object. This will be validated
      +   * against the combined checksums of the component objects.
          * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 10; + * + * .google.storage.v2.ObjectChecksums object_checksums = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the objectChecksums field is set. */ @@ -2270,11 +2300,13 @@ public boolean hasObjectChecksums() { * * *
      -   * The checksums of the complete object. This will be validated against the
      -   * combined checksums of the component objects.
      +   * Optional. The checksums of the complete object. This will be validated
      +   * against the combined checksums of the component objects.
          * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 10; + * + * .google.storage.v2.ObjectChecksums object_checksums = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The objectChecksums. */ @@ -2289,11 +2321,13 @@ public com.google.storage.v2.ObjectChecksums getObjectChecksums() { * * *
      -   * The checksums of the complete object. This will be validated against the
      -   * combined checksums of the component objects.
      +   * Optional. The checksums of the complete object. This will be validated
      +   * against the combined checksums of the component objects.
          * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 10; + * + * .google.storage.v2.ObjectChecksums object_checksums = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.ObjectChecksumsOrBuilder getObjectChecksumsOrBuilder() { @@ -3141,10 +3175,12 @@ private void ensureSourceObjectsIsMutable() { * * *
      -     * The list of source objects that will be concatenated into a single object.
      +     * Optional. The list of source objects that will be concatenated into a
      +     * single object.
            * 
      * - * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; + * + * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public java.util.List @@ -3160,10 +3196,12 @@ private void ensureSourceObjectsIsMutable() { * * *
      -     * The list of source objects that will be concatenated into a single object.
      +     * Optional. The list of source objects that will be concatenated into a
      +     * single object.
            * 
      * - * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; + * + * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public int getSourceObjectsCount() { @@ -3178,10 +3216,12 @@ public int getSourceObjectsCount() { * * *
      -     * The list of source objects that will be concatenated into a single object.
      +     * Optional. The list of source objects that will be concatenated into a
      +     * single object.
            * 
      * - * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; + * + * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.storage.v2.ComposeObjectRequest.SourceObject getSourceObjects(int index) { @@ -3196,10 +3236,12 @@ public com.google.storage.v2.ComposeObjectRequest.SourceObject getSourceObjects( * * *
      -     * The list of source objects that will be concatenated into a single object.
      +     * Optional. The list of source objects that will be concatenated into a
      +     * single object.
            * 
      * - * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; + * + * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setSourceObjects( @@ -3221,10 +3263,12 @@ public Builder setSourceObjects( * * *
      -     * The list of source objects that will be concatenated into a single object.
      +     * Optional. The list of source objects that will be concatenated into a
      +     * single object.
            * 
      * - * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; + * + * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setSourceObjects( @@ -3244,10 +3288,12 @@ public Builder setSourceObjects( * * *
      -     * The list of source objects that will be concatenated into a single object.
      +     * Optional. The list of source objects that will be concatenated into a
      +     * single object.
            * 
      * - * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; + * + * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addSourceObjects(com.google.storage.v2.ComposeObjectRequest.SourceObject value) { @@ -3268,10 +3314,12 @@ public Builder addSourceObjects(com.google.storage.v2.ComposeObjectRequest.Sourc * * *
      -     * The list of source objects that will be concatenated into a single object.
      +     * Optional. The list of source objects that will be concatenated into a
      +     * single object.
            * 
      * - * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; + * + * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addSourceObjects( @@ -3293,10 +3341,12 @@ public Builder addSourceObjects( * * *
      -     * The list of source objects that will be concatenated into a single object.
      +     * Optional. The list of source objects that will be concatenated into a
      +     * single object.
            * 
      * - * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; + * + * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addSourceObjects( @@ -3315,10 +3365,12 @@ public Builder addSourceObjects( * * *
      -     * The list of source objects that will be concatenated into a single object.
      +     * Optional. The list of source objects that will be concatenated into a
      +     * single object.
            * 
      * - * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; + * + * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addSourceObjects( @@ -3338,10 +3390,12 @@ public Builder addSourceObjects( * * *
      -     * The list of source objects that will be concatenated into a single object.
      +     * Optional. The list of source objects that will be concatenated into a
      +     * single object.
            * 
      * - * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; + * + * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder addAllSourceObjects( @@ -3361,10 +3415,12 @@ public Builder addAllSourceObjects( * * *
      -     * The list of source objects that will be concatenated into a single object.
      +     * Optional. The list of source objects that will be concatenated into a
      +     * single object.
            * 
      * - * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; + * + * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder clearSourceObjects() { @@ -3382,10 +3438,12 @@ public Builder clearSourceObjects() { * * *
      -     * The list of source objects that will be concatenated into a single object.
      +     * Optional. The list of source objects that will be concatenated into a
      +     * single object.
            * 
      * - * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; + * + * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder removeSourceObjects(int index) { @@ -3403,10 +3461,12 @@ public Builder removeSourceObjects(int index) { * * *
      -     * The list of source objects that will be concatenated into a single object.
      +     * Optional. The list of source objects that will be concatenated into a
      +     * single object.
            * 
      * - * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; + * + * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.storage.v2.ComposeObjectRequest.SourceObject.Builder getSourceObjectsBuilder( @@ -3418,10 +3478,12 @@ public com.google.storage.v2.ComposeObjectRequest.SourceObject.Builder getSource * * *
      -     * The list of source objects that will be concatenated into a single object.
      +     * Optional. The list of source objects that will be concatenated into a
      +     * single object.
            * 
      * - * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; + * + * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.storage.v2.ComposeObjectRequest.SourceObjectOrBuilder @@ -3437,10 +3499,12 @@ public com.google.storage.v2.ComposeObjectRequest.SourceObject.Builder getSource * * *
      -     * The list of source objects that will be concatenated into a single object.
      +     * Optional. The list of source objects that will be concatenated into a
      +     * single object.
            * 
      * - * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; + * + * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public java.util.List< @@ -3457,10 +3521,12 @@ public com.google.storage.v2.ComposeObjectRequest.SourceObject.Builder getSource * * *
      -     * The list of source objects that will be concatenated into a single object.
      +     * Optional. The list of source objects that will be concatenated into a
      +     * single object.
            * 
      * - * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; + * + * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.storage.v2.ComposeObjectRequest.SourceObject.Builder @@ -3473,10 +3539,12 @@ public com.google.storage.v2.ComposeObjectRequest.SourceObject.Builder getSource * * *
      -     * The list of source objects that will be concatenated into a single object.
      +     * Optional. The list of source objects that will be concatenated into a
      +     * single object.
            * 
      * - * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; + * + * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.storage.v2.ComposeObjectRequest.SourceObject.Builder addSourceObjectsBuilder( @@ -3490,10 +3558,12 @@ public com.google.storage.v2.ComposeObjectRequest.SourceObject.Builder addSource * * *
      -     * The list of source objects that will be concatenated into a single object.
      +     * Optional. The list of source objects that will be concatenated into a
      +     * single object.
            * 
      * - * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; + * + * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2 [(.google.api.field_behavior) = OPTIONAL]; * */ public java.util.List @@ -3527,12 +3597,12 @@ public com.google.storage.v2.ComposeObjectRequest.SourceObject.Builder addSource * * *
      -     * Apply a predefined set of access controls to the destination object.
      -     * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +     * Optional. Apply a predefined set of access controls to the destination
      +     * object. Valid values are "authenticatedRead", "bucketOwnerFullControl",
            * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
            * 
      * - * string destination_predefined_acl = 9; + * string destination_predefined_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return The destinationPredefinedAcl. */ @@ -3552,12 +3622,12 @@ public java.lang.String getDestinationPredefinedAcl() { * * *
      -     * Apply a predefined set of access controls to the destination object.
      -     * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +     * Optional. Apply a predefined set of access controls to the destination
      +     * object. Valid values are "authenticatedRead", "bucketOwnerFullControl",
            * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
            * 
      * - * string destination_predefined_acl = 9; + * string destination_predefined_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for destinationPredefinedAcl. */ @@ -3577,12 +3647,12 @@ public com.google.protobuf.ByteString getDestinationPredefinedAclBytes() { * * *
      -     * Apply a predefined set of access controls to the destination object.
      -     * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +     * Optional. Apply a predefined set of access controls to the destination
      +     * object. Valid values are "authenticatedRead", "bucketOwnerFullControl",
            * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
            * 
      * - * string destination_predefined_acl = 9; + * string destination_predefined_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The destinationPredefinedAcl to set. * @return This builder for chaining. @@ -3601,12 +3671,12 @@ public Builder setDestinationPredefinedAcl(java.lang.String value) { * * *
      -     * Apply a predefined set of access controls to the destination object.
      -     * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +     * Optional. Apply a predefined set of access controls to the destination
      +     * object. Valid values are "authenticatedRead", "bucketOwnerFullControl",
            * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
            * 
      * - * string destination_predefined_acl = 9; + * string destination_predefined_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -3621,12 +3691,12 @@ public Builder clearDestinationPredefinedAcl() { * * *
      -     * Apply a predefined set of access controls to the destination object.
      -     * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +     * Optional. Apply a predefined set of access controls to the destination
      +     * object. Valid values are "authenticatedRead", "bucketOwnerFullControl",
            * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
            * 
      * - * string destination_predefined_acl = 9; + * string destination_predefined_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for destinationPredefinedAcl to set. * @return This builder for chaining. @@ -3804,13 +3874,15 @@ public Builder clearIfMetagenerationMatch() { * * *
      -     * Resource name of the Cloud KMS key, of the form
      +     * Optional. Resource name of the Cloud KMS key, of the form
            * `projects/my-project/locations/my-location/keyRings/my-kr/cryptoKeys/my-key`,
            * that will be used to encrypt the object. Overrides the object
            * metadata's `kms_key_name` value, if any.
            * 
      * - * string kms_key = 6 [(.google.api.resource_reference) = { ... } + * + * string kms_key = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The kmsKey. */ @@ -3830,13 +3902,15 @@ public java.lang.String getKmsKey() { * * *
      -     * Resource name of the Cloud KMS key, of the form
      +     * Optional. Resource name of the Cloud KMS key, of the form
            * `projects/my-project/locations/my-location/keyRings/my-kr/cryptoKeys/my-key`,
            * that will be used to encrypt the object. Overrides the object
            * metadata's `kms_key_name` value, if any.
            * 
      * - * string kms_key = 6 [(.google.api.resource_reference) = { ... } + * + * string kms_key = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for kmsKey. */ @@ -3856,13 +3930,15 @@ public com.google.protobuf.ByteString getKmsKeyBytes() { * * *
      -     * Resource name of the Cloud KMS key, of the form
      +     * Optional. Resource name of the Cloud KMS key, of the form
            * `projects/my-project/locations/my-location/keyRings/my-kr/cryptoKeys/my-key`,
            * that will be used to encrypt the object. Overrides the object
            * metadata's `kms_key_name` value, if any.
            * 
      * - * string kms_key = 6 [(.google.api.resource_reference) = { ... } + * + * string kms_key = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param value The kmsKey to set. * @return This builder for chaining. @@ -3881,13 +3957,15 @@ public Builder setKmsKey(java.lang.String value) { * * *
      -     * Resource name of the Cloud KMS key, of the form
      +     * Optional. Resource name of the Cloud KMS key, of the form
            * `projects/my-project/locations/my-location/keyRings/my-kr/cryptoKeys/my-key`,
            * that will be used to encrypt the object. Overrides the object
            * metadata's `kms_key_name` value, if any.
            * 
      * - * string kms_key = 6 [(.google.api.resource_reference) = { ... } + * + * string kms_key = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -3902,13 +3980,15 @@ public Builder clearKmsKey() { * * *
      -     * Resource name of the Cloud KMS key, of the form
      +     * Optional. Resource name of the Cloud KMS key, of the form
            * `projects/my-project/locations/my-location/keyRings/my-kr/cryptoKeys/my-key`,
            * that will be used to encrypt the object. Overrides the object
            * metadata's `kms_key_name` value, if any.
            * 
      * - * string kms_key = 6 [(.google.api.resource_reference) = { ... } + * + * string kms_key = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for kmsKey to set. * @return This builder for chaining. @@ -3935,10 +4015,13 @@ public Builder setKmsKeyBytes(com.google.protobuf.ByteString value) { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -3950,10 +4033,13 @@ public boolean hasCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -3971,10 +4057,13 @@ public com.google.storage.v2.CommonObjectRequestParams getCommonObjectRequestPar * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams value) { @@ -3995,10 +4084,13 @@ public Builder setCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams.Builder builderForValue) { @@ -4016,10 +4108,13 @@ public Builder setCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams value) { @@ -4046,10 +4141,13 @@ public Builder mergeCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearCommonObjectRequestParams() { bitField0_ = (bitField0_ & ~0x00000040); @@ -4066,10 +4164,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.CommonObjectRequestParams.Builder getCommonObjectRequestParamsBuilder() { @@ -4082,10 +4183,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.CommonObjectRequestParamsOrBuilder getCommonObjectRequestParamsOrBuilder() { @@ -4102,10 +4206,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.CommonObjectRequestParams, @@ -4135,11 +4242,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * The checksums of the complete object. This will be validated against the
      -     * combined checksums of the component objects.
      +     * Optional. The checksums of the complete object. This will be validated
      +     * against the combined checksums of the component objects.
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 10; + * + * .google.storage.v2.ObjectChecksums object_checksums = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the objectChecksums field is set. */ @@ -4151,11 +4260,13 @@ public boolean hasObjectChecksums() { * * *
      -     * The checksums of the complete object. This will be validated against the
      -     * combined checksums of the component objects.
      +     * Optional. The checksums of the complete object. This will be validated
      +     * against the combined checksums of the component objects.
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 10; + * + * .google.storage.v2.ObjectChecksums object_checksums = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The objectChecksums. */ @@ -4173,11 +4284,13 @@ public com.google.storage.v2.ObjectChecksums getObjectChecksums() { * * *
      -     * The checksums of the complete object. This will be validated against the
      -     * combined checksums of the component objects.
      +     * Optional. The checksums of the complete object. This will be validated
      +     * against the combined checksums of the component objects.
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 10; + * + * .google.storage.v2.ObjectChecksums object_checksums = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setObjectChecksums(com.google.storage.v2.ObjectChecksums value) { if (objectChecksumsBuilder_ == null) { @@ -4197,11 +4310,13 @@ public Builder setObjectChecksums(com.google.storage.v2.ObjectChecksums value) { * * *
      -     * The checksums of the complete object. This will be validated against the
      -     * combined checksums of the component objects.
      +     * Optional. The checksums of the complete object. This will be validated
      +     * against the combined checksums of the component objects.
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 10; + * + * .google.storage.v2.ObjectChecksums object_checksums = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setObjectChecksums( com.google.storage.v2.ObjectChecksums.Builder builderForValue) { @@ -4219,11 +4334,13 @@ public Builder setObjectChecksums( * * *
      -     * The checksums of the complete object. This will be validated against the
      -     * combined checksums of the component objects.
      +     * Optional. The checksums of the complete object. This will be validated
      +     * against the combined checksums of the component objects.
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 10; + * + * .google.storage.v2.ObjectChecksums object_checksums = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeObjectChecksums(com.google.storage.v2.ObjectChecksums value) { if (objectChecksumsBuilder_ == null) { @@ -4248,11 +4365,13 @@ public Builder mergeObjectChecksums(com.google.storage.v2.ObjectChecksums value) * * *
      -     * The checksums of the complete object. This will be validated against the
      -     * combined checksums of the component objects.
      +     * Optional. The checksums of the complete object. This will be validated
      +     * against the combined checksums of the component objects.
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 10; + * + * .google.storage.v2.ObjectChecksums object_checksums = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearObjectChecksums() { bitField0_ = (bitField0_ & ~0x00000080); @@ -4269,11 +4388,13 @@ public Builder clearObjectChecksums() { * * *
      -     * The checksums of the complete object. This will be validated against the
      -     * combined checksums of the component objects.
      +     * Optional. The checksums of the complete object. This will be validated
      +     * against the combined checksums of the component objects.
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 10; + * + * .google.storage.v2.ObjectChecksums object_checksums = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.ObjectChecksums.Builder getObjectChecksumsBuilder() { bitField0_ |= 0x00000080; @@ -4285,11 +4406,13 @@ public com.google.storage.v2.ObjectChecksums.Builder getObjectChecksumsBuilder() * * *
      -     * The checksums of the complete object. This will be validated against the
      -     * combined checksums of the component objects.
      +     * Optional. The checksums of the complete object. This will be validated
      +     * against the combined checksums of the component objects.
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 10; + * + * .google.storage.v2.ObjectChecksums object_checksums = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.ObjectChecksumsOrBuilder getObjectChecksumsOrBuilder() { if (objectChecksumsBuilder_ != null) { @@ -4305,11 +4428,13 @@ public com.google.storage.v2.ObjectChecksumsOrBuilder getObjectChecksumsOrBuilde * * *
      -     * The checksums of the complete object. This will be validated against the
      -     * combined checksums of the component objects.
      +     * Optional. The checksums of the complete object. This will be validated
      +     * against the combined checksums of the component objects.
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 10; + * + * .google.storage.v2.ObjectChecksums object_checksums = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.ObjectChecksums, diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ComposeObjectRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ComposeObjectRequestOrBuilder.java index 8430db17f8..36bf72dcfd 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ComposeObjectRequestOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ComposeObjectRequestOrBuilder.java @@ -68,10 +68,13 @@ public interface ComposeObjectRequestOrBuilder * * *
      -   * The list of source objects that will be concatenated into a single object.
      +   * Optional. The list of source objects that will be concatenated into a
      +   * single object.
          * 
      * - * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; + * + * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ java.util.List getSourceObjectsList(); @@ -79,10 +82,13 @@ public interface ComposeObjectRequestOrBuilder * * *
      -   * The list of source objects that will be concatenated into a single object.
      +   * Optional. The list of source objects that will be concatenated into a
      +   * single object.
          * 
      * - * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; + * + * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.ComposeObjectRequest.SourceObject getSourceObjects(int index); @@ -90,10 +96,13 @@ public interface ComposeObjectRequestOrBuilder * * *
      -   * The list of source objects that will be concatenated into a single object.
      +   * Optional. The list of source objects that will be concatenated into a
      +   * single object.
          * 
      * - * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; + * + * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ int getSourceObjectsCount(); @@ -101,10 +110,13 @@ public interface ComposeObjectRequestOrBuilder * * *
      -   * The list of source objects that will be concatenated into a single object.
      +   * Optional. The list of source objects that will be concatenated into a
      +   * single object.
          * 
      * - * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; + * + * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ java.util.List getSourceObjectsOrBuilderList(); @@ -113,10 +125,13 @@ public interface ComposeObjectRequestOrBuilder * * *
      -   * The list of source objects that will be concatenated into a single object.
      +   * Optional. The list of source objects that will be concatenated into a
      +   * single object.
          * 
      * - * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; + * + * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.ComposeObjectRequest.SourceObjectOrBuilder getSourceObjectsOrBuilder( int index); @@ -125,12 +140,12 @@ com.google.storage.v2.ComposeObjectRequest.SourceObjectOrBuilder getSourceObject * * *
      -   * Apply a predefined set of access controls to the destination object.
      -   * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +   * Optional. Apply a predefined set of access controls to the destination
      +   * object. Valid values are "authenticatedRead", "bucketOwnerFullControl",
          * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
          * 
      * - * string destination_predefined_acl = 9; + * string destination_predefined_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return The destinationPredefinedAcl. */ @@ -140,12 +155,12 @@ com.google.storage.v2.ComposeObjectRequest.SourceObjectOrBuilder getSourceObject * * *
      -   * Apply a predefined set of access controls to the destination object.
      -   * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +   * Optional. Apply a predefined set of access controls to the destination
      +   * object. Valid values are "authenticatedRead", "bucketOwnerFullControl",
          * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
          * 
      * - * string destination_predefined_acl = 9; + * string destination_predefined_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for destinationPredefinedAcl. */ @@ -213,13 +228,15 @@ com.google.storage.v2.ComposeObjectRequest.SourceObjectOrBuilder getSourceObject * * *
      -   * Resource name of the Cloud KMS key, of the form
      +   * Optional. Resource name of the Cloud KMS key, of the form
          * `projects/my-project/locations/my-location/keyRings/my-kr/cryptoKeys/my-key`,
          * that will be used to encrypt the object. Overrides the object
          * metadata's `kms_key_name` value, if any.
          * 
      * - * string kms_key = 6 [(.google.api.resource_reference) = { ... } + * + * string kms_key = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The kmsKey. */ @@ -229,13 +246,15 @@ com.google.storage.v2.ComposeObjectRequest.SourceObjectOrBuilder getSourceObject * * *
      -   * Resource name of the Cloud KMS key, of the form
      +   * Optional. Resource name of the Cloud KMS key, of the form
          * `projects/my-project/locations/my-location/keyRings/my-kr/cryptoKeys/my-key`,
          * that will be used to encrypt the object. Overrides the object
          * metadata's `kms_key_name` value, if any.
          * 
      * - * string kms_key = 6 [(.google.api.resource_reference) = { ... } + * + * string kms_key = 6 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for kmsKey. */ @@ -245,10 +264,13 @@ com.google.storage.v2.ComposeObjectRequest.SourceObjectOrBuilder getSourceObject * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -258,10 +280,13 @@ com.google.storage.v2.ComposeObjectRequest.SourceObjectOrBuilder getSourceObject * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -271,10 +296,13 @@ com.google.storage.v2.ComposeObjectRequest.SourceObjectOrBuilder getSourceObject * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.CommonObjectRequestParamsOrBuilder getCommonObjectRequestParamsOrBuilder(); @@ -282,11 +310,13 @@ com.google.storage.v2.ComposeObjectRequest.SourceObjectOrBuilder getSourceObject * * *
      -   * The checksums of the complete object. This will be validated against the
      -   * combined checksums of the component objects.
      +   * Optional. The checksums of the complete object. This will be validated
      +   * against the combined checksums of the component objects.
          * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 10; + * + * .google.storage.v2.ObjectChecksums object_checksums = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the objectChecksums field is set. */ @@ -296,11 +326,13 @@ com.google.storage.v2.ComposeObjectRequest.SourceObjectOrBuilder getSourceObject * * *
      -   * The checksums of the complete object. This will be validated against the
      -   * combined checksums of the component objects.
      +   * Optional. The checksums of the complete object. This will be validated
      +   * against the combined checksums of the component objects.
          * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 10; + * + * .google.storage.v2.ObjectChecksums object_checksums = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The objectChecksums. */ @@ -310,11 +342,13 @@ com.google.storage.v2.ComposeObjectRequest.SourceObjectOrBuilder getSourceObject * * *
      -   * The checksums of the complete object. This will be validated against the
      -   * combined checksums of the component objects.
      +   * Optional. The checksums of the complete object. This will be validated
      +   * against the combined checksums of the component objects.
          * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 10; + * + * .google.storage.v2.ObjectChecksums object_checksums = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.ObjectChecksumsOrBuilder getObjectChecksumsOrBuilder(); } diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateBucketRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateBucketRequest.java index 1e3cb4dc31..f4b88b3d6d 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateBucketRequest.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateBucketRequest.java @@ -77,7 +77,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
      -   * Required. The project to which this bucket will belong.
      +   * Required. The project to which this bucket will belong. This field must
      +   * either be empty or `projects/_`. The project ID that owns this bucket
      +   * should be specified in the `bucket.project` field.
          * 
      * * @@ -103,7 +105,9 @@ public java.lang.String getParent() { * * *
      -   * Required. The project to which this bucket will belong.
      +   * Required. The project to which this bucket will belong. This field must
      +   * either be empty or `projects/_`. The project ID that owns this bucket
      +   * should be specified in the `bucket.project` field.
          * 
      * * @@ -132,7 +136,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
      -   * Properties of the new bucket being inserted.
      +   * Optional. Properties of the new bucket being inserted.
          * The name of the bucket is specified in the `bucket_id` field. Populating
          * `bucket.name` field will result in an error.
          * The project of the bucket must be specified in the `bucket.project` field.
      @@ -141,7 +145,7 @@ public com.google.protobuf.ByteString getParentBytes() {
          * field must be either empty or `projects/_`.
          * 
      * - * .google.storage.v2.Bucket bucket = 2; + * .google.storage.v2.Bucket bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return Whether the bucket field is set. */ @@ -154,7 +158,7 @@ public boolean hasBucket() { * * *
      -   * Properties of the new bucket being inserted.
      +   * Optional. Properties of the new bucket being inserted.
          * The name of the bucket is specified in the `bucket_id` field. Populating
          * `bucket.name` field will result in an error.
          * The project of the bucket must be specified in the `bucket.project` field.
      @@ -163,7 +167,7 @@ public boolean hasBucket() {
          * field must be either empty or `projects/_`.
          * 
      * - * .google.storage.v2.Bucket bucket = 2; + * .google.storage.v2.Bucket bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bucket. */ @@ -176,7 +180,7 @@ public com.google.storage.v2.Bucket getBucket() { * * *
      -   * Properties of the new bucket being inserted.
      +   * Optional. Properties of the new bucket being inserted.
          * The name of the bucket is specified in the `bucket_id` field. Populating
          * `bucket.name` field will result in an error.
          * The project of the bucket must be specified in the `bucket.project` field.
      @@ -185,7 +189,7 @@ public com.google.storage.v2.Bucket getBucket() {
          * field must be either empty or `projects/_`.
          * 
      * - * .google.storage.v2.Bucket bucket = 2; + * .google.storage.v2.Bucket bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public com.google.storage.v2.BucketOrBuilder getBucketOrBuilder() { @@ -258,12 +262,12 @@ public com.google.protobuf.ByteString getBucketIdBytes() { * * *
      -   * Apply a predefined set of access controls to this bucket.
      +   * Optional. Apply a predefined set of access controls to this bucket.
          * Valid values are "authenticatedRead", "private", "projectPrivate",
          * "publicRead", or "publicReadWrite".
          * 
      * - * string predefined_acl = 6; + * string predefined_acl = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The predefinedAcl. */ @@ -284,12 +288,12 @@ public java.lang.String getPredefinedAcl() { * * *
      -   * Apply a predefined set of access controls to this bucket.
      +   * Optional. Apply a predefined set of access controls to this bucket.
          * Valid values are "authenticatedRead", "private", "projectPrivate",
          * "publicRead", or "publicReadWrite".
          * 
      * - * string predefined_acl = 6; + * string predefined_acl = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for predefinedAcl. */ @@ -315,12 +319,13 @@ public com.google.protobuf.ByteString getPredefinedAclBytes() { * * *
      -   * Apply a predefined set of default object access controls to this bucket.
      -   * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +   * Optional. Apply a predefined set of default object access controls to this
      +   * bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl",
          * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
          * 
      * - * string predefined_default_object_acl = 7; + * string predefined_default_object_acl = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The predefinedDefaultObjectAcl. */ @@ -341,12 +346,13 @@ public java.lang.String getPredefinedDefaultObjectAcl() { * * *
      -   * Apply a predefined set of default object access controls to this bucket.
      -   * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +   * Optional. Apply a predefined set of default object access controls to this
      +   * bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl",
          * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
          * 
      * - * string predefined_default_object_acl = 7; + * string predefined_default_object_acl = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The bytes for predefinedDefaultObjectAcl. */ @@ -828,7 +834,9 @@ public Builder mergeFrom( * * *
      -     * Required. The project to which this bucket will belong.
      +     * Required. The project to which this bucket will belong. This field must
      +     * either be empty or `projects/_`. The project ID that owns this bucket
      +     * should be specified in the `bucket.project` field.
            * 
      * * @@ -853,7 +861,9 @@ public java.lang.String getParent() { * * *
      -     * Required. The project to which this bucket will belong.
      +     * Required. The project to which this bucket will belong. This field must
      +     * either be empty or `projects/_`. The project ID that owns this bucket
      +     * should be specified in the `bucket.project` field.
            * 
      * * @@ -878,7 +888,9 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
      -     * Required. The project to which this bucket will belong.
      +     * Required. The project to which this bucket will belong. This field must
      +     * either be empty or `projects/_`. The project ID that owns this bucket
      +     * should be specified in the `bucket.project` field.
            * 
      * * @@ -902,7 +914,9 @@ public Builder setParent(java.lang.String value) { * * *
      -     * Required. The project to which this bucket will belong.
      +     * Required. The project to which this bucket will belong. This field must
      +     * either be empty or `projects/_`. The project ID that owns this bucket
      +     * should be specified in the `bucket.project` field.
            * 
      * * @@ -922,7 +936,9 @@ public Builder clearParent() { * * *
      -     * Required. The project to which this bucket will belong.
      +     * Required. The project to which this bucket will belong. This field must
      +     * either be empty or `projects/_`. The project ID that owns this bucket
      +     * should be specified in the `bucket.project` field.
            * 
      * * @@ -954,7 +970,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
      -     * Properties of the new bucket being inserted.
      +     * Optional. Properties of the new bucket being inserted.
            * The name of the bucket is specified in the `bucket_id` field. Populating
            * `bucket.name` field will result in an error.
            * The project of the bucket must be specified in the `bucket.project` field.
      @@ -963,7 +979,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) {
            * field must be either empty or `projects/_`.
            * 
      * - * .google.storage.v2.Bucket bucket = 2; + * .google.storage.v2.Bucket bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return Whether the bucket field is set. */ @@ -975,7 +991,7 @@ public boolean hasBucket() { * * *
      -     * Properties of the new bucket being inserted.
      +     * Optional. Properties of the new bucket being inserted.
            * The name of the bucket is specified in the `bucket_id` field. Populating
            * `bucket.name` field will result in an error.
            * The project of the bucket must be specified in the `bucket.project` field.
      @@ -984,7 +1000,7 @@ public boolean hasBucket() {
            * field must be either empty or `projects/_`.
            * 
      * - * .google.storage.v2.Bucket bucket = 2; + * .google.storage.v2.Bucket bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bucket. */ @@ -1000,7 +1016,7 @@ public com.google.storage.v2.Bucket getBucket() { * * *
      -     * Properties of the new bucket being inserted.
      +     * Optional. Properties of the new bucket being inserted.
            * The name of the bucket is specified in the `bucket_id` field. Populating
            * `bucket.name` field will result in an error.
            * The project of the bucket must be specified in the `bucket.project` field.
      @@ -1009,7 +1025,7 @@ public com.google.storage.v2.Bucket getBucket() {
            * field must be either empty or `projects/_`.
            * 
      * - * .google.storage.v2.Bucket bucket = 2; + * .google.storage.v2.Bucket bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; */ public Builder setBucket(com.google.storage.v2.Bucket value) { if (bucketBuilder_ == null) { @@ -1029,7 +1045,7 @@ public Builder setBucket(com.google.storage.v2.Bucket value) { * * *
      -     * Properties of the new bucket being inserted.
      +     * Optional. Properties of the new bucket being inserted.
            * The name of the bucket is specified in the `bucket_id` field. Populating
            * `bucket.name` field will result in an error.
            * The project of the bucket must be specified in the `bucket.project` field.
      @@ -1038,7 +1054,7 @@ public Builder setBucket(com.google.storage.v2.Bucket value) {
            * field must be either empty or `projects/_`.
            * 
      * - * .google.storage.v2.Bucket bucket = 2; + * .google.storage.v2.Bucket bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; */ public Builder setBucket(com.google.storage.v2.Bucket.Builder builderForValue) { if (bucketBuilder_ == null) { @@ -1055,7 +1071,7 @@ public Builder setBucket(com.google.storage.v2.Bucket.Builder builderForValue) { * * *
      -     * Properties of the new bucket being inserted.
      +     * Optional. Properties of the new bucket being inserted.
            * The name of the bucket is specified in the `bucket_id` field. Populating
            * `bucket.name` field will result in an error.
            * The project of the bucket must be specified in the `bucket.project` field.
      @@ -1064,7 +1080,7 @@ public Builder setBucket(com.google.storage.v2.Bucket.Builder builderForValue) {
            * field must be either empty or `projects/_`.
            * 
      * - * .google.storage.v2.Bucket bucket = 2; + * .google.storage.v2.Bucket bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; */ public Builder mergeBucket(com.google.storage.v2.Bucket value) { if (bucketBuilder_ == null) { @@ -1089,7 +1105,7 @@ public Builder mergeBucket(com.google.storage.v2.Bucket value) { * * *
      -     * Properties of the new bucket being inserted.
      +     * Optional. Properties of the new bucket being inserted.
            * The name of the bucket is specified in the `bucket_id` field. Populating
            * `bucket.name` field will result in an error.
            * The project of the bucket must be specified in the `bucket.project` field.
      @@ -1098,7 +1114,7 @@ public Builder mergeBucket(com.google.storage.v2.Bucket value) {
            * field must be either empty or `projects/_`.
            * 
      * - * .google.storage.v2.Bucket bucket = 2; + * .google.storage.v2.Bucket bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; */ public Builder clearBucket() { bitField0_ = (bitField0_ & ~0x00000002); @@ -1115,7 +1131,7 @@ public Builder clearBucket() { * * *
      -     * Properties of the new bucket being inserted.
      +     * Optional. Properties of the new bucket being inserted.
            * The name of the bucket is specified in the `bucket_id` field. Populating
            * `bucket.name` field will result in an error.
            * The project of the bucket must be specified in the `bucket.project` field.
      @@ -1124,7 +1140,7 @@ public Builder clearBucket() {
            * field must be either empty or `projects/_`.
            * 
      * - * .google.storage.v2.Bucket bucket = 2; + * .google.storage.v2.Bucket bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; */ public com.google.storage.v2.Bucket.Builder getBucketBuilder() { bitField0_ |= 0x00000002; @@ -1136,7 +1152,7 @@ public com.google.storage.v2.Bucket.Builder getBucketBuilder() { * * *
      -     * Properties of the new bucket being inserted.
      +     * Optional. Properties of the new bucket being inserted.
            * The name of the bucket is specified in the `bucket_id` field. Populating
            * `bucket.name` field will result in an error.
            * The project of the bucket must be specified in the `bucket.project` field.
      @@ -1145,7 +1161,7 @@ public com.google.storage.v2.Bucket.Builder getBucketBuilder() {
            * field must be either empty or `projects/_`.
            * 
      * - * .google.storage.v2.Bucket bucket = 2; + * .google.storage.v2.Bucket bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; */ public com.google.storage.v2.BucketOrBuilder getBucketOrBuilder() { if (bucketBuilder_ != null) { @@ -1159,7 +1175,7 @@ public com.google.storage.v2.BucketOrBuilder getBucketOrBuilder() { * * *
      -     * Properties of the new bucket being inserted.
      +     * Optional. Properties of the new bucket being inserted.
            * The name of the bucket is specified in the `bucket_id` field. Populating
            * `bucket.name` field will result in an error.
            * The project of the bucket must be specified in the `bucket.project` field.
      @@ -1168,7 +1184,7 @@ public com.google.storage.v2.BucketOrBuilder getBucketOrBuilder() {
            * field must be either empty or `projects/_`.
            * 
      * - * .google.storage.v2.Bucket bucket = 2; + * .google.storage.v2.Bucket bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.Bucket, @@ -1314,12 +1330,12 @@ public Builder setBucketIdBytes(com.google.protobuf.ByteString value) { * * *
      -     * Apply a predefined set of access controls to this bucket.
      +     * Optional. Apply a predefined set of access controls to this bucket.
            * Valid values are "authenticatedRead", "private", "projectPrivate",
            * "publicRead", or "publicReadWrite".
            * 
      * - * string predefined_acl = 6; + * string predefined_acl = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The predefinedAcl. */ @@ -1339,12 +1355,12 @@ public java.lang.String getPredefinedAcl() { * * *
      -     * Apply a predefined set of access controls to this bucket.
      +     * Optional. Apply a predefined set of access controls to this bucket.
            * Valid values are "authenticatedRead", "private", "projectPrivate",
            * "publicRead", or "publicReadWrite".
            * 
      * - * string predefined_acl = 6; + * string predefined_acl = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for predefinedAcl. */ @@ -1364,12 +1380,12 @@ public com.google.protobuf.ByteString getPredefinedAclBytes() { * * *
      -     * Apply a predefined set of access controls to this bucket.
      +     * Optional. Apply a predefined set of access controls to this bucket.
            * Valid values are "authenticatedRead", "private", "projectPrivate",
            * "publicRead", or "publicReadWrite".
            * 
      * - * string predefined_acl = 6; + * string predefined_acl = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The predefinedAcl to set. * @return This builder for chaining. @@ -1388,12 +1404,12 @@ public Builder setPredefinedAcl(java.lang.String value) { * * *
      -     * Apply a predefined set of access controls to this bucket.
      +     * Optional. Apply a predefined set of access controls to this bucket.
            * Valid values are "authenticatedRead", "private", "projectPrivate",
            * "publicRead", or "publicReadWrite".
            * 
      * - * string predefined_acl = 6; + * string predefined_acl = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1408,12 +1424,12 @@ public Builder clearPredefinedAcl() { * * *
      -     * Apply a predefined set of access controls to this bucket.
      +     * Optional. Apply a predefined set of access controls to this bucket.
            * Valid values are "authenticatedRead", "private", "projectPrivate",
            * "publicRead", or "publicReadWrite".
            * 
      * - * string predefined_acl = 6; + * string predefined_acl = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for predefinedAcl to set. * @return This builder for chaining. @@ -1435,12 +1451,13 @@ public Builder setPredefinedAclBytes(com.google.protobuf.ByteString value) { * * *
      -     * Apply a predefined set of default object access controls to this bucket.
      -     * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +     * Optional. Apply a predefined set of default object access controls to this
      +     * bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl",
            * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
            * 
      * - * string predefined_default_object_acl = 7; + * string predefined_default_object_acl = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The predefinedDefaultObjectAcl. */ @@ -1460,12 +1477,13 @@ public java.lang.String getPredefinedDefaultObjectAcl() { * * *
      -     * Apply a predefined set of default object access controls to this bucket.
      -     * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +     * Optional. Apply a predefined set of default object access controls to this
      +     * bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl",
            * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
            * 
      * - * string predefined_default_object_acl = 7; + * string predefined_default_object_acl = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The bytes for predefinedDefaultObjectAcl. */ @@ -1485,12 +1503,13 @@ public com.google.protobuf.ByteString getPredefinedDefaultObjectAclBytes() { * * *
      -     * Apply a predefined set of default object access controls to this bucket.
      -     * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +     * Optional. Apply a predefined set of default object access controls to this
      +     * bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl",
            * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
            * 
      * - * string predefined_default_object_acl = 7; + * string predefined_default_object_acl = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param value The predefinedDefaultObjectAcl to set. * @return This builder for chaining. @@ -1509,12 +1528,13 @@ public Builder setPredefinedDefaultObjectAcl(java.lang.String value) { * * *
      -     * Apply a predefined set of default object access controls to this bucket.
      -     * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +     * Optional. Apply a predefined set of default object access controls to this
      +     * bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl",
            * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
            * 
      * - * string predefined_default_object_acl = 7; + * string predefined_default_object_acl = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return This builder for chaining. */ @@ -1529,12 +1549,13 @@ public Builder clearPredefinedDefaultObjectAcl() { * * *
      -     * Apply a predefined set of default object access controls to this bucket.
      -     * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +     * Optional. Apply a predefined set of default object access controls to this
      +     * bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl",
            * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
            * 
      * - * string predefined_default_object_acl = 7; + * string predefined_default_object_acl = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param value The bytes for predefinedDefaultObjectAcl to set. * @return This builder for chaining. diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateBucketRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateBucketRequestOrBuilder.java index ee8cf129c0..c68a2d7005 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateBucketRequestOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CreateBucketRequestOrBuilder.java @@ -28,7 +28,9 @@ public interface CreateBucketRequestOrBuilder * * *
      -   * Required. The project to which this bucket will belong.
      +   * Required. The project to which this bucket will belong. This field must
      +   * either be empty or `projects/_`. The project ID that owns this bucket
      +   * should be specified in the `bucket.project` field.
          * 
      * * @@ -43,7 +45,9 @@ public interface CreateBucketRequestOrBuilder * * *
      -   * Required. The project to which this bucket will belong.
      +   * Required. The project to which this bucket will belong. This field must
      +   * either be empty or `projects/_`. The project ID that owns this bucket
      +   * should be specified in the `bucket.project` field.
          * 
      * * @@ -58,7 +62,7 @@ public interface CreateBucketRequestOrBuilder * * *
      -   * Properties of the new bucket being inserted.
      +   * Optional. Properties of the new bucket being inserted.
          * The name of the bucket is specified in the `bucket_id` field. Populating
          * `bucket.name` field will result in an error.
          * The project of the bucket must be specified in the `bucket.project` field.
      @@ -67,7 +71,7 @@ public interface CreateBucketRequestOrBuilder
          * field must be either empty or `projects/_`.
          * 
      * - * .google.storage.v2.Bucket bucket = 2; + * .google.storage.v2.Bucket bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return Whether the bucket field is set. */ @@ -77,7 +81,7 @@ public interface CreateBucketRequestOrBuilder * * *
      -   * Properties of the new bucket being inserted.
      +   * Optional. Properties of the new bucket being inserted.
          * The name of the bucket is specified in the `bucket_id` field. Populating
          * `bucket.name` field will result in an error.
          * The project of the bucket must be specified in the `bucket.project` field.
      @@ -86,7 +90,7 @@ public interface CreateBucketRequestOrBuilder
          * field must be either empty or `projects/_`.
          * 
      * - * .google.storage.v2.Bucket bucket = 2; + * .google.storage.v2.Bucket bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bucket. */ @@ -96,7 +100,7 @@ public interface CreateBucketRequestOrBuilder * * *
      -   * Properties of the new bucket being inserted.
      +   * Optional. Properties of the new bucket being inserted.
          * The name of the bucket is specified in the `bucket_id` field. Populating
          * `bucket.name` field will result in an error.
          * The project of the bucket must be specified in the `bucket.project` field.
      @@ -105,7 +109,7 @@ public interface CreateBucketRequestOrBuilder
          * field must be either empty or `projects/_`.
          * 
      * - * .google.storage.v2.Bucket bucket = 2; + * .google.storage.v2.Bucket bucket = 2 [(.google.api.field_behavior) = OPTIONAL]; */ com.google.storage.v2.BucketOrBuilder getBucketOrBuilder(); @@ -143,12 +147,12 @@ public interface CreateBucketRequestOrBuilder * * *
      -   * Apply a predefined set of access controls to this bucket.
      +   * Optional. Apply a predefined set of access controls to this bucket.
          * Valid values are "authenticatedRead", "private", "projectPrivate",
          * "publicRead", or "publicReadWrite".
          * 
      * - * string predefined_acl = 6; + * string predefined_acl = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The predefinedAcl. */ @@ -158,12 +162,12 @@ public interface CreateBucketRequestOrBuilder * * *
      -   * Apply a predefined set of access controls to this bucket.
      +   * Optional. Apply a predefined set of access controls to this bucket.
          * Valid values are "authenticatedRead", "private", "projectPrivate",
          * "publicRead", or "publicReadWrite".
          * 
      * - * string predefined_acl = 6; + * string predefined_acl = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for predefinedAcl. */ @@ -173,12 +177,13 @@ public interface CreateBucketRequestOrBuilder * * *
      -   * Apply a predefined set of default object access controls to this bucket.
      -   * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +   * Optional. Apply a predefined set of default object access controls to this
      +   * bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl",
          * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
          * 
      * - * string predefined_default_object_acl = 7; + * string predefined_default_object_acl = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The predefinedDefaultObjectAcl. */ @@ -188,12 +193,13 @@ public interface CreateBucketRequestOrBuilder * * *
      -   * Apply a predefined set of default object access controls to this bucket.
      -   * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +   * Optional. Apply a predefined set of default object access controls to this
      +   * bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl",
          * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
          * 
      * - * string predefined_default_object_acl = 7; + * string predefined_default_object_acl = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The bytes for predefinedDefaultObjectAcl. */ diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CustomerEncryption.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CustomerEncryption.java index 26cd468311..9ebfba31e8 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CustomerEncryption.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CustomerEncryption.java @@ -75,10 +75,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
      -   * The encryption algorithm.
      +   * Optional. The encryption algorithm.
          * 
      * - * string encryption_algorithm = 1; + * string encryption_algorithm = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The encryptionAlgorithm. */ @@ -99,10 +99,10 @@ public java.lang.String getEncryptionAlgorithm() { * * *
      -   * The encryption algorithm.
      +   * Optional. The encryption algorithm.
          * 
      * - * string encryption_algorithm = 1; + * string encryption_algorithm = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for encryptionAlgorithm. */ @@ -126,11 +126,11 @@ public com.google.protobuf.ByteString getEncryptionAlgorithmBytes() { * * *
      -   * SHA256 hash value of the encryption key.
      +   * Optional. SHA256 hash value of the encryption key.
          * In raw bytes format (not base64-encoded).
          * 
      * - * bytes key_sha256_bytes = 3; + * bytes key_sha256_bytes = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The keySha256Bytes. */ @@ -509,10 +509,10 @@ public Builder mergeFrom( * * *
      -     * The encryption algorithm.
      +     * Optional. The encryption algorithm.
            * 
      * - * string encryption_algorithm = 1; + * string encryption_algorithm = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The encryptionAlgorithm. */ @@ -532,10 +532,10 @@ public java.lang.String getEncryptionAlgorithm() { * * *
      -     * The encryption algorithm.
      +     * Optional. The encryption algorithm.
            * 
      * - * string encryption_algorithm = 1; + * string encryption_algorithm = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for encryptionAlgorithm. */ @@ -555,10 +555,10 @@ public com.google.protobuf.ByteString getEncryptionAlgorithmBytes() { * * *
      -     * The encryption algorithm.
      +     * Optional. The encryption algorithm.
            * 
      * - * string encryption_algorithm = 1; + * string encryption_algorithm = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The encryptionAlgorithm to set. * @return This builder for chaining. @@ -577,10 +577,10 @@ public Builder setEncryptionAlgorithm(java.lang.String value) { * * *
      -     * The encryption algorithm.
      +     * Optional. The encryption algorithm.
            * 
      * - * string encryption_algorithm = 1; + * string encryption_algorithm = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -595,10 +595,10 @@ public Builder clearEncryptionAlgorithm() { * * *
      -     * The encryption algorithm.
      +     * Optional. The encryption algorithm.
            * 
      * - * string encryption_algorithm = 1; + * string encryption_algorithm = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for encryptionAlgorithm to set. * @return This builder for chaining. @@ -620,11 +620,11 @@ public Builder setEncryptionAlgorithmBytes(com.google.protobuf.ByteString value) * * *
      -     * SHA256 hash value of the encryption key.
      +     * Optional. SHA256 hash value of the encryption key.
            * In raw bytes format (not base64-encoded).
            * 
      * - * bytes key_sha256_bytes = 3; + * bytes key_sha256_bytes = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The keySha256Bytes. */ @@ -637,11 +637,11 @@ public com.google.protobuf.ByteString getKeySha256Bytes() { * * *
      -     * SHA256 hash value of the encryption key.
      +     * Optional. SHA256 hash value of the encryption key.
            * In raw bytes format (not base64-encoded).
            * 
      * - * bytes key_sha256_bytes = 3; + * bytes key_sha256_bytes = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The keySha256Bytes to set. * @return This builder for chaining. @@ -660,11 +660,11 @@ public Builder setKeySha256Bytes(com.google.protobuf.ByteString value) { * * *
      -     * SHA256 hash value of the encryption key.
      +     * Optional. SHA256 hash value of the encryption key.
            * In raw bytes format (not base64-encoded).
            * 
      * - * bytes key_sha256_bytes = 3; + * bytes key_sha256_bytes = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CustomerEncryptionOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CustomerEncryptionOrBuilder.java index 11e3745248..1ccb9e9e3f 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CustomerEncryptionOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/CustomerEncryptionOrBuilder.java @@ -28,10 +28,10 @@ public interface CustomerEncryptionOrBuilder * * *
      -   * The encryption algorithm.
      +   * Optional. The encryption algorithm.
          * 
      * - * string encryption_algorithm = 1; + * string encryption_algorithm = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The encryptionAlgorithm. */ @@ -41,10 +41,10 @@ public interface CustomerEncryptionOrBuilder * * *
      -   * The encryption algorithm.
      +   * Optional. The encryption algorithm.
          * 
      * - * string encryption_algorithm = 1; + * string encryption_algorithm = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for encryptionAlgorithm. */ @@ -54,11 +54,11 @@ public interface CustomerEncryptionOrBuilder * * *
      -   * SHA256 hash value of the encryption key.
      +   * Optional. SHA256 hash value of the encryption key.
          * In raw bytes format (not base64-encoded).
          * 
      * - * bytes key_sha256_bytes = 3; + * bytes key_sha256_bytes = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The keySha256Bytes. */ diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteObjectRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteObjectRequest.java index 620d5b45d5..4c4325628c 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteObjectRequest.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteObjectRequest.java @@ -188,11 +188,11 @@ public com.google.protobuf.ByteString getObjectBytes() { * * *
      -   * If present, permanently deletes a specific revision of this object (as
      -   * opposed to the latest version, the default).
      +   * Optional. If present, permanently deletes a specific revision of this
      +   * object (as opposed to the latest version, the default).
          * 
      * - * int64 generation = 4; + * int64 generation = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The generation. */ @@ -362,10 +362,13 @@ public long getIfMetagenerationNotMatch() { * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -378,10 +381,13 @@ public boolean hasCommonObjectRequestParams() { * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -396,10 +402,13 @@ public com.google.storage.v2.CommonObjectRequestParams getCommonObjectRequestPar * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.CommonObjectRequestParamsOrBuilder @@ -1208,11 +1217,11 @@ public Builder setObjectBytes(com.google.protobuf.ByteString value) { * * *
      -     * If present, permanently deletes a specific revision of this object (as
      -     * opposed to the latest version, the default).
      +     * Optional. If present, permanently deletes a specific revision of this
      +     * object (as opposed to the latest version, the default).
            * 
      * - * int64 generation = 4; + * int64 generation = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The generation. */ @@ -1225,11 +1234,11 @@ public long getGeneration() { * * *
      -     * If present, permanently deletes a specific revision of this object (as
      -     * opposed to the latest version, the default).
      +     * Optional. If present, permanently deletes a specific revision of this
      +     * object (as opposed to the latest version, the default).
            * 
      * - * int64 generation = 4; + * int64 generation = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The generation to set. * @return This builder for chaining. @@ -1246,11 +1255,11 @@ public Builder setGeneration(long value) { * * *
      -     * If present, permanently deletes a specific revision of this object (as
      -     * opposed to the latest version, the default).
      +     * Optional. If present, permanently deletes a specific revision of this
      +     * object (as opposed to the latest version, the default).
            * 
      * - * int64 generation = 4; + * int64 generation = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1588,10 +1597,13 @@ public Builder clearIfMetagenerationNotMatch() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -1603,10 +1615,13 @@ public boolean hasCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -1624,10 +1639,13 @@ public com.google.storage.v2.CommonObjectRequestParams getCommonObjectRequestPar * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams value) { @@ -1648,10 +1666,13 @@ public Builder setCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams.Builder builderForValue) { @@ -1669,10 +1690,13 @@ public Builder setCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams value) { @@ -1699,10 +1723,13 @@ public Builder mergeCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearCommonObjectRequestParams() { bitField0_ = (bitField0_ & ~0x00000080); @@ -1719,10 +1746,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.CommonObjectRequestParams.Builder getCommonObjectRequestParamsBuilder() { @@ -1735,10 +1765,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.CommonObjectRequestParamsOrBuilder getCommonObjectRequestParamsOrBuilder() { @@ -1755,10 +1788,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.CommonObjectRequestParams, diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteObjectRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteObjectRequestOrBuilder.java index 8b73763c98..7cfc2d778b 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteObjectRequestOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/DeleteObjectRequestOrBuilder.java @@ -88,11 +88,11 @@ public interface DeleteObjectRequestOrBuilder * * *
      -   * If present, permanently deletes a specific revision of this object (as
      -   * opposed to the latest version, the default).
      +   * Optional. If present, permanently deletes a specific revision of this
      +   * object (as opposed to the latest version, the default).
          * 
      * - * int64 generation = 4; + * int64 generation = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The generation. */ @@ -220,10 +220,13 @@ public interface DeleteObjectRequestOrBuilder * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -233,10 +236,13 @@ public interface DeleteObjectRequestOrBuilder * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -246,10 +252,13 @@ public interface DeleteObjectRequestOrBuilder * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.CommonObjectRequestParamsOrBuilder getCommonObjectRequestParamsOrBuilder(); } diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetObjectRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetObjectRequest.java index 71d6408388..ca1d343767 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetObjectRequest.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetObjectRequest.java @@ -184,11 +184,11 @@ public com.google.protobuf.ByteString getObjectBytes() { * * *
      -   * If present, selects a specific revision of this object (as opposed to the
      -   * latest version, the default).
      +   * Optional. If present, selects a specific revision of this object (as
      +   * opposed to the latest version, the default).
          * 
      * - * int64 generation = 3; + * int64 generation = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The generation. */ @@ -393,10 +393,13 @@ public long getIfMetagenerationNotMatch() { * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -409,10 +412,13 @@ public boolean hasCommonObjectRequestParams() { * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -427,10 +433,13 @@ public com.google.storage.v2.CommonObjectRequestParams getCommonObjectRequestPar * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.CommonObjectRequestParamsOrBuilder @@ -1431,11 +1440,11 @@ public Builder setObjectBytes(com.google.protobuf.ByteString value) { * * *
      -     * If present, selects a specific revision of this object (as opposed to the
      -     * latest version, the default).
      +     * Optional. If present, selects a specific revision of this object (as
      +     * opposed to the latest version, the default).
            * 
      * - * int64 generation = 3; + * int64 generation = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The generation. */ @@ -1448,11 +1457,11 @@ public long getGeneration() { * * *
      -     * If present, selects a specific revision of this object (as opposed to the
      -     * latest version, the default).
      +     * Optional. If present, selects a specific revision of this object (as
      +     * opposed to the latest version, the default).
            * 
      * - * int64 generation = 3; + * int64 generation = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The generation to set. * @return This builder for chaining. @@ -1469,11 +1478,11 @@ public Builder setGeneration(long value) { * * *
      -     * If present, selects a specific revision of this object (as opposed to the
      -     * latest version, the default).
      +     * Optional. If present, selects a specific revision of this object (as
      +     * opposed to the latest version, the default).
            * 
      * - * int64 generation = 3; + * int64 generation = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1883,10 +1892,13 @@ public Builder clearIfMetagenerationNotMatch() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -1898,10 +1910,13 @@ public boolean hasCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -1919,10 +1934,13 @@ public com.google.storage.v2.CommonObjectRequestParams getCommonObjectRequestPar * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams value) { @@ -1943,10 +1961,13 @@ public Builder setCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams.Builder builderForValue) { @@ -1964,10 +1985,13 @@ public Builder setCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams value) { @@ -1994,10 +2018,13 @@ public Builder mergeCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearCommonObjectRequestParams() { bitField0_ = (bitField0_ & ~0x00000100); @@ -2014,10 +2041,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.CommonObjectRequestParams.Builder getCommonObjectRequestParamsBuilder() { @@ -2030,10 +2060,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.CommonObjectRequestParamsOrBuilder getCommonObjectRequestParamsOrBuilder() { @@ -2050,10 +2083,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.CommonObjectRequestParams, diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetObjectRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetObjectRequestOrBuilder.java index 3ef25c94d7..31c91b3012 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetObjectRequestOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/GetObjectRequestOrBuilder.java @@ -84,11 +84,11 @@ public interface GetObjectRequestOrBuilder * * *
      -   * If present, selects a specific revision of this object (as opposed to the
      -   * latest version, the default).
      +   * Optional. If present, selects a specific revision of this object (as
      +   * opposed to the latest version, the default).
          * 
      * - * int64 generation = 3; + * int64 generation = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The generation. */ @@ -242,10 +242,13 @@ public interface GetObjectRequestOrBuilder * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -255,10 +258,13 @@ public interface GetObjectRequestOrBuilder * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -268,10 +274,13 @@ public interface GetObjectRequestOrBuilder * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.CommonObjectRequestParamsOrBuilder getCommonObjectRequestParamsOrBuilder(); diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListBucketsRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListBucketsRequest.java index 5f0e4b0432..4fa407a70f 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListBucketsRequest.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListBucketsRequest.java @@ -131,13 +131,13 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
      -   * Maximum number of buckets to return in a single response. The service will
      -   * use this parameter or 1,000 items, whichever is smaller. If "acl" is
      -   * present in the read_mask, the service will use this parameter of 200 items,
      -   * whichever is smaller.
      +   * Optional. Maximum number of buckets to return in a single response. The
      +   * service will use this parameter or 1,000 items, whichever is smaller. If
      +   * "acl" is present in the read_mask, the service will use this parameter of
      +   * 200 items, whichever is smaller.
          * 
      * - * int32 page_size = 2; + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ @@ -155,11 +155,11 @@ public int getPageSize() { * * *
      -   * A previously-returned page token representing part of the larger set of
      -   * results to view.
      +   * Optional. A previously-returned page token representing part of the larger
      +   * set of results to view.
          * 
      * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ @@ -180,11 +180,11 @@ public java.lang.String getPageToken() { * * *
      -   * A previously-returned page token representing part of the larger set of
      -   * results to view.
      +   * Optional. A previously-returned page token representing part of the larger
      +   * set of results to view.
          * 
      * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ @@ -210,10 +210,10 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
      -   * Filter results to buckets whose names begin with this prefix.
      +   * Optional. Filter results to buckets whose names begin with this prefix.
          * 
      * - * string prefix = 4; + * string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The prefix. */ @@ -234,10 +234,10 @@ public java.lang.String getPrefix() { * * *
      -   * Filter results to buckets whose names begin with this prefix.
      +   * Optional. Filter results to buckets whose names begin with this prefix.
          * 
      * - * string prefix = 4; + * string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for prefix. */ @@ -893,13 +893,13 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
      -     * Maximum number of buckets to return in a single response. The service will
      -     * use this parameter or 1,000 items, whichever is smaller. If "acl" is
      -     * present in the read_mask, the service will use this parameter of 200 items,
      -     * whichever is smaller.
      +     * Optional. Maximum number of buckets to return in a single response. The
      +     * service will use this parameter or 1,000 items, whichever is smaller. If
      +     * "acl" is present in the read_mask, the service will use this parameter of
      +     * 200 items, whichever is smaller.
            * 
      * - * int32 page_size = 2; + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ @@ -912,13 +912,13 @@ public int getPageSize() { * * *
      -     * Maximum number of buckets to return in a single response. The service will
      -     * use this parameter or 1,000 items, whichever is smaller. If "acl" is
      -     * present in the read_mask, the service will use this parameter of 200 items,
      -     * whichever is smaller.
      +     * Optional. Maximum number of buckets to return in a single response. The
      +     * service will use this parameter or 1,000 items, whichever is smaller. If
      +     * "acl" is present in the read_mask, the service will use this parameter of
      +     * 200 items, whichever is smaller.
            * 
      * - * int32 page_size = 2; + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The pageSize to set. * @return This builder for chaining. @@ -935,13 +935,13 @@ public Builder setPageSize(int value) { * * *
      -     * Maximum number of buckets to return in a single response. The service will
      -     * use this parameter or 1,000 items, whichever is smaller. If "acl" is
      -     * present in the read_mask, the service will use this parameter of 200 items,
      -     * whichever is smaller.
      +     * Optional. Maximum number of buckets to return in a single response. The
      +     * service will use this parameter or 1,000 items, whichever is smaller. If
      +     * "acl" is present in the read_mask, the service will use this parameter of
      +     * 200 items, whichever is smaller.
            * 
      * - * int32 page_size = 2; + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -958,11 +958,11 @@ public Builder clearPageSize() { * * *
      -     * A previously-returned page token representing part of the larger set of
      -     * results to view.
      +     * Optional. A previously-returned page token representing part of the larger
      +     * set of results to view.
            * 
      * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ @@ -982,11 +982,11 @@ public java.lang.String getPageToken() { * * *
      -     * A previously-returned page token representing part of the larger set of
      -     * results to view.
      +     * Optional. A previously-returned page token representing part of the larger
      +     * set of results to view.
            * 
      * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ @@ -1006,11 +1006,11 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
      -     * A previously-returned page token representing part of the larger set of
      -     * results to view.
      +     * Optional. A previously-returned page token representing part of the larger
      +     * set of results to view.
            * 
      * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The pageToken to set. * @return This builder for chaining. @@ -1029,11 +1029,11 @@ public Builder setPageToken(java.lang.String value) { * * *
      -     * A previously-returned page token representing part of the larger set of
      -     * results to view.
      +     * Optional. A previously-returned page token representing part of the larger
      +     * set of results to view.
            * 
      * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1048,11 +1048,11 @@ public Builder clearPageToken() { * * *
      -     * A previously-returned page token representing part of the larger set of
      -     * results to view.
      +     * Optional. A previously-returned page token representing part of the larger
      +     * set of results to view.
            * 
      * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for pageToken to set. * @return This builder for chaining. @@ -1074,10 +1074,10 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { * * *
      -     * Filter results to buckets whose names begin with this prefix.
      +     * Optional. Filter results to buckets whose names begin with this prefix.
            * 
      * - * string prefix = 4; + * string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The prefix. */ @@ -1097,10 +1097,10 @@ public java.lang.String getPrefix() { * * *
      -     * Filter results to buckets whose names begin with this prefix.
      +     * Optional. Filter results to buckets whose names begin with this prefix.
            * 
      * - * string prefix = 4; + * string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for prefix. */ @@ -1120,10 +1120,10 @@ public com.google.protobuf.ByteString getPrefixBytes() { * * *
      -     * Filter results to buckets whose names begin with this prefix.
      +     * Optional. Filter results to buckets whose names begin with this prefix.
            * 
      * - * string prefix = 4; + * string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The prefix to set. * @return This builder for chaining. @@ -1142,10 +1142,10 @@ public Builder setPrefix(java.lang.String value) { * * *
      -     * Filter results to buckets whose names begin with this prefix.
      +     * Optional. Filter results to buckets whose names begin with this prefix.
            * 
      * - * string prefix = 4; + * string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1160,10 +1160,10 @@ public Builder clearPrefix() { * * *
      -     * Filter results to buckets whose names begin with this prefix.
      +     * Optional. Filter results to buckets whose names begin with this prefix.
            * 
      * - * string prefix = 4; + * string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for prefix to set. * @return This builder for chaining. diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListBucketsRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListBucketsRequestOrBuilder.java index 2b5bb417eb..eb515d1163 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListBucketsRequestOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListBucketsRequestOrBuilder.java @@ -58,13 +58,13 @@ public interface ListBucketsRequestOrBuilder * * *
      -   * Maximum number of buckets to return in a single response. The service will
      -   * use this parameter or 1,000 items, whichever is smaller. If "acl" is
      -   * present in the read_mask, the service will use this parameter of 200 items,
      -   * whichever is smaller.
      +   * Optional. Maximum number of buckets to return in a single response. The
      +   * service will use this parameter or 1,000 items, whichever is smaller. If
      +   * "acl" is present in the read_mask, the service will use this parameter of
      +   * 200 items, whichever is smaller.
          * 
      * - * int32 page_size = 2; + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ @@ -74,11 +74,11 @@ public interface ListBucketsRequestOrBuilder * * *
      -   * A previously-returned page token representing part of the larger set of
      -   * results to view.
      +   * Optional. A previously-returned page token representing part of the larger
      +   * set of results to view.
          * 
      * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ @@ -88,11 +88,11 @@ public interface ListBucketsRequestOrBuilder * * *
      -   * A previously-returned page token representing part of the larger set of
      -   * results to view.
      +   * Optional. A previously-returned page token representing part of the larger
      +   * set of results to view.
          * 
      * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ @@ -102,10 +102,10 @@ public interface ListBucketsRequestOrBuilder * * *
      -   * Filter results to buckets whose names begin with this prefix.
      +   * Optional. Filter results to buckets whose names begin with this prefix.
          * 
      * - * string prefix = 4; + * string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The prefix. */ @@ -115,10 +115,10 @@ public interface ListBucketsRequestOrBuilder * * *
      -   * Filter results to buckets whose names begin with this prefix.
      +   * Optional. Filter results to buckets whose names begin with this prefix.
          * 
      * - * string prefix = 4; + * string prefix = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for prefix. */ diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListObjectsRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListObjectsRequest.java index 1b6f3bb753..c1f7a66e54 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListObjectsRequest.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListObjectsRequest.java @@ -135,13 +135,13 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
      -   * Maximum number of `items` plus `prefixes` to return
      +   * Optional. Maximum number of `items` plus `prefixes` to return
          * in a single page of responses. As duplicate `prefixes` are
          * omitted, fewer total results may be returned than requested. The service
          * will use this parameter or 1,000 items, whichever is smaller.
          * 
      * - * int32 page_size = 2; + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ @@ -159,11 +159,11 @@ public int getPageSize() { * * *
      -   * A previously-returned page token representing part of the larger set of
      -   * results to view.
      +   * Optional. A previously-returned page token representing part of the larger
      +   * set of results to view.
          * 
      * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ @@ -184,11 +184,11 @@ public java.lang.String getPageToken() { * * *
      -   * A previously-returned page token representing part of the larger set of
      -   * results to view.
      +   * Optional. A previously-returned page token representing part of the larger
      +   * set of results to view.
          * 
      * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ @@ -214,15 +214,14 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
      -   * If set, returns results in a directory-like mode. `items` will contain
      -   * only objects whose names, aside from the `prefix`, do not
      -   * contain `delimiter`. Objects whose names, aside from the
      -   * `prefix`, contain `delimiter` will have their name,
      -   * truncated after the `delimiter`, returned in
      -   * `prefixes`. Duplicate `prefixes` are omitted.
      +   * Optional. If set, returns results in a directory-like mode. `items` will
      +   * contain only objects whose names, aside from the `prefix`, do not contain
      +   * `delimiter`. Objects whose names, aside from the `prefix`, contain
      +   * `delimiter` will have their name, truncated after the `delimiter`, returned
      +   * in `prefixes`. Duplicate `prefixes` are omitted.
          * 
      * - * string delimiter = 4; + * string delimiter = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The delimiter. */ @@ -243,15 +242,14 @@ public java.lang.String getDelimiter() { * * *
      -   * If set, returns results in a directory-like mode. `items` will contain
      -   * only objects whose names, aside from the `prefix`, do not
      -   * contain `delimiter`. Objects whose names, aside from the
      -   * `prefix`, contain `delimiter` will have their name,
      -   * truncated after the `delimiter`, returned in
      -   * `prefixes`. Duplicate `prefixes` are omitted.
      +   * Optional. If set, returns results in a directory-like mode. `items` will
      +   * contain only objects whose names, aside from the `prefix`, do not contain
      +   * `delimiter`. Objects whose names, aside from the `prefix`, contain
      +   * `delimiter` will have their name, truncated after the `delimiter`, returned
      +   * in `prefixes`. Duplicate `prefixes` are omitted.
          * 
      * - * string delimiter = 4; + * string delimiter = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for delimiter. */ @@ -275,12 +273,12 @@ public com.google.protobuf.ByteString getDelimiterBytes() { * * *
      -   * If true, objects that end in exactly one instance of `delimiter`
      +   * Optional. If true, objects that end in exactly one instance of `delimiter`
          * will have their metadata included in `items` in addition to
          * `prefixes`.
          * 
      * - * bool include_trailing_delimiter = 5; + * bool include_trailing_delimiter = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The includeTrailingDelimiter. */ @@ -298,10 +296,10 @@ public boolean getIncludeTrailingDelimiter() { * * *
      -   * Filter results to objects whose names begin with this prefix.
      +   * Optional. Filter results to objects whose names begin with this prefix.
          * 
      * - * string prefix = 6; + * string prefix = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The prefix. */ @@ -322,10 +320,10 @@ public java.lang.String getPrefix() { * * *
      -   * Filter results to objects whose names begin with this prefix.
      +   * Optional. Filter results to objects whose names begin with this prefix.
          * 
      * - * string prefix = 6; + * string prefix = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for prefix. */ @@ -349,13 +347,13 @@ public com.google.protobuf.ByteString getPrefixBytes() { * * *
      -   * If `true`, lists all versions of an object as distinct results.
      +   * Optional. If `true`, lists all versions of an object as distinct results.
          * For more information, see
          * [Object
          * Versioning](https://cloud.google.com/storage/docs/object-versioning).
          * 
      * - * bool versions = 7; + * bool versions = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The versions. */ @@ -1404,13 +1402,13 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
      -     * Maximum number of `items` plus `prefixes` to return
      +     * Optional. Maximum number of `items` plus `prefixes` to return
            * in a single page of responses. As duplicate `prefixes` are
            * omitted, fewer total results may be returned than requested. The service
            * will use this parameter or 1,000 items, whichever is smaller.
            * 
      * - * int32 page_size = 2; + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ @@ -1423,13 +1421,13 @@ public int getPageSize() { * * *
      -     * Maximum number of `items` plus `prefixes` to return
      +     * Optional. Maximum number of `items` plus `prefixes` to return
            * in a single page of responses. As duplicate `prefixes` are
            * omitted, fewer total results may be returned than requested. The service
            * will use this parameter or 1,000 items, whichever is smaller.
            * 
      * - * int32 page_size = 2; + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The pageSize to set. * @return This builder for chaining. @@ -1446,13 +1444,13 @@ public Builder setPageSize(int value) { * * *
      -     * Maximum number of `items` plus `prefixes` to return
      +     * Optional. Maximum number of `items` plus `prefixes` to return
            * in a single page of responses. As duplicate `prefixes` are
            * omitted, fewer total results may be returned than requested. The service
            * will use this parameter or 1,000 items, whichever is smaller.
            * 
      * - * int32 page_size = 2; + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1469,11 +1467,11 @@ public Builder clearPageSize() { * * *
      -     * A previously-returned page token representing part of the larger set of
      -     * results to view.
      +     * Optional. A previously-returned page token representing part of the larger
      +     * set of results to view.
            * 
      * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ @@ -1493,11 +1491,11 @@ public java.lang.String getPageToken() { * * *
      -     * A previously-returned page token representing part of the larger set of
      -     * results to view.
      +     * Optional. A previously-returned page token representing part of the larger
      +     * set of results to view.
            * 
      * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ @@ -1517,11 +1515,11 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
      -     * A previously-returned page token representing part of the larger set of
      -     * results to view.
      +     * Optional. A previously-returned page token representing part of the larger
      +     * set of results to view.
            * 
      * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The pageToken to set. * @return This builder for chaining. @@ -1540,11 +1538,11 @@ public Builder setPageToken(java.lang.String value) { * * *
      -     * A previously-returned page token representing part of the larger set of
      -     * results to view.
      +     * Optional. A previously-returned page token representing part of the larger
      +     * set of results to view.
            * 
      * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1559,11 +1557,11 @@ public Builder clearPageToken() { * * *
      -     * A previously-returned page token representing part of the larger set of
      -     * results to view.
      +     * Optional. A previously-returned page token representing part of the larger
      +     * set of results to view.
            * 
      * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for pageToken to set. * @return This builder for chaining. @@ -1585,15 +1583,14 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { * * *
      -     * If set, returns results in a directory-like mode. `items` will contain
      -     * only objects whose names, aside from the `prefix`, do not
      -     * contain `delimiter`. Objects whose names, aside from the
      -     * `prefix`, contain `delimiter` will have their name,
      -     * truncated after the `delimiter`, returned in
      -     * `prefixes`. Duplicate `prefixes` are omitted.
      +     * Optional. If set, returns results in a directory-like mode. `items` will
      +     * contain only objects whose names, aside from the `prefix`, do not contain
      +     * `delimiter`. Objects whose names, aside from the `prefix`, contain
      +     * `delimiter` will have their name, truncated after the `delimiter`, returned
      +     * in `prefixes`. Duplicate `prefixes` are omitted.
            * 
      * - * string delimiter = 4; + * string delimiter = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The delimiter. */ @@ -1613,15 +1610,14 @@ public java.lang.String getDelimiter() { * * *
      -     * If set, returns results in a directory-like mode. `items` will contain
      -     * only objects whose names, aside from the `prefix`, do not
      -     * contain `delimiter`. Objects whose names, aside from the
      -     * `prefix`, contain `delimiter` will have their name,
      -     * truncated after the `delimiter`, returned in
      -     * `prefixes`. Duplicate `prefixes` are omitted.
      +     * Optional. If set, returns results in a directory-like mode. `items` will
      +     * contain only objects whose names, aside from the `prefix`, do not contain
      +     * `delimiter`. Objects whose names, aside from the `prefix`, contain
      +     * `delimiter` will have their name, truncated after the `delimiter`, returned
      +     * in `prefixes`. Duplicate `prefixes` are omitted.
            * 
      * - * string delimiter = 4; + * string delimiter = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for delimiter. */ @@ -1641,15 +1637,14 @@ public com.google.protobuf.ByteString getDelimiterBytes() { * * *
      -     * If set, returns results in a directory-like mode. `items` will contain
      -     * only objects whose names, aside from the `prefix`, do not
      -     * contain `delimiter`. Objects whose names, aside from the
      -     * `prefix`, contain `delimiter` will have their name,
      -     * truncated after the `delimiter`, returned in
      -     * `prefixes`. Duplicate `prefixes` are omitted.
      +     * Optional. If set, returns results in a directory-like mode. `items` will
      +     * contain only objects whose names, aside from the `prefix`, do not contain
      +     * `delimiter`. Objects whose names, aside from the `prefix`, contain
      +     * `delimiter` will have their name, truncated after the `delimiter`, returned
      +     * in `prefixes`. Duplicate `prefixes` are omitted.
            * 
      * - * string delimiter = 4; + * string delimiter = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The delimiter to set. * @return This builder for chaining. @@ -1668,15 +1663,14 @@ public Builder setDelimiter(java.lang.String value) { * * *
      -     * If set, returns results in a directory-like mode. `items` will contain
      -     * only objects whose names, aside from the `prefix`, do not
      -     * contain `delimiter`. Objects whose names, aside from the
      -     * `prefix`, contain `delimiter` will have their name,
      -     * truncated after the `delimiter`, returned in
      -     * `prefixes`. Duplicate `prefixes` are omitted.
      +     * Optional. If set, returns results in a directory-like mode. `items` will
      +     * contain only objects whose names, aside from the `prefix`, do not contain
      +     * `delimiter`. Objects whose names, aside from the `prefix`, contain
      +     * `delimiter` will have their name, truncated after the `delimiter`, returned
      +     * in `prefixes`. Duplicate `prefixes` are omitted.
            * 
      * - * string delimiter = 4; + * string delimiter = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1691,15 +1685,14 @@ public Builder clearDelimiter() { * * *
      -     * If set, returns results in a directory-like mode. `items` will contain
      -     * only objects whose names, aside from the `prefix`, do not
      -     * contain `delimiter`. Objects whose names, aside from the
      -     * `prefix`, contain `delimiter` will have their name,
      -     * truncated after the `delimiter`, returned in
      -     * `prefixes`. Duplicate `prefixes` are omitted.
      +     * Optional. If set, returns results in a directory-like mode. `items` will
      +     * contain only objects whose names, aside from the `prefix`, do not contain
      +     * `delimiter`. Objects whose names, aside from the `prefix`, contain
      +     * `delimiter` will have their name, truncated after the `delimiter`, returned
      +     * in `prefixes`. Duplicate `prefixes` are omitted.
            * 
      * - * string delimiter = 4; + * string delimiter = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for delimiter to set. * @return This builder for chaining. @@ -1721,12 +1714,12 @@ public Builder setDelimiterBytes(com.google.protobuf.ByteString value) { * * *
      -     * If true, objects that end in exactly one instance of `delimiter`
      +     * Optional. If true, objects that end in exactly one instance of `delimiter`
            * will have their metadata included in `items` in addition to
            * `prefixes`.
            * 
      * - * bool include_trailing_delimiter = 5; + * bool include_trailing_delimiter = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The includeTrailingDelimiter. */ @@ -1739,12 +1732,12 @@ public boolean getIncludeTrailingDelimiter() { * * *
      -     * If true, objects that end in exactly one instance of `delimiter`
      +     * Optional. If true, objects that end in exactly one instance of `delimiter`
            * will have their metadata included in `items` in addition to
            * `prefixes`.
            * 
      * - * bool include_trailing_delimiter = 5; + * bool include_trailing_delimiter = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The includeTrailingDelimiter to set. * @return This builder for chaining. @@ -1761,12 +1754,12 @@ public Builder setIncludeTrailingDelimiter(boolean value) { * * *
      -     * If true, objects that end in exactly one instance of `delimiter`
      +     * Optional. If true, objects that end in exactly one instance of `delimiter`
            * will have their metadata included in `items` in addition to
            * `prefixes`.
            * 
      * - * bool include_trailing_delimiter = 5; + * bool include_trailing_delimiter = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1783,10 +1776,10 @@ public Builder clearIncludeTrailingDelimiter() { * * *
      -     * Filter results to objects whose names begin with this prefix.
      +     * Optional. Filter results to objects whose names begin with this prefix.
            * 
      * - * string prefix = 6; + * string prefix = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The prefix. */ @@ -1806,10 +1799,10 @@ public java.lang.String getPrefix() { * * *
      -     * Filter results to objects whose names begin with this prefix.
      +     * Optional. Filter results to objects whose names begin with this prefix.
            * 
      * - * string prefix = 6; + * string prefix = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for prefix. */ @@ -1829,10 +1822,10 @@ public com.google.protobuf.ByteString getPrefixBytes() { * * *
      -     * Filter results to objects whose names begin with this prefix.
      +     * Optional. Filter results to objects whose names begin with this prefix.
            * 
      * - * string prefix = 6; + * string prefix = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The prefix to set. * @return This builder for chaining. @@ -1851,10 +1844,10 @@ public Builder setPrefix(java.lang.String value) { * * *
      -     * Filter results to objects whose names begin with this prefix.
      +     * Optional. Filter results to objects whose names begin with this prefix.
            * 
      * - * string prefix = 6; + * string prefix = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1869,10 +1862,10 @@ public Builder clearPrefix() { * * *
      -     * Filter results to objects whose names begin with this prefix.
      +     * Optional. Filter results to objects whose names begin with this prefix.
            * 
      * - * string prefix = 6; + * string prefix = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for prefix to set. * @return This builder for chaining. @@ -1894,13 +1887,13 @@ public Builder setPrefixBytes(com.google.protobuf.ByteString value) { * * *
      -     * If `true`, lists all versions of an object as distinct results.
      +     * Optional. If `true`, lists all versions of an object as distinct results.
            * For more information, see
            * [Object
            * Versioning](https://cloud.google.com/storage/docs/object-versioning).
            * 
      * - * bool versions = 7; + * bool versions = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The versions. */ @@ -1913,13 +1906,13 @@ public boolean getVersions() { * * *
      -     * If `true`, lists all versions of an object as distinct results.
      +     * Optional. If `true`, lists all versions of an object as distinct results.
            * For more information, see
            * [Object
            * Versioning](https://cloud.google.com/storage/docs/object-versioning).
            * 
      * - * bool versions = 7; + * bool versions = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The versions to set. * @return This builder for chaining. @@ -1936,13 +1929,13 @@ public Builder setVersions(boolean value) { * * *
      -     * If `true`, lists all versions of an object as distinct results.
      +     * Optional. If `true`, lists all versions of an object as distinct results.
            * For more information, see
            * [Object
            * Versioning](https://cloud.google.com/storage/docs/object-versioning).
            * 
      * - * bool versions = 7; + * bool versions = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListObjectsRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListObjectsRequestOrBuilder.java index ebdde2dc36..7e3a016516 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListObjectsRequestOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ListObjectsRequestOrBuilder.java @@ -58,13 +58,13 @@ public interface ListObjectsRequestOrBuilder * * *
      -   * Maximum number of `items` plus `prefixes` to return
      +   * Optional. Maximum number of `items` plus `prefixes` to return
          * in a single page of responses. As duplicate `prefixes` are
          * omitted, fewer total results may be returned than requested. The service
          * will use this parameter or 1,000 items, whichever is smaller.
          * 
      * - * int32 page_size = 2; + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageSize. */ @@ -74,11 +74,11 @@ public interface ListObjectsRequestOrBuilder * * *
      -   * A previously-returned page token representing part of the larger set of
      -   * results to view.
      +   * Optional. A previously-returned page token representing part of the larger
      +   * set of results to view.
          * 
      * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The pageToken. */ @@ -88,11 +88,11 @@ public interface ListObjectsRequestOrBuilder * * *
      -   * A previously-returned page token representing part of the larger set of
      -   * results to view.
      +   * Optional. A previously-returned page token representing part of the larger
      +   * set of results to view.
          * 
      * - * string page_token = 3; + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for pageToken. */ @@ -102,15 +102,14 @@ public interface ListObjectsRequestOrBuilder * * *
      -   * If set, returns results in a directory-like mode. `items` will contain
      -   * only objects whose names, aside from the `prefix`, do not
      -   * contain `delimiter`. Objects whose names, aside from the
      -   * `prefix`, contain `delimiter` will have their name,
      -   * truncated after the `delimiter`, returned in
      -   * `prefixes`. Duplicate `prefixes` are omitted.
      +   * Optional. If set, returns results in a directory-like mode. `items` will
      +   * contain only objects whose names, aside from the `prefix`, do not contain
      +   * `delimiter`. Objects whose names, aside from the `prefix`, contain
      +   * `delimiter` will have their name, truncated after the `delimiter`, returned
      +   * in `prefixes`. Duplicate `prefixes` are omitted.
          * 
      * - * string delimiter = 4; + * string delimiter = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The delimiter. */ @@ -120,15 +119,14 @@ public interface ListObjectsRequestOrBuilder * * *
      -   * If set, returns results in a directory-like mode. `items` will contain
      -   * only objects whose names, aside from the `prefix`, do not
      -   * contain `delimiter`. Objects whose names, aside from the
      -   * `prefix`, contain `delimiter` will have their name,
      -   * truncated after the `delimiter`, returned in
      -   * `prefixes`. Duplicate `prefixes` are omitted.
      +   * Optional. If set, returns results in a directory-like mode. `items` will
      +   * contain only objects whose names, aside from the `prefix`, do not contain
      +   * `delimiter`. Objects whose names, aside from the `prefix`, contain
      +   * `delimiter` will have their name, truncated after the `delimiter`, returned
      +   * in `prefixes`. Duplicate `prefixes` are omitted.
          * 
      * - * string delimiter = 4; + * string delimiter = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for delimiter. */ @@ -138,12 +136,12 @@ public interface ListObjectsRequestOrBuilder * * *
      -   * If true, objects that end in exactly one instance of `delimiter`
      +   * Optional. If true, objects that end in exactly one instance of `delimiter`
          * will have their metadata included in `items` in addition to
          * `prefixes`.
          * 
      * - * bool include_trailing_delimiter = 5; + * bool include_trailing_delimiter = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The includeTrailingDelimiter. */ @@ -153,10 +151,10 @@ public interface ListObjectsRequestOrBuilder * * *
      -   * Filter results to objects whose names begin with this prefix.
      +   * Optional. Filter results to objects whose names begin with this prefix.
          * 
      * - * string prefix = 6; + * string prefix = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The prefix. */ @@ -166,10 +164,10 @@ public interface ListObjectsRequestOrBuilder * * *
      -   * Filter results to objects whose names begin with this prefix.
      +   * Optional. Filter results to objects whose names begin with this prefix.
          * 
      * - * string prefix = 6; + * string prefix = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for prefix. */ @@ -179,13 +177,13 @@ public interface ListObjectsRequestOrBuilder * * *
      -   * If `true`, lists all versions of an object as distinct results.
      +   * Optional. If `true`, lists all versions of an object as distinct results.
          * For more information, see
          * [Object
          * Versioning](https://cloud.google.com/storage/docs/object-versioning).
          * 
      * - * bool versions = 7; + * bool versions = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The versions. */ diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Object.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Object.java index 8c0946ac8a..de3b7edd02 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Object.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Object.java @@ -85,6 +85,1184 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl com.google.storage.v2.Object.class, com.google.storage.v2.Object.Builder.class); } + public interface RetentionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.storage.v2.Object.Retention) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +     * Optional. The mode of the Retention.
      +     * 
      + * + * + * .google.storage.v2.Object.Retention.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for mode. + */ + int getModeValue(); + + /** + * + * + *
      +     * Optional. The mode of the Retention.
      +     * 
      + * + * + * .google.storage.v2.Object.Retention.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mode. + */ + com.google.storage.v2.Object.Retention.Mode getMode(); + + /** + * + * + *
      +     * Optional. The timestamp that the object needs to be retained until.
      +     * Value cannot be set in the past or more than 100 years in the future.
      +     * 
      + * + * + * .google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the retainUntilTime field is set. + */ + boolean hasRetainUntilTime(); + + /** + * + * + *
      +     * Optional. The timestamp that the object needs to be retained until.
      +     * Value cannot be set in the past or more than 100 years in the future.
      +     * 
      + * + * + * .google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The retainUntilTime. + */ + com.google.protobuf.Timestamp getRetainUntilTime(); + + /** + * + * + *
      +     * Optional. The timestamp that the object needs to be retained until.
      +     * Value cannot be set in the past or more than 100 years in the future.
      +     * 
      + * + * + * .google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.TimestampOrBuilder getRetainUntilTimeOrBuilder(); + } + + /** + * + * + *
      +   * Specifies retention parameters of the object. Objects under retention
      +   * cannot be deleted or overwritten until their retention expires.
      +   * 
      + * + * Protobuf type {@code google.storage.v2.Object.Retention} + */ + public static final class Retention extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.storage.v2.Object.Retention) + RetentionOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Retention.newBuilder() to construct. + private Retention(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Retention() { + mode_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Retention(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.v2.StorageProto + .internal_static_google_storage_v2_Object_Retention_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.v2.StorageProto + .internal_static_google_storage_v2_Object_Retention_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.v2.Object.Retention.class, + com.google.storage.v2.Object.Retention.Builder.class); + } + + /** + * + * + *
      +     * Retention mode values.
      +     * 
      + * + * Protobuf enum {@code google.storage.v2.Object.Retention.Mode} + */ + public enum Mode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
      +       * No specified mode. Object is not under retention.
      +       * 
      + * + * MODE_UNSPECIFIED = 0; + */ + MODE_UNSPECIFIED(0), + /** + * + * + *
      +       * Retention period may be decreased or increased.
      +       * The Retention configuration may be removed.
      +       * The mode may be changed to locked.
      +       * 
      + * + * UNLOCKED = 1; + */ + UNLOCKED(1), + /** + * + * + *
      +       * Retention period may be increased.
      +       * The Retention configuration cannot be removed.
      +       * The mode cannot be changed.
      +       * 
      + * + * LOCKED = 2; + */ + LOCKED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
      +       * No specified mode. Object is not under retention.
      +       * 
      + * + * MODE_UNSPECIFIED = 0; + */ + public static final int MODE_UNSPECIFIED_VALUE = 0; + + /** + * + * + *
      +       * Retention period may be decreased or increased.
      +       * The Retention configuration may be removed.
      +       * The mode may be changed to locked.
      +       * 
      + * + * UNLOCKED = 1; + */ + public static final int UNLOCKED_VALUE = 1; + + /** + * + * + *
      +       * Retention period may be increased.
      +       * The Retention configuration cannot be removed.
      +       * The mode cannot be changed.
      +       * 
      + * + * LOCKED = 2; + */ + public static final int LOCKED_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Mode valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Mode forNumber(int value) { + switch (value) { + case 0: + return MODE_UNSPECIFIED; + case 1: + return UNLOCKED; + case 2: + return LOCKED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Mode findValueByNumber(int number) { + return Mode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.storage.v2.Object.Retention.getDescriptor().getEnumTypes().get(0); + } + + private static final Mode[] VALUES = values(); + + public static Mode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Mode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.storage.v2.Object.Retention.Mode) + } + + private int bitField0_; + public static final int MODE_FIELD_NUMBER = 1; + private int mode_ = 0; + + /** + * + * + *
      +     * Optional. The mode of the Retention.
      +     * 
      + * + * + * .google.storage.v2.Object.Retention.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override + public int getModeValue() { + return mode_; + } + + /** + * + * + *
      +     * Optional. The mode of the Retention.
      +     * 
      + * + * + * .google.storage.v2.Object.Retention.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mode. + */ + @java.lang.Override + public com.google.storage.v2.Object.Retention.Mode getMode() { + com.google.storage.v2.Object.Retention.Mode result = + com.google.storage.v2.Object.Retention.Mode.forNumber(mode_); + return result == null ? com.google.storage.v2.Object.Retention.Mode.UNRECOGNIZED : result; + } + + public static final int RETAIN_UNTIL_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp retainUntilTime_; + + /** + * + * + *
      +     * Optional. The timestamp that the object needs to be retained until.
      +     * Value cannot be set in the past or more than 100 years in the future.
      +     * 
      + * + * + * .google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the retainUntilTime field is set. + */ + @java.lang.Override + public boolean hasRetainUntilTime() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
      +     * Optional. The timestamp that the object needs to be retained until.
      +     * Value cannot be set in the past or more than 100 years in the future.
      +     * 
      + * + * + * .google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The retainUntilTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getRetainUntilTime() { + return retainUntilTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : retainUntilTime_; + } + + /** + * + * + *
      +     * Optional. The timestamp that the object needs to be retained until.
      +     * Value cannot be set in the past or more than 100 years in the future.
      +     * 
      + * + * + * .google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getRetainUntilTimeOrBuilder() { + return retainUntilTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : retainUntilTime_; + } + + 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 (mode_ != com.google.storage.v2.Object.Retention.Mode.MODE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, mode_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getRetainUntilTime()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (mode_ != com.google.storage.v2.Object.Retention.Mode.MODE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, mode_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRetainUntilTime()); + } + 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.Object.Retention)) { + return super.equals(obj); + } + com.google.storage.v2.Object.Retention other = (com.google.storage.v2.Object.Retention) obj; + + if (mode_ != other.mode_) return false; + if (hasRetainUntilTime() != other.hasRetainUntilTime()) return false; + if (hasRetainUntilTime()) { + if (!getRetainUntilTime().equals(other.getRetainUntilTime())) 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) + MODE_FIELD_NUMBER; + hash = (53 * hash) + mode_; + if (hasRetainUntilTime()) { + hash = (37 * hash) + RETAIN_UNTIL_TIME_FIELD_NUMBER; + hash = (53 * hash) + getRetainUntilTime().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.storage.v2.Object.Retention parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.v2.Object.Retention 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.Object.Retention parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.v2.Object.Retention 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.Object.Retention parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.storage.v2.Object.Retention parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.storage.v2.Object.Retention parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.v2.Object.Retention 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.Object.Retention parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.storage.v2.Object.Retention 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.Object.Retention parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.storage.v2.Object.Retention 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.Object.Retention 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; + } + + /** + * + * + *
      +     * Specifies retention parameters of the object. Objects under retention
      +     * cannot be deleted or overwritten until their retention expires.
      +     * 
      + * + * Protobuf type {@code google.storage.v2.Object.Retention} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.storage.v2.Object.Retention) + com.google.storage.v2.Object.RetentionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.storage.v2.StorageProto + .internal_static_google_storage_v2_Object_Retention_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.storage.v2.StorageProto + .internal_static_google_storage_v2_Object_Retention_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.storage.v2.Object.Retention.class, + com.google.storage.v2.Object.Retention.Builder.class); + } + + // Construct using com.google.storage.v2.Object.Retention.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getRetainUntilTimeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + mode_ = 0; + retainUntilTime_ = null; + if (retainUntilTimeBuilder_ != null) { + retainUntilTimeBuilder_.dispose(); + retainUntilTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.storage.v2.StorageProto + .internal_static_google_storage_v2_Object_Retention_descriptor; + } + + @java.lang.Override + public com.google.storage.v2.Object.Retention getDefaultInstanceForType() { + return com.google.storage.v2.Object.Retention.getDefaultInstance(); + } + + @java.lang.Override + public com.google.storage.v2.Object.Retention build() { + com.google.storage.v2.Object.Retention result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.storage.v2.Object.Retention buildPartial() { + com.google.storage.v2.Object.Retention result = + new com.google.storage.v2.Object.Retention(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.storage.v2.Object.Retention result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.mode_ = mode_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.retainUntilTime_ = + retainUntilTimeBuilder_ == null ? retainUntilTime_ : retainUntilTimeBuilder_.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.Object.Retention) { + return mergeFrom((com.google.storage.v2.Object.Retention) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.storage.v2.Object.Retention other) { + if (other == com.google.storage.v2.Object.Retention.getDefaultInstance()) return this; + if (other.mode_ != 0) { + setModeValue(other.getModeValue()); + } + if (other.hasRetainUntilTime()) { + mergeRetainUntilTime(other.getRetainUntilTime()); + } + 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 8: + { + mode_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + input.readMessage( + getRetainUntilTimeFieldBuilder().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 int mode_ = 0; + + /** + * + * + *
      +       * Optional. The mode of the Retention.
      +       * 
      + * + * + * .google.storage.v2.Object.Retention.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for mode. + */ + @java.lang.Override + public int getModeValue() { + return mode_; + } + + /** + * + * + *
      +       * Optional. The mode of the Retention.
      +       * 
      + * + * + * .google.storage.v2.Object.Retention.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for mode to set. + * @return This builder for chaining. + */ + public Builder setModeValue(int value) { + mode_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
      +       * Optional. The mode of the Retention.
      +       * 
      + * + * + * .google.storage.v2.Object.Retention.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The mode. + */ + @java.lang.Override + public com.google.storage.v2.Object.Retention.Mode getMode() { + com.google.storage.v2.Object.Retention.Mode result = + com.google.storage.v2.Object.Retention.Mode.forNumber(mode_); + return result == null ? com.google.storage.v2.Object.Retention.Mode.UNRECOGNIZED : result; + } + + /** + * + * + *
      +       * Optional. The mode of the Retention.
      +       * 
      + * + * + * .google.storage.v2.Object.Retention.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The mode to set. + * @return This builder for chaining. + */ + public Builder setMode(com.google.storage.v2.Object.Retention.Mode value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + mode_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
      +       * Optional. The mode of the Retention.
      +       * 
      + * + * + * .google.storage.v2.Object.Retention.Mode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearMode() { + bitField0_ = (bitField0_ & ~0x00000001); + mode_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp retainUntilTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + retainUntilTimeBuilder_; + + /** + * + * + *
      +       * Optional. The timestamp that the object needs to be retained until.
      +       * Value cannot be set in the past or more than 100 years in the future.
      +       * 
      + * + * + * .google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the retainUntilTime field is set. + */ + public boolean hasRetainUntilTime() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
      +       * Optional. The timestamp that the object needs to be retained until.
      +       * Value cannot be set in the past or more than 100 years in the future.
      +       * 
      + * + * + * .google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The retainUntilTime. + */ + public com.google.protobuf.Timestamp getRetainUntilTime() { + if (retainUntilTimeBuilder_ == null) { + return retainUntilTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : retainUntilTime_; + } else { + return retainUntilTimeBuilder_.getMessage(); + } + } + + /** + * + * + *
      +       * Optional. The timestamp that the object needs to be retained until.
      +       * Value cannot be set in the past or more than 100 years in the future.
      +       * 
      + * + * + * .google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRetainUntilTime(com.google.protobuf.Timestamp value) { + if (retainUntilTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + retainUntilTime_ = value; + } else { + retainUntilTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +       * Optional. The timestamp that the object needs to be retained until.
      +       * Value cannot be set in the past or more than 100 years in the future.
      +       * 
      + * + * + * .google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRetainUntilTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (retainUntilTimeBuilder_ == null) { + retainUntilTime_ = builderForValue.build(); + } else { + retainUntilTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
      +       * Optional. The timestamp that the object needs to be retained until.
      +       * Value cannot be set in the past or more than 100 years in the future.
      +       * 
      + * + * + * .google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRetainUntilTime(com.google.protobuf.Timestamp value) { + if (retainUntilTimeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && retainUntilTime_ != null + && retainUntilTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getRetainUntilTimeBuilder().mergeFrom(value); + } else { + retainUntilTime_ = value; + } + } else { + retainUntilTimeBuilder_.mergeFrom(value); + } + if (retainUntilTime_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + + /** + * + * + *
      +       * Optional. The timestamp that the object needs to be retained until.
      +       * Value cannot be set in the past or more than 100 years in the future.
      +       * 
      + * + * + * .google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRetainUntilTime() { + bitField0_ = (bitField0_ & ~0x00000002); + retainUntilTime_ = null; + if (retainUntilTimeBuilder_ != null) { + retainUntilTimeBuilder_.dispose(); + retainUntilTimeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +       * Optional. The timestamp that the object needs to be retained until.
      +       * Value cannot be set in the past or more than 100 years in the future.
      +       * 
      + * + * + * .google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Timestamp.Builder getRetainUntilTimeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRetainUntilTimeFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +       * Optional. The timestamp that the object needs to be retained until.
      +       * Value cannot be set in the past or more than 100 years in the future.
      +       * 
      + * + * + * .google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.TimestampOrBuilder getRetainUntilTimeOrBuilder() { + if (retainUntilTimeBuilder_ != null) { + return retainUntilTimeBuilder_.getMessageOrBuilder(); + } else { + return retainUntilTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : retainUntilTime_; + } + } + + /** + * + * + *
      +       * Optional. The timestamp that the object needs to be retained until.
      +       * Value cannot be set in the past or more than 100 years in the future.
      +       * 
      + * + * + * .google.protobuf.Timestamp retain_until_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getRetainUntilTimeFieldBuilder() { + if (retainUntilTimeBuilder_ == null) { + retainUntilTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getRetainUntilTime(), getParentForChildren(), isClean()); + retainUntilTime_ = null; + } + return retainUntilTimeBuilder_; + } + + @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.Object.Retention) + } + + // @@protoc_insertion_point(class_scope:google.storage.v2.Object.Retention) + private static final com.google.storage.v2.Object.Retention DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.storage.v2.Object.Retention(); + } + + public static com.google.storage.v2.Object.Retention getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Retention 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.Object.Retention getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; @@ -217,13 +1395,13 @@ public com.google.protobuf.ByteString getBucketBytes() { * * *
      -   * The etag of the object.
      +   * Optional. The etag of the object.
          * If included in the metadata of an update or delete request message, the
          * operation will only be performed if the etag matches that of the live
          * object.
          * 
      * - * string etag = 27; + * string etag = 27 [(.google.api.field_behavior) = OPTIONAL]; * * @return The etag. */ @@ -244,13 +1422,13 @@ public java.lang.String getEtag() { * * *
      -   * The etag of the object.
      +   * Optional. The etag of the object.
          * If included in the metadata of an update or delete request message, the
          * operation will only be performed if the etag matches that of the live
          * object.
          * 
      * - * string etag = 27; + * string etag = 27 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for etag. */ @@ -393,10 +1571,10 @@ public long getMetageneration() { * * *
      -   * Storage class of the object.
      +   * Optional. Storage class of the object.
          * 
      * - * string storage_class = 5; + * string storage_class = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The storageClass. */ @@ -417,10 +1595,10 @@ public java.lang.String getStorageClass() { * * *
      -   * Storage class of the object.
      +   * Optional. Storage class of the object.
          * 
      * - * string storage_class = 5; + * string storage_class = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for storageClass. */ @@ -466,11 +1644,11 @@ public long getSize() { * * *
      -   * Content-Encoding of the object data, matching
      +   * Optional. Content-Encoding of the object data, matching
          * [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2]
          * 
      * - * string content_encoding = 7; + * string content_encoding = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The contentEncoding. */ @@ -491,11 +1669,11 @@ public java.lang.String getContentEncoding() { * * *
      -   * Content-Encoding of the object data, matching
      +   * Optional. Content-Encoding of the object data, matching
          * [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2]
          * 
      * - * string content_encoding = 7; + * string content_encoding = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for contentEncoding. */ @@ -521,11 +1699,11 @@ public com.google.protobuf.ByteString getContentEncodingBytes() { * * *
      -   * Content-Disposition of the object data, matching
      +   * Optional. Content-Disposition of the object data, matching
          * [https://tools.ietf.org/html/rfc6266][RFC 6266].
          * 
      * - * string content_disposition = 8; + * string content_disposition = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The contentDisposition. */ @@ -546,11 +1724,11 @@ public java.lang.String getContentDisposition() { * * *
      -   * Content-Disposition of the object data, matching
      +   * Optional. Content-Disposition of the object data, matching
          * [https://tools.ietf.org/html/rfc6266][RFC 6266].
          * 
      * - * string content_disposition = 8; + * string content_disposition = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for contentDisposition. */ @@ -576,13 +1754,13 @@ public com.google.protobuf.ByteString getContentDispositionBytes() { * * *
      -   * Cache-Control directive for the object data, matching
      +   * Optional. Cache-Control directive for the object data, matching
          * [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2].
          * If omitted, and the object is accessible to all anonymous users, the
          * default will be `public, max-age=3600`.
          * 
      * - * string cache_control = 9; + * string cache_control = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return The cacheControl. */ @@ -603,13 +1781,13 @@ public java.lang.String getCacheControl() { * * *
      -   * Cache-Control directive for the object data, matching
      +   * Optional. Cache-Control directive for the object data, matching
          * [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2].
          * If omitted, and the object is accessible to all anonymous users, the
          * default will be `public, max-age=3600`.
          * 
      * - * string cache_control = 9; + * string cache_control = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for cacheControl. */ @@ -635,12 +1813,14 @@ public com.google.protobuf.ByteString getCacheControlBytes() { * * *
      -   * Access controls on the object.
      +   * Optional. Access controls on the object.
          * If iam_config.uniform_bucket_level_access is enabled on the parent
          * bucket, requests to set, read, or modify acl is an error.
          * 
      * - * repeated .google.storage.v2.ObjectAccessControl acl = 10; + * + * repeated .google.storage.v2.ObjectAccessControl acl = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public java.util.List getAclList() { @@ -651,12 +1831,14 @@ public java.util.List getAclList() { * * *
      -   * Access controls on the object.
      +   * Optional. Access controls on the object.
          * If iam_config.uniform_bucket_level_access is enabled on the parent
          * bucket, requests to set, read, or modify acl is an error.
          * 
      * - * repeated .google.storage.v2.ObjectAccessControl acl = 10; + * + * repeated .google.storage.v2.ObjectAccessControl acl = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public java.util.List @@ -668,12 +1850,14 @@ public java.util.List getAclList() { * * *
      -   * Access controls on the object.
      +   * Optional. Access controls on the object.
          * If iam_config.uniform_bucket_level_access is enabled on the parent
          * bucket, requests to set, read, or modify acl is an error.
          * 
      * - * repeated .google.storage.v2.ObjectAccessControl acl = 10; + * + * repeated .google.storage.v2.ObjectAccessControl acl = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public int getAclCount() { @@ -684,12 +1868,14 @@ public int getAclCount() { * * *
      -   * Access controls on the object.
      +   * Optional. Access controls on the object.
          * If iam_config.uniform_bucket_level_access is enabled on the parent
          * bucket, requests to set, read, or modify acl is an error.
          * 
      * - * repeated .google.storage.v2.ObjectAccessControl acl = 10; + * + * repeated .google.storage.v2.ObjectAccessControl acl = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.ObjectAccessControl getAcl(int index) { @@ -700,12 +1886,14 @@ public com.google.storage.v2.ObjectAccessControl getAcl(int index) { * * *
      -   * Access controls on the object.
      +   * Optional. Access controls on the object.
          * If iam_config.uniform_bucket_level_access is enabled on the parent
          * bucket, requests to set, read, or modify acl is an error.
          * 
      * - * repeated .google.storage.v2.ObjectAccessControl acl = 10; + * + * repeated .google.storage.v2.ObjectAccessControl acl = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.ObjectAccessControlOrBuilder getAclOrBuilder(int index) { @@ -721,11 +1909,11 @@ public com.google.storage.v2.ObjectAccessControlOrBuilder getAclOrBuilder(int in * * *
      -   * Content-Language of the object data, matching
      +   * Optional. Content-Language of the object data, matching
          * [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2].
          * 
      * - * string content_language = 11; + * string content_language = 11 [(.google.api.field_behavior) = OPTIONAL]; * * @return The contentLanguage. */ @@ -746,11 +1934,11 @@ public java.lang.String getContentLanguage() { * * *
      -   * Content-Language of the object data, matching
      +   * Optional. Content-Language of the object data, matching
          * [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2].
          * 
      * - * string content_language = 11; + * string content_language = 11 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for contentLanguage. */ @@ -890,13 +2078,13 @@ public com.google.protobuf.TimestampOrBuilder getFinalizeTimeOrBuilder() { * * *
      -   * Content-Type of the object data, matching
      +   * Optional. Content-Type of the object data, matching
          * [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5].
          * If an object is stored without a Content-Type, it is served as
          * `application/octet-stream`.
          * 
      * - * string content_type = 13; + * string content_type = 13 [(.google.api.field_behavior) = OPTIONAL]; * * @return The contentType. */ @@ -917,13 +2105,13 @@ public java.lang.String getContentType() { * * *
      -   * Content-Type of the object data, matching
      +   * Optional. Content-Type of the object data, matching
          * [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5].
          * If an object is stored without a Content-Type, it is served as
          * `application/octet-stream`.
          * 
      * - * string content_type = 13; + * string content_type = 13 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for contentType. */ @@ -1159,11 +2347,13 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * * *
      -   * Cloud KMS Key used to encrypt this object, if the object is encrypted by
      -   * such a key.
      +   * Optional. Cloud KMS Key used to encrypt this object, if the object is
      +   * encrypted by such a key.
          * 
      * - * string kms_key = 18 [(.google.api.resource_reference) = { ... } + * + * string kms_key = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The kmsKey. */ @@ -1184,11 +2374,13 @@ public java.lang.String getKmsKey() { * * *
      -   * Cloud KMS Key used to encrypt this object, if the object is encrypted by
      -   * such a key.
      +   * Optional. Cloud KMS Key used to encrypt this object, if the object is
      +   * encrypted by such a key.
          * 
      * - * string kms_key = 18 [(.google.api.resource_reference) = { ... } + * + * string kms_key = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for kmsKey. */ @@ -1274,14 +2466,15 @@ public com.google.protobuf.TimestampOrBuilder getUpdateStorageClassTimeOrBuilder * * *
      -   * Whether an object is under temporary hold. While this flag is set to true,
      -   * the object is protected against deletion and overwrites.  A common use case
      -   * of this flag is regulatory investigations where objects need to be retained
      -   * while the investigation is ongoing. Note that unlike event-based hold,
      -   * temporary hold does not impact retention expiration time of an object.
      +   * Optional. Whether an object is under temporary hold. While this flag is set
      +   * to true, the object is protected against deletion and overwrites.  A common
      +   * use case of this flag is regulatory investigations where objects need to be
      +   * retained while the investigation is ongoing. Note that unlike event-based
      +   * hold, temporary hold does not impact retention expiration time of an
      +   * object.
          * 
      * - * bool temporary_hold = 20; + * bool temporary_hold = 20 [(.google.api.field_behavior) = OPTIONAL]; * * @return The temporaryHold. */ @@ -1297,16 +2490,17 @@ public boolean getTemporaryHold() { * * *
      -   * A server-determined value that specifies the earliest time that the
      -   * object's retention period expires.
      -   * Note 1: This field is not provided for objects with an active event-based
      -   * hold, since retention expiration is unknown until the hold is removed.
      -   * Note 2: This value can be provided even when temporary hold is set (so that
      -   * the user can reason about policy without having to first unset the
      -   * temporary hold).
      +   * Optional. A server-determined value that specifies the earliest time that
      +   * the object's retention period expires. Note 1: This field is not provided
      +   * for objects with an active event-based hold, since retention expiration is
      +   * unknown until the hold is removed. Note 2: This value can be provided even
      +   * when temporary hold is set (so that the user can reason about policy
      +   * without having to first unset the temporary hold).
          * 
      * - * .google.protobuf.Timestamp retention_expire_time = 21; + * + * .google.protobuf.Timestamp retention_expire_time = 21 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the retentionExpireTime field is set. */ @@ -1319,16 +2513,17 @@ public boolean hasRetentionExpireTime() { * * *
      -   * A server-determined value that specifies the earliest time that the
      -   * object's retention period expires.
      -   * Note 1: This field is not provided for objects with an active event-based
      -   * hold, since retention expiration is unknown until the hold is removed.
      -   * Note 2: This value can be provided even when temporary hold is set (so that
      -   * the user can reason about policy without having to first unset the
      -   * temporary hold).
      +   * Optional. A server-determined value that specifies the earliest time that
      +   * the object's retention period expires. Note 1: This field is not provided
      +   * for objects with an active event-based hold, since retention expiration is
      +   * unknown until the hold is removed. Note 2: This value can be provided even
      +   * when temporary hold is set (so that the user can reason about policy
      +   * without having to first unset the temporary hold).
          * 
      * - * .google.protobuf.Timestamp retention_expire_time = 21; + * + * .google.protobuf.Timestamp retention_expire_time = 21 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The retentionExpireTime. */ @@ -1343,16 +2538,17 @@ public com.google.protobuf.Timestamp getRetentionExpireTime() { * * *
      -   * A server-determined value that specifies the earliest time that the
      -   * object's retention period expires.
      -   * Note 1: This field is not provided for objects with an active event-based
      -   * hold, since retention expiration is unknown until the hold is removed.
      -   * Note 2: This value can be provided even when temporary hold is set (so that
      -   * the user can reason about policy without having to first unset the
      -   * temporary hold).
      +   * Optional. A server-determined value that specifies the earliest time that
      +   * the object's retention period expires. Note 1: This field is not provided
      +   * for objects with an active event-based hold, since retention expiration is
      +   * unknown until the hold is removed. Note 2: This value can be provided even
      +   * when temporary hold is set (so that the user can reason about policy
      +   * without having to first unset the temporary hold).
          * 
      * - * .google.protobuf.Timestamp retention_expire_time = 21; + * + * .google.protobuf.Timestamp retention_expire_time = 21 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getRetentionExpireTimeOrBuilder() { @@ -1392,10 +2588,10 @@ public int getMetadataCount() { * * *
      -   * User-provided metadata, in key/value pairs.
      +   * Optional. User-provided metadata, in key/value pairs.
          * 
      * - * map<string, string> metadata = 22; + * map<string, string> metadata = 22 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public boolean containsMetadata(java.lang.String key) { @@ -1416,10 +2612,10 @@ public java.util.Map getMetadata() { * * *
      -   * User-provided metadata, in key/value pairs.
      +   * Optional. User-provided metadata, in key/value pairs.
          * 
      * - * map<string, string> metadata = 22; + * map<string, string> metadata = 22 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public java.util.Map getMetadataMap() { @@ -1430,10 +2626,10 @@ public java.util.Map getMetadataMap() { * * *
      -   * User-provided metadata, in key/value pairs.
      +   * Optional. User-provided metadata, in key/value pairs.
          * 
      * - * map<string, string> metadata = 22; + * map<string, string> metadata = 22 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public /* nullable */ java.lang.String getMetadataOrDefault( @@ -1451,10 +2647,10 @@ public java.util.Map getMetadataMap() { * * *
      -   * User-provided metadata, in key/value pairs.
      +   * Optional. User-provided metadata, in key/value pairs.
          * 
      * - * map<string, string> metadata = 22; + * map<string, string> metadata = 22 [(.google.api.field_behavior) = OPTIONAL]; */ @java.lang.Override public java.lang.String getMetadataOrThrow(java.lang.String key) { @@ -1582,11 +2778,13 @@ public com.google.storage.v2.OwnerOrBuilder getOwnerOrBuilder() { * * *
      -   * Metadata of Customer-Supplied Encryption Key, if the object is encrypted by
      -   * such a key.
      +   * Optional. Metadata of Customer-Supplied Encryption Key, if the object is
      +   * encrypted by such a key.
          * 
      * - * .google.storage.v2.CustomerEncryption customer_encryption = 25; + * + * .google.storage.v2.CustomerEncryption customer_encryption = 25 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the customerEncryption field is set. */ @@ -1599,11 +2797,13 @@ public boolean hasCustomerEncryption() { * * *
      -   * Metadata of Customer-Supplied Encryption Key, if the object is encrypted by
      -   * such a key.
      +   * Optional. Metadata of Customer-Supplied Encryption Key, if the object is
      +   * encrypted by such a key.
          * 
      * - * .google.storage.v2.CustomerEncryption customer_encryption = 25; + * + * .google.storage.v2.CustomerEncryption customer_encryption = 25 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The customerEncryption. */ @@ -1618,11 +2818,13 @@ public com.google.storage.v2.CustomerEncryption getCustomerEncryption() { * * *
      -   * Metadata of Customer-Supplied Encryption Key, if the object is encrypted by
      -   * such a key.
      +   * Optional. Metadata of Customer-Supplied Encryption Key, if the object is
      +   * encrypted by such a key.
          * 
      * - * .google.storage.v2.CustomerEncryption customer_encryption = 25; + * + * .google.storage.v2.CustomerEncryption customer_encryption = 25 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.CustomerEncryptionOrBuilder getCustomerEncryptionOrBuilder() { @@ -1638,10 +2840,11 @@ public com.google.storage.v2.CustomerEncryptionOrBuilder getCustomerEncryptionOr * * *
      -   * A user-specified timestamp set on an object.
      +   * Optional. A user-specified timestamp set on an object.
          * 
      * - * .google.protobuf.Timestamp custom_time = 26; + * .google.protobuf.Timestamp custom_time = 26 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the customTime field is set. */ @@ -1654,10 +2857,11 @@ public boolean hasCustomTime() { * * *
      -   * A user-specified timestamp set on an object.
      +   * Optional. A user-specified timestamp set on an object.
          * 
      * - * .google.protobuf.Timestamp custom_time = 26; + * .google.protobuf.Timestamp custom_time = 26 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The customTime. */ @@ -1670,10 +2874,11 @@ public com.google.protobuf.Timestamp getCustomTime() { * * *
      -   * A user-specified timestamp set on an object.
      +   * Optional. A user-specified timestamp set on an object.
          * 
      * - * .google.protobuf.Timestamp custom_time = 26; + * .google.protobuf.Timestamp custom_time = 26 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getCustomTimeOrBuilder() { @@ -1786,34 +2991,96 @@ public boolean hasHardDeleteTime() { * optional .google.protobuf.Timestamp hard_delete_time = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; *
      * - * @return The hardDeleteTime. + * @return The hardDeleteTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getHardDeleteTime() { + return hardDeleteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : hardDeleteTime_; + } + + /** + * + * + *
      +   * Output only. The time when the object will be permanently deleted.
      +   *
      +   * Only set when an object becomes soft-deleted with a soft_delete_policy.
      +   * Otherwise, the object will not be accessible.
      +   * 
      + * + * + * optional .google.protobuf.Timestamp hard_delete_time = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getHardDeleteTimeOrBuilder() { + return hardDeleteTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : hardDeleteTime_; + } + + public static final int RETENTION_FIELD_NUMBER = 30; + private com.google.storage.v2.Object.Retention retention_; + + /** + * + * + *
      +   * Optional. Retention configuration of this object.
      +   * May only be configured if the bucket has object retention enabled.
      +   * 
      + * + * + * .google.storage.v2.Object.Retention retention = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the retention field is set. + */ + @java.lang.Override + public boolean hasRetention() { + return ((bitField0_ & 0x00004000) != 0); + } + + /** + * + * + *
      +   * Optional. Retention configuration of this object.
      +   * May only be configured if the bucket has object retention enabled.
      +   * 
      + * + * + * .google.storage.v2.Object.Retention retention = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The retention. */ @java.lang.Override - public com.google.protobuf.Timestamp getHardDeleteTime() { - return hardDeleteTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : hardDeleteTime_; + public com.google.storage.v2.Object.Retention getRetention() { + return retention_ == null + ? com.google.storage.v2.Object.Retention.getDefaultInstance() + : retention_; } /** * * *
      -   * Output only. The time when the object will be permanently deleted.
      -   *
      -   * Only set when an object becomes soft-deleted with a soft_delete_policy.
      -   * Otherwise, the object will not be accessible.
      +   * Optional. Retention configuration of this object.
      +   * May only be configured if the bucket has object retention enabled.
          * 
      * * - * optional .google.protobuf.Timestamp hard_delete_time = 29 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.storage.v2.Object.Retention retention = 30 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getHardDeleteTimeOrBuilder() { - return hardDeleteTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : hardDeleteTime_; + public com.google.storage.v2.Object.RetentionOrBuilder getRetentionOrBuilder() { + return retention_ == null + ? com.google.storage.v2.Object.Retention.getDefaultInstance() + : retention_; } private byte memoizedIsInitialized = -1; @@ -1916,6 +3183,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00002000) != 0)) { output.writeMessage(29, getHardDeleteTime()); } + if (((bitField0_ & 0x00004000) != 0)) { + output.writeMessage(30, getRetention()); + } if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 35, restoreToken_); } @@ -2027,6 +3297,9 @@ public int getSerializedSize() { if (((bitField0_ & 0x00002000) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(29, getHardDeleteTime()); } + if (((bitField0_ & 0x00004000) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(30, getRetention()); + } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(35, restoreToken_); } @@ -2121,6 +3394,10 @@ public boolean equals(final java.lang.Object obj) { if (hasHardDeleteTime()) { if (!getHardDeleteTime().equals(other.getHardDeleteTime())) return false; } + if (hasRetention() != other.hasRetention()) return false; + if (hasRetention()) { + if (!getRetention().equals(other.getRetention())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2226,6 +3503,10 @@ public int hashCode() { hash = (37 * hash) + HARD_DELETE_TIME_FIELD_NUMBER; hash = (53 * hash) + getHardDeleteTime().hashCode(); } + if (hasRetention()) { + hash = (37 * hash) + RETENTION_FIELD_NUMBER; + hash = (53 * hash) + getRetention().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -2399,6 +3680,7 @@ private void maybeForceBuilderInitialization() { getCustomTimeFieldBuilder(); getSoftDeleteTimeFieldBuilder(); getHardDeleteTimeFieldBuilder(); + getRetentionFieldBuilder(); } } @@ -2491,6 +3773,11 @@ public Builder clear() { hardDeleteTimeBuilder_.dispose(); hardDeleteTimeBuilder_ = null; } + retention_ = null; + if (retentionBuilder_ != null) { + retentionBuilder_.dispose(); + retentionBuilder_ = null; + } return this; } @@ -2656,6 +3943,10 @@ private void buildPartial0(com.google.storage.v2.Object result) { hardDeleteTimeBuilder_ == null ? hardDeleteTime_ : hardDeleteTimeBuilder_.build(); to_bitField0_ |= 0x00002000; } + if (((from_bitField0_ & 0x80000000) != 0)) { + result.retention_ = retentionBuilder_ == null ? retention_ : retentionBuilder_.build(); + to_bitField0_ |= 0x00004000; + } result.bitField0_ |= to_bitField0_; } @@ -2842,6 +4133,9 @@ public Builder mergeFrom(com.google.storage.v2.Object other) { if (other.hasHardDeleteTime()) { mergeHardDeleteTime(other.getHardDeleteTime()); } + if (other.hasRetention()) { + mergeRetention(other.getRetention()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -3058,6 +4352,12 @@ public Builder mergeFrom( bitField0_ |= 0x40000000; break; } // case 234 + case 242: + { + input.readMessage(getRetentionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x80000000; + break; + } // case 242 case 282: { restoreToken_ = input.readStringRequireUtf8(); @@ -3357,13 +4657,13 @@ public Builder setBucketBytes(com.google.protobuf.ByteString value) { * * *
      -     * The etag of the object.
      +     * Optional. The etag of the object.
            * If included in the metadata of an update or delete request message, the
            * operation will only be performed if the etag matches that of the live
            * object.
            * 
      * - * string etag = 27; + * string etag = 27 [(.google.api.field_behavior) = OPTIONAL]; * * @return The etag. */ @@ -3383,13 +4683,13 @@ public java.lang.String getEtag() { * * *
      -     * The etag of the object.
      +     * Optional. The etag of the object.
            * If included in the metadata of an update or delete request message, the
            * operation will only be performed if the etag matches that of the live
            * object.
            * 
      * - * string etag = 27; + * string etag = 27 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for etag. */ @@ -3409,13 +4709,13 @@ public com.google.protobuf.ByteString getEtagBytes() { * * *
      -     * The etag of the object.
      +     * Optional. The etag of the object.
            * If included in the metadata of an update or delete request message, the
            * operation will only be performed if the etag matches that of the live
            * object.
            * 
      * - * string etag = 27; + * string etag = 27 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The etag to set. * @return This builder for chaining. @@ -3434,13 +4734,13 @@ public Builder setEtag(java.lang.String value) { * * *
      -     * The etag of the object.
      +     * Optional. The etag of the object.
            * If included in the metadata of an update or delete request message, the
            * operation will only be performed if the etag matches that of the live
            * object.
            * 
      * - * string etag = 27; + * string etag = 27 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -3455,13 +4755,13 @@ public Builder clearEtag() { * * *
      -     * The etag of the object.
      +     * Optional. The etag of the object.
            * If included in the metadata of an update or delete request message, the
            * operation will only be performed if the etag matches that of the live
            * object.
            * 
      * - * string etag = 27; + * string etag = 27 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for etag to set. * @return This builder for chaining. @@ -3745,10 +5045,10 @@ public Builder clearMetageneration() { * * *
      -     * Storage class of the object.
      +     * Optional. Storage class of the object.
            * 
      * - * string storage_class = 5; + * string storage_class = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The storageClass. */ @@ -3768,10 +5068,10 @@ public java.lang.String getStorageClass() { * * *
      -     * Storage class of the object.
      +     * Optional. Storage class of the object.
            * 
      * - * string storage_class = 5; + * string storage_class = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for storageClass. */ @@ -3791,10 +5091,10 @@ public com.google.protobuf.ByteString getStorageClassBytes() { * * *
      -     * Storage class of the object.
      +     * Optional. Storage class of the object.
            * 
      * - * string storage_class = 5; + * string storage_class = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The storageClass to set. * @return This builder for chaining. @@ -3813,10 +5113,10 @@ public Builder setStorageClass(java.lang.String value) { * * *
      -     * Storage class of the object.
      +     * Optional. Storage class of the object.
            * 
      * - * string storage_class = 5; + * string storage_class = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -3831,10 +5131,10 @@ public Builder clearStorageClass() { * * *
      -     * Storage class of the object.
      +     * Optional. Storage class of the object.
            * 
      * - * string storage_class = 5; + * string storage_class = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for storageClass to set. * @return This builder for chaining. @@ -3915,11 +5215,11 @@ public Builder clearSize() { * * *
      -     * Content-Encoding of the object data, matching
      +     * Optional. Content-Encoding of the object data, matching
            * [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2]
            * 
      * - * string content_encoding = 7; + * string content_encoding = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The contentEncoding. */ @@ -3939,11 +5239,11 @@ public java.lang.String getContentEncoding() { * * *
      -     * Content-Encoding of the object data, matching
      +     * Optional. Content-Encoding of the object data, matching
            * [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2]
            * 
      * - * string content_encoding = 7; + * string content_encoding = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for contentEncoding. */ @@ -3963,11 +5263,11 @@ public com.google.protobuf.ByteString getContentEncodingBytes() { * * *
      -     * Content-Encoding of the object data, matching
      +     * Optional. Content-Encoding of the object data, matching
            * [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2]
            * 
      * - * string content_encoding = 7; + * string content_encoding = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The contentEncoding to set. * @return This builder for chaining. @@ -3986,11 +5286,11 @@ public Builder setContentEncoding(java.lang.String value) { * * *
      -     * Content-Encoding of the object data, matching
      +     * Optional. Content-Encoding of the object data, matching
            * [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2]
            * 
      * - * string content_encoding = 7; + * string content_encoding = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -4005,11 +5305,11 @@ public Builder clearContentEncoding() { * * *
      -     * Content-Encoding of the object data, matching
      +     * Optional. Content-Encoding of the object data, matching
            * [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2]
            * 
      * - * string content_encoding = 7; + * string content_encoding = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for contentEncoding to set. * @return This builder for chaining. @@ -4031,11 +5331,11 @@ public Builder setContentEncodingBytes(com.google.protobuf.ByteString value) { * * *
      -     * Content-Disposition of the object data, matching
      +     * Optional. Content-Disposition of the object data, matching
            * [https://tools.ietf.org/html/rfc6266][RFC 6266].
            * 
      * - * string content_disposition = 8; + * string content_disposition = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The contentDisposition. */ @@ -4055,11 +5355,11 @@ public java.lang.String getContentDisposition() { * * *
      -     * Content-Disposition of the object data, matching
      +     * Optional. Content-Disposition of the object data, matching
            * [https://tools.ietf.org/html/rfc6266][RFC 6266].
            * 
      * - * string content_disposition = 8; + * string content_disposition = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for contentDisposition. */ @@ -4079,11 +5379,11 @@ public com.google.protobuf.ByteString getContentDispositionBytes() { * * *
      -     * Content-Disposition of the object data, matching
      +     * Optional. Content-Disposition of the object data, matching
            * [https://tools.ietf.org/html/rfc6266][RFC 6266].
            * 
      * - * string content_disposition = 8; + * string content_disposition = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The contentDisposition to set. * @return This builder for chaining. @@ -4102,11 +5402,11 @@ public Builder setContentDisposition(java.lang.String value) { * * *
      -     * Content-Disposition of the object data, matching
      +     * Optional. Content-Disposition of the object data, matching
            * [https://tools.ietf.org/html/rfc6266][RFC 6266].
            * 
      * - * string content_disposition = 8; + * string content_disposition = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -4121,11 +5421,11 @@ public Builder clearContentDisposition() { * * *
      -     * Content-Disposition of the object data, matching
      +     * Optional. Content-Disposition of the object data, matching
            * [https://tools.ietf.org/html/rfc6266][RFC 6266].
            * 
      * - * string content_disposition = 8; + * string content_disposition = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for contentDisposition to set. * @return This builder for chaining. @@ -4147,13 +5447,13 @@ public Builder setContentDispositionBytes(com.google.protobuf.ByteString value) * * *
      -     * Cache-Control directive for the object data, matching
      +     * Optional. Cache-Control directive for the object data, matching
            * [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2].
            * If omitted, and the object is accessible to all anonymous users, the
            * default will be `public, max-age=3600`.
            * 
      * - * string cache_control = 9; + * string cache_control = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return The cacheControl. */ @@ -4173,13 +5473,13 @@ public java.lang.String getCacheControl() { * * *
      -     * Cache-Control directive for the object data, matching
      +     * Optional. Cache-Control directive for the object data, matching
            * [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2].
            * If omitted, and the object is accessible to all anonymous users, the
            * default will be `public, max-age=3600`.
            * 
      * - * string cache_control = 9; + * string cache_control = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for cacheControl. */ @@ -4199,13 +5499,13 @@ public com.google.protobuf.ByteString getCacheControlBytes() { * * *
      -     * Cache-Control directive for the object data, matching
      +     * Optional. Cache-Control directive for the object data, matching
            * [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2].
            * If omitted, and the object is accessible to all anonymous users, the
            * default will be `public, max-age=3600`.
            * 
      * - * string cache_control = 9; + * string cache_control = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The cacheControl to set. * @return This builder for chaining. @@ -4224,13 +5524,13 @@ public Builder setCacheControl(java.lang.String value) { * * *
      -     * Cache-Control directive for the object data, matching
      +     * Optional. Cache-Control directive for the object data, matching
            * [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2].
            * If omitted, and the object is accessible to all anonymous users, the
            * default will be `public, max-age=3600`.
            * 
      * - * string cache_control = 9; + * string cache_control = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -4245,13 +5545,13 @@ public Builder clearCacheControl() { * * *
      -     * Cache-Control directive for the object data, matching
      +     * Optional. Cache-Control directive for the object data, matching
            * [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2].
            * If omitted, and the object is accessible to all anonymous users, the
            * default will be `public, max-age=3600`.
            * 
      * - * string cache_control = 9; + * string cache_control = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for cacheControl to set. * @return This builder for chaining. @@ -4287,12 +5587,14 @@ private void ensureAclIsMutable() { * * *
      -     * Access controls on the object.
      +     * Optional. Access controls on the object.
            * If iam_config.uniform_bucket_level_access is enabled on the parent
            * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl acl = 10; + * + * repeated .google.storage.v2.ObjectAccessControl acl = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public java.util.List getAclList() { if (aclBuilder_ == null) { @@ -4306,12 +5608,14 @@ public java.util.List getAclList() { * * *
      -     * Access controls on the object.
      +     * Optional. Access controls on the object.
            * If iam_config.uniform_bucket_level_access is enabled on the parent
            * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl acl = 10; + * + * repeated .google.storage.v2.ObjectAccessControl acl = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public int getAclCount() { if (aclBuilder_ == null) { @@ -4325,12 +5629,14 @@ public int getAclCount() { * * *
      -     * Access controls on the object.
      +     * Optional. Access controls on the object.
            * If iam_config.uniform_bucket_level_access is enabled on the parent
            * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl acl = 10; + * + * repeated .google.storage.v2.ObjectAccessControl acl = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.ObjectAccessControl getAcl(int index) { if (aclBuilder_ == null) { @@ -4344,12 +5650,14 @@ public com.google.storage.v2.ObjectAccessControl getAcl(int index) { * * *
      -     * Access controls on the object.
      +     * Optional. Access controls on the object.
            * If iam_config.uniform_bucket_level_access is enabled on the parent
            * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl acl = 10; + * + * repeated .google.storage.v2.ObjectAccessControl acl = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setAcl(int index, com.google.storage.v2.ObjectAccessControl value) { if (aclBuilder_ == null) { @@ -4369,12 +5677,14 @@ public Builder setAcl(int index, com.google.storage.v2.ObjectAccessControl value * * *
      -     * Access controls on the object.
      +     * Optional. Access controls on the object.
            * If iam_config.uniform_bucket_level_access is enabled on the parent
            * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl acl = 10; + * + * repeated .google.storage.v2.ObjectAccessControl acl = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setAcl( int index, com.google.storage.v2.ObjectAccessControl.Builder builderForValue) { @@ -4392,12 +5702,14 @@ public Builder setAcl( * * *
      -     * Access controls on the object.
      +     * Optional. Access controls on the object.
            * If iam_config.uniform_bucket_level_access is enabled on the parent
            * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl acl = 10; + * + * repeated .google.storage.v2.ObjectAccessControl acl = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder addAcl(com.google.storage.v2.ObjectAccessControl value) { if (aclBuilder_ == null) { @@ -4417,12 +5729,14 @@ public Builder addAcl(com.google.storage.v2.ObjectAccessControl value) { * * *
      -     * Access controls on the object.
      +     * Optional. Access controls on the object.
            * If iam_config.uniform_bucket_level_access is enabled on the parent
            * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl acl = 10; + * + * repeated .google.storage.v2.ObjectAccessControl acl = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder addAcl(int index, com.google.storage.v2.ObjectAccessControl value) { if (aclBuilder_ == null) { @@ -4442,12 +5756,14 @@ public Builder addAcl(int index, com.google.storage.v2.ObjectAccessControl value * * *
      -     * Access controls on the object.
      +     * Optional. Access controls on the object.
            * If iam_config.uniform_bucket_level_access is enabled on the parent
            * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl acl = 10; + * + * repeated .google.storage.v2.ObjectAccessControl acl = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder addAcl(com.google.storage.v2.ObjectAccessControl.Builder builderForValue) { if (aclBuilder_ == null) { @@ -4464,12 +5780,14 @@ public Builder addAcl(com.google.storage.v2.ObjectAccessControl.Builder builderF * * *
      -     * Access controls on the object.
      +     * Optional. Access controls on the object.
            * If iam_config.uniform_bucket_level_access is enabled on the parent
            * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl acl = 10; + * + * repeated .google.storage.v2.ObjectAccessControl acl = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder addAcl( int index, com.google.storage.v2.ObjectAccessControl.Builder builderForValue) { @@ -4487,12 +5805,14 @@ public Builder addAcl( * * *
      -     * Access controls on the object.
      +     * Optional. Access controls on the object.
            * If iam_config.uniform_bucket_level_access is enabled on the parent
            * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl acl = 10; + * + * repeated .google.storage.v2.ObjectAccessControl acl = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder addAllAcl( java.lang.Iterable values) { @@ -4510,12 +5830,14 @@ public Builder addAllAcl( * * *
      -     * Access controls on the object.
      +     * Optional. Access controls on the object.
            * If iam_config.uniform_bucket_level_access is enabled on the parent
            * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl acl = 10; + * + * repeated .google.storage.v2.ObjectAccessControl acl = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearAcl() { if (aclBuilder_ == null) { @@ -4532,12 +5854,14 @@ public Builder clearAcl() { * * *
      -     * Access controls on the object.
      +     * Optional. Access controls on the object.
            * If iam_config.uniform_bucket_level_access is enabled on the parent
            * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl acl = 10; + * + * repeated .google.storage.v2.ObjectAccessControl acl = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder removeAcl(int index) { if (aclBuilder_ == null) { @@ -4554,12 +5878,14 @@ public Builder removeAcl(int index) { * * *
      -     * Access controls on the object.
      +     * Optional. Access controls on the object.
            * If iam_config.uniform_bucket_level_access is enabled on the parent
            * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl acl = 10; + * + * repeated .google.storage.v2.ObjectAccessControl acl = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.ObjectAccessControl.Builder getAclBuilder(int index) { return getAclFieldBuilder().getBuilder(index); @@ -4569,12 +5895,14 @@ public com.google.storage.v2.ObjectAccessControl.Builder getAclBuilder(int index * * *
      -     * Access controls on the object.
      +     * Optional. Access controls on the object.
            * If iam_config.uniform_bucket_level_access is enabled on the parent
            * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl acl = 10; + * + * repeated .google.storage.v2.ObjectAccessControl acl = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.ObjectAccessControlOrBuilder getAclOrBuilder(int index) { if (aclBuilder_ == null) { @@ -4588,12 +5916,14 @@ public com.google.storage.v2.ObjectAccessControlOrBuilder getAclOrBuilder(int in * * *
      -     * Access controls on the object.
      +     * Optional. Access controls on the object.
            * If iam_config.uniform_bucket_level_access is enabled on the parent
            * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl acl = 10; + * + * repeated .google.storage.v2.ObjectAccessControl acl = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public java.util.List getAclOrBuilderList() { @@ -4608,12 +5938,14 @@ public com.google.storage.v2.ObjectAccessControlOrBuilder getAclOrBuilder(int in * * *
      -     * Access controls on the object.
      +     * Optional. Access controls on the object.
            * If iam_config.uniform_bucket_level_access is enabled on the parent
            * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl acl = 10; + * + * repeated .google.storage.v2.ObjectAccessControl acl = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.ObjectAccessControl.Builder addAclBuilder() { return getAclFieldBuilder() @@ -4624,12 +5956,14 @@ public com.google.storage.v2.ObjectAccessControl.Builder addAclBuilder() { * * *
      -     * Access controls on the object.
      +     * Optional. Access controls on the object.
            * If iam_config.uniform_bucket_level_access is enabled on the parent
            * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl acl = 10; + * + * repeated .google.storage.v2.ObjectAccessControl acl = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.ObjectAccessControl.Builder addAclBuilder(int index) { return getAclFieldBuilder() @@ -4640,12 +5974,14 @@ public com.google.storage.v2.ObjectAccessControl.Builder addAclBuilder(int index * * *
      -     * Access controls on the object.
      +     * Optional. Access controls on the object.
            * If iam_config.uniform_bucket_level_access is enabled on the parent
            * bucket, requests to set, read, or modify acl is an error.
            * 
      * - * repeated .google.storage.v2.ObjectAccessControl acl = 10; + * + * repeated .google.storage.v2.ObjectAccessControl acl = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public java.util.List getAclBuilderList() { return getAclFieldBuilder().getBuilderList(); @@ -4674,11 +6010,11 @@ public java.util.List getAclB * * *
      -     * Content-Language of the object data, matching
      +     * Optional. Content-Language of the object data, matching
            * [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2].
            * 
      * - * string content_language = 11; + * string content_language = 11 [(.google.api.field_behavior) = OPTIONAL]; * * @return The contentLanguage. */ @@ -4698,11 +6034,11 @@ public java.lang.String getContentLanguage() { * * *
      -     * Content-Language of the object data, matching
      +     * Optional. Content-Language of the object data, matching
            * [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2].
            * 
      * - * string content_language = 11; + * string content_language = 11 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for contentLanguage. */ @@ -4722,11 +6058,11 @@ public com.google.protobuf.ByteString getContentLanguageBytes() { * * *
      -     * Content-Language of the object data, matching
      +     * Optional. Content-Language of the object data, matching
            * [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2].
            * 
      * - * string content_language = 11; + * string content_language = 11 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The contentLanguage to set. * @return This builder for chaining. @@ -4745,11 +6081,11 @@ public Builder setContentLanguage(java.lang.String value) { * * *
      -     * Content-Language of the object data, matching
      +     * Optional. Content-Language of the object data, matching
            * [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2].
            * 
      * - * string content_language = 11; + * string content_language = 11 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -4764,11 +6100,11 @@ public Builder clearContentLanguage() { * * *
      -     * Content-Language of the object data, matching
      +     * Optional. Content-Language of the object data, matching
            * [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2].
            * 
      * - * string content_language = 11; + * string content_language = 11 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for contentLanguage to set. * @return This builder for chaining. @@ -5223,13 +6559,13 @@ public com.google.protobuf.TimestampOrBuilder getFinalizeTimeOrBuilder() { * * *
      -     * Content-Type of the object data, matching
      +     * Optional. Content-Type of the object data, matching
            * [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5].
            * If an object is stored without a Content-Type, it is served as
            * `application/octet-stream`.
            * 
      * - * string content_type = 13; + * string content_type = 13 [(.google.api.field_behavior) = OPTIONAL]; * * @return The contentType. */ @@ -5249,13 +6585,13 @@ public java.lang.String getContentType() { * * *
      -     * Content-Type of the object data, matching
      +     * Optional. Content-Type of the object data, matching
            * [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5].
            * If an object is stored without a Content-Type, it is served as
            * `application/octet-stream`.
            * 
      * - * string content_type = 13; + * string content_type = 13 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for contentType. */ @@ -5275,13 +6611,13 @@ public com.google.protobuf.ByteString getContentTypeBytes() { * * *
      -     * Content-Type of the object data, matching
      +     * Optional. Content-Type of the object data, matching
            * [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5].
            * If an object is stored without a Content-Type, it is served as
            * `application/octet-stream`.
            * 
      * - * string content_type = 13; + * string content_type = 13 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The contentType to set. * @return This builder for chaining. @@ -5300,13 +6636,13 @@ public Builder setContentType(java.lang.String value) { * * *
      -     * Content-Type of the object data, matching
      +     * Optional. Content-Type of the object data, matching
            * [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5].
            * If an object is stored without a Content-Type, it is served as
            * `application/octet-stream`.
            * 
      * - * string content_type = 13; + * string content_type = 13 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -5321,13 +6657,13 @@ public Builder clearContentType() { * * *
      -     * Content-Type of the object data, matching
      +     * Optional. Content-Type of the object data, matching
            * [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5].
            * If an object is stored without a Content-Type, it is served as
            * `application/octet-stream`.
            * 
      * - * string content_type = 13; + * string content_type = 13 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for contentType to set. * @return This builder for chaining. @@ -6125,11 +7461,13 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * * *
      -     * Cloud KMS Key used to encrypt this object, if the object is encrypted by
      -     * such a key.
      +     * Optional. Cloud KMS Key used to encrypt this object, if the object is
      +     * encrypted by such a key.
            * 
      * - * string kms_key = 18 [(.google.api.resource_reference) = { ... } + * + * string kms_key = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The kmsKey. */ @@ -6149,11 +7487,13 @@ public java.lang.String getKmsKey() { * * *
      -     * Cloud KMS Key used to encrypt this object, if the object is encrypted by
      -     * such a key.
      +     * Optional. Cloud KMS Key used to encrypt this object, if the object is
      +     * encrypted by such a key.
            * 
      * - * string kms_key = 18 [(.google.api.resource_reference) = { ... } + * + * string kms_key = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for kmsKey. */ @@ -6173,11 +7513,13 @@ public com.google.protobuf.ByteString getKmsKeyBytes() { * * *
      -     * Cloud KMS Key used to encrypt this object, if the object is encrypted by
      -     * such a key.
      +     * Optional. Cloud KMS Key used to encrypt this object, if the object is
      +     * encrypted by such a key.
            * 
      * - * string kms_key = 18 [(.google.api.resource_reference) = { ... } + * + * string kms_key = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param value The kmsKey to set. * @return This builder for chaining. @@ -6196,11 +7538,13 @@ public Builder setKmsKey(java.lang.String value) { * * *
      -     * Cloud KMS Key used to encrypt this object, if the object is encrypted by
      -     * such a key.
      +     * Optional. Cloud KMS Key used to encrypt this object, if the object is
      +     * encrypted by such a key.
            * 
      * - * string kms_key = 18 [(.google.api.resource_reference) = { ... } + * + * string kms_key = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -6215,11 +7559,13 @@ public Builder clearKmsKey() { * * *
      -     * Cloud KMS Key used to encrypt this object, if the object is encrypted by
      -     * such a key.
      +     * Optional. Cloud KMS Key used to encrypt this object, if the object is
      +     * encrypted by such a key.
            * 
      * - * string kms_key = 18 [(.google.api.resource_reference) = { ... } + * + * string kms_key = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for kmsKey to set. * @return This builder for chaining. @@ -6463,14 +7809,15 @@ public com.google.protobuf.TimestampOrBuilder getUpdateStorageClassTimeOrBuilder * * *
      -     * Whether an object is under temporary hold. While this flag is set to true,
      -     * the object is protected against deletion and overwrites.  A common use case
      -     * of this flag is regulatory investigations where objects need to be retained
      -     * while the investigation is ongoing. Note that unlike event-based hold,
      -     * temporary hold does not impact retention expiration time of an object.
      +     * Optional. Whether an object is under temporary hold. While this flag is set
      +     * to true, the object is protected against deletion and overwrites.  A common
      +     * use case of this flag is regulatory investigations where objects need to be
      +     * retained while the investigation is ongoing. Note that unlike event-based
      +     * hold, temporary hold does not impact retention expiration time of an
      +     * object.
            * 
      * - * bool temporary_hold = 20; + * bool temporary_hold = 20 [(.google.api.field_behavior) = OPTIONAL]; * * @return The temporaryHold. */ @@ -6483,14 +7830,15 @@ public boolean getTemporaryHold() { * * *
      -     * Whether an object is under temporary hold. While this flag is set to true,
      -     * the object is protected against deletion and overwrites.  A common use case
      -     * of this flag is regulatory investigations where objects need to be retained
      -     * while the investigation is ongoing. Note that unlike event-based hold,
      -     * temporary hold does not impact retention expiration time of an object.
      +     * Optional. Whether an object is under temporary hold. While this flag is set
      +     * to true, the object is protected against deletion and overwrites.  A common
      +     * use case of this flag is regulatory investigations where objects need to be
      +     * retained while the investigation is ongoing. Note that unlike event-based
      +     * hold, temporary hold does not impact retention expiration time of an
      +     * object.
            * 
      * - * bool temporary_hold = 20; + * bool temporary_hold = 20 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The temporaryHold to set. * @return This builder for chaining. @@ -6507,14 +7855,15 @@ public Builder setTemporaryHold(boolean value) { * * *
      -     * Whether an object is under temporary hold. While this flag is set to true,
      -     * the object is protected against deletion and overwrites.  A common use case
      -     * of this flag is regulatory investigations where objects need to be retained
      -     * while the investigation is ongoing. Note that unlike event-based hold,
      -     * temporary hold does not impact retention expiration time of an object.
      +     * Optional. Whether an object is under temporary hold. While this flag is set
      +     * to true, the object is protected against deletion and overwrites.  A common
      +     * use case of this flag is regulatory investigations where objects need to be
      +     * retained while the investigation is ongoing. Note that unlike event-based
      +     * hold, temporary hold does not impact retention expiration time of an
      +     * object.
            * 
      * - * bool temporary_hold = 20; + * bool temporary_hold = 20 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -6536,16 +7885,17 @@ public Builder clearTemporaryHold() { * * *
      -     * A server-determined value that specifies the earliest time that the
      -     * object's retention period expires.
      -     * Note 1: This field is not provided for objects with an active event-based
      -     * hold, since retention expiration is unknown until the hold is removed.
      -     * Note 2: This value can be provided even when temporary hold is set (so that
      -     * the user can reason about policy without having to first unset the
      -     * temporary hold).
      +     * Optional. A server-determined value that specifies the earliest time that
      +     * the object's retention period expires. Note 1: This field is not provided
      +     * for objects with an active event-based hold, since retention expiration is
      +     * unknown until the hold is removed. Note 2: This value can be provided even
      +     * when temporary hold is set (so that the user can reason about policy
      +     * without having to first unset the temporary hold).
            * 
      * - * .google.protobuf.Timestamp retention_expire_time = 21; + * + * .google.protobuf.Timestamp retention_expire_time = 21 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the retentionExpireTime field is set. */ @@ -6557,16 +7907,17 @@ public boolean hasRetentionExpireTime() { * * *
      -     * A server-determined value that specifies the earliest time that the
      -     * object's retention period expires.
      -     * Note 1: This field is not provided for objects with an active event-based
      -     * hold, since retention expiration is unknown until the hold is removed.
      -     * Note 2: This value can be provided even when temporary hold is set (so that
      -     * the user can reason about policy without having to first unset the
      -     * temporary hold).
      +     * Optional. A server-determined value that specifies the earliest time that
      +     * the object's retention period expires. Note 1: This field is not provided
      +     * for objects with an active event-based hold, since retention expiration is
      +     * unknown until the hold is removed. Note 2: This value can be provided even
      +     * when temporary hold is set (so that the user can reason about policy
      +     * without having to first unset the temporary hold).
            * 
      * - * .google.protobuf.Timestamp retention_expire_time = 21; + * + * .google.protobuf.Timestamp retention_expire_time = 21 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The retentionExpireTime. */ @@ -6584,16 +7935,17 @@ public com.google.protobuf.Timestamp getRetentionExpireTime() { * * *
      -     * A server-determined value that specifies the earliest time that the
      -     * object's retention period expires.
      -     * Note 1: This field is not provided for objects with an active event-based
      -     * hold, since retention expiration is unknown until the hold is removed.
      -     * Note 2: This value can be provided even when temporary hold is set (so that
      -     * the user can reason about policy without having to first unset the
      -     * temporary hold).
      +     * Optional. A server-determined value that specifies the earliest time that
      +     * the object's retention period expires. Note 1: This field is not provided
      +     * for objects with an active event-based hold, since retention expiration is
      +     * unknown until the hold is removed. Note 2: This value can be provided even
      +     * when temporary hold is set (so that the user can reason about policy
      +     * without having to first unset the temporary hold).
            * 
      * - * .google.protobuf.Timestamp retention_expire_time = 21; + * + * .google.protobuf.Timestamp retention_expire_time = 21 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setRetentionExpireTime(com.google.protobuf.Timestamp value) { if (retentionExpireTimeBuilder_ == null) { @@ -6613,16 +7965,17 @@ public Builder setRetentionExpireTime(com.google.protobuf.Timestamp value) { * * *
      -     * A server-determined value that specifies the earliest time that the
      -     * object's retention period expires.
      -     * Note 1: This field is not provided for objects with an active event-based
      -     * hold, since retention expiration is unknown until the hold is removed.
      -     * Note 2: This value can be provided even when temporary hold is set (so that
      -     * the user can reason about policy without having to first unset the
      -     * temporary hold).
      +     * Optional. A server-determined value that specifies the earliest time that
      +     * the object's retention period expires. Note 1: This field is not provided
      +     * for objects with an active event-based hold, since retention expiration is
      +     * unknown until the hold is removed. Note 2: This value can be provided even
      +     * when temporary hold is set (so that the user can reason about policy
      +     * without having to first unset the temporary hold).
            * 
      * - * .google.protobuf.Timestamp retention_expire_time = 21; + * + * .google.protobuf.Timestamp retention_expire_time = 21 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setRetentionExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) { if (retentionExpireTimeBuilder_ == null) { @@ -6639,16 +7992,17 @@ public Builder setRetentionExpireTime(com.google.protobuf.Timestamp.Builder buil * * *
      -     * A server-determined value that specifies the earliest time that the
      -     * object's retention period expires.
      -     * Note 1: This field is not provided for objects with an active event-based
      -     * hold, since retention expiration is unknown until the hold is removed.
      -     * Note 2: This value can be provided even when temporary hold is set (so that
      -     * the user can reason about policy without having to first unset the
      -     * temporary hold).
      +     * Optional. A server-determined value that specifies the earliest time that
      +     * the object's retention period expires. Note 1: This field is not provided
      +     * for objects with an active event-based hold, since retention expiration is
      +     * unknown until the hold is removed. Note 2: This value can be provided even
      +     * when temporary hold is set (so that the user can reason about policy
      +     * without having to first unset the temporary hold).
            * 
      * - * .google.protobuf.Timestamp retention_expire_time = 21; + * + * .google.protobuf.Timestamp retention_expire_time = 21 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeRetentionExpireTime(com.google.protobuf.Timestamp value) { if (retentionExpireTimeBuilder_ == null) { @@ -6673,16 +8027,17 @@ public Builder mergeRetentionExpireTime(com.google.protobuf.Timestamp value) { * * *
      -     * A server-determined value that specifies the earliest time that the
      -     * object's retention period expires.
      -     * Note 1: This field is not provided for objects with an active event-based
      -     * hold, since retention expiration is unknown until the hold is removed.
      -     * Note 2: This value can be provided even when temporary hold is set (so that
      -     * the user can reason about policy without having to first unset the
      -     * temporary hold).
      +     * Optional. A server-determined value that specifies the earliest time that
      +     * the object's retention period expires. Note 1: This field is not provided
      +     * for objects with an active event-based hold, since retention expiration is
      +     * unknown until the hold is removed. Note 2: This value can be provided even
      +     * when temporary hold is set (so that the user can reason about policy
      +     * without having to first unset the temporary hold).
            * 
      * - * .google.protobuf.Timestamp retention_expire_time = 21; + * + * .google.protobuf.Timestamp retention_expire_time = 21 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearRetentionExpireTime() { bitField0_ = (bitField0_ & ~0x00800000); @@ -6699,16 +8054,17 @@ public Builder clearRetentionExpireTime() { * * *
      -     * A server-determined value that specifies the earliest time that the
      -     * object's retention period expires.
      -     * Note 1: This field is not provided for objects with an active event-based
      -     * hold, since retention expiration is unknown until the hold is removed.
      -     * Note 2: This value can be provided even when temporary hold is set (so that
      -     * the user can reason about policy without having to first unset the
      -     * temporary hold).
      +     * Optional. A server-determined value that specifies the earliest time that
      +     * the object's retention period expires. Note 1: This field is not provided
      +     * for objects with an active event-based hold, since retention expiration is
      +     * unknown until the hold is removed. Note 2: This value can be provided even
      +     * when temporary hold is set (so that the user can reason about policy
      +     * without having to first unset the temporary hold).
            * 
      * - * .google.protobuf.Timestamp retention_expire_time = 21; + * + * .google.protobuf.Timestamp retention_expire_time = 21 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.protobuf.Timestamp.Builder getRetentionExpireTimeBuilder() { bitField0_ |= 0x00800000; @@ -6720,16 +8076,17 @@ public com.google.protobuf.Timestamp.Builder getRetentionExpireTimeBuilder() { * * *
      -     * A server-determined value that specifies the earliest time that the
      -     * object's retention period expires.
      -     * Note 1: This field is not provided for objects with an active event-based
      -     * hold, since retention expiration is unknown until the hold is removed.
      -     * Note 2: This value can be provided even when temporary hold is set (so that
      -     * the user can reason about policy without having to first unset the
      -     * temporary hold).
      +     * Optional. A server-determined value that specifies the earliest time that
      +     * the object's retention period expires. Note 1: This field is not provided
      +     * for objects with an active event-based hold, since retention expiration is
      +     * unknown until the hold is removed. Note 2: This value can be provided even
      +     * when temporary hold is set (so that the user can reason about policy
      +     * without having to first unset the temporary hold).
            * 
      * - * .google.protobuf.Timestamp retention_expire_time = 21; + * + * .google.protobuf.Timestamp retention_expire_time = 21 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.protobuf.TimestampOrBuilder getRetentionExpireTimeOrBuilder() { if (retentionExpireTimeBuilder_ != null) { @@ -6745,16 +8102,17 @@ public com.google.protobuf.TimestampOrBuilder getRetentionExpireTimeOrBuilder() * * *
      -     * A server-determined value that specifies the earliest time that the
      -     * object's retention period expires.
      -     * Note 1: This field is not provided for objects with an active event-based
      -     * hold, since retention expiration is unknown until the hold is removed.
      -     * Note 2: This value can be provided even when temporary hold is set (so that
      -     * the user can reason about policy without having to first unset the
      -     * temporary hold).
      +     * Optional. A server-determined value that specifies the earliest time that
      +     * the object's retention period expires. Note 1: This field is not provided
      +     * for objects with an active event-based hold, since retention expiration is
      +     * unknown until the hold is removed. Note 2: This value can be provided even
      +     * when temporary hold is set (so that the user can reason about policy
      +     * without having to first unset the temporary hold).
            * 
      * - * .google.protobuf.Timestamp retention_expire_time = 21; + * + * .google.protobuf.Timestamp retention_expire_time = 21 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, @@ -6804,10 +8162,11 @@ public int getMetadataCount() { * * *
      -     * User-provided metadata, in key/value pairs.
      +     * Optional. User-provided metadata, in key/value pairs.
            * 
      * - * map<string, string> metadata = 22; + * map<string, string> metadata = 22 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public boolean containsMetadata(java.lang.String key) { @@ -6828,10 +8187,11 @@ public java.util.Map getMetadata() { * * *
      -     * User-provided metadata, in key/value pairs.
      +     * Optional. User-provided metadata, in key/value pairs.
            * 
      * - * map<string, string> metadata = 22; + * map<string, string> metadata = 22 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public java.util.Map getMetadataMap() { @@ -6842,10 +8202,11 @@ public java.util.Map getMetadataMap() { * * *
      -     * User-provided metadata, in key/value pairs.
      +     * Optional. User-provided metadata, in key/value pairs.
            * 
      * - * map<string, string> metadata = 22; + * map<string, string> metadata = 22 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public /* nullable */ java.lang.String getMetadataOrDefault( @@ -6863,10 +8224,11 @@ public java.util.Map getMetadataMap() { * * *
      -     * User-provided metadata, in key/value pairs.
      +     * Optional. User-provided metadata, in key/value pairs.
            * 
      * - * map<string, string> metadata = 22; + * map<string, string> metadata = 22 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public java.lang.String getMetadataOrThrow(java.lang.String key) { @@ -6890,10 +8252,11 @@ public Builder clearMetadata() { * * *
      -     * User-provided metadata, in key/value pairs.
      +     * Optional. User-provided metadata, in key/value pairs.
            * 
      * - * map<string, string> metadata = 22; + * map<string, string> metadata = 22 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder removeMetadata(java.lang.String key) { if (key == null) { @@ -6914,10 +8277,11 @@ public java.util.Map getMutableMetadata() { * * *
      -     * User-provided metadata, in key/value pairs.
      +     * Optional. User-provided metadata, in key/value pairs.
            * 
      * - * map<string, string> metadata = 22; + * map<string, string> metadata = 22 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder putMetadata(java.lang.String key, java.lang.String value) { if (key == null) { @@ -6935,10 +8299,11 @@ public Builder putMetadata(java.lang.String key, java.lang.String value) { * * *
      -     * User-provided metadata, in key/value pairs.
      +     * Optional. User-provided metadata, in key/value pairs.
            * 
      * - * map<string, string> metadata = 22; + * map<string, string> metadata = 22 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder putAllMetadata(java.util.Map values) { internalGetMutableMetadata().getMutableMap().putAll(values); @@ -7277,11 +8642,13 @@ public com.google.storage.v2.OwnerOrBuilder getOwnerOrBuilder() { * * *
      -     * Metadata of Customer-Supplied Encryption Key, if the object is encrypted by
      -     * such a key.
      +     * Optional. Metadata of Customer-Supplied Encryption Key, if the object is
      +     * encrypted by such a key.
            * 
      * - * .google.storage.v2.CustomerEncryption customer_encryption = 25; + * + * .google.storage.v2.CustomerEncryption customer_encryption = 25 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the customerEncryption field is set. */ @@ -7293,11 +8660,13 @@ public boolean hasCustomerEncryption() { * * *
      -     * Metadata of Customer-Supplied Encryption Key, if the object is encrypted by
      -     * such a key.
      +     * Optional. Metadata of Customer-Supplied Encryption Key, if the object is
      +     * encrypted by such a key.
            * 
      * - * .google.storage.v2.CustomerEncryption customer_encryption = 25; + * + * .google.storage.v2.CustomerEncryption customer_encryption = 25 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The customerEncryption. */ @@ -7315,11 +8684,13 @@ public com.google.storage.v2.CustomerEncryption getCustomerEncryption() { * * *
      -     * Metadata of Customer-Supplied Encryption Key, if the object is encrypted by
      -     * such a key.
      +     * Optional. Metadata of Customer-Supplied Encryption Key, if the object is
      +     * encrypted by such a key.
            * 
      * - * .google.storage.v2.CustomerEncryption customer_encryption = 25; + * + * .google.storage.v2.CustomerEncryption customer_encryption = 25 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCustomerEncryption(com.google.storage.v2.CustomerEncryption value) { if (customerEncryptionBuilder_ == null) { @@ -7339,11 +8710,13 @@ public Builder setCustomerEncryption(com.google.storage.v2.CustomerEncryption va * * *
      -     * Metadata of Customer-Supplied Encryption Key, if the object is encrypted by
      -     * such a key.
      +     * Optional. Metadata of Customer-Supplied Encryption Key, if the object is
      +     * encrypted by such a key.
            * 
      * - * .google.storage.v2.CustomerEncryption customer_encryption = 25; + * + * .google.storage.v2.CustomerEncryption customer_encryption = 25 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCustomerEncryption( com.google.storage.v2.CustomerEncryption.Builder builderForValue) { @@ -7361,11 +8734,13 @@ public Builder setCustomerEncryption( * * *
      -     * Metadata of Customer-Supplied Encryption Key, if the object is encrypted by
      -     * such a key.
      +     * Optional. Metadata of Customer-Supplied Encryption Key, if the object is
      +     * encrypted by such a key.
            * 
      * - * .google.storage.v2.CustomerEncryption customer_encryption = 25; + * + * .google.storage.v2.CustomerEncryption customer_encryption = 25 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeCustomerEncryption(com.google.storage.v2.CustomerEncryption value) { if (customerEncryptionBuilder_ == null) { @@ -7391,11 +8766,13 @@ public Builder mergeCustomerEncryption(com.google.storage.v2.CustomerEncryption * * *
      -     * Metadata of Customer-Supplied Encryption Key, if the object is encrypted by
      -     * such a key.
      +     * Optional. Metadata of Customer-Supplied Encryption Key, if the object is
      +     * encrypted by such a key.
            * 
      * - * .google.storage.v2.CustomerEncryption customer_encryption = 25; + * + * .google.storage.v2.CustomerEncryption customer_encryption = 25 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearCustomerEncryption() { bitField0_ = (bitField0_ & ~0x08000000); @@ -7412,11 +8789,13 @@ public Builder clearCustomerEncryption() { * * *
      -     * Metadata of Customer-Supplied Encryption Key, if the object is encrypted by
      -     * such a key.
      +     * Optional. Metadata of Customer-Supplied Encryption Key, if the object is
      +     * encrypted by such a key.
            * 
      * - * .google.storage.v2.CustomerEncryption customer_encryption = 25; + * + * .google.storage.v2.CustomerEncryption customer_encryption = 25 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.CustomerEncryption.Builder getCustomerEncryptionBuilder() { bitField0_ |= 0x08000000; @@ -7428,11 +8807,13 @@ public com.google.storage.v2.CustomerEncryption.Builder getCustomerEncryptionBui * * *
      -     * Metadata of Customer-Supplied Encryption Key, if the object is encrypted by
      -     * such a key.
      +     * Optional. Metadata of Customer-Supplied Encryption Key, if the object is
      +     * encrypted by such a key.
            * 
      * - * .google.storage.v2.CustomerEncryption customer_encryption = 25; + * + * .google.storage.v2.CustomerEncryption customer_encryption = 25 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.CustomerEncryptionOrBuilder getCustomerEncryptionOrBuilder() { if (customerEncryptionBuilder_ != null) { @@ -7448,11 +8829,13 @@ public com.google.storage.v2.CustomerEncryptionOrBuilder getCustomerEncryptionOr * * *
      -     * Metadata of Customer-Supplied Encryption Key, if the object is encrypted by
      -     * such a key.
      +     * Optional. Metadata of Customer-Supplied Encryption Key, if the object is
      +     * encrypted by such a key.
            * 
      * - * .google.storage.v2.CustomerEncryption customer_encryption = 25; + * + * .google.storage.v2.CustomerEncryption customer_encryption = 25 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.CustomerEncryption, @@ -7482,10 +8865,11 @@ public com.google.storage.v2.CustomerEncryptionOrBuilder getCustomerEncryptionOr * * *
      -     * A user-specified timestamp set on an object.
      +     * Optional. A user-specified timestamp set on an object.
            * 
      * - * .google.protobuf.Timestamp custom_time = 26; + * .google.protobuf.Timestamp custom_time = 26 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the customTime field is set. */ @@ -7497,10 +8881,11 @@ public boolean hasCustomTime() { * * *
      -     * A user-specified timestamp set on an object.
      +     * Optional. A user-specified timestamp set on an object.
            * 
      * - * .google.protobuf.Timestamp custom_time = 26; + * .google.protobuf.Timestamp custom_time = 26 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The customTime. */ @@ -7518,10 +8903,11 @@ public com.google.protobuf.Timestamp getCustomTime() { * * *
      -     * A user-specified timestamp set on an object.
      +     * Optional. A user-specified timestamp set on an object.
            * 
      * - * .google.protobuf.Timestamp custom_time = 26; + * .google.protobuf.Timestamp custom_time = 26 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCustomTime(com.google.protobuf.Timestamp value) { if (customTimeBuilder_ == null) { @@ -7541,10 +8927,11 @@ public Builder setCustomTime(com.google.protobuf.Timestamp value) { * * *
      -     * A user-specified timestamp set on an object.
      +     * Optional. A user-specified timestamp set on an object.
            * 
      * - * .google.protobuf.Timestamp custom_time = 26; + * .google.protobuf.Timestamp custom_time = 26 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCustomTime(com.google.protobuf.Timestamp.Builder builderForValue) { if (customTimeBuilder_ == null) { @@ -7561,10 +8948,11 @@ public Builder setCustomTime(com.google.protobuf.Timestamp.Builder builderForVal * * *
      -     * A user-specified timestamp set on an object.
      +     * Optional. A user-specified timestamp set on an object.
            * 
      * - * .google.protobuf.Timestamp custom_time = 26; + * .google.protobuf.Timestamp custom_time = 26 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeCustomTime(com.google.protobuf.Timestamp value) { if (customTimeBuilder_ == null) { @@ -7589,10 +8977,11 @@ public Builder mergeCustomTime(com.google.protobuf.Timestamp value) { * * *
      -     * A user-specified timestamp set on an object.
      +     * Optional. A user-specified timestamp set on an object.
            * 
      * - * .google.protobuf.Timestamp custom_time = 26; + * .google.protobuf.Timestamp custom_time = 26 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearCustomTime() { bitField0_ = (bitField0_ & ~0x10000000); @@ -7609,10 +8998,11 @@ public Builder clearCustomTime() { * * *
      -     * A user-specified timestamp set on an object.
      +     * Optional. A user-specified timestamp set on an object.
            * 
      * - * .google.protobuf.Timestamp custom_time = 26; + * .google.protobuf.Timestamp custom_time = 26 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.protobuf.Timestamp.Builder getCustomTimeBuilder() { bitField0_ |= 0x10000000; @@ -7624,10 +9014,11 @@ public com.google.protobuf.Timestamp.Builder getCustomTimeBuilder() { * * *
      -     * A user-specified timestamp set on an object.
      +     * Optional. A user-specified timestamp set on an object.
            * 
      * - * .google.protobuf.Timestamp custom_time = 26; + * .google.protobuf.Timestamp custom_time = 26 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.protobuf.TimestampOrBuilder getCustomTimeOrBuilder() { if (customTimeBuilder_ != null) { @@ -7643,10 +9034,11 @@ public com.google.protobuf.TimestampOrBuilder getCustomTimeOrBuilder() { * * *
      -     * A user-specified timestamp set on an object.
      +     * Optional. A user-specified timestamp set on an object.
            * 
      * - * .google.protobuf.Timestamp custom_time = 26; + * .google.protobuf.Timestamp custom_time = 26 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, @@ -8143,6 +9535,227 @@ public com.google.protobuf.TimestampOrBuilder getHardDeleteTimeOrBuilder() { return hardDeleteTimeBuilder_; } + private com.google.storage.v2.Object.Retention retention_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.v2.Object.Retention, + com.google.storage.v2.Object.Retention.Builder, + com.google.storage.v2.Object.RetentionOrBuilder> + retentionBuilder_; + + /** + * + * + *
      +     * Optional. Retention configuration of this object.
      +     * May only be configured if the bucket has object retention enabled.
      +     * 
      + * + * + * .google.storage.v2.Object.Retention retention = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the retention field is set. + */ + public boolean hasRetention() { + return ((bitField0_ & 0x80000000) != 0); + } + + /** + * + * + *
      +     * Optional. Retention configuration of this object.
      +     * May only be configured if the bucket has object retention enabled.
      +     * 
      + * + * + * .google.storage.v2.Object.Retention retention = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The retention. + */ + public com.google.storage.v2.Object.Retention getRetention() { + if (retentionBuilder_ == null) { + return retention_ == null + ? com.google.storage.v2.Object.Retention.getDefaultInstance() + : retention_; + } else { + return retentionBuilder_.getMessage(); + } + } + + /** + * + * + *
      +     * Optional. Retention configuration of this object.
      +     * May only be configured if the bucket has object retention enabled.
      +     * 
      + * + * + * .google.storage.v2.Object.Retention retention = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRetention(com.google.storage.v2.Object.Retention value) { + if (retentionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + retention_ = value; + } else { + retentionBuilder_.setMessage(value); + } + bitField0_ |= 0x80000000; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. Retention configuration of this object.
      +     * May only be configured if the bucket has object retention enabled.
      +     * 
      + * + * + * .google.storage.v2.Object.Retention retention = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRetention(com.google.storage.v2.Object.Retention.Builder builderForValue) { + if (retentionBuilder_ == null) { + retention_ = builderForValue.build(); + } else { + retentionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x80000000; + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. Retention configuration of this object.
      +     * May only be configured if the bucket has object retention enabled.
      +     * 
      + * + * + * .google.storage.v2.Object.Retention retention = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRetention(com.google.storage.v2.Object.Retention value) { + if (retentionBuilder_ == null) { + if (((bitField0_ & 0x80000000) != 0) + && retention_ != null + && retention_ != com.google.storage.v2.Object.Retention.getDefaultInstance()) { + getRetentionBuilder().mergeFrom(value); + } else { + retention_ = value; + } + } else { + retentionBuilder_.mergeFrom(value); + } + if (retention_ != null) { + bitField0_ |= 0x80000000; + onChanged(); + } + return this; + } + + /** + * + * + *
      +     * Optional. Retention configuration of this object.
      +     * May only be configured if the bucket has object retention enabled.
      +     * 
      + * + * + * .google.storage.v2.Object.Retention retention = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRetention() { + bitField0_ = (bitField0_ & ~0x80000000); + retention_ = null; + if (retentionBuilder_ != null) { + retentionBuilder_.dispose(); + retentionBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
      +     * Optional. Retention configuration of this object.
      +     * May only be configured if the bucket has object retention enabled.
      +     * 
      + * + * + * .google.storage.v2.Object.Retention retention = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.storage.v2.Object.Retention.Builder getRetentionBuilder() { + bitField0_ |= 0x80000000; + onChanged(); + return getRetentionFieldBuilder().getBuilder(); + } + + /** + * + * + *
      +     * Optional. Retention configuration of this object.
      +     * May only be configured if the bucket has object retention enabled.
      +     * 
      + * + * + * .google.storage.v2.Object.Retention retention = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.storage.v2.Object.RetentionOrBuilder getRetentionOrBuilder() { + if (retentionBuilder_ != null) { + return retentionBuilder_.getMessageOrBuilder(); + } else { + return retention_ == null + ? com.google.storage.v2.Object.Retention.getDefaultInstance() + : retention_; + } + } + + /** + * + * + *
      +     * Optional. Retention configuration of this object.
      +     * May only be configured if the bucket has object retention enabled.
      +     * 
      + * + * + * .google.storage.v2.Object.Retention retention = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.v2.Object.Retention, + com.google.storage.v2.Object.Retention.Builder, + com.google.storage.v2.Object.RetentionOrBuilder> + getRetentionFieldBuilder() { + if (retentionBuilder_ == null) { + retentionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.storage.v2.Object.Retention, + com.google.storage.v2.Object.Retention.Builder, + com.google.storage.v2.Object.RetentionOrBuilder>( + getRetention(), getParentForChildren(), isClean()); + retention_ = null; + } + return retentionBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectAccessControl.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectAccessControl.java index be991b308d..c70729830f 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectAccessControl.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectAccessControl.java @@ -81,13 +81,14 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
      -   * The access permission for the entity. One of the following values:
      +   * Optional. The access permission for the entity. One of the following
      +   * values:
          * * `READER`
          * * `WRITER`
          * * `OWNER`
          * 
      * - * string role = 1; + * string role = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The role. */ @@ -108,13 +109,14 @@ public java.lang.String getRole() { * * *
      -   * The access permission for the entity. One of the following values:
      +   * Optional. The access permission for the entity. One of the following
      +   * values:
          * * `READER`
          * * `WRITER`
          * * `OWNER`
          * 
      * - * string role = 1; + * string role = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for role. */ @@ -140,10 +142,10 @@ public com.google.protobuf.ByteString getRoleBytes() { * * *
      -   * The ID of the access-control entry.
      +   * Optional. The ID of the access-control entry.
          * 
      * - * string id = 2; + * string id = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The id. */ @@ -164,10 +166,10 @@ public java.lang.String getId() { * * *
      -   * The ID of the access-control entry.
      +   * Optional. The ID of the access-control entry.
          * 
      * - * string id = 2; + * string id = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for id. */ @@ -193,7 +195,7 @@ public com.google.protobuf.ByteString getIdBytes() { * * *
      -   * The entity holding the permission, in one of the following forms:
      +   * Optional. The entity holding the permission, in one of the following forms:
          * * `user-{userid}`
          * * `user-{email}`
          * * `group-{groupid}`
      @@ -213,7 +215,7 @@ public com.google.protobuf.ByteString getIdBytes() {
          * returned on response.
          * 
      * - * string entity = 3; + * string entity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The entity. */ @@ -234,7 +236,7 @@ public java.lang.String getEntity() { * * *
      -   * The entity holding the permission, in one of the following forms:
      +   * Optional. The entity holding the permission, in one of the following forms:
          * * `user-{userid}`
          * * `user-{email}`
          * * `group-{groupid}`
      @@ -254,7 +256,7 @@ public java.lang.String getEntity() {
          * returned on response.
          * 
      * - * string entity = 3; + * string entity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for entity. */ @@ -335,10 +337,10 @@ public com.google.protobuf.ByteString getEntityAltBytes() { * * *
      -   * The ID for the entity, if any.
      +   * Optional. The ID for the entity, if any.
          * 
      * - * string entity_id = 4; + * string entity_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The entityId. */ @@ -359,10 +361,10 @@ public java.lang.String getEntityId() { * * *
      -   * The ID for the entity, if any.
      +   * Optional. The ID for the entity, if any.
          * 
      * - * string entity_id = 4; + * string entity_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for entityId. */ @@ -388,13 +390,13 @@ public com.google.protobuf.ByteString getEntityIdBytes() { * * *
      -   * The etag of the ObjectAccessControl.
      +   * Optional. The etag of the ObjectAccessControl.
          * If included in the metadata of an update or delete request message, the
          * operation will only be performed if the etag matches that of the live
          * object's ObjectAccessControl.
          * 
      * - * string etag = 8; + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The etag. */ @@ -415,13 +417,13 @@ public java.lang.String getEtag() { * * *
      -   * The etag of the ObjectAccessControl.
      +   * Optional. The etag of the ObjectAccessControl.
          * If included in the metadata of an update or delete request message, the
          * operation will only be performed if the etag matches that of the live
          * object's ObjectAccessControl.
          * 
      * - * string etag = 8; + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for etag. */ @@ -447,10 +449,10 @@ public com.google.protobuf.ByteString getEtagBytes() { * * *
      -   * The email address associated with the entity, if any.
      +   * Optional. The email address associated with the entity, if any.
          * 
      * - * string email = 5; + * string email = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The email. */ @@ -471,10 +473,10 @@ public java.lang.String getEmail() { * * *
      -   * The email address associated with the entity, if any.
      +   * Optional. The email address associated with the entity, if any.
          * 
      * - * string email = 5; + * string email = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for email. */ @@ -500,10 +502,10 @@ public com.google.protobuf.ByteString getEmailBytes() { * * *
      -   * The domain associated with the entity, if any.
      +   * Optional. The domain associated with the entity, if any.
          * 
      * - * string domain = 6; + * string domain = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The domain. */ @@ -524,10 +526,10 @@ public java.lang.String getDomain() { * * *
      -   * The domain associated with the entity, if any.
      +   * Optional. The domain associated with the entity, if any.
          * 
      * - * string domain = 6; + * string domain = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for domain. */ @@ -551,10 +553,12 @@ public com.google.protobuf.ByteString getDomainBytes() { * * *
      -   * The project team associated with the entity, if any.
      +   * Optional. The project team associated with the entity, if any.
          * 
      * - * .google.storage.v2.ProjectTeam project_team = 7; + * + * .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the projectTeam field is set. */ @@ -567,10 +571,12 @@ public boolean hasProjectTeam() { * * *
      -   * The project team associated with the entity, if any.
      +   * Optional. The project team associated with the entity, if any.
          * 
      * - * .google.storage.v2.ProjectTeam project_team = 7; + * + * .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The projectTeam. */ @@ -585,10 +591,12 @@ public com.google.storage.v2.ProjectTeam getProjectTeam() { * * *
      -   * The project team associated with the entity, if any.
      +   * Optional. The project team associated with the entity, if any.
          * 
      * - * .google.storage.v2.ProjectTeam project_team = 7; + * + * .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.ProjectTeamOrBuilder getProjectTeamOrBuilder() { @@ -1157,13 +1165,14 @@ public Builder mergeFrom( * * *
      -     * The access permission for the entity. One of the following values:
      +     * Optional. The access permission for the entity. One of the following
      +     * values:
            * * `READER`
            * * `WRITER`
            * * `OWNER`
            * 
      * - * string role = 1; + * string role = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The role. */ @@ -1183,13 +1192,14 @@ public java.lang.String getRole() { * * *
      -     * The access permission for the entity. One of the following values:
      +     * Optional. The access permission for the entity. One of the following
      +     * values:
            * * `READER`
            * * `WRITER`
            * * `OWNER`
            * 
      * - * string role = 1; + * string role = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for role. */ @@ -1209,13 +1219,14 @@ public com.google.protobuf.ByteString getRoleBytes() { * * *
      -     * The access permission for the entity. One of the following values:
      +     * Optional. The access permission for the entity. One of the following
      +     * values:
            * * `READER`
            * * `WRITER`
            * * `OWNER`
            * 
      * - * string role = 1; + * string role = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The role to set. * @return This builder for chaining. @@ -1234,13 +1245,14 @@ public Builder setRole(java.lang.String value) { * * *
      -     * The access permission for the entity. One of the following values:
      +     * Optional. The access permission for the entity. One of the following
      +     * values:
            * * `READER`
            * * `WRITER`
            * * `OWNER`
            * 
      * - * string role = 1; + * string role = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1255,13 +1267,14 @@ public Builder clearRole() { * * *
      -     * The access permission for the entity. One of the following values:
      +     * Optional. The access permission for the entity. One of the following
      +     * values:
            * * `READER`
            * * `WRITER`
            * * `OWNER`
            * 
      * - * string role = 1; + * string role = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for role to set. * @return This builder for chaining. @@ -1283,10 +1296,10 @@ public Builder setRoleBytes(com.google.protobuf.ByteString value) { * * *
      -     * The ID of the access-control entry.
      +     * Optional. The ID of the access-control entry.
            * 
      * - * string id = 2; + * string id = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The id. */ @@ -1306,10 +1319,10 @@ public java.lang.String getId() { * * *
      -     * The ID of the access-control entry.
      +     * Optional. The ID of the access-control entry.
            * 
      * - * string id = 2; + * string id = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for id. */ @@ -1329,10 +1342,10 @@ public com.google.protobuf.ByteString getIdBytes() { * * *
      -     * The ID of the access-control entry.
      +     * Optional. The ID of the access-control entry.
            * 
      * - * string id = 2; + * string id = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The id to set. * @return This builder for chaining. @@ -1351,10 +1364,10 @@ public Builder setId(java.lang.String value) { * * *
      -     * The ID of the access-control entry.
      +     * Optional. The ID of the access-control entry.
            * 
      * - * string id = 2; + * string id = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1369,10 +1382,10 @@ public Builder clearId() { * * *
      -     * The ID of the access-control entry.
      +     * Optional. The ID of the access-control entry.
            * 
      * - * string id = 2; + * string id = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for id to set. * @return This builder for chaining. @@ -1394,7 +1407,7 @@ public Builder setIdBytes(com.google.protobuf.ByteString value) { * * *
      -     * The entity holding the permission, in one of the following forms:
      +     * Optional. The entity holding the permission, in one of the following forms:
            * * `user-{userid}`
            * * `user-{email}`
            * * `group-{groupid}`
      @@ -1414,7 +1427,7 @@ public Builder setIdBytes(com.google.protobuf.ByteString value) {
            * returned on response.
            * 
      * - * string entity = 3; + * string entity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The entity. */ @@ -1434,7 +1447,7 @@ public java.lang.String getEntity() { * * *
      -     * The entity holding the permission, in one of the following forms:
      +     * Optional. The entity holding the permission, in one of the following forms:
            * * `user-{userid}`
            * * `user-{email}`
            * * `group-{groupid}`
      @@ -1454,7 +1467,7 @@ public java.lang.String getEntity() {
            * returned on response.
            * 
      * - * string entity = 3; + * string entity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for entity. */ @@ -1474,7 +1487,7 @@ public com.google.protobuf.ByteString getEntityBytes() { * * *
      -     * The entity holding the permission, in one of the following forms:
      +     * Optional. The entity holding the permission, in one of the following forms:
            * * `user-{userid}`
            * * `user-{email}`
            * * `group-{groupid}`
      @@ -1494,7 +1507,7 @@ public com.google.protobuf.ByteString getEntityBytes() {
            * returned on response.
            * 
      * - * string entity = 3; + * string entity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The entity to set. * @return This builder for chaining. @@ -1513,7 +1526,7 @@ public Builder setEntity(java.lang.String value) { * * *
      -     * The entity holding the permission, in one of the following forms:
      +     * Optional. The entity holding the permission, in one of the following forms:
            * * `user-{userid}`
            * * `user-{email}`
            * * `group-{groupid}`
      @@ -1533,7 +1546,7 @@ public Builder setEntity(java.lang.String value) {
            * returned on response.
            * 
      * - * string entity = 3; + * string entity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1548,7 +1561,7 @@ public Builder clearEntity() { * * *
      -     * The entity holding the permission, in one of the following forms:
      +     * Optional. The entity holding the permission, in one of the following forms:
            * * `user-{userid}`
            * * `user-{email}`
            * * `group-{groupid}`
      @@ -1568,7 +1581,7 @@ public Builder clearEntity() {
            * returned on response.
            * 
      * - * string entity = 3; + * string entity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for entity to set. * @return This builder for chaining. @@ -1706,10 +1719,10 @@ public Builder setEntityAltBytes(com.google.protobuf.ByteString value) { * * *
      -     * The ID for the entity, if any.
      +     * Optional. The ID for the entity, if any.
            * 
      * - * string entity_id = 4; + * string entity_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The entityId. */ @@ -1729,10 +1742,10 @@ public java.lang.String getEntityId() { * * *
      -     * The ID for the entity, if any.
      +     * Optional. The ID for the entity, if any.
            * 
      * - * string entity_id = 4; + * string entity_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for entityId. */ @@ -1752,10 +1765,10 @@ public com.google.protobuf.ByteString getEntityIdBytes() { * * *
      -     * The ID for the entity, if any.
      +     * Optional. The ID for the entity, if any.
            * 
      * - * string entity_id = 4; + * string entity_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The entityId to set. * @return This builder for chaining. @@ -1774,10 +1787,10 @@ public Builder setEntityId(java.lang.String value) { * * *
      -     * The ID for the entity, if any.
      +     * Optional. The ID for the entity, if any.
            * 
      * - * string entity_id = 4; + * string entity_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1792,10 +1805,10 @@ public Builder clearEntityId() { * * *
      -     * The ID for the entity, if any.
      +     * Optional. The ID for the entity, if any.
            * 
      * - * string entity_id = 4; + * string entity_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for entityId to set. * @return This builder for chaining. @@ -1817,13 +1830,13 @@ public Builder setEntityIdBytes(com.google.protobuf.ByteString value) { * * *
      -     * The etag of the ObjectAccessControl.
      +     * Optional. The etag of the ObjectAccessControl.
            * If included in the metadata of an update or delete request message, the
            * operation will only be performed if the etag matches that of the live
            * object's ObjectAccessControl.
            * 
      * - * string etag = 8; + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The etag. */ @@ -1843,13 +1856,13 @@ public java.lang.String getEtag() { * * *
      -     * The etag of the ObjectAccessControl.
      +     * Optional. The etag of the ObjectAccessControl.
            * If included in the metadata of an update or delete request message, the
            * operation will only be performed if the etag matches that of the live
            * object's ObjectAccessControl.
            * 
      * - * string etag = 8; + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for etag. */ @@ -1869,13 +1882,13 @@ public com.google.protobuf.ByteString getEtagBytes() { * * *
      -     * The etag of the ObjectAccessControl.
      +     * Optional. The etag of the ObjectAccessControl.
            * If included in the metadata of an update or delete request message, the
            * operation will only be performed if the etag matches that of the live
            * object's ObjectAccessControl.
            * 
      * - * string etag = 8; + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The etag to set. * @return This builder for chaining. @@ -1894,13 +1907,13 @@ public Builder setEtag(java.lang.String value) { * * *
      -     * The etag of the ObjectAccessControl.
      +     * Optional. The etag of the ObjectAccessControl.
            * If included in the metadata of an update or delete request message, the
            * operation will only be performed if the etag matches that of the live
            * object's ObjectAccessControl.
            * 
      * - * string etag = 8; + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1915,13 +1928,13 @@ public Builder clearEtag() { * * *
      -     * The etag of the ObjectAccessControl.
      +     * Optional. The etag of the ObjectAccessControl.
            * If included in the metadata of an update or delete request message, the
            * operation will only be performed if the etag matches that of the live
            * object's ObjectAccessControl.
            * 
      * - * string etag = 8; + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for etag to set. * @return This builder for chaining. @@ -1943,10 +1956,10 @@ public Builder setEtagBytes(com.google.protobuf.ByteString value) { * * *
      -     * The email address associated with the entity, if any.
      +     * Optional. The email address associated with the entity, if any.
            * 
      * - * string email = 5; + * string email = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The email. */ @@ -1966,10 +1979,10 @@ public java.lang.String getEmail() { * * *
      -     * The email address associated with the entity, if any.
      +     * Optional. The email address associated with the entity, if any.
            * 
      * - * string email = 5; + * string email = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for email. */ @@ -1989,10 +2002,10 @@ public com.google.protobuf.ByteString getEmailBytes() { * * *
      -     * The email address associated with the entity, if any.
      +     * Optional. The email address associated with the entity, if any.
            * 
      * - * string email = 5; + * string email = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The email to set. * @return This builder for chaining. @@ -2011,10 +2024,10 @@ public Builder setEmail(java.lang.String value) { * * *
      -     * The email address associated with the entity, if any.
      +     * Optional. The email address associated with the entity, if any.
            * 
      * - * string email = 5; + * string email = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -2029,10 +2042,10 @@ public Builder clearEmail() { * * *
      -     * The email address associated with the entity, if any.
      +     * Optional. The email address associated with the entity, if any.
            * 
      * - * string email = 5; + * string email = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for email to set. * @return This builder for chaining. @@ -2054,10 +2067,10 @@ public Builder setEmailBytes(com.google.protobuf.ByteString value) { * * *
      -     * The domain associated with the entity, if any.
      +     * Optional. The domain associated with the entity, if any.
            * 
      * - * string domain = 6; + * string domain = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The domain. */ @@ -2077,10 +2090,10 @@ public java.lang.String getDomain() { * * *
      -     * The domain associated with the entity, if any.
      +     * Optional. The domain associated with the entity, if any.
            * 
      * - * string domain = 6; + * string domain = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for domain. */ @@ -2100,10 +2113,10 @@ public com.google.protobuf.ByteString getDomainBytes() { * * *
      -     * The domain associated with the entity, if any.
      +     * Optional. The domain associated with the entity, if any.
            * 
      * - * string domain = 6; + * string domain = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The domain to set. * @return This builder for chaining. @@ -2122,10 +2135,10 @@ public Builder setDomain(java.lang.String value) { * * *
      -     * The domain associated with the entity, if any.
      +     * Optional. The domain associated with the entity, if any.
            * 
      * - * string domain = 6; + * string domain = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -2140,10 +2153,10 @@ public Builder clearDomain() { * * *
      -     * The domain associated with the entity, if any.
      +     * Optional. The domain associated with the entity, if any.
            * 
      * - * string domain = 6; + * string domain = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for domain to set. * @return This builder for chaining. @@ -2170,10 +2183,12 @@ public Builder setDomainBytes(com.google.protobuf.ByteString value) { * * *
      -     * The project team associated with the entity, if any.
      +     * Optional. The project team associated with the entity, if any.
            * 
      * - * .google.storage.v2.ProjectTeam project_team = 7; + * + * .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the projectTeam field is set. */ @@ -2185,10 +2200,12 @@ public boolean hasProjectTeam() { * * *
      -     * The project team associated with the entity, if any.
      +     * Optional. The project team associated with the entity, if any.
            * 
      * - * .google.storage.v2.ProjectTeam project_team = 7; + * + * .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The projectTeam. */ @@ -2206,10 +2223,12 @@ public com.google.storage.v2.ProjectTeam getProjectTeam() { * * *
      -     * The project team associated with the entity, if any.
      +     * Optional. The project team associated with the entity, if any.
            * 
      * - * .google.storage.v2.ProjectTeam project_team = 7; + * + * .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setProjectTeam(com.google.storage.v2.ProjectTeam value) { if (projectTeamBuilder_ == null) { @@ -2229,10 +2248,12 @@ public Builder setProjectTeam(com.google.storage.v2.ProjectTeam value) { * * *
      -     * The project team associated with the entity, if any.
      +     * Optional. The project team associated with the entity, if any.
            * 
      * - * .google.storage.v2.ProjectTeam project_team = 7; + * + * .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setProjectTeam(com.google.storage.v2.ProjectTeam.Builder builderForValue) { if (projectTeamBuilder_ == null) { @@ -2249,10 +2270,12 @@ public Builder setProjectTeam(com.google.storage.v2.ProjectTeam.Builder builderF * * *
      -     * The project team associated with the entity, if any.
      +     * Optional. The project team associated with the entity, if any.
            * 
      * - * .google.storage.v2.ProjectTeam project_team = 7; + * + * .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeProjectTeam(com.google.storage.v2.ProjectTeam value) { if (projectTeamBuilder_ == null) { @@ -2277,10 +2300,12 @@ public Builder mergeProjectTeam(com.google.storage.v2.ProjectTeam value) { * * *
      -     * The project team associated with the entity, if any.
      +     * Optional. The project team associated with the entity, if any.
            * 
      * - * .google.storage.v2.ProjectTeam project_team = 7; + * + * .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearProjectTeam() { bitField0_ = (bitField0_ & ~0x00000100); @@ -2297,10 +2322,12 @@ public Builder clearProjectTeam() { * * *
      -     * The project team associated with the entity, if any.
      +     * Optional. The project team associated with the entity, if any.
            * 
      * - * .google.storage.v2.ProjectTeam project_team = 7; + * + * .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.ProjectTeam.Builder getProjectTeamBuilder() { bitField0_ |= 0x00000100; @@ -2312,10 +2339,12 @@ public com.google.storage.v2.ProjectTeam.Builder getProjectTeamBuilder() { * * *
      -     * The project team associated with the entity, if any.
      +     * Optional. The project team associated with the entity, if any.
            * 
      * - * .google.storage.v2.ProjectTeam project_team = 7; + * + * .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.ProjectTeamOrBuilder getProjectTeamOrBuilder() { if (projectTeamBuilder_ != null) { @@ -2331,10 +2360,12 @@ public com.google.storage.v2.ProjectTeamOrBuilder getProjectTeamOrBuilder() { * * *
      -     * The project team associated with the entity, if any.
      +     * Optional. The project team associated with the entity, if any.
            * 
      * - * .google.storage.v2.ProjectTeam project_team = 7; + * + * .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.ProjectTeam, diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectAccessControlOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectAccessControlOrBuilder.java index c076d927fd..84a36d44af 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectAccessControlOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectAccessControlOrBuilder.java @@ -28,13 +28,14 @@ public interface ObjectAccessControlOrBuilder * * *
      -   * The access permission for the entity. One of the following values:
      +   * Optional. The access permission for the entity. One of the following
      +   * values:
          * * `READER`
          * * `WRITER`
          * * `OWNER`
          * 
      * - * string role = 1; + * string role = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The role. */ @@ -44,13 +45,14 @@ public interface ObjectAccessControlOrBuilder * * *
      -   * The access permission for the entity. One of the following values:
      +   * Optional. The access permission for the entity. One of the following
      +   * values:
          * * `READER`
          * * `WRITER`
          * * `OWNER`
          * 
      * - * string role = 1; + * string role = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for role. */ @@ -60,10 +62,10 @@ public interface ObjectAccessControlOrBuilder * * *
      -   * The ID of the access-control entry.
      +   * Optional. The ID of the access-control entry.
          * 
      * - * string id = 2; + * string id = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The id. */ @@ -73,10 +75,10 @@ public interface ObjectAccessControlOrBuilder * * *
      -   * The ID of the access-control entry.
      +   * Optional. The ID of the access-control entry.
          * 
      * - * string id = 2; + * string id = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for id. */ @@ -86,7 +88,7 @@ public interface ObjectAccessControlOrBuilder * * *
      -   * The entity holding the permission, in one of the following forms:
      +   * Optional. The entity holding the permission, in one of the following forms:
          * * `user-{userid}`
          * * `user-{email}`
          * * `group-{groupid}`
      @@ -106,7 +108,7 @@ public interface ObjectAccessControlOrBuilder
          * returned on response.
          * 
      * - * string entity = 3; + * string entity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The entity. */ @@ -116,7 +118,7 @@ public interface ObjectAccessControlOrBuilder * * *
      -   * The entity holding the permission, in one of the following forms:
      +   * Optional. The entity holding the permission, in one of the following forms:
          * * `user-{userid}`
          * * `user-{email}`
          * * `group-{groupid}`
      @@ -136,7 +138,7 @@ public interface ObjectAccessControlOrBuilder
          * returned on response.
          * 
      * - * string entity = 3; + * string entity = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for entity. */ @@ -174,10 +176,10 @@ public interface ObjectAccessControlOrBuilder * * *
      -   * The ID for the entity, if any.
      +   * Optional. The ID for the entity, if any.
          * 
      * - * string entity_id = 4; + * string entity_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The entityId. */ @@ -187,10 +189,10 @@ public interface ObjectAccessControlOrBuilder * * *
      -   * The ID for the entity, if any.
      +   * Optional. The ID for the entity, if any.
          * 
      * - * string entity_id = 4; + * string entity_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for entityId. */ @@ -200,13 +202,13 @@ public interface ObjectAccessControlOrBuilder * * *
      -   * The etag of the ObjectAccessControl.
      +   * Optional. The etag of the ObjectAccessControl.
          * If included in the metadata of an update or delete request message, the
          * operation will only be performed if the etag matches that of the live
          * object's ObjectAccessControl.
          * 
      * - * string etag = 8; + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The etag. */ @@ -216,13 +218,13 @@ public interface ObjectAccessControlOrBuilder * * *
      -   * The etag of the ObjectAccessControl.
      +   * Optional. The etag of the ObjectAccessControl.
          * If included in the metadata of an update or delete request message, the
          * operation will only be performed if the etag matches that of the live
          * object's ObjectAccessControl.
          * 
      * - * string etag = 8; + * string etag = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for etag. */ @@ -232,10 +234,10 @@ public interface ObjectAccessControlOrBuilder * * *
      -   * The email address associated with the entity, if any.
      +   * Optional. The email address associated with the entity, if any.
          * 
      * - * string email = 5; + * string email = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The email. */ @@ -245,10 +247,10 @@ public interface ObjectAccessControlOrBuilder * * *
      -   * The email address associated with the entity, if any.
      +   * Optional. The email address associated with the entity, if any.
          * 
      * - * string email = 5; + * string email = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for email. */ @@ -258,10 +260,10 @@ public interface ObjectAccessControlOrBuilder * * *
      -   * The domain associated with the entity, if any.
      +   * Optional. The domain associated with the entity, if any.
          * 
      * - * string domain = 6; + * string domain = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The domain. */ @@ -271,10 +273,10 @@ public interface ObjectAccessControlOrBuilder * * *
      -   * The domain associated with the entity, if any.
      +   * Optional. The domain associated with the entity, if any.
          * 
      * - * string domain = 6; + * string domain = 6 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for domain. */ @@ -284,10 +286,12 @@ public interface ObjectAccessControlOrBuilder * * *
      -   * The project team associated with the entity, if any.
      +   * Optional. The project team associated with the entity, if any.
          * 
      * - * .google.storage.v2.ProjectTeam project_team = 7; + * + * .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the projectTeam field is set. */ @@ -297,10 +301,12 @@ public interface ObjectAccessControlOrBuilder * * *
      -   * The project team associated with the entity, if any.
      +   * Optional. The project team associated with the entity, if any.
          * 
      * - * .google.storage.v2.ProjectTeam project_team = 7; + * + * .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The projectTeam. */ @@ -310,10 +316,12 @@ public interface ObjectAccessControlOrBuilder * * *
      -   * The project team associated with the entity, if any.
      +   * Optional. The project team associated with the entity, if any.
          * 
      * - * .google.storage.v2.ProjectTeam project_team = 7; + * + * .google.storage.v2.ProjectTeam project_team = 7 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.ProjectTeamOrBuilder getProjectTeamOrBuilder(); } diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectChecksums.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectChecksums.java index bff37c391f..cb3b28d0aa 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectChecksums.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectChecksums.java @@ -113,7 +113,7 @@ public int getCrc32C() { * * *
      -   * 128 bit MD5 hash of the object data.
      +   * Optional. 128 bit MD5 hash of the object data.
          * For more information about using the MD5 hash, see
          * [https://cloud.google.com/storage/docs/hashes-etags#json-api][Hashes and
          * ETags: Best Practices].
      @@ -122,7 +122,7 @@ public int getCrc32C() {
          * object.txt | openssl md5 -binary`
          * 
      * - * bytes md5_hash = 2; + * bytes md5_hash = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The md5Hash. */ @@ -589,7 +589,7 @@ public Builder clearCrc32C() { * * *
      -     * 128 bit MD5 hash of the object data.
      +     * Optional. 128 bit MD5 hash of the object data.
            * For more information about using the MD5 hash, see
            * [https://cloud.google.com/storage/docs/hashes-etags#json-api][Hashes and
            * ETags: Best Practices].
      @@ -598,7 +598,7 @@ public Builder clearCrc32C() {
            * object.txt | openssl md5 -binary`
            * 
      * - * bytes md5_hash = 2; + * bytes md5_hash = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The md5Hash. */ @@ -611,7 +611,7 @@ public com.google.protobuf.ByteString getMd5Hash() { * * *
      -     * 128 bit MD5 hash of the object data.
      +     * Optional. 128 bit MD5 hash of the object data.
            * For more information about using the MD5 hash, see
            * [https://cloud.google.com/storage/docs/hashes-etags#json-api][Hashes and
            * ETags: Best Practices].
      @@ -620,7 +620,7 @@ public com.google.protobuf.ByteString getMd5Hash() {
            * object.txt | openssl md5 -binary`
            * 
      * - * bytes md5_hash = 2; + * bytes md5_hash = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The md5Hash to set. * @return This builder for chaining. @@ -639,7 +639,7 @@ public Builder setMd5Hash(com.google.protobuf.ByteString value) { * * *
      -     * 128 bit MD5 hash of the object data.
      +     * Optional. 128 bit MD5 hash of the object data.
            * For more information about using the MD5 hash, see
            * [https://cloud.google.com/storage/docs/hashes-etags#json-api][Hashes and
            * ETags: Best Practices].
      @@ -648,7 +648,7 @@ public Builder setMd5Hash(com.google.protobuf.ByteString value) {
            * object.txt | openssl md5 -binary`
            * 
      * - * bytes md5_hash = 2; + * bytes md5_hash = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectChecksumsOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectChecksumsOrBuilder.java index 89cb9f5fd9..e6c448428a 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectChecksumsOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectChecksumsOrBuilder.java @@ -60,7 +60,7 @@ public interface ObjectChecksumsOrBuilder * * *
      -   * 128 bit MD5 hash of the object data.
      +   * Optional. 128 bit MD5 hash of the object data.
          * For more information about using the MD5 hash, see
          * [https://cloud.google.com/storage/docs/hashes-etags#json-api][Hashes and
          * ETags: Best Practices].
      @@ -69,7 +69,7 @@ public interface ObjectChecksumsOrBuilder
          * object.txt | openssl md5 -binary`
          * 
      * - * bytes md5_hash = 2; + * bytes md5_hash = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The md5Hash. */ diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectOrBuilder.java index 6debf413ba..270c6429ec 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ObjectOrBuilder.java @@ -96,13 +96,13 @@ public interface ObjectOrBuilder * * *
      -   * The etag of the object.
      +   * Optional. The etag of the object.
          * If included in the metadata of an update or delete request message, the
          * operation will only be performed if the etag matches that of the live
          * object.
          * 
      * - * string etag = 27; + * string etag = 27 [(.google.api.field_behavior) = OPTIONAL]; * * @return The etag. */ @@ -112,13 +112,13 @@ public interface ObjectOrBuilder * * *
      -   * The etag of the object.
      +   * Optional. The etag of the object.
          * If included in the metadata of an update or delete request message, the
          * operation will only be performed if the etag matches that of the live
          * object.
          * 
      * - * string etag = 27; + * string etag = 27 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for etag. */ @@ -203,10 +203,10 @@ public interface ObjectOrBuilder * * *
      -   * Storage class of the object.
      +   * Optional. Storage class of the object.
          * 
      * - * string storage_class = 5; + * string storage_class = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The storageClass. */ @@ -216,10 +216,10 @@ public interface ObjectOrBuilder * * *
      -   * Storage class of the object.
      +   * Optional. Storage class of the object.
          * 
      * - * string storage_class = 5; + * string storage_class = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for storageClass. */ @@ -243,11 +243,11 @@ public interface ObjectOrBuilder * * *
      -   * Content-Encoding of the object data, matching
      +   * Optional. Content-Encoding of the object data, matching
          * [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2]
          * 
      * - * string content_encoding = 7; + * string content_encoding = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The contentEncoding. */ @@ -257,11 +257,11 @@ public interface ObjectOrBuilder * * *
      -   * Content-Encoding of the object data, matching
      +   * Optional. Content-Encoding of the object data, matching
          * [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2]
          * 
      * - * string content_encoding = 7; + * string content_encoding = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for contentEncoding. */ @@ -271,11 +271,11 @@ public interface ObjectOrBuilder * * *
      -   * Content-Disposition of the object data, matching
      +   * Optional. Content-Disposition of the object data, matching
          * [https://tools.ietf.org/html/rfc6266][RFC 6266].
          * 
      * - * string content_disposition = 8; + * string content_disposition = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The contentDisposition. */ @@ -285,11 +285,11 @@ public interface ObjectOrBuilder * * *
      -   * Content-Disposition of the object data, matching
      +   * Optional. Content-Disposition of the object data, matching
          * [https://tools.ietf.org/html/rfc6266][RFC 6266].
          * 
      * - * string content_disposition = 8; + * string content_disposition = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for contentDisposition. */ @@ -299,13 +299,13 @@ public interface ObjectOrBuilder * * *
      -   * Cache-Control directive for the object data, matching
      +   * Optional. Cache-Control directive for the object data, matching
          * [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2].
          * If omitted, and the object is accessible to all anonymous users, the
          * default will be `public, max-age=3600`.
          * 
      * - * string cache_control = 9; + * string cache_control = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return The cacheControl. */ @@ -315,13 +315,13 @@ public interface ObjectOrBuilder * * *
      -   * Cache-Control directive for the object data, matching
      +   * Optional. Cache-Control directive for the object data, matching
          * [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2].
          * If omitted, and the object is accessible to all anonymous users, the
          * default will be `public, max-age=3600`.
          * 
      * - * string cache_control = 9; + * string cache_control = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for cacheControl. */ @@ -331,12 +331,14 @@ public interface ObjectOrBuilder * * *
      -   * Access controls on the object.
      +   * Optional. Access controls on the object.
          * If iam_config.uniform_bucket_level_access is enabled on the parent
          * bucket, requests to set, read, or modify acl is an error.
          * 
      * - * repeated .google.storage.v2.ObjectAccessControl acl = 10; + * + * repeated .google.storage.v2.ObjectAccessControl acl = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ java.util.List getAclList(); @@ -344,12 +346,14 @@ public interface ObjectOrBuilder * * *
      -   * Access controls on the object.
      +   * Optional. Access controls on the object.
          * If iam_config.uniform_bucket_level_access is enabled on the parent
          * bucket, requests to set, read, or modify acl is an error.
          * 
      * - * repeated .google.storage.v2.ObjectAccessControl acl = 10; + * + * repeated .google.storage.v2.ObjectAccessControl acl = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.ObjectAccessControl getAcl(int index); @@ -357,12 +361,14 @@ public interface ObjectOrBuilder * * *
      -   * Access controls on the object.
      +   * Optional. Access controls on the object.
          * If iam_config.uniform_bucket_level_access is enabled on the parent
          * bucket, requests to set, read, or modify acl is an error.
          * 
      * - * repeated .google.storage.v2.ObjectAccessControl acl = 10; + * + * repeated .google.storage.v2.ObjectAccessControl acl = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ int getAclCount(); @@ -370,12 +376,14 @@ public interface ObjectOrBuilder * * *
      -   * Access controls on the object.
      +   * Optional. Access controls on the object.
          * If iam_config.uniform_bucket_level_access is enabled on the parent
          * bucket, requests to set, read, or modify acl is an error.
          * 
      * - * repeated .google.storage.v2.ObjectAccessControl acl = 10; + * + * repeated .google.storage.v2.ObjectAccessControl acl = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ java.util.List getAclOrBuilderList(); @@ -384,12 +392,14 @@ public interface ObjectOrBuilder * * *
      -   * Access controls on the object.
      +   * Optional. Access controls on the object.
          * If iam_config.uniform_bucket_level_access is enabled on the parent
          * bucket, requests to set, read, or modify acl is an error.
          * 
      * - * repeated .google.storage.v2.ObjectAccessControl acl = 10; + * + * repeated .google.storage.v2.ObjectAccessControl acl = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.ObjectAccessControlOrBuilder getAclOrBuilder(int index); @@ -397,11 +407,11 @@ public interface ObjectOrBuilder * * *
      -   * Content-Language of the object data, matching
      +   * Optional. Content-Language of the object data, matching
          * [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2].
          * 
      * - * string content_language = 11; + * string content_language = 11 [(.google.api.field_behavior) = OPTIONAL]; * * @return The contentLanguage. */ @@ -411,11 +421,11 @@ public interface ObjectOrBuilder * * *
      -   * Content-Language of the object data, matching
      +   * Optional. Content-Language of the object data, matching
          * [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2].
          * 
      * - * string content_language = 11; + * string content_language = 11 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for contentLanguage. */ @@ -511,13 +521,13 @@ public interface ObjectOrBuilder * * *
      -   * Content-Type of the object data, matching
      +   * Optional. Content-Type of the object data, matching
          * [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5].
          * If an object is stored without a Content-Type, it is served as
          * `application/octet-stream`.
          * 
      * - * string content_type = 13; + * string content_type = 13 [(.google.api.field_behavior) = OPTIONAL]; * * @return The contentType. */ @@ -527,13 +537,13 @@ public interface ObjectOrBuilder * * *
      -   * Content-Type of the object data, matching
      +   * Optional. Content-Type of the object data, matching
          * [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5].
          * If an object is stored without a Content-Type, it is served as
          * `application/octet-stream`.
          * 
      * - * string content_type = 13; + * string content_type = 13 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for contentType. */ @@ -707,11 +717,13 @@ public interface ObjectOrBuilder * * *
      -   * Cloud KMS Key used to encrypt this object, if the object is encrypted by
      -   * such a key.
      +   * Optional. Cloud KMS Key used to encrypt this object, if the object is
      +   * encrypted by such a key.
          * 
      * - * string kms_key = 18 [(.google.api.resource_reference) = { ... } + * + * string kms_key = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The kmsKey. */ @@ -721,11 +733,13 @@ public interface ObjectOrBuilder * * *
      -   * Cloud KMS Key used to encrypt this object, if the object is encrypted by
      -   * such a key.
      +   * Optional. Cloud KMS Key used to encrypt this object, if the object is
      +   * encrypted by such a key.
          * 
      * - * string kms_key = 18 [(.google.api.resource_reference) = { ... } + * + * string kms_key = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for kmsKey. */ @@ -781,14 +795,15 @@ public interface ObjectOrBuilder * * *
      -   * Whether an object is under temporary hold. While this flag is set to true,
      -   * the object is protected against deletion and overwrites.  A common use case
      -   * of this flag is regulatory investigations where objects need to be retained
      -   * while the investigation is ongoing. Note that unlike event-based hold,
      -   * temporary hold does not impact retention expiration time of an object.
      +   * Optional. Whether an object is under temporary hold. While this flag is set
      +   * to true, the object is protected against deletion and overwrites.  A common
      +   * use case of this flag is regulatory investigations where objects need to be
      +   * retained while the investigation is ongoing. Note that unlike event-based
      +   * hold, temporary hold does not impact retention expiration time of an
      +   * object.
          * 
      * - * bool temporary_hold = 20; + * bool temporary_hold = 20 [(.google.api.field_behavior) = OPTIONAL]; * * @return The temporaryHold. */ @@ -798,16 +813,17 @@ public interface ObjectOrBuilder * * *
      -   * A server-determined value that specifies the earliest time that the
      -   * object's retention period expires.
      -   * Note 1: This field is not provided for objects with an active event-based
      -   * hold, since retention expiration is unknown until the hold is removed.
      -   * Note 2: This value can be provided even when temporary hold is set (so that
      -   * the user can reason about policy without having to first unset the
      -   * temporary hold).
      +   * Optional. A server-determined value that specifies the earliest time that
      +   * the object's retention period expires. Note 1: This field is not provided
      +   * for objects with an active event-based hold, since retention expiration is
      +   * unknown until the hold is removed. Note 2: This value can be provided even
      +   * when temporary hold is set (so that the user can reason about policy
      +   * without having to first unset the temporary hold).
          * 
      * - * .google.protobuf.Timestamp retention_expire_time = 21; + * + * .google.protobuf.Timestamp retention_expire_time = 21 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the retentionExpireTime field is set. */ @@ -817,16 +833,17 @@ public interface ObjectOrBuilder * * *
      -   * A server-determined value that specifies the earliest time that the
      -   * object's retention period expires.
      -   * Note 1: This field is not provided for objects with an active event-based
      -   * hold, since retention expiration is unknown until the hold is removed.
      -   * Note 2: This value can be provided even when temporary hold is set (so that
      -   * the user can reason about policy without having to first unset the
      -   * temporary hold).
      +   * Optional. A server-determined value that specifies the earliest time that
      +   * the object's retention period expires. Note 1: This field is not provided
      +   * for objects with an active event-based hold, since retention expiration is
      +   * unknown until the hold is removed. Note 2: This value can be provided even
      +   * when temporary hold is set (so that the user can reason about policy
      +   * without having to first unset the temporary hold).
          * 
      * - * .google.protobuf.Timestamp retention_expire_time = 21; + * + * .google.protobuf.Timestamp retention_expire_time = 21 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The retentionExpireTime. */ @@ -836,16 +853,17 @@ public interface ObjectOrBuilder * * *
      -   * A server-determined value that specifies the earliest time that the
      -   * object's retention period expires.
      -   * Note 1: This field is not provided for objects with an active event-based
      -   * hold, since retention expiration is unknown until the hold is removed.
      -   * Note 2: This value can be provided even when temporary hold is set (so that
      -   * the user can reason about policy without having to first unset the
      -   * temporary hold).
      +   * Optional. A server-determined value that specifies the earliest time that
      +   * the object's retention period expires. Note 1: This field is not provided
      +   * for objects with an active event-based hold, since retention expiration is
      +   * unknown until the hold is removed. Note 2: This value can be provided even
      +   * when temporary hold is set (so that the user can reason about policy
      +   * without having to first unset the temporary hold).
          * 
      * - * .google.protobuf.Timestamp retention_expire_time = 21; + * + * .google.protobuf.Timestamp retention_expire_time = 21 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.protobuf.TimestampOrBuilder getRetentionExpireTimeOrBuilder(); @@ -853,10 +871,10 @@ public interface ObjectOrBuilder * * *
      -   * User-provided metadata, in key/value pairs.
      +   * Optional. User-provided metadata, in key/value pairs.
          * 
      * - * map<string, string> metadata = 22; + * map<string, string> metadata = 22 [(.google.api.field_behavior) = OPTIONAL]; */ int getMetadataCount(); @@ -864,10 +882,10 @@ public interface ObjectOrBuilder * * *
      -   * User-provided metadata, in key/value pairs.
      +   * Optional. User-provided metadata, in key/value pairs.
          * 
      * - * map<string, string> metadata = 22; + * map<string, string> metadata = 22 [(.google.api.field_behavior) = OPTIONAL]; */ boolean containsMetadata(java.lang.String key); @@ -879,10 +897,10 @@ public interface ObjectOrBuilder * * *
      -   * User-provided metadata, in key/value pairs.
      +   * Optional. User-provided metadata, in key/value pairs.
          * 
      * - * map<string, string> metadata = 22; + * map<string, string> metadata = 22 [(.google.api.field_behavior) = OPTIONAL]; */ java.util.Map getMetadataMap(); @@ -890,10 +908,10 @@ public interface ObjectOrBuilder * * *
      -   * User-provided metadata, in key/value pairs.
      +   * Optional. User-provided metadata, in key/value pairs.
          * 
      * - * map<string, string> metadata = 22; + * map<string, string> metadata = 22 [(.google.api.field_behavior) = OPTIONAL]; */ /* nullable */ java.lang.String getMetadataOrDefault( @@ -905,10 +923,10 @@ java.lang.String getMetadataOrDefault( * * *
      -   * User-provided metadata, in key/value pairs.
      +   * Optional. User-provided metadata, in key/value pairs.
          * 
      * - * map<string, string> metadata = 22; + * map<string, string> metadata = 22 [(.google.api.field_behavior) = OPTIONAL]; */ java.lang.String getMetadataOrThrow(java.lang.String key); @@ -1002,11 +1020,13 @@ java.lang.String getMetadataOrDefault( * * *
      -   * Metadata of Customer-Supplied Encryption Key, if the object is encrypted by
      -   * such a key.
      +   * Optional. Metadata of Customer-Supplied Encryption Key, if the object is
      +   * encrypted by such a key.
          * 
      * - * .google.storage.v2.CustomerEncryption customer_encryption = 25; + * + * .google.storage.v2.CustomerEncryption customer_encryption = 25 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the customerEncryption field is set. */ @@ -1016,11 +1036,13 @@ java.lang.String getMetadataOrDefault( * * *
      -   * Metadata of Customer-Supplied Encryption Key, if the object is encrypted by
      -   * such a key.
      +   * Optional. Metadata of Customer-Supplied Encryption Key, if the object is
      +   * encrypted by such a key.
          * 
      * - * .google.storage.v2.CustomerEncryption customer_encryption = 25; + * + * .google.storage.v2.CustomerEncryption customer_encryption = 25 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The customerEncryption. */ @@ -1030,11 +1052,13 @@ java.lang.String getMetadataOrDefault( * * *
      -   * Metadata of Customer-Supplied Encryption Key, if the object is encrypted by
      -   * such a key.
      +   * Optional. Metadata of Customer-Supplied Encryption Key, if the object is
      +   * encrypted by such a key.
          * 
      * - * .google.storage.v2.CustomerEncryption customer_encryption = 25; + * + * .google.storage.v2.CustomerEncryption customer_encryption = 25 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.CustomerEncryptionOrBuilder getCustomerEncryptionOrBuilder(); @@ -1042,10 +1066,11 @@ java.lang.String getMetadataOrDefault( * * *
      -   * A user-specified timestamp set on an object.
      +   * Optional. A user-specified timestamp set on an object.
          * 
      * - * .google.protobuf.Timestamp custom_time = 26; + * .google.protobuf.Timestamp custom_time = 26 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the customTime field is set. */ @@ -1055,10 +1080,11 @@ java.lang.String getMetadataOrDefault( * * *
      -   * A user-specified timestamp set on an object.
      +   * Optional. A user-specified timestamp set on an object.
          * 
      * - * .google.protobuf.Timestamp custom_time = 26; + * .google.protobuf.Timestamp custom_time = 26 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The customTime. */ @@ -1068,10 +1094,11 @@ java.lang.String getMetadataOrDefault( * * *
      -   * A user-specified timestamp set on an object.
      +   * Optional. A user-specified timestamp set on an object.
          * 
      * - * .google.protobuf.Timestamp custom_time = 26; + * .google.protobuf.Timestamp custom_time = 26 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.protobuf.TimestampOrBuilder getCustomTimeOrBuilder(); @@ -1178,4 +1205,50 @@ java.lang.String getMetadataOrDefault( *
      */ com.google.protobuf.TimestampOrBuilder getHardDeleteTimeOrBuilder(); + + /** + * + * + *
      +   * Optional. Retention configuration of this object.
      +   * May only be configured if the bucket has object retention enabled.
      +   * 
      + * + * + * .google.storage.v2.Object.Retention retention = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the retention field is set. + */ + boolean hasRetention(); + + /** + * + * + *
      +   * Optional. Retention configuration of this object.
      +   * May only be configured if the bucket has object retention enabled.
      +   * 
      + * + * + * .google.storage.v2.Object.Retention retention = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The retention. + */ + com.google.storage.v2.Object.Retention getRetention(); + + /** + * + * + *
      +   * Optional. Retention configuration of this object.
      +   * May only be configured if the bucket has object retention enabled.
      +   * 
      + * + * + * .google.storage.v2.Object.Retention retention = 30 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.storage.v2.Object.RetentionOrBuilder getRetentionOrBuilder(); } diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Owner.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Owner.java index 19151bbcd5..236b7e1e4f 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Owner.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/Owner.java @@ -72,10 +72,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
      -   * The entity, in the form `user-`*userId*.
      +   * Optional. The entity, in the form `user-`*userId*.
          * 
      * - * string entity = 1; + * string entity = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The entity. */ @@ -96,10 +96,10 @@ public java.lang.String getEntity() { * * *
      -   * The entity, in the form `user-`*userId*.
      +   * Optional. The entity, in the form `user-`*userId*.
          * 
      * - * string entity = 1; + * string entity = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for entity. */ @@ -125,10 +125,10 @@ public com.google.protobuf.ByteString getEntityBytes() { * * *
      -   * The ID for the entity.
      +   * Optional. The ID for the entity.
          * 
      * - * string entity_id = 2; + * string entity_id = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The entityId. */ @@ -149,10 +149,10 @@ public java.lang.String getEntityId() { * * *
      -   * The ID for the entity.
      +   * Optional. The ID for the entity.
          * 
      * - * string entity_id = 2; + * string entity_id = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for entityId. */ @@ -535,10 +535,10 @@ public Builder mergeFrom( * * *
      -     * The entity, in the form `user-`*userId*.
      +     * Optional. The entity, in the form `user-`*userId*.
            * 
      * - * string entity = 1; + * string entity = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The entity. */ @@ -558,10 +558,10 @@ public java.lang.String getEntity() { * * *
      -     * The entity, in the form `user-`*userId*.
      +     * Optional. The entity, in the form `user-`*userId*.
            * 
      * - * string entity = 1; + * string entity = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for entity. */ @@ -581,10 +581,10 @@ public com.google.protobuf.ByteString getEntityBytes() { * * *
      -     * The entity, in the form `user-`*userId*.
      +     * Optional. The entity, in the form `user-`*userId*.
            * 
      * - * string entity = 1; + * string entity = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The entity to set. * @return This builder for chaining. @@ -603,10 +603,10 @@ public Builder setEntity(java.lang.String value) { * * *
      -     * The entity, in the form `user-`*userId*.
      +     * Optional. The entity, in the form `user-`*userId*.
            * 
      * - * string entity = 1; + * string entity = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -621,10 +621,10 @@ public Builder clearEntity() { * * *
      -     * The entity, in the form `user-`*userId*.
      +     * Optional. The entity, in the form `user-`*userId*.
            * 
      * - * string entity = 1; + * string entity = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for entity to set. * @return This builder for chaining. @@ -646,10 +646,10 @@ public Builder setEntityBytes(com.google.protobuf.ByteString value) { * * *
      -     * The ID for the entity.
      +     * Optional. The ID for the entity.
            * 
      * - * string entity_id = 2; + * string entity_id = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The entityId. */ @@ -669,10 +669,10 @@ public java.lang.String getEntityId() { * * *
      -     * The ID for the entity.
      +     * Optional. The ID for the entity.
            * 
      * - * string entity_id = 2; + * string entity_id = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for entityId. */ @@ -692,10 +692,10 @@ public com.google.protobuf.ByteString getEntityIdBytes() { * * *
      -     * The ID for the entity.
      +     * Optional. The ID for the entity.
            * 
      * - * string entity_id = 2; + * string entity_id = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The entityId to set. * @return This builder for chaining. @@ -714,10 +714,10 @@ public Builder setEntityId(java.lang.String value) { * * *
      -     * The ID for the entity.
      +     * Optional. The ID for the entity.
            * 
      * - * string entity_id = 2; + * string entity_id = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -732,10 +732,10 @@ public Builder clearEntityId() { * * *
      -     * The ID for the entity.
      +     * Optional. The ID for the entity.
            * 
      * - * string entity_id = 2; + * string entity_id = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for entityId to set. * @return This builder for chaining. diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/OwnerOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/OwnerOrBuilder.java index 2a43b221d1..842d0dfe68 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/OwnerOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/OwnerOrBuilder.java @@ -28,10 +28,10 @@ public interface OwnerOrBuilder * * *
      -   * The entity, in the form `user-`*userId*.
      +   * Optional. The entity, in the form `user-`*userId*.
          * 
      * - * string entity = 1; + * string entity = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The entity. */ @@ -41,10 +41,10 @@ public interface OwnerOrBuilder * * *
      -   * The entity, in the form `user-`*userId*.
      +   * Optional. The entity, in the form `user-`*userId*.
          * 
      * - * string entity = 1; + * string entity = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for entity. */ @@ -54,10 +54,10 @@ public interface OwnerOrBuilder * * *
      -   * The ID for the entity.
      +   * Optional. The ID for the entity.
          * 
      * - * string entity_id = 2; + * string entity_id = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The entityId. */ @@ -67,10 +67,10 @@ public interface OwnerOrBuilder * * *
      -   * The ID for the entity.
      +   * Optional. The ID for the entity.
          * 
      * - * string entity_id = 2; + * string entity_id = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for entityId. */ diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ProjectTeam.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ProjectTeam.java index be38777468..75e555db82 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ProjectTeam.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ProjectTeam.java @@ -74,10 +74,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
      -   * The project number.
      +   * Optional. The project number.
          * 
      * - * string project_number = 1; + * string project_number = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The projectNumber. */ @@ -98,10 +98,10 @@ public java.lang.String getProjectNumber() { * * *
      -   * The project number.
      +   * Optional. The project number.
          * 
      * - * string project_number = 1; + * string project_number = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for projectNumber. */ @@ -127,10 +127,10 @@ public com.google.protobuf.ByteString getProjectNumberBytes() { * * *
      -   * The team.
      +   * Optional. The team.
          * 
      * - * string team = 2; + * string team = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The team. */ @@ -151,10 +151,10 @@ public java.lang.String getTeam() { * * *
      -   * The team.
      +   * Optional. The team.
          * 
      * - * string team = 2; + * string team = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for team. */ @@ -540,10 +540,10 @@ public Builder mergeFrom( * * *
      -     * The project number.
      +     * Optional. The project number.
            * 
      * - * string project_number = 1; + * string project_number = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The projectNumber. */ @@ -563,10 +563,10 @@ public java.lang.String getProjectNumber() { * * *
      -     * The project number.
      +     * Optional. The project number.
            * 
      * - * string project_number = 1; + * string project_number = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for projectNumber. */ @@ -586,10 +586,10 @@ public com.google.protobuf.ByteString getProjectNumberBytes() { * * *
      -     * The project number.
      +     * Optional. The project number.
            * 
      * - * string project_number = 1; + * string project_number = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The projectNumber to set. * @return This builder for chaining. @@ -608,10 +608,10 @@ public Builder setProjectNumber(java.lang.String value) { * * *
      -     * The project number.
      +     * Optional. The project number.
            * 
      * - * string project_number = 1; + * string project_number = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -626,10 +626,10 @@ public Builder clearProjectNumber() { * * *
      -     * The project number.
      +     * Optional. The project number.
            * 
      * - * string project_number = 1; + * string project_number = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for projectNumber to set. * @return This builder for chaining. @@ -651,10 +651,10 @@ public Builder setProjectNumberBytes(com.google.protobuf.ByteString value) { * * *
      -     * The team.
      +     * Optional. The team.
            * 
      * - * string team = 2; + * string team = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The team. */ @@ -674,10 +674,10 @@ public java.lang.String getTeam() { * * *
      -     * The team.
      +     * Optional. The team.
            * 
      * - * string team = 2; + * string team = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for team. */ @@ -697,10 +697,10 @@ public com.google.protobuf.ByteString getTeamBytes() { * * *
      -     * The team.
      +     * Optional. The team.
            * 
      * - * string team = 2; + * string team = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The team to set. * @return This builder for chaining. @@ -719,10 +719,10 @@ public Builder setTeam(java.lang.String value) { * * *
      -     * The team.
      +     * Optional. The team.
            * 
      * - * string team = 2; + * string team = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -737,10 +737,10 @@ public Builder clearTeam() { * * *
      -     * The team.
      +     * Optional. The team.
            * 
      * - * string team = 2; + * string team = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for team to set. * @return This builder for chaining. diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ProjectTeamOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ProjectTeamOrBuilder.java index 2361df1309..a974bc7e36 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ProjectTeamOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ProjectTeamOrBuilder.java @@ -28,10 +28,10 @@ public interface ProjectTeamOrBuilder * * *
      -   * The project number.
      +   * Optional. The project number.
          * 
      * - * string project_number = 1; + * string project_number = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The projectNumber. */ @@ -41,10 +41,10 @@ public interface ProjectTeamOrBuilder * * *
      -   * The project number.
      +   * Optional. The project number.
          * 
      * - * string project_number = 1; + * string project_number = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for projectNumber. */ @@ -54,10 +54,10 @@ public interface ProjectTeamOrBuilder * * *
      -   * The team.
      +   * Optional. The team.
          * 
      * - * string team = 2; + * string team = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The team. */ @@ -67,10 +67,10 @@ public interface ProjectTeamOrBuilder * * *
      -   * The team.
      +   * Optional. The team.
          * 
      * - * string team = 2; + * string team = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for team. */ diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/QueryWriteStatusRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/QueryWriteStatusRequest.java index 3772801e43..3054ea5427 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/QueryWriteStatusRequest.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/QueryWriteStatusRequest.java @@ -127,10 +127,13 @@ public com.google.protobuf.ByteString getUploadIdBytes() { * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 2; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -143,10 +146,13 @@ public boolean hasCommonObjectRequestParams() { * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 2; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -161,10 +167,13 @@ public com.google.storage.v2.CommonObjectRequestParams getCommonObjectRequestPar * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 2; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.CommonObjectRequestParamsOrBuilder @@ -693,10 +702,13 @@ public Builder setUploadIdBytes(com.google.protobuf.ByteString value) { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 2; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -708,10 +720,13 @@ public boolean hasCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 2; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -729,10 +744,13 @@ public com.google.storage.v2.CommonObjectRequestParams getCommonObjectRequestPar * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 2; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams value) { @@ -753,10 +771,13 @@ public Builder setCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 2; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams.Builder builderForValue) { @@ -774,10 +795,13 @@ public Builder setCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 2; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams value) { @@ -804,10 +828,13 @@ public Builder mergeCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 2; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearCommonObjectRequestParams() { bitField0_ = (bitField0_ & ~0x00000002); @@ -824,10 +851,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 2; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.CommonObjectRequestParams.Builder getCommonObjectRequestParamsBuilder() { @@ -840,10 +870,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 2; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.CommonObjectRequestParamsOrBuilder getCommonObjectRequestParamsOrBuilder() { @@ -860,10 +893,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 2; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.CommonObjectRequestParams, diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/QueryWriteStatusRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/QueryWriteStatusRequestOrBuilder.java index 6c700e6bc8..579c423d93 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/QueryWriteStatusRequestOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/QueryWriteStatusRequestOrBuilder.java @@ -56,10 +56,13 @@ public interface QueryWriteStatusRequestOrBuilder * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 2; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -69,10 +72,13 @@ public interface QueryWriteStatusRequestOrBuilder * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 2; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 2 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -82,10 +88,13 @@ public interface QueryWriteStatusRequestOrBuilder * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 2; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.CommonObjectRequestParamsOrBuilder getCommonObjectRequestParamsOrBuilder(); } diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ReadObjectRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ReadObjectRequest.java index 6ed478621c..248d9a89fa 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ReadObjectRequest.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ReadObjectRequest.java @@ -183,11 +183,11 @@ public com.google.protobuf.ByteString getObjectBytes() { * * *
      -   * If present, selects a specific revision of this object (as opposed
      -   * to the latest version, the default).
      +   * Optional. If present, selects a specific revision of this object (as
      +   * opposed to the latest version, the default).
          * 
      * - * int64 generation = 3; + * int64 generation = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The generation. */ @@ -203,8 +203,8 @@ public long getGeneration() { * * *
      -   * The offset for the first byte to return in the read, relative to the start
      -   * of the object.
      +   * Optional. The offset for the first byte to return in the read, relative to
      +   * the start of the object.
          *
          * A negative `read_offset` value will be interpreted as the number of bytes
          * back from the end of the object to be returned. For example, if an object's
      @@ -214,7 +214,7 @@ public long getGeneration() {
          * return the entire object.
          * 
      * - * int64 read_offset = 4; + * int64 read_offset = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The readOffset. */ @@ -230,16 +230,17 @@ public long getReadOffset() { * * *
      -   * The maximum number of `data` bytes the server is allowed to return in the
      -   * sum of all `Object` messages. A `read_limit` of zero indicates that there
      -   * is no limit, and a negative `read_limit` will cause an error.
      +   * Optional. The maximum number of `data` bytes the server is allowed to
      +   * return in the sum of all `Object` messages. A `read_limit` of zero
      +   * indicates that there is no limit, and a negative `read_limit` will cause an
      +   * error.
          *
          * If the stream returns fewer bytes than allowed by the `read_limit` and no
          * error occurred, the stream includes all data from the `read_offset` to the
          * end of the resource.
          * 
      * - * int64 read_limit = 5; + * int64 read_limit = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The readLimit. */ @@ -409,10 +410,13 @@ public long getIfMetagenerationNotMatch() { * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -425,10 +429,13 @@ public boolean hasCommonObjectRequestParams() { * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -443,10 +450,13 @@ public com.google.storage.v2.CommonObjectRequestParams getCommonObjectRequestPar * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.CommonObjectRequestParamsOrBuilder @@ -1381,11 +1391,11 @@ public Builder setObjectBytes(com.google.protobuf.ByteString value) { * * *
      -     * If present, selects a specific revision of this object (as opposed
      -     * to the latest version, the default).
      +     * Optional. If present, selects a specific revision of this object (as
      +     * opposed to the latest version, the default).
            * 
      * - * int64 generation = 3; + * int64 generation = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The generation. */ @@ -1398,11 +1408,11 @@ public long getGeneration() { * * *
      -     * If present, selects a specific revision of this object (as opposed
      -     * to the latest version, the default).
      +     * Optional. If present, selects a specific revision of this object (as
      +     * opposed to the latest version, the default).
            * 
      * - * int64 generation = 3; + * int64 generation = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The generation to set. * @return This builder for chaining. @@ -1419,11 +1429,11 @@ public Builder setGeneration(long value) { * * *
      -     * If present, selects a specific revision of this object (as opposed
      -     * to the latest version, the default).
      +     * Optional. If present, selects a specific revision of this object (as
      +     * opposed to the latest version, the default).
            * 
      * - * int64 generation = 3; + * int64 generation = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1440,8 +1450,8 @@ public Builder clearGeneration() { * * *
      -     * The offset for the first byte to return in the read, relative to the start
      -     * of the object.
      +     * Optional. The offset for the first byte to return in the read, relative to
      +     * the start of the object.
            *
            * A negative `read_offset` value will be interpreted as the number of bytes
            * back from the end of the object to be returned. For example, if an object's
      @@ -1451,7 +1461,7 @@ public Builder clearGeneration() {
            * return the entire object.
            * 
      * - * int64 read_offset = 4; + * int64 read_offset = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The readOffset. */ @@ -1464,8 +1474,8 @@ public long getReadOffset() { * * *
      -     * The offset for the first byte to return in the read, relative to the start
      -     * of the object.
      +     * Optional. The offset for the first byte to return in the read, relative to
      +     * the start of the object.
            *
            * A negative `read_offset` value will be interpreted as the number of bytes
            * back from the end of the object to be returned. For example, if an object's
      @@ -1475,7 +1485,7 @@ public long getReadOffset() {
            * return the entire object.
            * 
      * - * int64 read_offset = 4; + * int64 read_offset = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The readOffset to set. * @return This builder for chaining. @@ -1492,8 +1502,8 @@ public Builder setReadOffset(long value) { * * *
      -     * The offset for the first byte to return in the read, relative to the start
      -     * of the object.
      +     * Optional. The offset for the first byte to return in the read, relative to
      +     * the start of the object.
            *
            * A negative `read_offset` value will be interpreted as the number of bytes
            * back from the end of the object to be returned. For example, if an object's
      @@ -1503,7 +1513,7 @@ public Builder setReadOffset(long value) {
            * return the entire object.
            * 
      * - * int64 read_offset = 4; + * int64 read_offset = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1520,16 +1530,17 @@ public Builder clearReadOffset() { * * *
      -     * The maximum number of `data` bytes the server is allowed to return in the
      -     * sum of all `Object` messages. A `read_limit` of zero indicates that there
      -     * is no limit, and a negative `read_limit` will cause an error.
      +     * Optional. The maximum number of `data` bytes the server is allowed to
      +     * return in the sum of all `Object` messages. A `read_limit` of zero
      +     * indicates that there is no limit, and a negative `read_limit` will cause an
      +     * error.
            *
            * If the stream returns fewer bytes than allowed by the `read_limit` and no
            * error occurred, the stream includes all data from the `read_offset` to the
            * end of the resource.
            * 
      * - * int64 read_limit = 5; + * int64 read_limit = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The readLimit. */ @@ -1542,16 +1553,17 @@ public long getReadLimit() { * * *
      -     * The maximum number of `data` bytes the server is allowed to return in the
      -     * sum of all `Object` messages. A `read_limit` of zero indicates that there
      -     * is no limit, and a negative `read_limit` will cause an error.
      +     * Optional. The maximum number of `data` bytes the server is allowed to
      +     * return in the sum of all `Object` messages. A `read_limit` of zero
      +     * indicates that there is no limit, and a negative `read_limit` will cause an
      +     * error.
            *
            * If the stream returns fewer bytes than allowed by the `read_limit` and no
            * error occurred, the stream includes all data from the `read_offset` to the
            * end of the resource.
            * 
      * - * int64 read_limit = 5; + * int64 read_limit = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The readLimit to set. * @return This builder for chaining. @@ -1568,16 +1580,17 @@ public Builder setReadLimit(long value) { * * *
      -     * The maximum number of `data` bytes the server is allowed to return in the
      -     * sum of all `Object` messages. A `read_limit` of zero indicates that there
      -     * is no limit, and a negative `read_limit` will cause an error.
      +     * Optional. The maximum number of `data` bytes the server is allowed to
      +     * return in the sum of all `Object` messages. A `read_limit` of zero
      +     * indicates that there is no limit, and a negative `read_limit` will cause an
      +     * error.
            *
            * If the stream returns fewer bytes than allowed by the `read_limit` and no
            * error occurred, the stream includes all data from the `read_offset` to the
            * end of the resource.
            * 
      * - * int64 read_limit = 5; + * int64 read_limit = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1915,10 +1928,13 @@ public Builder clearIfMetagenerationNotMatch() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -1930,10 +1946,13 @@ public boolean hasCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -1951,10 +1970,13 @@ public com.google.storage.v2.CommonObjectRequestParams getCommonObjectRequestPar * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams value) { @@ -1975,10 +1997,13 @@ public Builder setCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams.Builder builderForValue) { @@ -1996,10 +2021,13 @@ public Builder setCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams value) { @@ -2026,10 +2054,13 @@ public Builder mergeCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearCommonObjectRequestParams() { bitField0_ = (bitField0_ & ~0x00000200); @@ -2046,10 +2077,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.CommonObjectRequestParams.Builder getCommonObjectRequestParamsBuilder() { @@ -2062,10 +2096,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.CommonObjectRequestParamsOrBuilder getCommonObjectRequestParamsOrBuilder() { @@ -2082,10 +2119,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.CommonObjectRequestParams, diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ReadObjectRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ReadObjectRequestOrBuilder.java index 3f6f41a2d8..d7ebc80a28 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ReadObjectRequestOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/ReadObjectRequestOrBuilder.java @@ -84,11 +84,11 @@ public interface ReadObjectRequestOrBuilder * * *
      -   * If present, selects a specific revision of this object (as opposed
      -   * to the latest version, the default).
      +   * Optional. If present, selects a specific revision of this object (as
      +   * opposed to the latest version, the default).
          * 
      * - * int64 generation = 3; + * int64 generation = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The generation. */ @@ -98,8 +98,8 @@ public interface ReadObjectRequestOrBuilder * * *
      -   * The offset for the first byte to return in the read, relative to the start
      -   * of the object.
      +   * Optional. The offset for the first byte to return in the read, relative to
      +   * the start of the object.
          *
          * A negative `read_offset` value will be interpreted as the number of bytes
          * back from the end of the object to be returned. For example, if an object's
      @@ -109,7 +109,7 @@ public interface ReadObjectRequestOrBuilder
          * return the entire object.
          * 
      * - * int64 read_offset = 4; + * int64 read_offset = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The readOffset. */ @@ -119,16 +119,17 @@ public interface ReadObjectRequestOrBuilder * * *
      -   * The maximum number of `data` bytes the server is allowed to return in the
      -   * sum of all `Object` messages. A `read_limit` of zero indicates that there
      -   * is no limit, and a negative `read_limit` will cause an error.
      +   * Optional. The maximum number of `data` bytes the server is allowed to
      +   * return in the sum of all `Object` messages. A `read_limit` of zero
      +   * indicates that there is no limit, and a negative `read_limit` will cause an
      +   * error.
          *
          * If the stream returns fewer bytes than allowed by the `read_limit` and no
          * error occurred, the stream includes all data from the `read_offset` to the
          * end of the resource.
          * 
      * - * int64 read_limit = 5; + * int64 read_limit = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The readLimit. */ @@ -256,10 +257,13 @@ public interface ReadObjectRequestOrBuilder * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -269,10 +273,13 @@ public interface ReadObjectRequestOrBuilder * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -282,10 +289,13 @@ public interface ReadObjectRequestOrBuilder * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.CommonObjectRequestParamsOrBuilder getCommonObjectRequestParamsOrBuilder(); diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RestoreObjectRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RestoreObjectRequest.java index e348366de8..e56a27a916 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RestoreObjectRequest.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RestoreObjectRequest.java @@ -458,10 +458,13 @@ public boolean getCopySourceAcl() { * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -474,10 +477,13 @@ public boolean hasCommonObjectRequestParams() { * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -492,10 +498,13 @@ public com.google.storage.v2.CommonObjectRequestParams getCommonObjectRequestPar * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.CommonObjectRequestParamsOrBuilder @@ -1934,10 +1943,13 @@ public Builder clearCopySourceAcl() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -1949,10 +1961,13 @@ public boolean hasCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -1970,10 +1985,13 @@ public com.google.storage.v2.CommonObjectRequestParams getCommonObjectRequestPar * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams value) { @@ -1994,10 +2012,13 @@ public Builder setCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams.Builder builderForValue) { @@ -2015,10 +2036,13 @@ public Builder setCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams value) { @@ -2045,10 +2069,13 @@ public Builder mergeCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearCommonObjectRequestParams() { bitField0_ = (bitField0_ & ~0x00000200); @@ -2065,10 +2092,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.CommonObjectRequestParams.Builder getCommonObjectRequestParamsBuilder() { @@ -2081,10 +2111,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.CommonObjectRequestParamsOrBuilder getCommonObjectRequestParamsOrBuilder() { @@ -2101,10 +2134,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.CommonObjectRequestParams, diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RestoreObjectRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RestoreObjectRequestOrBuilder.java index 6587c7c621..f344f0046b 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RestoreObjectRequestOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RestoreObjectRequestOrBuilder.java @@ -279,10 +279,13 @@ public interface RestoreObjectRequestOrBuilder * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -292,10 +295,13 @@ public interface RestoreObjectRequestOrBuilder * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -305,10 +311,13 @@ public interface RestoreObjectRequestOrBuilder * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.CommonObjectRequestParamsOrBuilder getCommonObjectRequestParamsOrBuilder(); } diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RewriteObjectRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RewriteObjectRequest.java index 16cdd85a3c..be7c53bbcc 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RewriteObjectRequest.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RewriteObjectRequest.java @@ -218,14 +218,16 @@ public com.google.protobuf.ByteString getDestinationBucketBytes() { * * *
      -   * The name of the Cloud KMS key that will be used to encrypt the destination
      -   * object. The Cloud KMS key must be located in same location as the object.
      -   * If the parameter is not specified, the request uses the destination
      -   * bucket's default encryption key, if any, or else the Google-managed
      -   * encryption key.
      +   * Optional. The name of the Cloud KMS key that will be used to encrypt the
      +   * destination object. The Cloud KMS key must be located in same location as
      +   * the object. If the parameter is not specified, the request uses the
      +   * destination bucket's default encryption key, if any, or else the
      +   * Google-managed encryption key.
          * 
      * - * string destination_kms_key = 27 [(.google.api.resource_reference) = { ... } + * + * string destination_kms_key = 27 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The destinationKmsKey. */ @@ -246,14 +248,16 @@ public java.lang.String getDestinationKmsKey() { * * *
      -   * The name of the Cloud KMS key that will be used to encrypt the destination
      -   * object. The Cloud KMS key must be located in same location as the object.
      -   * If the parameter is not specified, the request uses the destination
      -   * bucket's default encryption key, if any, or else the Google-managed
      -   * encryption key.
      +   * Optional. The name of the Cloud KMS key that will be used to encrypt the
      +   * destination object. The Cloud KMS key must be located in same location as
      +   * the object. If the parameter is not specified, the request uses the
      +   * destination bucket's default encryption key, if any, or else the
      +   * Google-managed encryption key.
          * 
      * - * string destination_kms_key = 27 [(.google.api.resource_reference) = { ... } + * + * string destination_kms_key = 27 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for destinationKmsKey. */ @@ -277,7 +281,7 @@ public com.google.protobuf.ByteString getDestinationKmsKeyBytes() { * * *
      -   * Properties of the destination, post-rewrite object.
      +   * Optional. Properties of the destination, post-rewrite object.
          * The `name`, `bucket` and `kms_key` fields must not be populated (these
          * values are specified in the `destination_name`, `destination_bucket`, and
          * `destination_kms_key` fields).
      @@ -286,7 +290,8 @@ public com.google.protobuf.ByteString getDestinationKmsKeyBytes() {
          * copied from the source object.
          * 
      * - * .google.storage.v2.Object destination = 1; + * .google.storage.v2.Object destination = 1 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the destination field is set. */ @@ -299,7 +304,7 @@ public boolean hasDestination() { * * *
      -   * Properties of the destination, post-rewrite object.
      +   * Optional. Properties of the destination, post-rewrite object.
          * The `name`, `bucket` and `kms_key` fields must not be populated (these
          * values are specified in the `destination_name`, `destination_bucket`, and
          * `destination_kms_key` fields).
      @@ -308,7 +313,8 @@ public boolean hasDestination() {
          * copied from the source object.
          * 
      * - * .google.storage.v2.Object destination = 1; + * .google.storage.v2.Object destination = 1 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The destination. */ @@ -321,7 +327,7 @@ public com.google.storage.v2.Object getDestination() { * * *
      -   * Properties of the destination, post-rewrite object.
      +   * Optional. Properties of the destination, post-rewrite object.
          * The `name`, `bucket` and `kms_key` fields must not be populated (these
          * values are specified in the `destination_name`, `destination_bucket`, and
          * `destination_kms_key` fields).
      @@ -330,7 +336,8 @@ public com.google.storage.v2.Object getDestination() {
          * copied from the source object.
          * 
      * - * .google.storage.v2.Object destination = 1; + * .google.storage.v2.Object destination = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.ObjectOrBuilder getDestinationOrBuilder() { @@ -454,11 +461,11 @@ public com.google.protobuf.ByteString getSourceObjectBytes() { * * *
      -   * If present, selects a specific revision of the source object (as opposed to
      -   * the latest version, the default).
      +   * Optional. If present, selects a specific revision of the source object (as
      +   * opposed to the latest version, the default).
          * 
      * - * int64 source_generation = 4; + * int64 source_generation = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The sourceGeneration. */ @@ -476,14 +483,14 @@ public long getSourceGeneration() { * * *
      -   * Include this field (from the previous rewrite response) on each rewrite
      -   * request after the first one, until the rewrite response 'done' flag is
      -   * true. Calls that provide a rewriteToken can omit all other request fields,
      -   * but if included those fields must match the values provided in the first
      -   * rewrite request.
      +   * Optional. Include this field (from the previous rewrite response) on each
      +   * rewrite request after the first one, until the rewrite response 'done' flag
      +   * is true. Calls that provide a rewriteToken can omit all other request
      +   * fields, but if included those fields must match the values provided in the
      +   * first rewrite request.
          * 
      * - * string rewrite_token = 5; + * string rewrite_token = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The rewriteToken. */ @@ -504,14 +511,14 @@ public java.lang.String getRewriteToken() { * * *
      -   * Include this field (from the previous rewrite response) on each rewrite
      -   * request after the first one, until the rewrite response 'done' flag is
      -   * true. Calls that provide a rewriteToken can omit all other request fields,
      -   * but if included those fields must match the values provided in the first
      -   * rewrite request.
      +   * Optional. Include this field (from the previous rewrite response) on each
      +   * rewrite request after the first one, until the rewrite response 'done' flag
      +   * is true. Calls that provide a rewriteToken can omit all other request
      +   * fields, but if included those fields must match the values provided in the
      +   * first rewrite request.
          * 
      * - * string rewrite_token = 5; + * string rewrite_token = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for rewriteToken. */ @@ -537,12 +544,12 @@ public com.google.protobuf.ByteString getRewriteTokenBytes() { * * *
      -   * Apply a predefined set of access controls to the destination object.
      -   * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +   * Optional. Apply a predefined set of access controls to the destination
      +   * object. Valid values are "authenticatedRead", "bucketOwnerFullControl",
          * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
          * 
      * - * string destination_predefined_acl = 28; + * string destination_predefined_acl = 28 [(.google.api.field_behavior) = OPTIONAL]; * * @return The destinationPredefinedAcl. */ @@ -563,12 +570,12 @@ public java.lang.String getDestinationPredefinedAcl() { * * *
      -   * Apply a predefined set of access controls to the destination object.
      -   * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +   * Optional. Apply a predefined set of access controls to the destination
      +   * object. Valid values are "authenticatedRead", "bucketOwnerFullControl",
          * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
          * 
      * - * string destination_predefined_acl = 28; + * string destination_predefined_acl = 28 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for destinationPredefinedAcl. */ @@ -894,17 +901,16 @@ public long getIfSourceMetagenerationNotMatch() { * * *
      -   * The maximum number of bytes that will be rewritten per rewrite request.
      -   * Most callers
      -   * shouldn't need to specify this parameter - it is primarily in place to
      -   * support testing. If specified the value must be an integral multiple of
      -   * 1 MiB (1048576). Also, this only applies to requests where the source and
      -   * destination span locations and/or storage classes. Finally, this value must
      -   * not change across rewrite calls else you'll get an error that the
      -   * `rewriteToken` is invalid.
      +   * Optional. The maximum number of bytes that will be rewritten per rewrite
      +   * request. Most callers shouldn't need to specify this parameter - it is
      +   * primarily in place to support testing. If specified the value must be an
      +   * integral multiple of 1 MiB (1048576). Also, this only applies to requests
      +   * where the source and destination span locations and/or storage classes.
      +   * Finally, this value must not change across rewrite calls else you'll get an
      +   * error that the `rewriteToken` is invalid.
          * 
      * - * int64 max_bytes_rewritten_per_call = 15; + * int64 max_bytes_rewritten_per_call = 15 [(.google.api.field_behavior) = OPTIONAL]; * * @return The maxBytesRewrittenPerCall. */ @@ -922,11 +928,12 @@ public long getMaxBytesRewrittenPerCall() { * * *
      -   * The algorithm used to encrypt the source object, if any. Used if the source
      -   * object was encrypted with a Customer-Supplied Encryption Key.
      +   * Optional. The algorithm used to encrypt the source object, if any. Used if
      +   * the source object was encrypted with a Customer-Supplied Encryption Key.
          * 
      * - * string copy_source_encryption_algorithm = 16; + * string copy_source_encryption_algorithm = 16 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The copySourceEncryptionAlgorithm. */ @@ -947,11 +954,12 @@ public java.lang.String getCopySourceEncryptionAlgorithm() { * * *
      -   * The algorithm used to encrypt the source object, if any. Used if the source
      -   * object was encrypted with a Customer-Supplied Encryption Key.
      +   * Optional. The algorithm used to encrypt the source object, if any. Used if
      +   * the source object was encrypted with a Customer-Supplied Encryption Key.
          * 
      * - * string copy_source_encryption_algorithm = 16; + * string copy_source_encryption_algorithm = 16 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The bytes for copySourceEncryptionAlgorithm. */ @@ -976,12 +984,13 @@ public com.google.protobuf.ByteString getCopySourceEncryptionAlgorithmBytes() { * * *
      -   * The raw bytes (not base64-encoded) AES-256 encryption key used to encrypt
      -   * the source object, if it was encrypted with a Customer-Supplied Encryption
      -   * Key.
      +   * Optional. The raw bytes (not base64-encoded) AES-256 encryption key used to
      +   * encrypt the source object, if it was encrypted with a Customer-Supplied
      +   * Encryption Key.
          * 
      * - * bytes copy_source_encryption_key_bytes = 21; + * bytes copy_source_encryption_key_bytes = 21 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The copySourceEncryptionKeyBytes. */ @@ -998,12 +1007,14 @@ public com.google.protobuf.ByteString getCopySourceEncryptionKeyBytes() { * * *
      -   * The raw bytes (not base64-encoded) SHA256 hash of the encryption key used
      -   * to encrypt the source object, if it was encrypted with a Customer-Supplied
      -   * Encryption Key.
      +   * Optional. The raw bytes (not base64-encoded) SHA256 hash of the encryption
      +   * key used to encrypt the source object, if it was encrypted with a
      +   * Customer-Supplied Encryption Key.
          * 
      * - * bytes copy_source_encryption_key_sha256_bytes = 22; + * + * bytes copy_source_encryption_key_sha256_bytes = 22 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The copySourceEncryptionKeySha256Bytes. */ @@ -1019,10 +1030,13 @@ public com.google.protobuf.ByteString getCopySourceEncryptionKeySha256Bytes() { * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 19; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 19 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -1035,10 +1049,13 @@ public boolean hasCommonObjectRequestParams() { * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 19; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 19 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -1053,10 +1070,13 @@ public com.google.storage.v2.CommonObjectRequestParams getCommonObjectRequestPar * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 19; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 19 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.CommonObjectRequestParamsOrBuilder @@ -1073,11 +1093,13 @@ public com.google.storage.v2.CommonObjectRequestParams getCommonObjectRequestPar * * *
      -   * The checksums of the complete object. This will be used to validate the
      -   * destination object after rewriting.
      +   * Optional. The checksums of the complete object. This will be used to
      +   * validate the destination object after rewriting.
          * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 29; + * + * .google.storage.v2.ObjectChecksums object_checksums = 29 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the objectChecksums field is set. */ @@ -1090,11 +1112,13 @@ public boolean hasObjectChecksums() { * * *
      -   * The checksums of the complete object. This will be used to validate the
      -   * destination object after rewriting.
      +   * Optional. The checksums of the complete object. This will be used to
      +   * validate the destination object after rewriting.
          * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 29; + * + * .google.storage.v2.ObjectChecksums object_checksums = 29 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The objectChecksums. */ @@ -1109,11 +1133,13 @@ public com.google.storage.v2.ObjectChecksums getObjectChecksums() { * * *
      -   * The checksums of the complete object. This will be used to validate the
      -   * destination object after rewriting.
      +   * Optional. The checksums of the complete object. This will be used to
      +   * validate the destination object after rewriting.
          * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 29; + * + * .google.storage.v2.ObjectChecksums object_checksums = 29 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.ObjectChecksumsOrBuilder getObjectChecksumsOrBuilder() { @@ -2369,14 +2395,16 @@ public Builder setDestinationBucketBytes(com.google.protobuf.ByteString value) { * * *
      -     * The name of the Cloud KMS key that will be used to encrypt the destination
      -     * object. The Cloud KMS key must be located in same location as the object.
      -     * If the parameter is not specified, the request uses the destination
      -     * bucket's default encryption key, if any, or else the Google-managed
      -     * encryption key.
      +     * Optional. The name of the Cloud KMS key that will be used to encrypt the
      +     * destination object. The Cloud KMS key must be located in same location as
      +     * the object. If the parameter is not specified, the request uses the
      +     * destination bucket's default encryption key, if any, or else the
      +     * Google-managed encryption key.
            * 
      * - * string destination_kms_key = 27 [(.google.api.resource_reference) = { ... } + * + * string destination_kms_key = 27 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The destinationKmsKey. */ @@ -2396,14 +2424,16 @@ public java.lang.String getDestinationKmsKey() { * * *
      -     * The name of the Cloud KMS key that will be used to encrypt the destination
      -     * object. The Cloud KMS key must be located in same location as the object.
      -     * If the parameter is not specified, the request uses the destination
      -     * bucket's default encryption key, if any, or else the Google-managed
      -     * encryption key.
      +     * Optional. The name of the Cloud KMS key that will be used to encrypt the
      +     * destination object. The Cloud KMS key must be located in same location as
      +     * the object. If the parameter is not specified, the request uses the
      +     * destination bucket's default encryption key, if any, or else the
      +     * Google-managed encryption key.
            * 
      * - * string destination_kms_key = 27 [(.google.api.resource_reference) = { ... } + * + * string destination_kms_key = 27 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for destinationKmsKey. */ @@ -2423,14 +2453,16 @@ public com.google.protobuf.ByteString getDestinationKmsKeyBytes() { * * *
      -     * The name of the Cloud KMS key that will be used to encrypt the destination
      -     * object. The Cloud KMS key must be located in same location as the object.
      -     * If the parameter is not specified, the request uses the destination
      -     * bucket's default encryption key, if any, or else the Google-managed
      -     * encryption key.
      +     * Optional. The name of the Cloud KMS key that will be used to encrypt the
      +     * destination object. The Cloud KMS key must be located in same location as
      +     * the object. If the parameter is not specified, the request uses the
      +     * destination bucket's default encryption key, if any, or else the
      +     * Google-managed encryption key.
            * 
      * - * string destination_kms_key = 27 [(.google.api.resource_reference) = { ... } + * + * string destination_kms_key = 27 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param value The destinationKmsKey to set. * @return This builder for chaining. @@ -2449,14 +2481,16 @@ public Builder setDestinationKmsKey(java.lang.String value) { * * *
      -     * The name of the Cloud KMS key that will be used to encrypt the destination
      -     * object. The Cloud KMS key must be located in same location as the object.
      -     * If the parameter is not specified, the request uses the destination
      -     * bucket's default encryption key, if any, or else the Google-managed
      -     * encryption key.
      +     * Optional. The name of the Cloud KMS key that will be used to encrypt the
      +     * destination object. The Cloud KMS key must be located in same location as
      +     * the object. If the parameter is not specified, the request uses the
      +     * destination bucket's default encryption key, if any, or else the
      +     * Google-managed encryption key.
            * 
      * - * string destination_kms_key = 27 [(.google.api.resource_reference) = { ... } + * + * string destination_kms_key = 27 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return This builder for chaining. */ @@ -2471,14 +2505,16 @@ public Builder clearDestinationKmsKey() { * * *
      -     * The name of the Cloud KMS key that will be used to encrypt the destination
      -     * object. The Cloud KMS key must be located in same location as the object.
      -     * If the parameter is not specified, the request uses the destination
      -     * bucket's default encryption key, if any, or else the Google-managed
      -     * encryption key.
      +     * Optional. The name of the Cloud KMS key that will be used to encrypt the
      +     * destination object. The Cloud KMS key must be located in same location as
      +     * the object. If the parameter is not specified, the request uses the
      +     * destination bucket's default encryption key, if any, or else the
      +     * Google-managed encryption key.
            * 
      * - * string destination_kms_key = 27 [(.google.api.resource_reference) = { ... } + * + * string destination_kms_key = 27 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @param value The bytes for destinationKmsKey to set. * @return This builder for chaining. @@ -2505,7 +2541,7 @@ public Builder setDestinationKmsKeyBytes(com.google.protobuf.ByteString value) { * * *
      -     * Properties of the destination, post-rewrite object.
      +     * Optional. Properties of the destination, post-rewrite object.
            * The `name`, `bucket` and `kms_key` fields must not be populated (these
            * values are specified in the `destination_name`, `destination_bucket`, and
            * `destination_kms_key` fields).
      @@ -2514,7 +2550,8 @@ public Builder setDestinationKmsKeyBytes(com.google.protobuf.ByteString value) {
            * copied from the source object.
            * 
      * - * .google.storage.v2.Object destination = 1; + * .google.storage.v2.Object destination = 1 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the destination field is set. */ @@ -2526,7 +2563,7 @@ public boolean hasDestination() { * * *
      -     * Properties of the destination, post-rewrite object.
      +     * Optional. Properties of the destination, post-rewrite object.
            * The `name`, `bucket` and `kms_key` fields must not be populated (these
            * values are specified in the `destination_name`, `destination_bucket`, and
            * `destination_kms_key` fields).
      @@ -2535,7 +2572,8 @@ public boolean hasDestination() {
            * copied from the source object.
            * 
      * - * .google.storage.v2.Object destination = 1; + * .google.storage.v2.Object destination = 1 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The destination. */ @@ -2553,7 +2591,7 @@ public com.google.storage.v2.Object getDestination() { * * *
      -     * Properties of the destination, post-rewrite object.
      +     * Optional. Properties of the destination, post-rewrite object.
            * The `name`, `bucket` and `kms_key` fields must not be populated (these
            * values are specified in the `destination_name`, `destination_bucket`, and
            * `destination_kms_key` fields).
      @@ -2562,7 +2600,8 @@ public com.google.storage.v2.Object getDestination() {
            * copied from the source object.
            * 
      * - * .google.storage.v2.Object destination = 1; + * .google.storage.v2.Object destination = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setDestination(com.google.storage.v2.Object value) { if (destinationBuilder_ == null) { @@ -2582,7 +2621,7 @@ public Builder setDestination(com.google.storage.v2.Object value) { * * *
      -     * Properties of the destination, post-rewrite object.
      +     * Optional. Properties of the destination, post-rewrite object.
            * The `name`, `bucket` and `kms_key` fields must not be populated (these
            * values are specified in the `destination_name`, `destination_bucket`, and
            * `destination_kms_key` fields).
      @@ -2591,7 +2630,8 @@ public Builder setDestination(com.google.storage.v2.Object value) {
            * copied from the source object.
            * 
      * - * .google.storage.v2.Object destination = 1; + * .google.storage.v2.Object destination = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setDestination(com.google.storage.v2.Object.Builder builderForValue) { if (destinationBuilder_ == null) { @@ -2608,7 +2648,7 @@ public Builder setDestination(com.google.storage.v2.Object.Builder builderForVal * * *
      -     * Properties of the destination, post-rewrite object.
      +     * Optional. Properties of the destination, post-rewrite object.
            * The `name`, `bucket` and `kms_key` fields must not be populated (these
            * values are specified in the `destination_name`, `destination_bucket`, and
            * `destination_kms_key` fields).
      @@ -2617,7 +2657,8 @@ public Builder setDestination(com.google.storage.v2.Object.Builder builderForVal
            * copied from the source object.
            * 
      * - * .google.storage.v2.Object destination = 1; + * .google.storage.v2.Object destination = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeDestination(com.google.storage.v2.Object value) { if (destinationBuilder_ == null) { @@ -2642,7 +2683,7 @@ public Builder mergeDestination(com.google.storage.v2.Object value) { * * *
      -     * Properties of the destination, post-rewrite object.
      +     * Optional. Properties of the destination, post-rewrite object.
            * The `name`, `bucket` and `kms_key` fields must not be populated (these
            * values are specified in the `destination_name`, `destination_bucket`, and
            * `destination_kms_key` fields).
      @@ -2651,7 +2692,8 @@ public Builder mergeDestination(com.google.storage.v2.Object value) {
            * copied from the source object.
            * 
      * - * .google.storage.v2.Object destination = 1; + * .google.storage.v2.Object destination = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearDestination() { bitField0_ = (bitField0_ & ~0x00000008); @@ -2668,7 +2710,7 @@ public Builder clearDestination() { * * *
      -     * Properties of the destination, post-rewrite object.
      +     * Optional. Properties of the destination, post-rewrite object.
            * The `name`, `bucket` and `kms_key` fields must not be populated (these
            * values are specified in the `destination_name`, `destination_bucket`, and
            * `destination_kms_key` fields).
      @@ -2677,7 +2719,8 @@ public Builder clearDestination() {
            * copied from the source object.
            * 
      * - * .google.storage.v2.Object destination = 1; + * .google.storage.v2.Object destination = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.Object.Builder getDestinationBuilder() { bitField0_ |= 0x00000008; @@ -2689,7 +2732,7 @@ public com.google.storage.v2.Object.Builder getDestinationBuilder() { * * *
      -     * Properties of the destination, post-rewrite object.
      +     * Optional. Properties of the destination, post-rewrite object.
            * The `name`, `bucket` and `kms_key` fields must not be populated (these
            * values are specified in the `destination_name`, `destination_bucket`, and
            * `destination_kms_key` fields).
      @@ -2698,7 +2741,8 @@ public com.google.storage.v2.Object.Builder getDestinationBuilder() {
            * copied from the source object.
            * 
      * - * .google.storage.v2.Object destination = 1; + * .google.storage.v2.Object destination = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.ObjectOrBuilder getDestinationOrBuilder() { if (destinationBuilder_ != null) { @@ -2714,7 +2758,7 @@ public com.google.storage.v2.ObjectOrBuilder getDestinationOrBuilder() { * * *
      -     * Properties of the destination, post-rewrite object.
      +     * Optional. Properties of the destination, post-rewrite object.
            * The `name`, `bucket` and `kms_key` fields must not be populated (these
            * values are specified in the `destination_name`, `destination_bucket`, and
            * `destination_kms_key` fields).
      @@ -2723,7 +2767,8 @@ public com.google.storage.v2.ObjectOrBuilder getDestinationOrBuilder() {
            * copied from the source object.
            * 
      * - * .google.storage.v2.Object destination = 1; + * .google.storage.v2.Object destination = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.Object, @@ -2980,11 +3025,11 @@ public Builder setSourceObjectBytes(com.google.protobuf.ByteString value) { * * *
      -     * If present, selects a specific revision of the source object (as opposed to
      -     * the latest version, the default).
      +     * Optional. If present, selects a specific revision of the source object (as
      +     * opposed to the latest version, the default).
            * 
      * - * int64 source_generation = 4; + * int64 source_generation = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The sourceGeneration. */ @@ -2997,11 +3042,11 @@ public long getSourceGeneration() { * * *
      -     * If present, selects a specific revision of the source object (as opposed to
      -     * the latest version, the default).
      +     * Optional. If present, selects a specific revision of the source object (as
      +     * opposed to the latest version, the default).
            * 
      * - * int64 source_generation = 4; + * int64 source_generation = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The sourceGeneration to set. * @return This builder for chaining. @@ -3018,11 +3063,11 @@ public Builder setSourceGeneration(long value) { * * *
      -     * If present, selects a specific revision of the source object (as opposed to
      -     * the latest version, the default).
      +     * Optional. If present, selects a specific revision of the source object (as
      +     * opposed to the latest version, the default).
            * 
      * - * int64 source_generation = 4; + * int64 source_generation = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -3039,14 +3084,14 @@ public Builder clearSourceGeneration() { * * *
      -     * Include this field (from the previous rewrite response) on each rewrite
      -     * request after the first one, until the rewrite response 'done' flag is
      -     * true. Calls that provide a rewriteToken can omit all other request fields,
      -     * but if included those fields must match the values provided in the first
      -     * rewrite request.
      +     * Optional. Include this field (from the previous rewrite response) on each
      +     * rewrite request after the first one, until the rewrite response 'done' flag
      +     * is true. Calls that provide a rewriteToken can omit all other request
      +     * fields, but if included those fields must match the values provided in the
      +     * first rewrite request.
            * 
      * - * string rewrite_token = 5; + * string rewrite_token = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The rewriteToken. */ @@ -3066,14 +3111,14 @@ public java.lang.String getRewriteToken() { * * *
      -     * Include this field (from the previous rewrite response) on each rewrite
      -     * request after the first one, until the rewrite response 'done' flag is
      -     * true. Calls that provide a rewriteToken can omit all other request fields,
      -     * but if included those fields must match the values provided in the first
      -     * rewrite request.
      +     * Optional. Include this field (from the previous rewrite response) on each
      +     * rewrite request after the first one, until the rewrite response 'done' flag
      +     * is true. Calls that provide a rewriteToken can omit all other request
      +     * fields, but if included those fields must match the values provided in the
      +     * first rewrite request.
            * 
      * - * string rewrite_token = 5; + * string rewrite_token = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for rewriteToken. */ @@ -3093,14 +3138,14 @@ public com.google.protobuf.ByteString getRewriteTokenBytes() { * * *
      -     * Include this field (from the previous rewrite response) on each rewrite
      -     * request after the first one, until the rewrite response 'done' flag is
      -     * true. Calls that provide a rewriteToken can omit all other request fields,
      -     * but if included those fields must match the values provided in the first
      -     * rewrite request.
      +     * Optional. Include this field (from the previous rewrite response) on each
      +     * rewrite request after the first one, until the rewrite response 'done' flag
      +     * is true. Calls that provide a rewriteToken can omit all other request
      +     * fields, but if included those fields must match the values provided in the
      +     * first rewrite request.
            * 
      * - * string rewrite_token = 5; + * string rewrite_token = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The rewriteToken to set. * @return This builder for chaining. @@ -3119,14 +3164,14 @@ public Builder setRewriteToken(java.lang.String value) { * * *
      -     * Include this field (from the previous rewrite response) on each rewrite
      -     * request after the first one, until the rewrite response 'done' flag is
      -     * true. Calls that provide a rewriteToken can omit all other request fields,
      -     * but if included those fields must match the values provided in the first
      -     * rewrite request.
      +     * Optional. Include this field (from the previous rewrite response) on each
      +     * rewrite request after the first one, until the rewrite response 'done' flag
      +     * is true. Calls that provide a rewriteToken can omit all other request
      +     * fields, but if included those fields must match the values provided in the
      +     * first rewrite request.
            * 
      * - * string rewrite_token = 5; + * string rewrite_token = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -3141,14 +3186,14 @@ public Builder clearRewriteToken() { * * *
      -     * Include this field (from the previous rewrite response) on each rewrite
      -     * request after the first one, until the rewrite response 'done' flag is
      -     * true. Calls that provide a rewriteToken can omit all other request fields,
      -     * but if included those fields must match the values provided in the first
      -     * rewrite request.
      +     * Optional. Include this field (from the previous rewrite response) on each
      +     * rewrite request after the first one, until the rewrite response 'done' flag
      +     * is true. Calls that provide a rewriteToken can omit all other request
      +     * fields, but if included those fields must match the values provided in the
      +     * first rewrite request.
            * 
      * - * string rewrite_token = 5; + * string rewrite_token = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for rewriteToken to set. * @return This builder for chaining. @@ -3170,12 +3215,13 @@ public Builder setRewriteTokenBytes(com.google.protobuf.ByteString value) { * * *
      -     * Apply a predefined set of access controls to the destination object.
      -     * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +     * Optional. Apply a predefined set of access controls to the destination
      +     * object. Valid values are "authenticatedRead", "bucketOwnerFullControl",
            * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
            * 
      * - * string destination_predefined_acl = 28; + * string destination_predefined_acl = 28 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The destinationPredefinedAcl. */ @@ -3195,12 +3241,13 @@ public java.lang.String getDestinationPredefinedAcl() { * * *
      -     * Apply a predefined set of access controls to the destination object.
      -     * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +     * Optional. Apply a predefined set of access controls to the destination
      +     * object. Valid values are "authenticatedRead", "bucketOwnerFullControl",
            * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
            * 
      * - * string destination_predefined_acl = 28; + * string destination_predefined_acl = 28 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The bytes for destinationPredefinedAcl. */ @@ -3220,12 +3267,13 @@ public com.google.protobuf.ByteString getDestinationPredefinedAclBytes() { * * *
      -     * Apply a predefined set of access controls to the destination object.
      -     * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +     * Optional. Apply a predefined set of access controls to the destination
      +     * object. Valid values are "authenticatedRead", "bucketOwnerFullControl",
            * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
            * 
      * - * string destination_predefined_acl = 28; + * string destination_predefined_acl = 28 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param value The destinationPredefinedAcl to set. * @return This builder for chaining. @@ -3244,12 +3292,13 @@ public Builder setDestinationPredefinedAcl(java.lang.String value) { * * *
      -     * Apply a predefined set of access controls to the destination object.
      -     * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +     * Optional. Apply a predefined set of access controls to the destination
      +     * object. Valid values are "authenticatedRead", "bucketOwnerFullControl",
            * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
            * 
      * - * string destination_predefined_acl = 28; + * string destination_predefined_acl = 28 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return This builder for chaining. */ @@ -3264,12 +3313,13 @@ public Builder clearDestinationPredefinedAcl() { * * *
      -     * Apply a predefined set of access controls to the destination object.
      -     * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +     * Optional. Apply a predefined set of access controls to the destination
      +     * object. Valid values are "authenticatedRead", "bucketOwnerFullControl",
            * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
            * 
      * - * string destination_predefined_acl = 28; + * string destination_predefined_acl = 28 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param value The bytes for destinationPredefinedAcl to set. * @return This builder for chaining. @@ -3911,17 +3961,17 @@ public Builder clearIfSourceMetagenerationNotMatch() { * * *
      -     * The maximum number of bytes that will be rewritten per rewrite request.
      -     * Most callers
      -     * shouldn't need to specify this parameter - it is primarily in place to
      -     * support testing. If specified the value must be an integral multiple of
      -     * 1 MiB (1048576). Also, this only applies to requests where the source and
      -     * destination span locations and/or storage classes. Finally, this value must
      -     * not change across rewrite calls else you'll get an error that the
      -     * `rewriteToken` is invalid.
      +     * Optional. The maximum number of bytes that will be rewritten per rewrite
      +     * request. Most callers shouldn't need to specify this parameter - it is
      +     * primarily in place to support testing. If specified the value must be an
      +     * integral multiple of 1 MiB (1048576). Also, this only applies to requests
      +     * where the source and destination span locations and/or storage classes.
      +     * Finally, this value must not change across rewrite calls else you'll get an
      +     * error that the `rewriteToken` is invalid.
            * 
      * - * int64 max_bytes_rewritten_per_call = 15; + * int64 max_bytes_rewritten_per_call = 15 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The maxBytesRewrittenPerCall. */ @@ -3934,17 +3984,17 @@ public long getMaxBytesRewrittenPerCall() { * * *
      -     * The maximum number of bytes that will be rewritten per rewrite request.
      -     * Most callers
      -     * shouldn't need to specify this parameter - it is primarily in place to
      -     * support testing. If specified the value must be an integral multiple of
      -     * 1 MiB (1048576). Also, this only applies to requests where the source and
      -     * destination span locations and/or storage classes. Finally, this value must
      -     * not change across rewrite calls else you'll get an error that the
      -     * `rewriteToken` is invalid.
      +     * Optional. The maximum number of bytes that will be rewritten per rewrite
      +     * request. Most callers shouldn't need to specify this parameter - it is
      +     * primarily in place to support testing. If specified the value must be an
      +     * integral multiple of 1 MiB (1048576). Also, this only applies to requests
      +     * where the source and destination span locations and/or storage classes.
      +     * Finally, this value must not change across rewrite calls else you'll get an
      +     * error that the `rewriteToken` is invalid.
            * 
      * - * int64 max_bytes_rewritten_per_call = 15; + * int64 max_bytes_rewritten_per_call = 15 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param value The maxBytesRewrittenPerCall to set. * @return This builder for chaining. @@ -3961,17 +4011,17 @@ public Builder setMaxBytesRewrittenPerCall(long value) { * * *
      -     * The maximum number of bytes that will be rewritten per rewrite request.
      -     * Most callers
      -     * shouldn't need to specify this parameter - it is primarily in place to
      -     * support testing. If specified the value must be an integral multiple of
      -     * 1 MiB (1048576). Also, this only applies to requests where the source and
      -     * destination span locations and/or storage classes. Finally, this value must
      -     * not change across rewrite calls else you'll get an error that the
      -     * `rewriteToken` is invalid.
      +     * Optional. The maximum number of bytes that will be rewritten per rewrite
      +     * request. Most callers shouldn't need to specify this parameter - it is
      +     * primarily in place to support testing. If specified the value must be an
      +     * integral multiple of 1 MiB (1048576). Also, this only applies to requests
      +     * where the source and destination span locations and/or storage classes.
      +     * Finally, this value must not change across rewrite calls else you'll get an
      +     * error that the `rewriteToken` is invalid.
            * 
      * - * int64 max_bytes_rewritten_per_call = 15; + * int64 max_bytes_rewritten_per_call = 15 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return This builder for chaining. */ @@ -3988,11 +4038,12 @@ public Builder clearMaxBytesRewrittenPerCall() { * * *
      -     * The algorithm used to encrypt the source object, if any. Used if the source
      -     * object was encrypted with a Customer-Supplied Encryption Key.
      +     * Optional. The algorithm used to encrypt the source object, if any. Used if
      +     * the source object was encrypted with a Customer-Supplied Encryption Key.
            * 
      * - * string copy_source_encryption_algorithm = 16; + * string copy_source_encryption_algorithm = 16 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The copySourceEncryptionAlgorithm. */ @@ -4012,11 +4063,12 @@ public java.lang.String getCopySourceEncryptionAlgorithm() { * * *
      -     * The algorithm used to encrypt the source object, if any. Used if the source
      -     * object was encrypted with a Customer-Supplied Encryption Key.
      +     * Optional. The algorithm used to encrypt the source object, if any. Used if
      +     * the source object was encrypted with a Customer-Supplied Encryption Key.
            * 
      * - * string copy_source_encryption_algorithm = 16; + * string copy_source_encryption_algorithm = 16 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The bytes for copySourceEncryptionAlgorithm. */ @@ -4036,11 +4088,12 @@ public com.google.protobuf.ByteString getCopySourceEncryptionAlgorithmBytes() { * * *
      -     * The algorithm used to encrypt the source object, if any. Used if the source
      -     * object was encrypted with a Customer-Supplied Encryption Key.
      +     * Optional. The algorithm used to encrypt the source object, if any. Used if
      +     * the source object was encrypted with a Customer-Supplied Encryption Key.
            * 
      * - * string copy_source_encryption_algorithm = 16; + * string copy_source_encryption_algorithm = 16 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param value The copySourceEncryptionAlgorithm to set. * @return This builder for chaining. @@ -4059,11 +4112,12 @@ public Builder setCopySourceEncryptionAlgorithm(java.lang.String value) { * * *
      -     * The algorithm used to encrypt the source object, if any. Used if the source
      -     * object was encrypted with a Customer-Supplied Encryption Key.
      +     * Optional. The algorithm used to encrypt the source object, if any. Used if
      +     * the source object was encrypted with a Customer-Supplied Encryption Key.
            * 
      * - * string copy_source_encryption_algorithm = 16; + * string copy_source_encryption_algorithm = 16 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return This builder for chaining. */ @@ -4078,11 +4132,12 @@ public Builder clearCopySourceEncryptionAlgorithm() { * * *
      -     * The algorithm used to encrypt the source object, if any. Used if the source
      -     * object was encrypted with a Customer-Supplied Encryption Key.
      +     * Optional. The algorithm used to encrypt the source object, if any. Used if
      +     * the source object was encrypted with a Customer-Supplied Encryption Key.
            * 
      * - * string copy_source_encryption_algorithm = 16; + * string copy_source_encryption_algorithm = 16 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param value The bytes for copySourceEncryptionAlgorithm to set. * @return This builder for chaining. @@ -4105,12 +4160,13 @@ public Builder setCopySourceEncryptionAlgorithmBytes(com.google.protobuf.ByteStr * * *
      -     * The raw bytes (not base64-encoded) AES-256 encryption key used to encrypt
      -     * the source object, if it was encrypted with a Customer-Supplied Encryption
      -     * Key.
      +     * Optional. The raw bytes (not base64-encoded) AES-256 encryption key used to
      +     * encrypt the source object, if it was encrypted with a Customer-Supplied
      +     * Encryption Key.
            * 
      * - * bytes copy_source_encryption_key_bytes = 21; + * bytes copy_source_encryption_key_bytes = 21 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The copySourceEncryptionKeyBytes. */ @@ -4123,12 +4179,13 @@ public com.google.protobuf.ByteString getCopySourceEncryptionKeyBytes() { * * *
      -     * The raw bytes (not base64-encoded) AES-256 encryption key used to encrypt
      -     * the source object, if it was encrypted with a Customer-Supplied Encryption
      -     * Key.
      +     * Optional. The raw bytes (not base64-encoded) AES-256 encryption key used to
      +     * encrypt the source object, if it was encrypted with a Customer-Supplied
      +     * Encryption Key.
            * 
      * - * bytes copy_source_encryption_key_bytes = 21; + * bytes copy_source_encryption_key_bytes = 21 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param value The copySourceEncryptionKeyBytes to set. * @return This builder for chaining. @@ -4147,12 +4204,13 @@ public Builder setCopySourceEncryptionKeyBytes(com.google.protobuf.ByteString va * * *
      -     * The raw bytes (not base64-encoded) AES-256 encryption key used to encrypt
      -     * the source object, if it was encrypted with a Customer-Supplied Encryption
      -     * Key.
      +     * Optional. The raw bytes (not base64-encoded) AES-256 encryption key used to
      +     * encrypt the source object, if it was encrypted with a Customer-Supplied
      +     * Encryption Key.
            * 
      * - * bytes copy_source_encryption_key_bytes = 21; + * bytes copy_source_encryption_key_bytes = 21 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return This builder for chaining. */ @@ -4170,12 +4228,14 @@ public Builder clearCopySourceEncryptionKeyBytes() { * * *
      -     * The raw bytes (not base64-encoded) SHA256 hash of the encryption key used
      -     * to encrypt the source object, if it was encrypted with a Customer-Supplied
      -     * Encryption Key.
      +     * Optional. The raw bytes (not base64-encoded) SHA256 hash of the encryption
      +     * key used to encrypt the source object, if it was encrypted with a
      +     * Customer-Supplied Encryption Key.
            * 
      * - * bytes copy_source_encryption_key_sha256_bytes = 22; + * + * bytes copy_source_encryption_key_sha256_bytes = 22 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The copySourceEncryptionKeySha256Bytes. */ @@ -4188,12 +4248,14 @@ public com.google.protobuf.ByteString getCopySourceEncryptionKeySha256Bytes() { * * *
      -     * The raw bytes (not base64-encoded) SHA256 hash of the encryption key used
      -     * to encrypt the source object, if it was encrypted with a Customer-Supplied
      -     * Encryption Key.
      +     * Optional. The raw bytes (not base64-encoded) SHA256 hash of the encryption
      +     * key used to encrypt the source object, if it was encrypted with a
      +     * Customer-Supplied Encryption Key.
            * 
      * - * bytes copy_source_encryption_key_sha256_bytes = 22; + * + * bytes copy_source_encryption_key_sha256_bytes = 22 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param value The copySourceEncryptionKeySha256Bytes to set. * @return This builder for chaining. @@ -4212,12 +4274,14 @@ public Builder setCopySourceEncryptionKeySha256Bytes(com.google.protobuf.ByteStr * * *
      -     * The raw bytes (not base64-encoded) SHA256 hash of the encryption key used
      -     * to encrypt the source object, if it was encrypted with a Customer-Supplied
      -     * Encryption Key.
      +     * Optional. The raw bytes (not base64-encoded) SHA256 hash of the encryption
      +     * key used to encrypt the source object, if it was encrypted with a
      +     * Customer-Supplied Encryption Key.
            * 
      * - * bytes copy_source_encryption_key_sha256_bytes = 22; + * + * bytes copy_source_encryption_key_sha256_bytes = 22 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return This builder for chaining. */ @@ -4240,10 +4304,13 @@ public Builder clearCopySourceEncryptionKeySha256Bytes() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 19; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 19 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -4255,10 +4322,13 @@ public boolean hasCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 19; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 19 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -4276,10 +4346,13 @@ public com.google.storage.v2.CommonObjectRequestParams getCommonObjectRequestPar * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 19; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 19 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams value) { @@ -4300,10 +4373,13 @@ public Builder setCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 19; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 19 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams.Builder builderForValue) { @@ -4321,10 +4397,13 @@ public Builder setCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 19; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 19 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams value) { @@ -4351,10 +4430,13 @@ public Builder mergeCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 19; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 19 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearCommonObjectRequestParams() { bitField0_ = (bitField0_ & ~0x00200000); @@ -4371,10 +4453,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 19; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 19 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.CommonObjectRequestParams.Builder getCommonObjectRequestParamsBuilder() { @@ -4387,10 +4472,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 19; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 19 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.CommonObjectRequestParamsOrBuilder getCommonObjectRequestParamsOrBuilder() { @@ -4407,10 +4495,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 19; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 19 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.CommonObjectRequestParams, @@ -4440,11 +4531,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * The checksums of the complete object. This will be used to validate the
      -     * destination object after rewriting.
      +     * Optional. The checksums of the complete object. This will be used to
      +     * validate the destination object after rewriting.
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 29; + * + * .google.storage.v2.ObjectChecksums object_checksums = 29 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the objectChecksums field is set. */ @@ -4456,11 +4549,13 @@ public boolean hasObjectChecksums() { * * *
      -     * The checksums of the complete object. This will be used to validate the
      -     * destination object after rewriting.
      +     * Optional. The checksums of the complete object. This will be used to
      +     * validate the destination object after rewriting.
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 29; + * + * .google.storage.v2.ObjectChecksums object_checksums = 29 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The objectChecksums. */ @@ -4478,11 +4573,13 @@ public com.google.storage.v2.ObjectChecksums getObjectChecksums() { * * *
      -     * The checksums of the complete object. This will be used to validate the
      -     * destination object after rewriting.
      +     * Optional. The checksums of the complete object. This will be used to
      +     * validate the destination object after rewriting.
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 29; + * + * .google.storage.v2.ObjectChecksums object_checksums = 29 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setObjectChecksums(com.google.storage.v2.ObjectChecksums value) { if (objectChecksumsBuilder_ == null) { @@ -4502,11 +4599,13 @@ public Builder setObjectChecksums(com.google.storage.v2.ObjectChecksums value) { * * *
      -     * The checksums of the complete object. This will be used to validate the
      -     * destination object after rewriting.
      +     * Optional. The checksums of the complete object. This will be used to
      +     * validate the destination object after rewriting.
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 29; + * + * .google.storage.v2.ObjectChecksums object_checksums = 29 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setObjectChecksums( com.google.storage.v2.ObjectChecksums.Builder builderForValue) { @@ -4524,11 +4623,13 @@ public Builder setObjectChecksums( * * *
      -     * The checksums of the complete object. This will be used to validate the
      -     * destination object after rewriting.
      +     * Optional. The checksums of the complete object. This will be used to
      +     * validate the destination object after rewriting.
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 29; + * + * .google.storage.v2.ObjectChecksums object_checksums = 29 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeObjectChecksums(com.google.storage.v2.ObjectChecksums value) { if (objectChecksumsBuilder_ == null) { @@ -4553,11 +4654,13 @@ public Builder mergeObjectChecksums(com.google.storage.v2.ObjectChecksums value) * * *
      -     * The checksums of the complete object. This will be used to validate the
      -     * destination object after rewriting.
      +     * Optional. The checksums of the complete object. This will be used to
      +     * validate the destination object after rewriting.
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 29; + * + * .google.storage.v2.ObjectChecksums object_checksums = 29 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearObjectChecksums() { bitField0_ = (bitField0_ & ~0x00400000); @@ -4574,11 +4677,13 @@ public Builder clearObjectChecksums() { * * *
      -     * The checksums of the complete object. This will be used to validate the
      -     * destination object after rewriting.
      +     * Optional. The checksums of the complete object. This will be used to
      +     * validate the destination object after rewriting.
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 29; + * + * .google.storage.v2.ObjectChecksums object_checksums = 29 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.ObjectChecksums.Builder getObjectChecksumsBuilder() { bitField0_ |= 0x00400000; @@ -4590,11 +4695,13 @@ public com.google.storage.v2.ObjectChecksums.Builder getObjectChecksumsBuilder() * * *
      -     * The checksums of the complete object. This will be used to validate the
      -     * destination object after rewriting.
      +     * Optional. The checksums of the complete object. This will be used to
      +     * validate the destination object after rewriting.
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 29; + * + * .google.storage.v2.ObjectChecksums object_checksums = 29 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.ObjectChecksumsOrBuilder getObjectChecksumsOrBuilder() { if (objectChecksumsBuilder_ != null) { @@ -4610,11 +4717,13 @@ public com.google.storage.v2.ObjectChecksumsOrBuilder getObjectChecksumsOrBuilde * * *
      -     * The checksums of the complete object. This will be used to validate the
      -     * destination object after rewriting.
      +     * Optional. The checksums of the complete object. This will be used to
      +     * validate the destination object after rewriting.
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 29; + * + * .google.storage.v2.ObjectChecksums object_checksums = 29 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.ObjectChecksums, diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RewriteObjectRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RewriteObjectRequestOrBuilder.java index 2d759d28b4..eac28c610c 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RewriteObjectRequestOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/RewriteObjectRequestOrBuilder.java @@ -102,14 +102,16 @@ public interface RewriteObjectRequestOrBuilder * * *
      -   * The name of the Cloud KMS key that will be used to encrypt the destination
      -   * object. The Cloud KMS key must be located in same location as the object.
      -   * If the parameter is not specified, the request uses the destination
      -   * bucket's default encryption key, if any, or else the Google-managed
      -   * encryption key.
      +   * Optional. The name of the Cloud KMS key that will be used to encrypt the
      +   * destination object. The Cloud KMS key must be located in same location as
      +   * the object. If the parameter is not specified, the request uses the
      +   * destination bucket's default encryption key, if any, or else the
      +   * Google-managed encryption key.
          * 
      * - * string destination_kms_key = 27 [(.google.api.resource_reference) = { ... } + * + * string destination_kms_key = 27 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The destinationKmsKey. */ @@ -119,14 +121,16 @@ public interface RewriteObjectRequestOrBuilder * * *
      -   * The name of the Cloud KMS key that will be used to encrypt the destination
      -   * object. The Cloud KMS key must be located in same location as the object.
      -   * If the parameter is not specified, the request uses the destination
      -   * bucket's default encryption key, if any, or else the Google-managed
      -   * encryption key.
      +   * Optional. The name of the Cloud KMS key that will be used to encrypt the
      +   * destination object. The Cloud KMS key must be located in same location as
      +   * the object. If the parameter is not specified, the request uses the
      +   * destination bucket's default encryption key, if any, or else the
      +   * Google-managed encryption key.
          * 
      * - * string destination_kms_key = 27 [(.google.api.resource_reference) = { ... } + * + * string destination_kms_key = 27 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * * * @return The bytes for destinationKmsKey. */ @@ -136,7 +140,7 @@ public interface RewriteObjectRequestOrBuilder * * *
      -   * Properties of the destination, post-rewrite object.
      +   * Optional. Properties of the destination, post-rewrite object.
          * The `name`, `bucket` and `kms_key` fields must not be populated (these
          * values are specified in the `destination_name`, `destination_bucket`, and
          * `destination_kms_key` fields).
      @@ -145,7 +149,8 @@ public interface RewriteObjectRequestOrBuilder
          * copied from the source object.
          * 
      * - * .google.storage.v2.Object destination = 1; + * .google.storage.v2.Object destination = 1 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the destination field is set. */ @@ -155,7 +160,7 @@ public interface RewriteObjectRequestOrBuilder * * *
      -   * Properties of the destination, post-rewrite object.
      +   * Optional. Properties of the destination, post-rewrite object.
          * The `name`, `bucket` and `kms_key` fields must not be populated (these
          * values are specified in the `destination_name`, `destination_bucket`, and
          * `destination_kms_key` fields).
      @@ -164,7 +169,8 @@ public interface RewriteObjectRequestOrBuilder
          * copied from the source object.
          * 
      * - * .google.storage.v2.Object destination = 1; + * .google.storage.v2.Object destination = 1 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The destination. */ @@ -174,7 +180,7 @@ public interface RewriteObjectRequestOrBuilder * * *
      -   * Properties of the destination, post-rewrite object.
      +   * Optional. Properties of the destination, post-rewrite object.
          * The `name`, `bucket` and `kms_key` fields must not be populated (these
          * values are specified in the `destination_name`, `destination_bucket`, and
          * `destination_kms_key` fields).
      @@ -183,7 +189,8 @@ public interface RewriteObjectRequestOrBuilder
          * copied from the source object.
          * 
      * - * .google.storage.v2.Object destination = 1; + * .google.storage.v2.Object destination = 1 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.ObjectOrBuilder getDestinationOrBuilder(); @@ -247,11 +254,11 @@ public interface RewriteObjectRequestOrBuilder * * *
      -   * If present, selects a specific revision of the source object (as opposed to
      -   * the latest version, the default).
      +   * Optional. If present, selects a specific revision of the source object (as
      +   * opposed to the latest version, the default).
          * 
      * - * int64 source_generation = 4; + * int64 source_generation = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The sourceGeneration. */ @@ -261,14 +268,14 @@ public interface RewriteObjectRequestOrBuilder * * *
      -   * Include this field (from the previous rewrite response) on each rewrite
      -   * request after the first one, until the rewrite response 'done' flag is
      -   * true. Calls that provide a rewriteToken can omit all other request fields,
      -   * but if included those fields must match the values provided in the first
      -   * rewrite request.
      +   * Optional. Include this field (from the previous rewrite response) on each
      +   * rewrite request after the first one, until the rewrite response 'done' flag
      +   * is true. Calls that provide a rewriteToken can omit all other request
      +   * fields, but if included those fields must match the values provided in the
      +   * first rewrite request.
          * 
      * - * string rewrite_token = 5; + * string rewrite_token = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The rewriteToken. */ @@ -278,14 +285,14 @@ public interface RewriteObjectRequestOrBuilder * * *
      -   * Include this field (from the previous rewrite response) on each rewrite
      -   * request after the first one, until the rewrite response 'done' flag is
      -   * true. Calls that provide a rewriteToken can omit all other request fields,
      -   * but if included those fields must match the values provided in the first
      -   * rewrite request.
      +   * Optional. Include this field (from the previous rewrite response) on each
      +   * rewrite request after the first one, until the rewrite response 'done' flag
      +   * is true. Calls that provide a rewriteToken can omit all other request
      +   * fields, but if included those fields must match the values provided in the
      +   * first rewrite request.
          * 
      * - * string rewrite_token = 5; + * string rewrite_token = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for rewriteToken. */ @@ -295,12 +302,12 @@ public interface RewriteObjectRequestOrBuilder * * *
      -   * Apply a predefined set of access controls to the destination object.
      -   * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +   * Optional. Apply a predefined set of access controls to the destination
      +   * object. Valid values are "authenticatedRead", "bucketOwnerFullControl",
          * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
          * 
      * - * string destination_predefined_acl = 28; + * string destination_predefined_acl = 28 [(.google.api.field_behavior) = OPTIONAL]; * * @return The destinationPredefinedAcl. */ @@ -310,12 +317,12 @@ public interface RewriteObjectRequestOrBuilder * * *
      -   * Apply a predefined set of access controls to the destination object.
      -   * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +   * Optional. Apply a predefined set of access controls to the destination
      +   * object. Valid values are "authenticatedRead", "bucketOwnerFullControl",
          * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
          * 
      * - * string destination_predefined_acl = 28; + * string destination_predefined_acl = 28 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for destinationPredefinedAcl. */ @@ -555,17 +562,16 @@ public interface RewriteObjectRequestOrBuilder * * *
      -   * The maximum number of bytes that will be rewritten per rewrite request.
      -   * Most callers
      -   * shouldn't need to specify this parameter - it is primarily in place to
      -   * support testing. If specified the value must be an integral multiple of
      -   * 1 MiB (1048576). Also, this only applies to requests where the source and
      -   * destination span locations and/or storage classes. Finally, this value must
      -   * not change across rewrite calls else you'll get an error that the
      -   * `rewriteToken` is invalid.
      +   * Optional. The maximum number of bytes that will be rewritten per rewrite
      +   * request. Most callers shouldn't need to specify this parameter - it is
      +   * primarily in place to support testing. If specified the value must be an
      +   * integral multiple of 1 MiB (1048576). Also, this only applies to requests
      +   * where the source and destination span locations and/or storage classes.
      +   * Finally, this value must not change across rewrite calls else you'll get an
      +   * error that the `rewriteToken` is invalid.
          * 
      * - * int64 max_bytes_rewritten_per_call = 15; + * int64 max_bytes_rewritten_per_call = 15 [(.google.api.field_behavior) = OPTIONAL]; * * @return The maxBytesRewrittenPerCall. */ @@ -575,11 +581,12 @@ public interface RewriteObjectRequestOrBuilder * * *
      -   * The algorithm used to encrypt the source object, if any. Used if the source
      -   * object was encrypted with a Customer-Supplied Encryption Key.
      +   * Optional. The algorithm used to encrypt the source object, if any. Used if
      +   * the source object was encrypted with a Customer-Supplied Encryption Key.
          * 
      * - * string copy_source_encryption_algorithm = 16; + * string copy_source_encryption_algorithm = 16 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The copySourceEncryptionAlgorithm. */ @@ -589,11 +596,12 @@ public interface RewriteObjectRequestOrBuilder * * *
      -   * The algorithm used to encrypt the source object, if any. Used if the source
      -   * object was encrypted with a Customer-Supplied Encryption Key.
      +   * Optional. The algorithm used to encrypt the source object, if any. Used if
      +   * the source object was encrypted with a Customer-Supplied Encryption Key.
          * 
      * - * string copy_source_encryption_algorithm = 16; + * string copy_source_encryption_algorithm = 16 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The bytes for copySourceEncryptionAlgorithm. */ @@ -603,12 +611,13 @@ public interface RewriteObjectRequestOrBuilder * * *
      -   * The raw bytes (not base64-encoded) AES-256 encryption key used to encrypt
      -   * the source object, if it was encrypted with a Customer-Supplied Encryption
      -   * Key.
      +   * Optional. The raw bytes (not base64-encoded) AES-256 encryption key used to
      +   * encrypt the source object, if it was encrypted with a Customer-Supplied
      +   * Encryption Key.
          * 
      * - * bytes copy_source_encryption_key_bytes = 21; + * bytes copy_source_encryption_key_bytes = 21 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The copySourceEncryptionKeyBytes. */ @@ -618,12 +627,14 @@ public interface RewriteObjectRequestOrBuilder * * *
      -   * The raw bytes (not base64-encoded) SHA256 hash of the encryption key used
      -   * to encrypt the source object, if it was encrypted with a Customer-Supplied
      -   * Encryption Key.
      +   * Optional. The raw bytes (not base64-encoded) SHA256 hash of the encryption
      +   * key used to encrypt the source object, if it was encrypted with a
      +   * Customer-Supplied Encryption Key.
          * 
      * - * bytes copy_source_encryption_key_sha256_bytes = 22; + * + * bytes copy_source_encryption_key_sha256_bytes = 22 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The copySourceEncryptionKeySha256Bytes. */ @@ -633,10 +644,13 @@ public interface RewriteObjectRequestOrBuilder * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 19; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 19 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -646,10 +660,13 @@ public interface RewriteObjectRequestOrBuilder * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 19; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 19 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -659,10 +676,13 @@ public interface RewriteObjectRequestOrBuilder * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 19; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 19 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.CommonObjectRequestParamsOrBuilder getCommonObjectRequestParamsOrBuilder(); @@ -670,11 +690,13 @@ public interface RewriteObjectRequestOrBuilder * * *
      -   * The checksums of the complete object. This will be used to validate the
      -   * destination object after rewriting.
      +   * Optional. The checksums of the complete object. This will be used to
      +   * validate the destination object after rewriting.
          * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 29; + * + * .google.storage.v2.ObjectChecksums object_checksums = 29 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the objectChecksums field is set. */ @@ -684,11 +706,13 @@ public interface RewriteObjectRequestOrBuilder * * *
      -   * The checksums of the complete object. This will be used to validate the
      -   * destination object after rewriting.
      +   * Optional. The checksums of the complete object. This will be used to
      +   * validate the destination object after rewriting.
          * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 29; + * + * .google.storage.v2.ObjectChecksums object_checksums = 29 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The objectChecksums. */ @@ -698,11 +722,13 @@ public interface RewriteObjectRequestOrBuilder * * *
      -   * The checksums of the complete object. This will be used to validate the
      -   * destination object after rewriting.
      +   * Optional. The checksums of the complete object. This will be used to
      +   * validate the destination object after rewriting.
          * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 29; + * + * .google.storage.v2.ObjectChecksums object_checksums = 29 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.ObjectChecksumsOrBuilder getObjectChecksumsOrBuilder(); } diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StartResumableWriteRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StartResumableWriteRequest.java index 1be6f6a883..2857a1599d 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StartResumableWriteRequest.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StartResumableWriteRequest.java @@ -129,10 +129,13 @@ public com.google.storage.v2.WriteObjectSpecOrBuilder getWriteObjectSpecOrBuilde * * *
      -   * A set of parameters common to Storage API requests related to an object.
      +   * Optional. A set of parameters common to Storage API requests related to an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 3; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 3 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -145,10 +148,13 @@ public boolean hasCommonObjectRequestParams() { * * *
      -   * A set of parameters common to Storage API requests related to an object.
      +   * Optional. A set of parameters common to Storage API requests related to an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 3; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 3 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -163,10 +169,13 @@ public com.google.storage.v2.CommonObjectRequestParams getCommonObjectRequestPar * * *
      -   * A set of parameters common to Storage API requests related to an object.
      +   * Optional. A set of parameters common to Storage API requests related to an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 3; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 3 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.CommonObjectRequestParamsOrBuilder @@ -183,14 +192,16 @@ public com.google.storage.v2.CommonObjectRequestParams getCommonObjectRequestPar * * *
      -   * The checksums of the complete object. This is used to validate the
      -   * uploaded object. For each upload, `object_checksums` can be provided when
      -   * initiating a resumable upload with`StartResumableWriteRequest` or when
      +   * Optional. The checksums of the complete object. This is used to validate
      +   * the uploaded object. For each upload, `object_checksums` can be provided
      +   * when initiating a resumable upload with`StartResumableWriteRequest` or when
          * completing a write with `WriteObjectRequest` with
          * `finish_write` set to `true`.
          * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 5; + * + * .google.storage.v2.ObjectChecksums object_checksums = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the objectChecksums field is set. */ @@ -203,14 +214,16 @@ public boolean hasObjectChecksums() { * * *
      -   * The checksums of the complete object. This is used to validate the
      -   * uploaded object. For each upload, `object_checksums` can be provided when
      -   * initiating a resumable upload with`StartResumableWriteRequest` or when
      +   * Optional. The checksums of the complete object. This is used to validate
      +   * the uploaded object. For each upload, `object_checksums` can be provided
      +   * when initiating a resumable upload with`StartResumableWriteRequest` or when
          * completing a write with `WriteObjectRequest` with
          * `finish_write` set to `true`.
          * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 5; + * + * .google.storage.v2.ObjectChecksums object_checksums = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The objectChecksums. */ @@ -225,14 +238,16 @@ public com.google.storage.v2.ObjectChecksums getObjectChecksums() { * * *
      -   * The checksums of the complete object. This is used to validate the
      -   * uploaded object. For each upload, `object_checksums` can be provided when
      -   * initiating a resumable upload with`StartResumableWriteRequest` or when
      +   * Optional. The checksums of the complete object. This is used to validate
      +   * the uploaded object. For each upload, `object_checksums` can be provided
      +   * when initiating a resumable upload with`StartResumableWriteRequest` or when
          * completing a write with `WriteObjectRequest` with
          * `finish_write` set to `true`.
          * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 5; + * + * .google.storage.v2.ObjectChecksums object_checksums = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.ObjectChecksumsOrBuilder getObjectChecksumsOrBuilder() { @@ -902,10 +917,13 @@ public com.google.storage.v2.WriteObjectSpecOrBuilder getWriteObjectSpecOrBuilde * * *
      -     * A set of parameters common to Storage API requests related to an object.
      +     * Optional. A set of parameters common to Storage API requests related to an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 3; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 3 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -917,10 +935,13 @@ public boolean hasCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests related to an object.
      +     * Optional. A set of parameters common to Storage API requests related to an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 3; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 3 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -938,10 +959,13 @@ public com.google.storage.v2.CommonObjectRequestParams getCommonObjectRequestPar * * *
      -     * A set of parameters common to Storage API requests related to an object.
      +     * Optional. A set of parameters common to Storage API requests related to an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 3; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 3 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams value) { @@ -962,10 +986,13 @@ public Builder setCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests related to an object.
      +     * Optional. A set of parameters common to Storage API requests related to an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 3; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 3 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams.Builder builderForValue) { @@ -983,10 +1010,13 @@ public Builder setCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests related to an object.
      +     * Optional. A set of parameters common to Storage API requests related to an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 3; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 3 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams value) { @@ -1013,10 +1043,13 @@ public Builder mergeCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests related to an object.
      +     * Optional. A set of parameters common to Storage API requests related to an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 3; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 3 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearCommonObjectRequestParams() { bitField0_ = (bitField0_ & ~0x00000002); @@ -1033,10 +1066,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests related to an object.
      +     * Optional. A set of parameters common to Storage API requests related to an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 3; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 3 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.CommonObjectRequestParams.Builder getCommonObjectRequestParamsBuilder() { @@ -1049,10 +1085,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests related to an object.
      +     * Optional. A set of parameters common to Storage API requests related to an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 3; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 3 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.CommonObjectRequestParamsOrBuilder getCommonObjectRequestParamsOrBuilder() { @@ -1069,10 +1108,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests related to an object.
      +     * Optional. A set of parameters common to Storage API requests related to an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 3; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 3 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.CommonObjectRequestParams, @@ -1102,14 +1144,16 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * The checksums of the complete object. This is used to validate the
      -     * uploaded object. For each upload, `object_checksums` can be provided when
      -     * initiating a resumable upload with`StartResumableWriteRequest` or when
      +     * Optional. The checksums of the complete object. This is used to validate
      +     * the uploaded object. For each upload, `object_checksums` can be provided
      +     * when initiating a resumable upload with`StartResumableWriteRequest` or when
            * completing a write with `WriteObjectRequest` with
            * `finish_write` set to `true`.
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 5; + * + * .google.storage.v2.ObjectChecksums object_checksums = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the objectChecksums field is set. */ @@ -1121,14 +1165,16 @@ public boolean hasObjectChecksums() { * * *
      -     * The checksums of the complete object. This is used to validate the
      -     * uploaded object. For each upload, `object_checksums` can be provided when
      -     * initiating a resumable upload with`StartResumableWriteRequest` or when
      +     * Optional. The checksums of the complete object. This is used to validate
      +     * the uploaded object. For each upload, `object_checksums` can be provided
      +     * when initiating a resumable upload with`StartResumableWriteRequest` or when
            * completing a write with `WriteObjectRequest` with
            * `finish_write` set to `true`.
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 5; + * + * .google.storage.v2.ObjectChecksums object_checksums = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The objectChecksums. */ @@ -1146,14 +1192,16 @@ public com.google.storage.v2.ObjectChecksums getObjectChecksums() { * * *
      -     * The checksums of the complete object. This is used to validate the
      -     * uploaded object. For each upload, `object_checksums` can be provided when
      -     * initiating a resumable upload with`StartResumableWriteRequest` or when
      +     * Optional. The checksums of the complete object. This is used to validate
      +     * the uploaded object. For each upload, `object_checksums` can be provided
      +     * when initiating a resumable upload with`StartResumableWriteRequest` or when
            * completing a write with `WriteObjectRequest` with
            * `finish_write` set to `true`.
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 5; + * + * .google.storage.v2.ObjectChecksums object_checksums = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setObjectChecksums(com.google.storage.v2.ObjectChecksums value) { if (objectChecksumsBuilder_ == null) { @@ -1173,14 +1221,16 @@ public Builder setObjectChecksums(com.google.storage.v2.ObjectChecksums value) { * * *
      -     * The checksums of the complete object. This is used to validate the
      -     * uploaded object. For each upload, `object_checksums` can be provided when
      -     * initiating a resumable upload with`StartResumableWriteRequest` or when
      +     * Optional. The checksums of the complete object. This is used to validate
      +     * the uploaded object. For each upload, `object_checksums` can be provided
      +     * when initiating a resumable upload with`StartResumableWriteRequest` or when
            * completing a write with `WriteObjectRequest` with
            * `finish_write` set to `true`.
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 5; + * + * .google.storage.v2.ObjectChecksums object_checksums = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setObjectChecksums( com.google.storage.v2.ObjectChecksums.Builder builderForValue) { @@ -1198,14 +1248,16 @@ public Builder setObjectChecksums( * * *
      -     * The checksums of the complete object. This is used to validate the
      -     * uploaded object. For each upload, `object_checksums` can be provided when
      -     * initiating a resumable upload with`StartResumableWriteRequest` or when
      +     * Optional. The checksums of the complete object. This is used to validate
      +     * the uploaded object. For each upload, `object_checksums` can be provided
      +     * when initiating a resumable upload with`StartResumableWriteRequest` or when
            * completing a write with `WriteObjectRequest` with
            * `finish_write` set to `true`.
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 5; + * + * .google.storage.v2.ObjectChecksums object_checksums = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeObjectChecksums(com.google.storage.v2.ObjectChecksums value) { if (objectChecksumsBuilder_ == null) { @@ -1230,14 +1282,16 @@ public Builder mergeObjectChecksums(com.google.storage.v2.ObjectChecksums value) * * *
      -     * The checksums of the complete object. This is used to validate the
      -     * uploaded object. For each upload, `object_checksums` can be provided when
      -     * initiating a resumable upload with`StartResumableWriteRequest` or when
      +     * Optional. The checksums of the complete object. This is used to validate
      +     * the uploaded object. For each upload, `object_checksums` can be provided
      +     * when initiating a resumable upload with`StartResumableWriteRequest` or when
            * completing a write with `WriteObjectRequest` with
            * `finish_write` set to `true`.
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 5; + * + * .google.storage.v2.ObjectChecksums object_checksums = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearObjectChecksums() { bitField0_ = (bitField0_ & ~0x00000004); @@ -1254,14 +1308,16 @@ public Builder clearObjectChecksums() { * * *
      -     * The checksums of the complete object. This is used to validate the
      -     * uploaded object. For each upload, `object_checksums` can be provided when
      -     * initiating a resumable upload with`StartResumableWriteRequest` or when
      +     * Optional. The checksums of the complete object. This is used to validate
      +     * the uploaded object. For each upload, `object_checksums` can be provided
      +     * when initiating a resumable upload with`StartResumableWriteRequest` or when
            * completing a write with `WriteObjectRequest` with
            * `finish_write` set to `true`.
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 5; + * + * .google.storage.v2.ObjectChecksums object_checksums = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.ObjectChecksums.Builder getObjectChecksumsBuilder() { bitField0_ |= 0x00000004; @@ -1273,14 +1329,16 @@ public com.google.storage.v2.ObjectChecksums.Builder getObjectChecksumsBuilder() * * *
      -     * The checksums of the complete object. This is used to validate the
      -     * uploaded object. For each upload, `object_checksums` can be provided when
      -     * initiating a resumable upload with`StartResumableWriteRequest` or when
      +     * Optional. The checksums of the complete object. This is used to validate
      +     * the uploaded object. For each upload, `object_checksums` can be provided
      +     * when initiating a resumable upload with`StartResumableWriteRequest` or when
            * completing a write with `WriteObjectRequest` with
            * `finish_write` set to `true`.
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 5; + * + * .google.storage.v2.ObjectChecksums object_checksums = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.ObjectChecksumsOrBuilder getObjectChecksumsOrBuilder() { if (objectChecksumsBuilder_ != null) { @@ -1296,14 +1354,16 @@ public com.google.storage.v2.ObjectChecksumsOrBuilder getObjectChecksumsOrBuilde * * *
      -     * The checksums of the complete object. This is used to validate the
      -     * uploaded object. For each upload, `object_checksums` can be provided when
      -     * initiating a resumable upload with`StartResumableWriteRequest` or when
      +     * Optional. The checksums of the complete object. This is used to validate
      +     * the uploaded object. For each upload, `object_checksums` can be provided
      +     * when initiating a resumable upload with`StartResumableWriteRequest` or when
            * completing a write with `WriteObjectRequest` with
            * `finish_write` set to `true`.
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 5; + * + * .google.storage.v2.ObjectChecksums object_checksums = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.ObjectChecksums, diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StartResumableWriteRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StartResumableWriteRequestOrBuilder.java index 9d0b1bbecd..c9d033358e 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StartResumableWriteRequestOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/StartResumableWriteRequestOrBuilder.java @@ -71,10 +71,13 @@ public interface StartResumableWriteRequestOrBuilder * * *
      -   * A set of parameters common to Storage API requests related to an object.
      +   * Optional. A set of parameters common to Storage API requests related to an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 3; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 3 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -84,10 +87,13 @@ public interface StartResumableWriteRequestOrBuilder * * *
      -   * A set of parameters common to Storage API requests related to an object.
      +   * Optional. A set of parameters common to Storage API requests related to an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 3; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 3 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -97,10 +103,13 @@ public interface StartResumableWriteRequestOrBuilder * * *
      -   * A set of parameters common to Storage API requests related to an object.
      +   * Optional. A set of parameters common to Storage API requests related to an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 3; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 3 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.CommonObjectRequestParamsOrBuilder getCommonObjectRequestParamsOrBuilder(); @@ -108,14 +117,16 @@ public interface StartResumableWriteRequestOrBuilder * * *
      -   * The checksums of the complete object. This is used to validate the
      -   * uploaded object. For each upload, `object_checksums` can be provided when
      -   * initiating a resumable upload with`StartResumableWriteRequest` or when
      +   * Optional. The checksums of the complete object. This is used to validate
      +   * the uploaded object. For each upload, `object_checksums` can be provided
      +   * when initiating a resumable upload with`StartResumableWriteRequest` or when
          * completing a write with `WriteObjectRequest` with
          * `finish_write` set to `true`.
          * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 5; + * + * .google.storage.v2.ObjectChecksums object_checksums = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the objectChecksums field is set. */ @@ -125,14 +136,16 @@ public interface StartResumableWriteRequestOrBuilder * * *
      -   * The checksums of the complete object. This is used to validate the
      -   * uploaded object. For each upload, `object_checksums` can be provided when
      -   * initiating a resumable upload with`StartResumableWriteRequest` or when
      +   * Optional. The checksums of the complete object. This is used to validate
      +   * the uploaded object. For each upload, `object_checksums` can be provided
      +   * when initiating a resumable upload with`StartResumableWriteRequest` or when
          * completing a write with `WriteObjectRequest` with
          * `finish_write` set to `true`.
          * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 5; + * + * .google.storage.v2.ObjectChecksums object_checksums = 5 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The objectChecksums. */ @@ -142,14 +155,16 @@ public interface StartResumableWriteRequestOrBuilder * * *
      -   * The checksums of the complete object. This is used to validate the
      -   * uploaded object. For each upload, `object_checksums` can be provided when
      -   * initiating a resumable upload with`StartResumableWriteRequest` or when
      +   * Optional. The checksums of the complete object. This is used to validate
      +   * the uploaded object. For each upload, `object_checksums` can be provided
      +   * when initiating a resumable upload with`StartResumableWriteRequest` or when
          * completing a write with `WriteObjectRequest` with
          * `finish_write` set to `true`.
          * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 5; + * + * .google.storage.v2.ObjectChecksums object_checksums = 5 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.ObjectChecksumsOrBuilder getObjectChecksumsOrBuilder(); } 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 1a2a072c87..68084e5c9a 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 @@ -276,6 +276,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_storage_v2_Bucket_Autoclass_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_storage_v2_Bucket_Autoclass_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storage_v2_Bucket_IpFilter_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storage_v2_Bucket_IpFilter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storage_v2_Bucket_IpFilter_PublicNetworkSource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storage_v2_Bucket_IpFilter_PublicNetworkSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storage_v2_Bucket_IpFilter_VpcNetworkSource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storage_v2_Bucket_IpFilter_VpcNetworkSource_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_storage_v2_Bucket_HierarchicalNamespace_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -304,6 +316,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_storage_v2_Object_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_storage_v2_Object_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_storage_v2_Object_Retention_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_storage_v2_Object_Retention_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_storage_v2_Object_MetadataEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -363,20 +379,20 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\tread_mask\030\005 \001(\0132\032.google.protobuf.FieldMaskH\002\210\001\001B\032\n" + "\030_if_metageneration_matchB\036\n" + "\034_if_metageneration_not_matchB\014\n\n" - + "_read_mask\"\316\001\n" + + "_read_mask\"\335\001\n" + "\023CreateBucketRequest\0225\n" + "\006parent\030\001 \001(" - + "\tB%\340A\002\372A\037\022\035storage.googleapis.com/Bucket\022)\n" - + "\006bucket\030\002 \001(\0132\031.google.storage.v2.Bucket\022\026\n" - + "\tbucket_id\030\003 \001(\tB\003\340A\002\022\026\n" - + "\016predefined_acl\030\006 \001(\t\022%\n" - + "\035predefined_default_object_acl\030\007 \001(\t\"\304\001\n" + + "\tB%\340A\002\372A\037\022\035storage.googleapis.com/Bucket\022.\n" + + "\006bucket\030\002 \001(\0132\031.google.storage.v2.BucketB\003\340A\001\022\026\n" + + "\tbucket_id\030\003 \001(\tB\003\340A\002\022\033\n" + + "\016predefined_acl\030\006 \001(\tB\003\340A\001\022*\n" + + "\035predefined_default_object_acl\030\007 \001(\tB\003\340A\001\"\323\001\n" + "\022ListBucketsRequest\0225\n" - + "\006parent\030\001 \001(" - + "\tB%\340A\002\372A\037\022\035storage.googleapis.com/Bucket\022\021\n" - + "\tpage_size\030\002 \001(\005\022\022\n\n" - + "page_token\030\003 \001(\t\022\016\n" - + "\006prefix\030\004 \001(\t\0222\n" + + "\006parent\030\001 \001(\t" + + "B%\340A\002\372A\037\022\035storage.googleapis.com/Bucket\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\023\n" + + "\006prefix\030\004 \001(\tB\003\340A\001\0222\n" + "\tread_mask\030\005 \001(\0132\032.google.protobuf.FieldMaskH\000\210\001\001B\014\n\n" + "_read_mask\"Z\n" + "\023ListBucketsResponse\022*\n" @@ -385,54 +401,54 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " LockBucketRetentionPolicyRequest\0225\n" + "\006bucket\030\001 \001(\tB%\340A\002\372A\037\n" + "\035storage.googleapis.com/Bucket\022$\n" - + "\027if_metageneration_match\030\002 \001(\003B\003\340A\002\"\306\002\n" + + "\027if_metageneration_match\030\002 \001(\003B\003\340A\002\"\320\002\n" + "\023UpdateBucketRequest\022.\n" + "\006bucket\030\001 \001(\0132\031.google.storage.v2.BucketB\003\340A\002\022$\n" + "\027if_metageneration_match\030\002 \001(\003H\000\210\001\001\022(\n" - + "\033if_metageneration_not_match\030\003 \001(\003H\001\210\001\001\022\026\n" - + "\016predefined_acl\030\010 \001(\t\022%\n" - + "\035predefined_default_object_acl\030\t \001(\t\0224\n" + + "\033if_metageneration_not_match\030\003 \001(\003H\001\210\001\001\022\033\n" + + "\016predefined_acl\030\010 \001(\tB\003\340A\001\022*\n" + + "\035predefined_default_object_acl\030\t \001(\tB\003\340A\001\0224\n" + "\013update_mask\030\006 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002B\032\n" + "\030_if_metageneration_matchB\036\n" - + "\034_if_metageneration_not_match\"\365\005\n" + + "\034_if_metageneration_not_match\"\226\006\n" + "\024ComposeObjectRequest\0223\n" - + "\013destination\030\001 \001(\0132\031.google.storage.v2.ObjectB\003\340A\002\022L\n" + + "\013destination\030\001 \001(\0132\031.google.storage.v2.ObjectB\003\340A\002\022Q\n" + "\016source_objects\030\002 \003(\01324." - + "google.storage.v2.ComposeObjectRequest.SourceObject\022\"\n" - + "\032destination_predefined_acl\030\t \001(\t\022 \n" + + "google.storage.v2.ComposeObjectRequest.SourceObjectB\003\340A\001\022\'\n" + + "\032destination_predefined_acl\030\t \001(\tB\003\340A\001\022 \n" + "\023if_generation_match\030\004 \001(\003H\000\210\001\001\022$\n" - + "\027if_metageneration_match\030\005 \001(\003H\001\210\001\001\0227\n" - + "\007kms_key\030\006 \001(\tB&\372A#\n" - + "!cloudkms.googleapis.com/CryptoKey\022R\n" - + "\034common_object_request_params\030\007" - + " \001(\0132,.google.storage.v2.CommonObjectRequestParams\022<\n" + + "\027if_metageneration_match\030\005 \001(\003H\001\210\001\001\022:\n" + + "\007kms_key\030\006 \001(\tB)\340A\001\372A#\n" + + "!cloudkms.googleapis.com/CryptoKey\022W\n" + + "\034common_object_request_params\030\007 \001(\0132,.google.sto" + + "rage.v2.CommonObjectRequestParamsB\003\340A\001\022A\n" + "\020object_checksums\030\n" - + " \001(\0132\".google.storage.v2.ObjectChecksums\032\356\001\n" + + " \001(\0132\".google.storage.v2.ObjectChecksumsB\003\340A\001\032\370\001\n" + "\014SourceObject\022\021\n" - + "\004name\030\001 \001(\tB\003\340A\002\022\022\n\n" - + "generation\030\002 \001(\003\022f\n" - + "\024object_preconditions\030\003 \001(\0132H.google.storage.v2.ComposeObje" - + "ctRequest.SourceObject.ObjectPreconditions\032O\n" + + "\004name\030\001 \001(\tB\003\340A\002\022\027\n\n" + + "generation\030\002 \001(\003B\003\340A\001\022k\n" + + "\024object_preconditions\030\003 \001(\0132H.g" + + "oogle.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditionsB\003\340A\001\032O\n" + "\023ObjectPreconditions\022 \n" + "\023if_generation_match\030\001 \001(\003H\000\210\001\001B\026\n" + "\024_if_generation_matchB\026\n" + "\024_if_generation_matchB\032\n" - + "\030_if_metageneration_match\"\321\003\n" + + "\030_if_metageneration_match\"\333\003\n" + "\023DeleteObjectRequest\0225\n" + "\006bucket\030\001 \001(\tB%\340A\002\372A\037\n" + "\035storage.googleapis.com/Bucket\022\023\n" - + "\006object\030\002 \001(\tB\003\340A\002\022\022\n\n" - + "generation\030\004 \001(\003\022 \n" + + "\006object\030\002 \001(\tB\003\340A\002\022\027\n\n" + + "generation\030\004 \001(\003B\003\340A\001\022 \n" + "\023if_generation_match\030\005 \001(\003H\000\210\001\001\022$\n" + "\027if_generation_not_match\030\006 \001(\003H\001\210\001\001\022$\n" + "\027if_metageneration_match\030\007 \001(\003H\002\210\001\001\022(\n" - + "\033if_metageneration_not_match\030\010 \001(\003H\003\210\001\001\022R\n" + + "\033if_metageneration_not_match\030\010 \001(\003H\003\210\001\001\022W\n" + "\034common_object_request_params\030\n" - + " \001(\0132,.google.storage.v2.CommonObjectRequestParamsB\026\n" + + " \001(\0132,.google.storage.v2.CommonObjectRequestParamsB\003\340A\001B\026\n" + "\024_if_generation_matchB\032\n" + "\030_if_generation_not_matchB\032\n" + "\030_if_metageneration_matchB\036\n" - + "\034_if_metageneration_not_match\"\245\004\n" + + "\034_if_metageneration_not_match\"\252\004\n" + "\024RestoreObjectRequest\0225\n" + "\006bucket\030\001 \001(\tB%\340A\002\372A\037\n" + "\035storage.googleapis.com/Bucket\022\023\n" @@ -443,9 +459,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\027if_generation_not_match\030\005 \001(\003H\001\210\001\001\022$\n" + "\027if_metageneration_match\030\006 \001(\003H\002\210\001\001\022(\n" + "\033if_metageneration_not_match\030\007 \001(\003H\003\210\001\001\022\034\n" - + "\017copy_source_acl\030\t \001(\010H\004\210\001\001\022R\n" + + "\017copy_source_acl\030\t \001(\010H\004\210\001\001\022W\n" + "\034common_object_request_params\030\010" - + " \001(\0132,.google.storage.v2.CommonObjectRequestParamsB\026\n" + + " \001(\0132,.google.storage.v2.CommonObjectRequestParamsB\003\340A\001B\026\n" + "\024_if_generation_matchB\032\n" + "\030_if_generation_not_matchB\032\n" + "\030_if_metageneration_matchB\036\n" @@ -453,38 +469,38 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\020_copy_source_acl\"5\n" + "\033CancelResumableWriteRequest\022\026\n" + "\tupload_id\030\001 \001(\tB\003\340A\002\"\036\n" - + "\034CancelResumableWriteResponse\"\272\004\n" + + "\034CancelResumableWriteResponse\"\316\004\n" + "\021ReadObjectRequest\0225\n" + "\006bucket\030\001 \001(\tB%\340A\002\372A\037\n" + "\035storage.googleapis.com/Bucket\022\023\n" - + "\006object\030\002 \001(\tB\003\340A\002\022\022\n\n" - + "generation\030\003 \001(\003\022\023\n" - + "\013read_offset\030\004 \001(\003\022\022\n\n" - + "read_limit\030\005 \001(\003\022 \n" + + "\006object\030\002 \001(\tB\003\340A\002\022\027\n\n" + + "generation\030\003 \001(\003B\003\340A\001\022\030\n" + + "\013read_offset\030\004 \001(\003B\003\340A\001\022\027\n\n" + + "read_limit\030\005 \001(\003B\003\340A\001\022 \n" + "\023if_generation_match\030\006 \001(\003H\000\210\001\001\022$\n" + "\027if_generation_not_match\030\007 \001(\003H\001\210\001\001\022$\n" + "\027if_metageneration_match\030\010 \001(\003H\002\210\001\001\022(\n" - + "\033if_metageneration_not_match\030\t \001(\003H\003\210\001\001\022R\n" + + "\033if_metageneration_not_match\030\t \001(\003H\003\210\001\001\022W\n" + "\034common_object_request_params\030\n" - + " \001(\0132,.google.storage.v2.CommonObjectRequestParams\0222\n" + + " \001(\0132,.google.storage.v2.CommonObjectRequestParamsB\003\340A\001\0222\n" + "\tread_mask\030\014 \001(\0132\032.google.protobuf.FieldMaskH\004\210\001\001B\026\n" + "\024_if_generation_matchB\032\n" + "\030_if_generation_not_matchB\032\n" + "\030_if_metageneration_matchB\036\n" + "\034_if_metageneration_not_matchB\014\n\n" - + "_read_mask\"\330\004\n" + + "_read_mask\"\342\004\n" + "\020GetObjectRequest\0225\n" + "\006bucket\030\001 \001(\tB%\340A\002\372A\037\n" + "\035storage.googleapis.com/Bucket\022\023\n" - + "\006object\030\002 \001(\tB\003\340A\002\022\022\n\n" - + "generation\030\003 \001(\003\022\031\n" + + "\006object\030\002 \001(\tB\003\340A\002\022\027\n\n" + + "generation\030\003 \001(\003B\003\340A\001\022\031\n" + "\014soft_deleted\030\013 \001(\010H\000\210\001\001\022 \n" + "\023if_generation_match\030\004 \001(\003H\001\210\001\001\022$\n" + "\027if_generation_not_match\030\005 \001(\003H\002\210\001\001\022$\n" + "\027if_metageneration_match\030\006 \001(\003H\003\210\001\001\022(\n" - + "\033if_metageneration_not_match\030\007 \001(\003H\004\210\001\001\022R\n" + + "\033if_metageneration_not_match\030\007 \001(\003H\004\210\001\001\022W\n" + "\034common_object_request_params\030\010" - + " \001(\0132,.google.storage.v2.CommonObjectRequestParams\0222\n" + + " \001(\0132,.google.storage.v2.CommonObjectRequestParamsB\003\340A\001\0222\n" + "\tread_mask\030\n" + " \001(\0132\032.google.protobuf.FieldMaskH\005\210\001\001\022\032\n\r" + "restore_token\030\014 \001(\tB\003\340A\001B\017\n\r" @@ -498,18 +514,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\020checksummed_data\030\001 \001(\0132\".google.storage.v2.ChecksummedData\022<\n" + "\020object_checksums\030\002 \001(\0132\".google.storage.v2.ObjectChecksums\0226\n\r" + "content_range\030\003 \001(\0132\037.google.storage.v2.ContentRange\022+\n" - + "\010metadata\030\004 \001(\0132\031.google.storage.v2.Object\"\221\005\n" + + "\010metadata\030\004 \001(\0132\031.google.storage.v2.Object\"\233\005\n" + "\022BidiReadObjectSpec\0225\n" + "\006bucket\030\001 \001(\tB%\340A\002\372A\037\n" + "\035storage.googleapis.com/Bucket\022\023\n" - + "\006object\030\002 \001(\tB\003\340A\002\022\022\n\n" - + "generation\030\003 \001(\003\022 \n" + + "\006object\030\002 \001(\tB\003\340A\002\022\027\n\n" + + "generation\030\003 \001(\003B\003\340A\001\022 \n" + "\023if_generation_match\030\004 \001(\003H\000\210\001\001\022$\n" + "\027if_generation_not_match\030\005 \001(\003H\001\210\001\001\022$\n" + "\027if_metageneration_match\030\006 \001(\003H\002\210\001\001\022(\n" - + "\033if_metageneration_not_match\030\007 \001(\003H\003\210\001\001\022R\n" + + "\033if_metageneration_not_match\030\007 \001(\003H\003\210\001\001\022W\n" + "\034common_object_request_params\030\010" - + " \001(\0132,.google.storage.v2.CommonObjectRequestParams\0226\n" + + " \001(\0132,.google.storage.v2.CommonObjectRequestParamsB\003\340A\001\0226\n" + "\tread_mask\030\014" + " \001(\0132\032.google.protobuf.FieldMaskB\002\030\001H\004\210\001\001\022;\n" + "\013read_handle\030\r" @@ -521,10 +537,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\034_if_metageneration_not_matchB\014\n\n" + "_read_maskB\016\n" + "\014_read_handleB\020\n" - + "\016_routing_token\"\213\001\n" - + "\025BidiReadObjectRequest\022?\n" - + "\020read_object_spec\030\001 \001(\0132%.google.storage.v2.BidiReadObjectSpec\0221\n" - + "\013read_ranges\030\010 \003(\0132\034.google.storage.v2.ReadRange\"\275\001\n" + + "\016_routing_token\"\225\001\n" + + "\025BidiReadObjectRequest\022D\n" + + "\020read_object_spec\030\001" + + " \001(\0132%.google.storage.v2.BidiReadObjectSpecB\003\340A\001\0226\n" + + "\013read_ranges\030\010" + + " \003(\0132\034.google.storage.v2.ReadRangeB\003\340A\001\"\275\001\n" + "\026BidiReadObjectResponse\022>\n" + "\022object_data_ranges\030\006 \003(\0132\".google.storage.v2.ObjectRangeData\022+\n" + "\010metadata\030\004 \001(\0132\031.google.storage.v2.Object\0226\n" @@ -535,8 +553,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\016_routing_token\"\306\001\n" + "\036BidiWriteObjectRedirectedError\022\032\n\r" + "routing_token\030\001 \001(\tH\000\210\001\001\022=\n" - + "\014write_handle\030\002 \001(" - + "\0132\".google.storage.v2.BidiWriteHandleH\001\210\001\001\022\027\n\n" + + "\014write_handle\030\002" + + " \001(\0132\".google.storage.v2.BidiWriteHandleH\001\210\001\001\022\027\n\n" + "generation\030\003 \001(\003H\002\210\001\001B\020\n" + "\016_routing_tokenB\017\n\r" + "_write_handleB\r\n" @@ -557,10 +575,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\016BidiReadHandle\022\023\n" + "\006handle\030\001 \001(\014B\003\340A\002\"&\n" + "\017BidiWriteHandle\022\023\n" - + "\006handle\030\001 \001(\014B\003\340A\002\"\265\003\n" + + "\006handle\030\001 \001(\014B\003\340A\002\"\272\003\n" + "\017WriteObjectSpec\0220\n" - + "\010resource\030\001 \001(\0132\031.google.storage.v2.ObjectB\003\340A\002\022\026\n" - + "\016predefined_acl\030\007 \001(\t\022 \n" + + "\010resource\030\001 \001(\0132\031.google.storage.v2.ObjectB\003\340A\002\022\033\n" + + "\016predefined_acl\030\007 \001(\tB\003\340A\001\022 \n" + "\023if_generation_match\030\003 \001(\003H\000\210\001\001\022$\n" + "\027if_generation_not_match\030\004 \001(\003H\001\210\001\001\022$\n" + "\027if_metageneration_match\030\005 \001(\003H\002\210\001\001\022(\n" @@ -571,19 +589,21 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\030_if_generation_not_matchB\032\n" + "\030_if_metageneration_matchB\036\n" + "\034_if_metageneration_not_matchB\016\n" - + "\014_object_sizeB\r\n" - + "\013_appendable\"\206\003\n" + + "\014_object_sizeB\r" + + "\n" + + "\013_appendable\"\225\003\n" + "\022WriteObjectRequest\022\023\n" + "\tupload_id\030\001 \001(\tH\000\022?\n" + "\021write_object_spec\030\002" + " \001(\0132\".google.storage.v2.WriteObjectSpecH\000\022\031\n" + "\014write_offset\030\003 \001(\003B\003\340A\002\022>\n" + "\020checksummed_data\030\004" - + " \001(\0132\".google.storage.v2.ChecksummedDataH\001\022<\n" - + "\020object_checksums\030\006 \001(\0132\".google.storage.v2.ObjectChecksums\022\024\n" - + "\014finish_write\030\007 \001(\010\022R\n" - + "\034common_object_request_params\030\010 \001(\0132,.googl" - + "e.storage.v2.CommonObjectRequestParamsB\017\n\r" + + " \001(\0132\".google.storage.v2.ChecksummedDataH\001\022A\n" + + "\020object_checksums\030\006 \001(\0132" + + "\".google.storage.v2.ObjectChecksumsB\003\340A\001\022\031\n" + + "\014finish_write\030\007 \001(\010B\003\340A\001\022W\n" + + "\034common_object_request_params\030\010" + + " \001(\0132,.google.storage.v2.CommonObjectRequestParamsB\003\340A\001B\017\n\r" + "first_messageB\006\n" + "\004data\"n\n" + "\023WriteObjectResponse\022\030\n" @@ -603,7 +623,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\030_if_metageneration_matchB\036\n" + "\034_if_metageneration_not_matchB\020\n" + "\016_routing_tokenB\017\n\r" - + "_write_handle\"\362\003\n" + + "_write_handle\"\213\004\n" + "\026BidiWriteObjectRequest\022\023\n" + "\tupload_id\030\001 \001(\tH\000\022?\n" + "\021write_object_spec\030\002" @@ -612,14 +632,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " \001(\0132#.google.storage.v2.AppendObjectSpecH\000\022\031\n" + "\014write_offset\030\003 \001(\003B\003\340A\002\022>\n" + "\020checksummed_data\030\004" - + " \001(\0132\".google.storage.v2.ChecksummedDataH\001\022<\n" - + "\020object_checksums\030\006 \001(\0132\".google.storage.v2.ObjectChecksums\022\024\n" - + "\014state_lookup\030\007 \001(\010\022\r" - + "\n" - + "\005flush\030\010 \001(\010\022\024\n" - + "\014finish_write\030\t \001(\010\022R\n" + + " \001(\0132\".google.storage.v2.ChecksummedDataH\001\022A\n" + + "\020object_checksums\030\006" + + " \001(\0132\".google.storage.v2.ObjectChecksumsB\003\340A\001\022\031\n" + + "\014state_lookup\030\007 \001(\010B\003\340A\001\022\022\n" + + "\005flush\030\010 \001(\010B\003\340A\001\022\031\n" + + "\014finish_write\030\t \001(\010B\003\340A\001\022W\n" + "\034common_object_request_params\030\n" - + " \001(\0132,.google.storage.v2.CommonObjectRequestParamsB\017\n\r" + + " \001(\0132,.google.storage.v2.CommonObjectRequestParamsB\003\340A\001B\017\n\r" + "first_messageB\006\n" + "\004data\"\302\001\n" + "\027BidiWriteObjectResponse\022\030\n" @@ -628,16 +648,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\014write_handle\030\003" + " \001(\0132\".google.storage.v2.BidiWriteHandleH\001\210\001\001B\016\n" + "\014write_statusB\017\n\r" - + "_write_handle\"\255\003\n" + + "_write_handle\"\313\003\n" + "\022ListObjectsRequest\0225\n" + "\006parent\030\001 \001(\tB%\340A\002\372A\037\n" - + "\035storage.googleapis.com/Bucket\022\021\n" - + "\tpage_size\030\002 \001(\005\022\022\n\n" - + "page_token\030\003 \001(\t\022\021\n" - + "\tdelimiter\030\004 \001(\t\022\"\n" - + "\032include_trailing_delimiter\030\005 \001(\010\022\016\n" - + "\006prefix\030\006 \001(\t\022\020\n" - + "\010versions\030\007 \001(\010\0222\n" + + "\035storage.googleapis.com/Bucket\022\026\n" + + "\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\n" + + "page_token\030\003 \001(\tB\003\340A\001\022\026\n" + + "\tdelimiter\030\004 \001(\tB\003\340A\001\022\'\n" + + "\032include_trailing_delimiter\030\005 \001(\010B\003\340A\001\022\023\n" + + "\006prefix\030\006 \001(\tB\003\340A\001\022\025\n" + + "\010versions\030\007 \001(\010B\003\340A\001\0222\n" + "\tread_mask\030\010 \001(\0132\032.google.protobuf.FieldMaskH\000\210\001\001\022 \n" + "\023lexicographic_start\030\n" + " \001(\tB\003\340A\001\022\036\n" @@ -646,28 +666,28 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\033include_folders_as_prefixes\030\r" + " \001(\010B\003\340A\001\022\027\n\n" + "match_glob\030\016 \001(\tB\003\340A\001B\014\n\n" - + "_read_mask\"\205\001\n" + + "_read_mask\"\212\001\n" + "\027QueryWriteStatusRequest\022\026\n" - + "\tupload_id\030\001 \001(\tB\003\340A\002\022R\n" - + "\034common_object_request_params\030\002" - + " \001(\0132,.google.storage.v2.CommonObjectRequestParams\"s\n" + + "\tupload_id\030\001 \001(\tB\003\340A\002\022W\n" + + "\034common_object_request_params\030\002 \001(\0132,.g" + + "oogle.storage.v2.CommonObjectRequestParamsB\003\340A\001\"s\n" + "\030QueryWriteStatusResponse\022\030\n" + "\016persisted_size\030\001 \001(\003H\000\022-\n" + "\010resource\030\002 \001(\0132\031.google.storage.v2.ObjectH\000B\016\n" - + "\014write_status\"\250\n\n" + + "\014write_status\"\335\n\n" + "\024RewriteObjectRequest\022 \n" + "\020destination_name\030\030 \001(\tB\006\340A\002\340A\005\022D\n" + "\022destination_bucket\030\031 \001(\tB(\340A\002\340A\005\372A\037\n" - + "\035storage.googleapis.com/Bucket\022C\n" - + "\023destination_kms_key\030\033 \001(\tB&\372A#\n" - + "!cloudkms.googleapis.com/CryptoKey\022.\n" - + "\013destination\030\001 \001(\0132\031.google.storage.v2.Object\022<\n\r" + + "\035storage.googleapis.com/Bucket\022F\n" + + "\023destination_kms_key\030\033 \001(\tB)\340A\001\372A#\n" + + "!cloudkms.googleapis.com/CryptoKey\0223\n" + + "\013destination\030\001 \001(\0132\031.google.storage.v2.ObjectB\003\340A\001\022<\n\r" + "source_bucket\030\002 \001(\tB%\340A\002\372A\037\n" + "\035storage.googleapis.com/Bucket\022\032\n\r" - + "source_object\030\003 \001(\tB\003\340A\002\022\031\n" - + "\021source_generation\030\004 \001(\003\022\025\n\r" - + "rewrite_token\030\005 \001(\t\022\"\n" - + "\032destination_predefined_acl\030\034 \001(\t\022 \n" + + "source_object\030\003 \001(\tB\003\340A\002\022\036\n" + + "\021source_generation\030\004 \001(\003B\003\340A\001\022\032\n\r" + + "rewrite_token\030\005 \001(\tB\003\340A\001\022\'\n" + + "\032destination_predefined_acl\030\034 \001(\tB\003\340A\001\022 \n" + "\023if_generation_match\030\007 \001(\003H\000\210\001\001\022$\n" + "\027if_generation_not_match\030\010 \001(\003H\001\210\001\001\022$\n" + "\027if_metageneration_match\030\t \001(\003H\002\210\001\001\022(\n" @@ -677,14 +697,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\036if_source_generation_not_match\030\014 \001(\003H\005\210\001\001\022+\n" + "\036if_source_metageneration_match\030\r" + " \001(\003H\006\210\001\001\022/\n" - + "\"if_source_metageneration_not_match\030\016 \001(\003H\007\210\001\001\022$\n" - + "\034max_bytes_rewritten_per_call\030\017 \001(\003\022(\n" - + " copy_source_encryption_algorithm\030\020 \001(\t\022(\n" - + " copy_source_encryption_key_bytes\030\025 \001(\014\022/\n" - + "\'copy_source_encryption_key_sha256_bytes\030\026 \001(\014\022R\n" + + "\"if_source_metageneration_not_match\030\016 \001(\003H\007\210\001\001\022)\n" + + "\034max_bytes_rewritten_per_call\030\017 \001(\003B\003\340A\001\022-\n" + + " copy_source_encryption_algorithm\030\020 \001(\tB\003\340A\001\022-\n" + + " copy_source_encryption_key_bytes\030\025 \001(\014B\003\340A\001\0224\n" + + "\'copy_source_encryption_key_sha256_bytes\030\026 \001(\014B\003\340A\001\022W\n" + "\034common_object_request_params\030\023" - + " \001(\0132,.google.storage.v2.CommonObjectRequestParams\022<\n" - + "\020object_checksums\030\035 \001(\0132\".google.storage.v2.ObjectChecksumsB\026\n" + + " \001(\0132,.google.storage.v2.CommonObjectRequestParamsB\003\340A\001\022A\n" + + "\020object_checksums\030\035" + + " \001(\0132\".google.storage.v2.ObjectChecksumsB\003\340A\001B\026\n" + "\024_if_generation_matchB\032\n" + "\030_if_generation_not_matchB\032\n" + "\030_if_metageneration_matchB\036\n" @@ -724,34 +745,35 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\024_if_generation_matchB\032\n" + "\030_if_generation_not_matchB\032\n" + "\030_if_metageneration_matchB\036\n" - + "\034_if_metageneration_not_match\"\362\001\n" + + "\034_if_metageneration_not_match\"\374\001\n" + "\032StartResumableWriteRequest\022B\n" - + "\021write_object_spec\030\001 " - + "\001(\0132\".google.storage.v2.WriteObjectSpecB\003\340A\002\022R\n" - + "\034common_object_request_params\030\003 \001" - + "(\0132,.google.storage.v2.CommonObjectRequestParams\022<\n" - + "\020object_checksums\030\005 \001(\0132\".google.storage.v2.ObjectChecksums\"0\n" + + "\021write_object_spec\030\001" + + " \001(\0132\".google.storage.v2.WriteObjectSpecB\003\340A\002\022W\n" + + "\034common_object_request_params\030\003 \001(\0132,.goog" + + "le.storage.v2.CommonObjectRequestParamsB\003\340A\001\022A\n" + + "\020object_checksums\030\005" + + " \001(\0132\".google.storage.v2.ObjectChecksumsB\003\340A\001\"0\n" + "\033StartResumableWriteResponse\022\021\n" - + "\tupload_id\030\001 \001(\t\"\357\003\n" + + "\tupload_id\030\001 \001(\t\"\371\003\n" + "\023UpdateObjectRequest\022.\n" + "\006object\030\001 \001(\0132\031.google.storage.v2.ObjectB\003\340A\002\022 \n" + "\023if_generation_match\030\002 \001(\003H\000\210\001\001\022$\n" + "\027if_generation_not_match\030\003 \001(\003H\001\210\001\001\022$\n" + "\027if_metageneration_match\030\004 \001(\003H\002\210\001\001\022(\n" - + "\033if_metageneration_not_match\030\005 \001(\003H\003\210\001\001\022\026\n" + + "\033if_metageneration_not_match\030\005 \001(\003H\003\210\001\001\022\033\n" + "\016predefined_acl\030\n" - + " \001(\t\0224\n" - + "\013update_mask\030\007 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\022R\n" + + " \001(\tB\003\340A\001\0224\n" + + "\013update_mask\030\007 \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\022W\n" + "\034common_object_request_params\030\010" - + " \001(\0132,.google.storage.v2.CommonObjectRequestParamsB\026\n" + + " \001(\0132,.google.storage.v2.CommonObjectRequestParamsB\003\340A\001B\026\n" + "\024_if_generation_matchB\032\n" + "\030_if_generation_not_matchB\032\n" + "\030_if_metageneration_matchB\036\n" - + "\034_if_metageneration_not_match\"|\n" - + "\031CommonObjectRequestParams\022\034\n" - + "\024encryption_algorithm\030\001 \001(\t\022\034\n" - + "\024encryption_key_bytes\030\004 \001(\014\022#\n" - + "\033encryption_key_sha256_bytes\030\005 \001(\014\"\312\005\n" + + "\034_if_metageneration_not_match\"\213\001\n" + + "\031CommonObjectRequestParams\022!\n" + + "\024encryption_algorithm\030\001 \001(\tB\003\340A\001\022!\n" + + "\024encryption_key_bytes\030\004 \001(\014B\003\340A\001\022(\n" + + "\033encryption_key_sha256_bytes\030\005 \001(\014B\003\340A\001\"\312\005\n" + "\020ServiceConstants\"\265\005\n" + "\006Values\022\026\n" + "\022VALUES_UNSPECIFIED\020\000\022\033\n" @@ -771,312 +793,356 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\033MAX_LABELS_KEY_VALUE_LENGTH\020?\022\037\n" + "\032MAX_LABELS_KEY_VALUE_BYTES\020\200\001\022.\n" + ")MAX_OBJECT_IDS_PER_DELETE_OBJECTS_REQUEST\020\350\007\022\036\n" - + "\032SPLIT_TOKEN_MAX_VALID_DAYS\020\016\032\002\020\001\"\243\034\n" + + "\032SPLIT_TOKEN_MAX_VALID_DAYS\020\016\032\002\020\001\"\225\"\n" + "\006Bucket\022\021\n" - + "\004name\030\001 \001(\tB\003\340A\005\022\026\n" + + "\004name\030\001 \001(\tB\003\340A\010\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" + "+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\r" - + "location_type\030\006 \001(\tB\003\340A\003\022\025\n\r" - + "storage_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" - + "\022default_object_acl\030\t \003(\0132&.google.storage.v2.ObjectAccessControl\0226\n" + + "location_type\030\006 \001(\tB\003\340A\003\022\032\n\r" + + "storage_class\030\007 \001(\tB\003\340A\001\022\020\n" + + "\003rpo\030\033 \001(\tB\003\340A\001\0228\n" + + "\003acl\030\010 \003(\0132&.google.storage.v2.BucketAccessControlB\003\340A\001\022G\n" + + "\022default_object_acl\030\t \003(\0132&" + + ".google.storage.v2.ObjectAccessControlB\003\340A\001\022;\n" + "\tlifecycle\030\n" - + " \001(\0132#.google.storage.v2.Bucket.Lifecycle\0224\n" - + "\013create_time\030\013 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022,\n" - + "\004cors\030\014 \003(\0132\036.google.storage.v2.Bucket.Cors\0224\n" + + " \001(\0132#.google.storage.v2.Bucket.LifecycleB\003\340A\001\0224\n" + + "\013create_time\030\013 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0221\n" + + "\004cors\030\014 \003(\0132\036.google.storage.v2.Bucket.CorsB\003\340A\001\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" - + "\006labels\030\017 \003(\0132%.google.storage.v2.Bucket.LabelsEntry\0222\n" - + "\007website\030\020 \001(\0132!.google.storage.v2.Bucket.Website\0228\n\n" - + "versioning\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.OwnerB\003\340A\003\0228\n\n" - + "encryption\030\024 \001(\0132$.google.storage.v2.Bucket.Encryption\0222\n" - + "\007billing\030\025 \001(\0132!.google.storage.v2.Bucket.Billing\022C\n" - + "\020retention_policy\030\026 \001(\0132" - + ").google.storage.v2.Bucket.RetentionPolicy\0227\n\n" - + "iam_config\030\027 \001(\0132#.google.storage.v2.Bucket.IamConfig\022\025\n\r" - + "satisfies_pzs\030\031 \001(\010\022P\n" - + "\027custom_placement_config\030\032 \001(\0132/.go" - + "ogle.storage.v2.Bucket.CustomPlacementConfig\0226\n" - + "\tautoclass\030\034 \001(\0132#.google.storage.v2.Bucket.Autoclass\022T\n" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022%\n" + + "\030default_event_based_hold\030\016 \001(\010B\003\340A\001\022:\n" + + "\006labels\030\017 \003(\0132%" + + ".google.storage.v2.Bucket.LabelsEntryB\003\340A\001\0227\n" + + "\007website\030\020" + + " \001(\0132!.google.storage.v2.Bucket.WebsiteB\003\340A\001\022=\n\n" + + "versioning\030\021 \001(\0132" + + "$.google.storage.v2.Bucket.VersioningB\003\340A\001\0227\n" + + "\007logging\030\022 \001(\0132!.google.storage.v2.Bucket.LoggingB\003\340A\001\022,\n" + + "\005owner\030\023 \001(\0132\030.google.storage.v2.OwnerB\003\340A\003\022=\n\n" + + "encryption\030\024" + + " \001(\0132$.google.storage.v2.Bucket.EncryptionB\003\340A\001\0227\n" + + "\007billing\030\025 \001(\0132!.google.storage.v2.Bucket.BillingB\003\340A\001\022H\n" + + "\020retention_policy\030\026" + + " \001(\0132).google.storage.v2.Bucket.RetentionPolicyB\003\340A\001\022<\n\n" + + "iam_config\030\027 \001(\0132" + + "#.google.storage.v2.Bucket.IamConfigB\003\340A\001\022\032\n\r" + + "satisfies_pzs\030\031 \001(\010B\003\340A\001\022U\n" + + "\027custom_placement_config\030\032" + + " \001(\0132/.google.storage.v2.Bucket.CustomPlacementConfigB\003\340A\001\022;\n" + + "\tautoclass\030\034" + + " \001(\0132#.google.storage.v2.Bucket.AutoclassB\003\340A\001\022T\n" + "\026hierarchical_namespace\030 " + " \001(\0132/.google.storage.v2.Bucket.HierarchicalNamespaceB\003\340A\001\022K\n" + "\022soft_delete_policy\030\037" - + " \001(\0132*.google.storage.v2.Bucket.SoftDeletePolicyB\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_seconds\030\004 \001(\005\032M\n\n" - + "Encryption\022?\n" - + "\017default_kms_key\030\001 \001(\tB&\372A#\n" - + "!cloudkms.googleapis.com/CryptoKey\032\354\001\n" - + "\tIamConfig\022a\n" - + "\033uniform_bucket_level_access\030\001 \001(\0132<" - + ".google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccess\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.storage.v2.Bucket.Lifecycle.Rule.Action\022E\n" + + " \001(\0132*.google.storage.v2.Bucket.SoftDeletePolicyB\003\340A\001\022?\n" + + "\tip_filter\030& \001(\0132" + + "\".google.storage.v2.Bucket.IpFilterB\003\340A\001H\000\210\001\001\032&\n" + + "\007Billing\022\033\n" + + "\016requester_pays\030\001 \001(\010B\003\340A\001\032l\n" + + "\004Cors\022\023\n" + + "\006origin\030\001 \003(\tB\003\340A\001\022\023\n" + + "\006method\030\002 \003(\tB\003\340A\001\022\034\n" + + "\017response_header\030\003 \003(\tB\003\340A\001\022\034\n" + + "\017max_age_seconds\030\004 \001(\005B\003\340A\001\032P\n\n" + + "Encryption\022B\n" + + "\017default_kms_key\030\001 \001(\tB)\340A\001\372A#\n" + + "!cloudkms.googleapis.com/CryptoKey\032\200\002\n" + + "\tIamConfig\022f\n" + + "\033uniform_bucket_level_access\030\001" + + " \001(\0132<.google.storage.v2.Bucket.IamConfig.UniformBucketLevelAccessB\003\340A\001\022%\n" + + "\030public_access_prevention\030\003 \001(\tB\003\340A\001\032d\n" + + "\030UniformBucketLevelAccess\022\024\n" + + "\007enabled\030\001 \001(\010B\003\340A\001\0222\n" + + "\tlock_time\030\002" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\001\032\252\006\n" + + "\tLifecycle\022;\n" + + "\004rule\030\001 \003(\0132(.google.storage.v2.Bucket.Lifecycl", + "e.RuleB\003\340A\001\032\337\005\n" + + "\004Rule\022D\n" + + "\006action\030\001 \001(\0132/.g" + + "oogle.storage.v2.Bucket.Lifecycle.Rule.ActionB\003\340A\001\022J\n" + "\tcondition\030\002 \001(\01322.google.s" - + "torage.v2.Bucket.Lifecycle.Rule.Condition\032-\n" - + "\006Action\022\014\n" - + "\004type\030\001 \001(\t\022\025\n\r" - + "storage_class\030\002 \001(\t\032\355\003\n" + + "torage.v2.Bucket.Lifecycle.Rule.ConditionB\003\340A\001\0327\n" + + "\006Action\022\021\n" + + "\004type\030\001 \001(\tB\003\340A\001\022\032\n\r" + + "storage_class\030\002 \001(\tB\003\340A\001\032\213\004\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.Date\022\024\n" + + "\010age_days\030\001 \001(\005H\000\210\001\001\022.\n" + + "\016created_before\030\002 \001(\0132\021.google.type.DateB\003\340A\001\022\024\n" + "\007is_live\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" - + "\022custom_time_before\030\010 \001(\0132\021.google.type.Date\022\'\n" - + "\032days_since_noncurrent_time\030\t \001(\005H\004\210\001\001\0221\n" - + "\026noncurrent_time_b", - "efore\030\n" - + " \001(\0132\021.google.type.Date\022\026\n" - + "\016matches_prefix\030\013 \003(\t\022\026\n" - + "\016matches_suffix\030\014 \003(\tB\013\n" + + "\022num_newer_versions\030\004 \001(\005H\002\210\001\001\022\"\n" + + "\025matches_storage_class\030\005 \003(\tB\003\340A\001\022#\n" + + "\026days_since_custom_time\030\007 \001(\005H\003\210\001\001\0222\n" + + "\022custom_time_before\030\010 \001(\0132\021.google.type.DateB\003\340A\001\022\'\n" + + "\032days_since_noncurrent_time\030\t \001(\005H\004\210\001\001\0226\n" + + "\026noncurrent_time_before\030\n" + + " \001(\0132\021.google.type.DateB\003\340A\001\022\033\n" + + "\016matches_prefix\030\013 \003(\tB\003\340A\001\022\033\n" + + "\016matches_suffix\030\014 \003(\tB\003\340A\001B\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_since_noncurrent_time\0328\n" - + "\007Logging\022\022\n\n" - + "log_bucket\030\001 \001(\t\022\031\n" - + "\021log_object_prefix\030\002 \001(\t\032\217\001\n" - + "\017RetentionPolicy\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.google.protobuf.Duration\032\261\001\n" + + "\033_days_since_noncurrent_time\032B\n" + + "\007Logging\022\027\n\n" + + "log_bucket\030\001 \001(\tB\003\340A\001\022\036\n" + + "\021log_object_prefix\030\002 \001(\tB\003\340A\001\032\236\001\n" + + "\017RetentionPolicy\0227\n" + + "\016effective_time\030\001" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\001\022\026\n" + + "\tis_locked\030\002 \001(\010B\003\340A\001\022:\n" + + "\022retention_duration\030\004" + + " \001(\0132\031.google.protobuf.DurationB\003\340A\001\032\261\001\n" + "\020SoftDeletePolicy\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_time\032\035\n\n" - + "Versioning\022\017\n" - + "\007enabled\030\001 \001(\010\032;\n" - + "\007Website\022\030\n" - + "\020main_page_suffix\030\001 \001(\t\022\026\n" - + "\016not_found_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" - + "\007enabled\030\001 \001(\010\0224\n" + + "\017_effective_time\032\"\n\n" + + "Versioning\022\024\n" + + "\007enabled\030\001 \001(\010B\003\340A\001\032E\n" + + "\007Website\022\035\n" + + "\020main_page_suffix\030\001 \001(\tB\003\340A\001\022\033\n" + + "\016not_found_page\030\002 \001(\tB\003\340A\001\0324\n" + + "\025CustomPlacementConfig\022\033\n" + + "\016data_locations\030\001 \003(\tB\003\340A\001\032\220\002\n" + + "\tAutoclass\022\024\n" + + "\007enabled\030\001 \001(\010B\003\340A\001\0224\n" + "\013toggle_time\030\002 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022#\n" + "\026terminal_storage_class\030\003 \001(\tH\000\210\001\001\022P\n" + "\"terminal_storage_class_update_time\030\004" + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003H\001\210\001\001B\031\n" + "\027_terminal_storage_classB%\n" - + "#_terminal_storage_class_update_time\032-\n" + + "#_terminal_storage_class_update_time\032\255\003\n" + + "\010IpFilter\022\021\n" + + "\004mode\030\001 \001(\tH\000\210\001\001\022Z\n" + + "\025public_network_source\030\002 \001(\01326.google.storage.v2.Bu" + + "cket.IpFilter.PublicNetworkSourceH\001\210\001\001\022U\n" + + "\023vpc_network_sources\030\003 \003(\01323.google.sto" + + "rage.v2.Bucket.IpFilter.VpcNetworkSourceB\003\340A\001\022!\n" + + "\024allow_cross_org_vpcs\030\004 \001(\010B\003\340A\001\032:\n" + + "\023PublicNetworkSource\022#\n" + + "\026allowed_ip_cidr_ranges\030\001 \003(\tB\003\340A\001\032Y\n" + + "\020VpcNetworkSource\022\024\n" + + "\007network\030\001 \001(\tH\000\210\001\001\022#\n" + + "\026allowed_ip_cidr_ranges\030\002 \003(\tB\003\340A\001B\n\n" + + "\010_networkB\007\n" + + "\005_modeB\030\n" + + "\026_public_network_source\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.googleapis.com/Bucket\022#projects/" - + "{project}/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\n" - + "entity_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" + + "\035storage.googleapis.com/Bucket\022#pr" + + "ojects/{project}/buckets/{bucket}*\007buckets2\006bucketB\014\n\n" + + "_ip_filter\"\366\001\n" + + "\023BucketAccessControl\022\021\n" + + "\004role\030\001 \001(\tB\003\340A\001\022\017\n" + + "\002id\030\002 \001(\tB\003\340A\001\022\023\n" + + "\006entity\030\003 \001(\tB\003\340A\001\022\027\n\n" + + "entity_alt\030\t \001(\tB\003\340A\003\022\026\n" + + "\tentity_id\030\004 \001(\tB\003\340A\001\022\021\n" + + "\004etag\030\010 \001(\tB\003\340A\001\022\022\n" + + "\005email\030\005 \001(\tB\003\340A\001\022\023\n" + + "\006domain\030\006 \001(\tB\003\340A\001\0229\n" + + "\014project_team\030\007" + + " \001(\0132\036.google.storage.v2.ProjectTeamB\003\340A\001\"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" + + "\007_crc32c\"H\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" - + "\022CustomerEncryption\022\034\n" - + "\024encryption_algorithm\030\001 \001(\t\022\030\n" - + "\020key_sha256_bytes\030\003 \001(\014\"\227\013\n" + + "\006crc32c\030\001 \001(\007H\000\210\001\001\022\025\n" + + "\010md5_hash\030\002 \001(\014B\003\340A\001B\t\n" + + "\007_crc32c\"V\n" + + "\022CustomerEncryption\022!\n" + + "\024encryption_algorithm\030\001 \001(\tB\003\340A\001\022\035\n" + + "\020key_sha256_bytes\030\003 \001(\014B\003\340A\001\"\327\r\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" + + "\035storage.googleapis.com/Bucket\022\021\n" + + "\004etag\030\033 \001(\tB\003\340A\001\022\027\n\n" + "generation\030\003 \001(\003B\003\340A\005\022\037\n\r" + "restore_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\r" - + "storage_class\030\005 \001(\t\022\021\n" - + "\004size\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" - + "\r" - + "cache_control\030\t \001(\t\0223\n" + + "\016metageneration\030\004 \001(\003B\003\340A\003\022\032\n\r" + + "storage_class\030\005 \001(\tB\003\340A\001\022\021\n" + + "\004size\030\006 \001(\003B\003\340A\003\022\035\n" + + "\020content_encoding\030\007 \001(\tB\003\340A\001\022 \n" + + "\023content_disposition\030\010 \001(\tB\003\340A\001\022\032\n\r" + + "cache_control\030\t \001(\tB\003\340A\001\0228\n" + "\003acl\030\n" - + " \003(\0132&.google.storage.v2.ObjectAccessControl\022\030\n" - + "\020content_language\030\013 \001(\t\0224\n" + + " \003(\0132&.google.storage.v2.ObjectAccessControlB\003\340A\001\022\035\n" + + "\020content_language\030\013 \001(\tB\003\340A\001\0224\n" + "\013delete_time\030\014" + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0226\n\r" - + "finalize_time\030$ \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\024\n" + + "finalize_time\030$ \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\031\n" + "\014content_type\030\r" - + " \001(\t\0224\n" + + " \001(\tB\003\340A\001\0224\n" + "\013create_time\030\016" + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\034\n" + "\017component_count\030\017 \001(\005B\003\340A\003\022:\n" + "\tchecksums\030\020" + " \001(\0132\".google.storage.v2.ObjectChecksumsB\003\340A\003\0224\n" - + "\013update_time\030\021 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\0227\n" - + "\007kms_key\030\022 \001(\tB&\372A#\n" + + "\013update_time\030\021 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022:\n" + + "\007kms_key\030\022 \001(\tB)\340A\001\372A#\n" + "!cloudkms.googleapis.com/CryptoKey\022B\n" + "\031update_storage_class_time\030\023" - + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\026\n" - + "\016temporary_hold\030\024 \001(\010\0229\n" - + "\025retention_expire_time\030\025 \001(\0132\032.google.protobuf.Timestamp\0229\n" - + "\010metadata\030\026 \003(\0132\'.google.storage.v2.Object.MetadataEntry\022\035\n" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\033\n" + + "\016temporary_hold\030\024 \001(\010B\003\340A\001\022>\n" + + "\025retention_expire_time\030\025" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\001\022>\n" + + "\010metadata\030\026" + + " \003(\0132\'.google.storage.v2.Object.MetadataEntryB\003\340A\001\022\035\n" + "\020event_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" - + "\023customer_encryption\030\031 \001" - + "(\0132%.google.storage.v2.CustomerEncryption\022/\n" - + "\013custom_time\030\032 \001(\0132\032.google.protobuf.Timestamp\022>\n" + + "\005owner\030\030 \001(\0132\030.google.storage.v2.OwnerB\003\340A\003\022G\n" + + "\023customer_encryption\030\031" + + " \001(\0132%.google.storage.v2.CustomerEncryptionB\003\340A\001\0224\n" + + "\013custom_time\030\032 \001(\0132\032.google.protobuf.TimestampB\003\340A\001\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.protobuf.TimestampB\003\340A\003H\003\210\001\001\032/\n\r" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003H\003\210\001\001\022;\n" + + "\tretention\030\036" + + " \001(\0132#.google.storage.v2.Object.RetentionB\003\340A\001\032\274\001\n" + + "\tRetention\022;\n" + + "\004mode\030\001" + + " \001(\0162(.google.storage.v2.Object.Retention.ModeB\003\340A\001\022:\n" + + "\021retain_until_time\030\002" + + " \001(\0132\032.google.protobuf.TimestampB\003\340A\001\"6\n" + + "\004Mode\022\024\n" + + "\020MODE_UNSPECIFIED\020\000\022\014\n" + + "\010UNLOCKED\020\001\022\n\n" + + "\006LOCKED\020\002\032/\n\r" + "MetadataEntry\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_holdB\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\n" - + "entity_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\"l\n" + + "\021_hard_delete_time\"\366\001\n" + + "\023ObjectAccessControl\022\021\n" + + "\004role\030\001 \001(\tB\003\340A\001\022\017\n" + + "\002id\030\002 \001(\tB\003\340A\001\022\023\n" + + "\006entity\030\003 \001(\tB\003\340A\001\022\027\n\n" + + "entity_alt\030\t \001(\tB\003\340A\003\022\026\n" + + "\tentity_id\030\004 \001(\tB\003\340A\001\022\021\n" + + "\004etag\030\010 \001(\tB\003\340A\001\022\022\n" + + "\005email\030\005 \001(\tB\003\340A\001\022\023\n" + + "\006domain\030\006 \001(\tB\003\340A\001\0229\n" + + "\014project_team\030\007" + + " \001(\0132\036.google.storage.v2.ProjectTeamB\003\340A\001\"l\n" + "\023ListObjectsResponse\022*\n" + "\007objects\030\001 \003(\0132\031.google.storage.v2.Object\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" + + "\017next_page_token\030\003 \001(\t\"=\n" + + "\013ProjectTeam\022\033\n" + + "\016project_number\030\001 \001(\tB\003\340A\001\022\021\n" + + "\004team\030\002 \001(\tB\003\340A\001\"4\n" + + "\005Owner\022\023\n" + + "\006entity\030\001 \001(\tB\003\340A\001\022\026\n" + + "\tentity_id\030\002 \001(\tB\003\340A\001\"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(\0032\301\036\n" + + "\017complete_length\030\003 \001(\0032\237\037\n" + "\007Storage\022r\n" - + "\014DeleteBucket\022&.google.storage.v" - + "2.DeleteBucketRequest\032\026.google.protobuf.Empty\"\"\332A\004name\212\323\344\223\002\025\022\023\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.GetBu" - + "cketRequest\032\031.google.storage.v2.Bucket\"\"\332A\004name\212\323\344\223\002\025\022\023\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.CreateBu" - + "cketRequest\032\031.google.storage.v2.Bucket\"X\332A\027parent,bucket,bucket_id\212\323\344\223\0028\022\026\n" + + "\014CreateBucket\022&.google.storage.v2.CreateBucketRequest\032\031.google.sto" + + "rage.v2.Bucket\"X\332A\027parent,bucket,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" - + "\013ListBuckets\022%.google.storage.v2.ListBucketsRequest\032&.google.storage" - + ".v2.ListBucketsResponse\"\'\332A\006parent\212\323\344\223\002\030\022\026\n" + + "\013ListBuckets\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.LockB" - + "ucketRetentionPolicyRequest\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.GetIamPolicyRequest\032\025.google.iam.v1.Policy\"*\332A\010resource\212\323\344\223\002\031\022\027\n" - + "\010resource\022\013{bucket=**}\022|\n" - + "\014SetIamPolicy\022\".google.i" - + "am.v1.SetIamPolicyRequest\032\025.google.iam.v1.Policy\"1\332A\017resource,policy\212\323\344\223\002\031\022\027\n" - + "\010resource\022\013{bucket=**}\022\226\002\n" - + "\022TestIamPermissions\022(.google.iam.v1.TestIamPermissionsReq" - + "uest\032).google.iam.v1.TestIamPermissionsR" - + "esponse\"\252\001\332A\024resource,permissions\212\323\344\223\002\214\001\022\027\n" + + "\031LockBucketRetentionPolicy\0223.google.storage.v2.LockBucketRetentionPolicyRequ" + + "est\032\031.google.storage.v2.Bucket\"&\332A\006bucket\212\323\344\223\002\027\022\025\n" + + "\006bucket\022\013{bucket=**}\022\243\001\n" + + "\014GetIamPolicy\022\".google.iam.v1.GetIamPolicyRequ" + + "est\032\025.google.iam.v1.Policy\"X\332A\010resource\212\323\344\223\002G\022\027\n" + + "\010resource\022\013{bucket=**}\022,\n" + + "\010resource\022 {bucket=projects/*/buckets/*}/**\022\252\001\n" + + "\014SetIamPolicy\022\".google.iam.v1.SetIamPoli" + + "cyRequest\032\025.google.iam.v1.Policy\"_\332A\017resource,policy\212\323\344\223\002G\022\027\n" + + "\010resource\022\013{bucket=**}\022,\n" + + "\010resource\022 {bucket=projects/*/buckets/*}/**\022\226\002\n" + + "\022TestIamPermissions\022(.google.iam.v1.TestIamPermissionsRequest\032).goo" + + "gle.iam.v1.TestIamPermissionsResponse\"\252\001\332A\024resource,permissions\212\323\344\223\002\214\001\022\027\n" + "\010resource\022\013{bucket=**}\0224\n" + "\010resource\022({bucket=projects/*/buckets/*}/objects/**\022;\n" + "\010resource\022/{bucket=projects/*/buckets/*}/managedFolders/**\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" + + "\014UpdateBucket\022&.google.storage.v2.UpdateBucketRequest\032\031.google.sto" + + "rage.v2.Bucket\"7\332A\022bucket,update_mask\212\323\344\223\002\034\022\032\n" + "\013bucket.name\022\013{bucket=**}\022~\n\r" - + "ComposeObject\022\'.google.storage.v2.C" - + "omposeObjectRequest\032\031.google.storage.v2.Object\")\212\323\344\223\002#\022!\n" + + "ComposeObject\022\'.google.storage.v2.ComposeObje" + + "ctRequest\032\031.google.storage.v2.Object\")\212\323\344\223\002#\022!\n" + "\022destination.bucket\022\013{bucket=**}\022\230\001\n" - + "\014DeleteObject\022&.google.stor" - + "age.v2.DeleteObjectRequest\032\026.google.protobuf.Empty\"H\332A\r" + + "\014DeleteObject\022&.google.storage.v2.Del" + + "eteObjectRequest\032\026.google.protobuf.Empty\"H\332A\r" + "bucket,object\332A\030bucket,object,generation\212\323\344\223\002\027\022\025\n" + "\006bucket\022\013{bucket=**}\022\215\001\n\r" - + "RestoreObject\022\'.google.storage.v2.RestoreObjectRequest\032\031.google.storage" - + ".v2.Object\"8\332A\030bucket,object,generation\212\323\344\223\002\027\022\025\n" + + "RestoreObject\022\'.google.storage.v2.Restore" + + "ObjectRequest\032\031.google.storage.v2.Object\"8\332A\030bucket,object,generation\212\323\344\223\002\027\022\025\n" + "\006bucket\022\013{bucket=**}\022\272\001\n" - + "\024CancelResumableWrite\022..google.storage.v2.Cancel" - + "ResumableWriteRequest\032/.google.storage.v2.CancelResumableWriteResponse\"A\332A" + + "\024CancelResumableWrite\022..google.storage.v2.CancelResumableW" + + "riteRequest\032/.google.storage.v2.CancelResumableWriteResponse\"A\332A" + "\tupload_id\212\323\344\223\002/\022-\n" + "\tupload_id\022 {bucket=projects/*/buckets/*}/**\022\225\001\n" - + "\tGetObject\022#.google" - + ".storage.v2.GetObjectRequest\032\031.google.storage.v2.Object\"H\332A\r" + + "\tGetObject\022#.google.storage.v" + + "2.GetObjectRequest\032\031.google.storage.v2.Object\"H\332A\r" + "bucket,object\332A\030bucket,object,generation\212\323\344\223\002\027\022\025\n" + "\006bucket\022\013{bucket=**}\022\245\001\n\n" - + "ReadObject\022$.google.storag" - + "e.v2.ReadObjectRequest\032%.google.storage.v2.ReadObjectResponse\"H\332A\r" + + "ReadObject\022$.google.storage.v2.ReadO" + + "bjectRequest\032%.google.storage.v2.ReadObjectResponse\"H\332A\r" + "bucket,object\332A\030bucket,object,generation\212\323\344\223\002\027\022\025\n" + "\006bucket\022\013{bucket=**}0\001\022\231\001\n" - + "\016BidiReadObject\022(.google.storage.v2.BidiReadObjectRequest\032)" - + ".google.storage.v2.BidiReadObjectResponse\".\212\323\344\223\002(\022&\n" + + "\016BidiReadObject\022(.google.storage.v2.BidiReadObjectRequest\032).google.st" + + "orage.v2.BidiReadObjectResponse\".\212\323\344\223\002(\022&\n" + "\027read_object_spec.bucket\022\013{bucket=**}(\0010\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" + + "\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" - + "\013WriteObject\022%.google.storage.v2.WriteObj" - + "ectRequest\032&.google.storage.v2.WriteObjectResponse\"\000(\001\022n\n" - + "\017BidiWriteObject\022).google.storage.v2.BidiWriteObjectRequest\032*.g" - + "oogle.storage.v2.BidiWriteObjectResponse\"\000(\0010\001\022\204\001\n" - + "\013ListObjects\022%.google.storage.v2.ListObjectsRequest\032&.google.storage.v" - + "2.ListObjectsResponse\"&\332A\006parent\212\323\344\223\002\027\022\025\n" + + "\013WriteObject\022%.google.storage.v2.WriteObjectRequest" + + "\032&.google.storage.v2.WriteObjectResponse\"\000(\001\022n\n" + + "\017BidiWriteObject\022).google.storage" + + ".v2.BidiWriteObjectRequest\032*.google.storage.v2.BidiWriteObjectResponse\"\000(\0010\001\022\204\001\n" + + "\013ListObjects\022%.google.storage.v2.ListObj" + + "ectsRequest\032&.google.storage.v2.ListObjectsResponse\"&\332A\006parent\212\323\344\223\002\027\022\025\n" + "\006parent\022\013{bucket=**}\022\230\001\n\r" - + "RewriteObject\022\'.google.storage.v2.RewriteObjectRequest" - + "\032\".google.storage.v2.RewriteResponse\":\212\323\344\223\0024\022\017\n\r" + + "RewriteObject\022\'.google.s" + + "torage.v2.RewriteObjectRequest\032\".google.storage.v2.RewriteResponse\":\212\323\344\223\0024\022\017\n\r" + "source_bucket\022!\n" + "\022destination_bucket\022\013{bucket=**}\022\256\001\n" - + "\023StartResumableWrite\022-.google.storage.v2.StartResumableWrite" - + "Request\032..google.storage.v2.StartResumableWriteResponse\"8\212\323\344\223\0022\0220\n" + + "\023StartResumableWrite\022-.google.storage.v2.StartResumableWriteRequest\032.." + + "google.storage.v2.StartResumableWriteResponse\"8\212\323\344\223\0022\0220\n" + "!write_object_spec.resource.bucket\022\013{bucket=**}\022\256\001\n" - + "\020QueryWriteStatus\022*.google.storage.v2.Query" - + "WriteStatusRequest\032+.google.storage.v2.QueryWriteStatusResponse\"A\332A" + + "\020QueryWriteStatus\022*.google.storage.v2.QueryWriteStatu" + + "sRequest\032+.google.storage.v2.QueryWriteStatusResponse\"A\332A" + "\tupload_id\212\323\344\223\002/\022-\n" + "\tupload_id\022 {bucket=projects/*/buckets/*}/**\022\226\001\n\n" - + "MoveObject\022$.google.storage.v2.MoveObjectRequest\032\031.google.storage" - + ".v2.Object\"G\332A\'bucket,source_object,destination_object\212\323\344\223\002\027\022\025\n" - + "\006bucket\022\013{bucket=" - + "**}\032\247\002\312A\026storage.googleapis.com\322A\212\002https" - + "://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-" - + "platform.read-only,https://www.googleapis.com/auth/devstorage.full_control,https" - + "://www.googleapis.com/auth/devstorage.re" - + "ad_only,https://www.googleapis.com/auth/devstorage.read_writeB\342\001\n" - + "\025com.google.storage.v2B\014StorageProtoP\001Z>cloud.google.co" - + "m/go/storage/internal/apiv2/storagepb;storagepb\352Ax\n" - + "!cloudkms.googleapis.com/CryptoKey\022Sprojects/{project}/locations/{loc" - + "ation}/keyRings/{key_ring}/cryptoKeys/{crypto_key}b\006proto3" + + "MoveObject\022$.google.storage.v2.MoveObjectRequest\032\031.google.storage.v2.Object" + + "\"G\332A\'bucket,source_object,destination_object\212\323\344\223\002\027\022\025\n" + + "\006bucket\022\013{bucket=**}\032\247\002\312A\026s" + + "torage.googleapis.com\322A\212\002https://www.goo" + + "gleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.r" + + "ead-only,https://www.googleapis.com/auth/devstorage.full_control,https://www.goo" + + "gleapis.com/auth/devstorage.read_only,ht" + + "tps://www.googleapis.com/auth/devstorage.read_writeB\342\001\n" + + "\025com.google.storage.v2B\014StorageProtoP\001Z>cloud.google.com/go/stora" + + "ge/internal/apiv2/storagepb;storagepb\352Ax\n" + + "!cloudkms.googleapis.com/CryptoKey\022Sprojects/{project}/locations/{location}/key" + + "Rings/{key_ring}/cryptoKeys/{crypto_key}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -1629,6 +1695,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Autoclass", "HierarchicalNamespace", "SoftDeletePolicy", + "IpFilter", }); internal_static_google_storage_v2_Bucket_Billing_descriptor = internal_static_google_storage_v2_Bucket_descriptor.getNestedTypes().get(0); @@ -1768,8 +1835,32 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Enabled", "ToggleTime", "TerminalStorageClass", "TerminalStorageClassUpdateTime", }); - internal_static_google_storage_v2_Bucket_HierarchicalNamespace_descriptor = + internal_static_google_storage_v2_Bucket_IpFilter_descriptor = internal_static_google_storage_v2_Bucket_descriptor.getNestedTypes().get(12); + internal_static_google_storage_v2_Bucket_IpFilter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storage_v2_Bucket_IpFilter_descriptor, + new java.lang.String[] { + "Mode", "PublicNetworkSource", "VpcNetworkSources", "AllowCrossOrgVpcs", + }); + internal_static_google_storage_v2_Bucket_IpFilter_PublicNetworkSource_descriptor = + internal_static_google_storage_v2_Bucket_IpFilter_descriptor.getNestedTypes().get(0); + internal_static_google_storage_v2_Bucket_IpFilter_PublicNetworkSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storage_v2_Bucket_IpFilter_PublicNetworkSource_descriptor, + new java.lang.String[] { + "AllowedIpCidrRanges", + }); + internal_static_google_storage_v2_Bucket_IpFilter_VpcNetworkSource_descriptor = + internal_static_google_storage_v2_Bucket_IpFilter_descriptor.getNestedTypes().get(1); + internal_static_google_storage_v2_Bucket_IpFilter_VpcNetworkSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storage_v2_Bucket_IpFilter_VpcNetworkSource_descriptor, + new java.lang.String[] { + "Network", "AllowedIpCidrRanges", + }); + internal_static_google_storage_v2_Bucket_HierarchicalNamespace_descriptor = + internal_static_google_storage_v2_Bucket_descriptor.getNestedTypes().get(13); internal_static_google_storage_v2_Bucket_HierarchicalNamespace_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_Bucket_HierarchicalNamespace_descriptor, @@ -1777,7 +1868,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Enabled", }); internal_static_google_storage_v2_Bucket_LabelsEntry_descriptor = - internal_static_google_storage_v2_Bucket_descriptor.getNestedTypes().get(13); + internal_static_google_storage_v2_Bucket_descriptor.getNestedTypes().get(14); internal_static_google_storage_v2_Bucket_LabelsEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_Bucket_LabelsEntry_descriptor, @@ -1860,9 +1951,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "CustomTime", "SoftDeleteTime", "HardDeleteTime", + "Retention", }); - internal_static_google_storage_v2_Object_MetadataEntry_descriptor = + internal_static_google_storage_v2_Object_Retention_descriptor = internal_static_google_storage_v2_Object_descriptor.getNestedTypes().get(0); + internal_static_google_storage_v2_Object_Retention_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_storage_v2_Object_Retention_descriptor, + new java.lang.String[] { + "Mode", "RetainUntilTime", + }); + internal_static_google_storage_v2_Object_MetadataEntry_descriptor = + internal_static_google_storage_v2_Object_descriptor.getNestedTypes().get(1); internal_static_google_storage_v2_Object_MetadataEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_storage_v2_Object_MetadataEntry_descriptor, diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateBucketRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateBucketRequest.java index 8662aac324..f1d547e6b5 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateBucketRequest.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateBucketRequest.java @@ -201,12 +201,12 @@ public long getIfMetagenerationNotMatch() { * * *
      -   * Apply a predefined set of access controls to this bucket.
      +   * Optional. Apply a predefined set of access controls to this bucket.
          * Valid values are "authenticatedRead", "private", "projectPrivate",
          * "publicRead", or "publicReadWrite".
          * 
      * - * string predefined_acl = 8; + * string predefined_acl = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The predefinedAcl. */ @@ -227,12 +227,12 @@ public java.lang.String getPredefinedAcl() { * * *
      -   * Apply a predefined set of access controls to this bucket.
      +   * Optional. Apply a predefined set of access controls to this bucket.
          * Valid values are "authenticatedRead", "private", "projectPrivate",
          * "publicRead", or "publicReadWrite".
          * 
      * - * string predefined_acl = 8; + * string predefined_acl = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for predefinedAcl. */ @@ -258,12 +258,13 @@ public com.google.protobuf.ByteString getPredefinedAclBytes() { * * *
      -   * Apply a predefined set of default object access controls to this bucket.
      -   * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +   * Optional. Apply a predefined set of default object access controls to this
      +   * bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl",
          * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
          * 
      * - * string predefined_default_object_acl = 9; + * string predefined_default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The predefinedDefaultObjectAcl. */ @@ -284,12 +285,13 @@ public java.lang.String getPredefinedDefaultObjectAcl() { * * *
      -   * Apply a predefined set of default object access controls to this bucket.
      -   * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +   * Optional. Apply a predefined set of default object access controls to this
      +   * bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl",
          * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
          * 
      * - * string predefined_default_object_acl = 9; + * string predefined_default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The bytes for predefinedDefaultObjectAcl. */ @@ -1236,12 +1238,12 @@ public Builder clearIfMetagenerationNotMatch() { * * *
      -     * Apply a predefined set of access controls to this bucket.
      +     * Optional. Apply a predefined set of access controls to this bucket.
            * Valid values are "authenticatedRead", "private", "projectPrivate",
            * "publicRead", or "publicReadWrite".
            * 
      * - * string predefined_acl = 8; + * string predefined_acl = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The predefinedAcl. */ @@ -1261,12 +1263,12 @@ public java.lang.String getPredefinedAcl() { * * *
      -     * Apply a predefined set of access controls to this bucket.
      +     * Optional. Apply a predefined set of access controls to this bucket.
            * Valid values are "authenticatedRead", "private", "projectPrivate",
            * "publicRead", or "publicReadWrite".
            * 
      * - * string predefined_acl = 8; + * string predefined_acl = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for predefinedAcl. */ @@ -1286,12 +1288,12 @@ public com.google.protobuf.ByteString getPredefinedAclBytes() { * * *
      -     * Apply a predefined set of access controls to this bucket.
      +     * Optional. Apply a predefined set of access controls to this bucket.
            * Valid values are "authenticatedRead", "private", "projectPrivate",
            * "publicRead", or "publicReadWrite".
            * 
      * - * string predefined_acl = 8; + * string predefined_acl = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The predefinedAcl to set. * @return This builder for chaining. @@ -1310,12 +1312,12 @@ public Builder setPredefinedAcl(java.lang.String value) { * * *
      -     * Apply a predefined set of access controls to this bucket.
      +     * Optional. Apply a predefined set of access controls to this bucket.
            * Valid values are "authenticatedRead", "private", "projectPrivate",
            * "publicRead", or "publicReadWrite".
            * 
      * - * string predefined_acl = 8; + * string predefined_acl = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1330,12 +1332,12 @@ public Builder clearPredefinedAcl() { * * *
      -     * Apply a predefined set of access controls to this bucket.
      +     * Optional. Apply a predefined set of access controls to this bucket.
            * Valid values are "authenticatedRead", "private", "projectPrivate",
            * "publicRead", or "publicReadWrite".
            * 
      * - * string predefined_acl = 8; + * string predefined_acl = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for predefinedAcl to set. * @return This builder for chaining. @@ -1357,12 +1359,13 @@ public Builder setPredefinedAclBytes(com.google.protobuf.ByteString value) { * * *
      -     * Apply a predefined set of default object access controls to this bucket.
      -     * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +     * Optional. Apply a predefined set of default object access controls to this
      +     * bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl",
            * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
            * 
      * - * string predefined_default_object_acl = 9; + * string predefined_default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The predefinedDefaultObjectAcl. */ @@ -1382,12 +1385,13 @@ public java.lang.String getPredefinedDefaultObjectAcl() { * * *
      -     * Apply a predefined set of default object access controls to this bucket.
      -     * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +     * Optional. Apply a predefined set of default object access controls to this
      +     * bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl",
            * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
            * 
      * - * string predefined_default_object_acl = 9; + * string predefined_default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The bytes for predefinedDefaultObjectAcl. */ @@ -1407,12 +1411,13 @@ public com.google.protobuf.ByteString getPredefinedDefaultObjectAclBytes() { * * *
      -     * Apply a predefined set of default object access controls to this bucket.
      -     * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +     * Optional. Apply a predefined set of default object access controls to this
      +     * bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl",
            * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
            * 
      * - * string predefined_default_object_acl = 9; + * string predefined_default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param value The predefinedDefaultObjectAcl to set. * @return This builder for chaining. @@ -1431,12 +1436,13 @@ public Builder setPredefinedDefaultObjectAcl(java.lang.String value) { * * *
      -     * Apply a predefined set of default object access controls to this bucket.
      -     * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +     * Optional. Apply a predefined set of default object access controls to this
      +     * bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl",
            * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
            * 
      * - * string predefined_default_object_acl = 9; + * string predefined_default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return This builder for chaining. */ @@ -1451,12 +1457,13 @@ public Builder clearPredefinedDefaultObjectAcl() { * * *
      -     * Apply a predefined set of default object access controls to this bucket.
      -     * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +     * Optional. Apply a predefined set of default object access controls to this
      +     * bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl",
            * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
            * 
      * - * string predefined_default_object_acl = 9; + * string predefined_default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * * * @param value The bytes for predefinedDefaultObjectAcl to set. * @return This builder for chaining. diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateBucketRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateBucketRequestOrBuilder.java index 0c94b6efc5..1ea505781a 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateBucketRequestOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateBucketRequestOrBuilder.java @@ -124,12 +124,12 @@ public interface UpdateBucketRequestOrBuilder * * *
      -   * Apply a predefined set of access controls to this bucket.
      +   * Optional. Apply a predefined set of access controls to this bucket.
          * Valid values are "authenticatedRead", "private", "projectPrivate",
          * "publicRead", or "publicReadWrite".
          * 
      * - * string predefined_acl = 8; + * string predefined_acl = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The predefinedAcl. */ @@ -139,12 +139,12 @@ public interface UpdateBucketRequestOrBuilder * * *
      -   * Apply a predefined set of access controls to this bucket.
      +   * Optional. Apply a predefined set of access controls to this bucket.
          * Valid values are "authenticatedRead", "private", "projectPrivate",
          * "publicRead", or "publicReadWrite".
          * 
      * - * string predefined_acl = 8; + * string predefined_acl = 8 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for predefinedAcl. */ @@ -154,12 +154,13 @@ public interface UpdateBucketRequestOrBuilder * * *
      -   * Apply a predefined set of default object access controls to this bucket.
      -   * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +   * Optional. Apply a predefined set of default object access controls to this
      +   * bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl",
          * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
          * 
      * - * string predefined_default_object_acl = 9; + * string predefined_default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The predefinedDefaultObjectAcl. */ @@ -169,12 +170,13 @@ public interface UpdateBucketRequestOrBuilder * * *
      -   * Apply a predefined set of default object access controls to this bucket.
      -   * Valid values are "authenticatedRead", "bucketOwnerFullControl",
      +   * Optional. Apply a predefined set of default object access controls to this
      +   * bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl",
          * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
          * 
      * - * string predefined_default_object_acl = 9; + * string predefined_default_object_acl = 9 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The bytes for predefinedDefaultObjectAcl. */ diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateObjectRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateObjectRequest.java index eea0409600..3e84ce4552 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateObjectRequest.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateObjectRequest.java @@ -289,12 +289,12 @@ public long getIfMetagenerationNotMatch() { * * *
      -   * Apply a predefined set of access controls to this object.
      +   * Optional. Apply a predefined set of access controls to this object.
          * Valid values are "authenticatedRead", "bucketOwnerFullControl",
          * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
          * 
      * - * string predefined_acl = 10; + * string predefined_acl = 10 [(.google.api.field_behavior) = OPTIONAL]; * * @return The predefinedAcl. */ @@ -315,12 +315,12 @@ public java.lang.String getPredefinedAcl() { * * *
      -   * Apply a predefined set of access controls to this object.
      +   * Optional. Apply a predefined set of access controls to this object.
          * Valid values are "authenticatedRead", "bucketOwnerFullControl",
          * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
          * 
      * - * string predefined_acl = 10; + * string predefined_acl = 10 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for predefinedAcl. */ @@ -417,10 +417,13 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -433,10 +436,13 @@ public boolean hasCommonObjectRequestParams() { * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -451,10 +457,13 @@ public com.google.storage.v2.CommonObjectRequestParams getCommonObjectRequestPar * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.CommonObjectRequestParamsOrBuilder @@ -1582,12 +1591,12 @@ public Builder clearIfMetagenerationNotMatch() { * * *
      -     * Apply a predefined set of access controls to this object.
      +     * Optional. Apply a predefined set of access controls to this object.
            * Valid values are "authenticatedRead", "bucketOwnerFullControl",
            * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
            * 
      * - * string predefined_acl = 10; + * string predefined_acl = 10 [(.google.api.field_behavior) = OPTIONAL]; * * @return The predefinedAcl. */ @@ -1607,12 +1616,12 @@ public java.lang.String getPredefinedAcl() { * * *
      -     * Apply a predefined set of access controls to this object.
      +     * Optional. Apply a predefined set of access controls to this object.
            * Valid values are "authenticatedRead", "bucketOwnerFullControl",
            * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
            * 
      * - * string predefined_acl = 10; + * string predefined_acl = 10 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for predefinedAcl. */ @@ -1632,12 +1641,12 @@ public com.google.protobuf.ByteString getPredefinedAclBytes() { * * *
      -     * Apply a predefined set of access controls to this object.
      +     * Optional. Apply a predefined set of access controls to this object.
            * Valid values are "authenticatedRead", "bucketOwnerFullControl",
            * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
            * 
      * - * string predefined_acl = 10; + * string predefined_acl = 10 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The predefinedAcl to set. * @return This builder for chaining. @@ -1656,12 +1665,12 @@ public Builder setPredefinedAcl(java.lang.String value) { * * *
      -     * Apply a predefined set of access controls to this object.
      +     * Optional. Apply a predefined set of access controls to this object.
            * Valid values are "authenticatedRead", "bucketOwnerFullControl",
            * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
            * 
      * - * string predefined_acl = 10; + * string predefined_acl = 10 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1676,12 +1685,12 @@ public Builder clearPredefinedAcl() { * * *
      -     * Apply a predefined set of access controls to this object.
      +     * Optional. Apply a predefined set of access controls to this object.
            * Valid values are "authenticatedRead", "bucketOwnerFullControl",
            * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
            * 
      * - * string predefined_acl = 10; + * string predefined_acl = 10 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for predefinedAcl to set. * @return This builder for chaining. @@ -1974,10 +1983,13 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -1989,10 +2001,13 @@ public boolean hasCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -2010,10 +2025,13 @@ public com.google.storage.v2.CommonObjectRequestParams getCommonObjectRequestPar * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams value) { @@ -2034,10 +2052,13 @@ public Builder setCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams.Builder builderForValue) { @@ -2055,10 +2076,13 @@ public Builder setCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams value) { @@ -2085,10 +2109,13 @@ public Builder mergeCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearCommonObjectRequestParams() { bitField0_ = (bitField0_ & ~0x00000080); @@ -2105,10 +2132,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.CommonObjectRequestParams.Builder getCommonObjectRequestParamsBuilder() { @@ -2121,10 +2151,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.CommonObjectRequestParamsOrBuilder getCommonObjectRequestParamsOrBuilder() { @@ -2141,10 +2174,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.CommonObjectRequestParams, diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateObjectRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateObjectRequestOrBuilder.java index 84ab2cc45e..fd7c505ac9 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateObjectRequestOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/UpdateObjectRequestOrBuilder.java @@ -195,12 +195,12 @@ public interface UpdateObjectRequestOrBuilder * * *
      -   * Apply a predefined set of access controls to this object.
      +   * Optional. Apply a predefined set of access controls to this object.
          * Valid values are "authenticatedRead", "bucketOwnerFullControl",
          * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
          * 
      * - * string predefined_acl = 10; + * string predefined_acl = 10 [(.google.api.field_behavior) = OPTIONAL]; * * @return The predefinedAcl. */ @@ -210,12 +210,12 @@ public interface UpdateObjectRequestOrBuilder * * *
      -   * Apply a predefined set of access controls to this object.
      +   * Optional. Apply a predefined set of access controls to this object.
          * Valid values are "authenticatedRead", "bucketOwnerFullControl",
          * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
          * 
      * - * string predefined_acl = 10; + * string predefined_acl = 10 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for predefinedAcl. */ @@ -286,10 +286,13 @@ public interface UpdateObjectRequestOrBuilder * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -299,10 +302,13 @@ public interface UpdateObjectRequestOrBuilder * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -312,10 +318,13 @@ public interface UpdateObjectRequestOrBuilder * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.CommonObjectRequestParamsOrBuilder getCommonObjectRequestParamsOrBuilder(); } diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectRequest.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectRequest.java index 12ec02b4ea..0abe243af7 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectRequest.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectRequest.java @@ -388,13 +388,15 @@ public com.google.storage.v2.ChecksummedDataOrBuilder getChecksummedDataOrBuilde * * *
      -   * Checksums for the complete object. If the checksums computed by the service
      -   * don't match the specified checksums the call will fail. May only be
      -   * provided in the first or last request (either with first_message, or
      -   * finish_write set).
      +   * Optional. Checksums for the complete object. If the checksums computed by
      +   * the service don't match the specified checksums the call will fail. May
      +   * only be provided in the first or last request (either with first_message,
      +   * or finish_write set).
          * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 6; + * + * .google.storage.v2.ObjectChecksums object_checksums = 6 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the objectChecksums field is set. */ @@ -407,13 +409,15 @@ public boolean hasObjectChecksums() { * * *
      -   * Checksums for the complete object. If the checksums computed by the service
      -   * don't match the specified checksums the call will fail. May only be
      -   * provided in the first or last request (either with first_message, or
      -   * finish_write set).
      +   * Optional. Checksums for the complete object. If the checksums computed by
      +   * the service don't match the specified checksums the call will fail. May
      +   * only be provided in the first or last request (either with first_message,
      +   * or finish_write set).
          * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 6; + * + * .google.storage.v2.ObjectChecksums object_checksums = 6 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The objectChecksums. */ @@ -428,13 +432,15 @@ public com.google.storage.v2.ObjectChecksums getObjectChecksums() { * * *
      -   * Checksums for the complete object. If the checksums computed by the service
      -   * don't match the specified checksums the call will fail. May only be
      -   * provided in the first or last request (either with first_message, or
      -   * finish_write set).
      +   * Optional. Checksums for the complete object. If the checksums computed by
      +   * the service don't match the specified checksums the call will fail. May
      +   * only be provided in the first or last request (either with first_message,
      +   * or finish_write set).
          * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 6; + * + * .google.storage.v2.ObjectChecksums object_checksums = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.ObjectChecksumsOrBuilder getObjectChecksumsOrBuilder() { @@ -450,7 +456,7 @@ public com.google.storage.v2.ObjectChecksumsOrBuilder getObjectChecksumsOrBuilde * * *
      -   * If `true`, this indicates that the write is complete. Sending any
      +   * Optional. If `true`, this indicates that the write is complete. Sending any
          * `WriteObjectRequest`s subsequent to one in which `finish_write` is `true`
          * will cause an error.
          * For a non-resumable write (where the upload_id was not set in the first
      @@ -458,7 +464,7 @@ public com.google.storage.v2.ObjectChecksumsOrBuilder getObjectChecksumsOrBuilde
          * stream.
          * 
      * - * bool finish_write = 7; + * bool finish_write = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The finishWrite. */ @@ -474,10 +480,13 @@ public boolean getFinishWrite() { * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -490,10 +499,13 @@ public boolean hasCommonObjectRequestParams() { * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -508,10 +520,13 @@ public com.google.storage.v2.CommonObjectRequestParams getCommonObjectRequestPar * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override public com.google.storage.v2.CommonObjectRequestParamsOrBuilder @@ -1826,13 +1841,15 @@ public com.google.storage.v2.ChecksummedDataOrBuilder getChecksummedDataOrBuilde * * *
      -     * Checksums for the complete object. If the checksums computed by the service
      -     * don't match the specified checksums the call will fail. May only be
      -     * provided in the first or last request (either with first_message, or
      -     * finish_write set).
      +     * Optional. Checksums for the complete object. If the checksums computed by
      +     * the service don't match the specified checksums the call will fail. May
      +     * only be provided in the first or last request (either with first_message,
      +     * or finish_write set).
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 6; + * + * .google.storage.v2.ObjectChecksums object_checksums = 6 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the objectChecksums field is set. */ @@ -1844,13 +1861,15 @@ public boolean hasObjectChecksums() { * * *
      -     * Checksums for the complete object. If the checksums computed by the service
      -     * don't match the specified checksums the call will fail. May only be
      -     * provided in the first or last request (either with first_message, or
      -     * finish_write set).
      +     * Optional. Checksums for the complete object. If the checksums computed by
      +     * the service don't match the specified checksums the call will fail. May
      +     * only be provided in the first or last request (either with first_message,
      +     * or finish_write set).
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 6; + * + * .google.storage.v2.ObjectChecksums object_checksums = 6 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The objectChecksums. */ @@ -1868,13 +1887,15 @@ public com.google.storage.v2.ObjectChecksums getObjectChecksums() { * * *
      -     * Checksums for the complete object. If the checksums computed by the service
      -     * don't match the specified checksums the call will fail. May only be
      -     * provided in the first or last request (either with first_message, or
      -     * finish_write set).
      +     * Optional. Checksums for the complete object. If the checksums computed by
      +     * the service don't match the specified checksums the call will fail. May
      +     * only be provided in the first or last request (either with first_message,
      +     * or finish_write set).
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 6; + * + * .google.storage.v2.ObjectChecksums object_checksums = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setObjectChecksums(com.google.storage.v2.ObjectChecksums value) { if (objectChecksumsBuilder_ == null) { @@ -1894,13 +1915,15 @@ public Builder setObjectChecksums(com.google.storage.v2.ObjectChecksums value) { * * *
      -     * Checksums for the complete object. If the checksums computed by the service
      -     * don't match the specified checksums the call will fail. May only be
      -     * provided in the first or last request (either with first_message, or
      -     * finish_write set).
      +     * Optional. Checksums for the complete object. If the checksums computed by
      +     * the service don't match the specified checksums the call will fail. May
      +     * only be provided in the first or last request (either with first_message,
      +     * or finish_write set).
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 6; + * + * .google.storage.v2.ObjectChecksums object_checksums = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setObjectChecksums( com.google.storage.v2.ObjectChecksums.Builder builderForValue) { @@ -1918,13 +1941,15 @@ public Builder setObjectChecksums( * * *
      -     * Checksums for the complete object. If the checksums computed by the service
      -     * don't match the specified checksums the call will fail. May only be
      -     * provided in the first or last request (either with first_message, or
      -     * finish_write set).
      +     * Optional. Checksums for the complete object. If the checksums computed by
      +     * the service don't match the specified checksums the call will fail. May
      +     * only be provided in the first or last request (either with first_message,
      +     * or finish_write set).
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 6; + * + * .google.storage.v2.ObjectChecksums object_checksums = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeObjectChecksums(com.google.storage.v2.ObjectChecksums value) { if (objectChecksumsBuilder_ == null) { @@ -1949,13 +1974,15 @@ public Builder mergeObjectChecksums(com.google.storage.v2.ObjectChecksums value) * * *
      -     * Checksums for the complete object. If the checksums computed by the service
      -     * don't match the specified checksums the call will fail. May only be
      -     * provided in the first or last request (either with first_message, or
      -     * finish_write set).
      +     * Optional. Checksums for the complete object. If the checksums computed by
      +     * the service don't match the specified checksums the call will fail. May
      +     * only be provided in the first or last request (either with first_message,
      +     * or finish_write set).
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 6; + * + * .google.storage.v2.ObjectChecksums object_checksums = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearObjectChecksums() { bitField0_ = (bitField0_ & ~0x00000010); @@ -1972,13 +1999,15 @@ public Builder clearObjectChecksums() { * * *
      -     * Checksums for the complete object. If the checksums computed by the service
      -     * don't match the specified checksums the call will fail. May only be
      -     * provided in the first or last request (either with first_message, or
      -     * finish_write set).
      +     * Optional. Checksums for the complete object. If the checksums computed by
      +     * the service don't match the specified checksums the call will fail. May
      +     * only be provided in the first or last request (either with first_message,
      +     * or finish_write set).
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 6; + * + * .google.storage.v2.ObjectChecksums object_checksums = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.ObjectChecksums.Builder getObjectChecksumsBuilder() { bitField0_ |= 0x00000010; @@ -1990,13 +2019,15 @@ public com.google.storage.v2.ObjectChecksums.Builder getObjectChecksumsBuilder() * * *
      -     * Checksums for the complete object. If the checksums computed by the service
      -     * don't match the specified checksums the call will fail. May only be
      -     * provided in the first or last request (either with first_message, or
      -     * finish_write set).
      +     * Optional. Checksums for the complete object. If the checksums computed by
      +     * the service don't match the specified checksums the call will fail. May
      +     * only be provided in the first or last request (either with first_message,
      +     * or finish_write set).
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 6; + * + * .google.storage.v2.ObjectChecksums object_checksums = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.ObjectChecksumsOrBuilder getObjectChecksumsOrBuilder() { if (objectChecksumsBuilder_ != null) { @@ -2012,13 +2043,15 @@ public com.google.storage.v2.ObjectChecksumsOrBuilder getObjectChecksumsOrBuilde * * *
      -     * Checksums for the complete object. If the checksums computed by the service
      -     * don't match the specified checksums the call will fail. May only be
      -     * provided in the first or last request (either with first_message, or
      -     * finish_write set).
      +     * Optional. Checksums for the complete object. If the checksums computed by
      +     * the service don't match the specified checksums the call will fail. May
      +     * only be provided in the first or last request (either with first_message,
      +     * or finish_write set).
            * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 6; + * + * .google.storage.v2.ObjectChecksums object_checksums = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.ObjectChecksums, @@ -2043,7 +2076,7 @@ public com.google.storage.v2.ObjectChecksumsOrBuilder getObjectChecksumsOrBuilde * * *
      -     * If `true`, this indicates that the write is complete. Sending any
      +     * Optional. If `true`, this indicates that the write is complete. Sending any
            * `WriteObjectRequest`s subsequent to one in which `finish_write` is `true`
            * will cause an error.
            * For a non-resumable write (where the upload_id was not set in the first
      @@ -2051,7 +2084,7 @@ public com.google.storage.v2.ObjectChecksumsOrBuilder getObjectChecksumsOrBuilde
            * stream.
            * 
      * - * bool finish_write = 7; + * bool finish_write = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The finishWrite. */ @@ -2064,7 +2097,7 @@ public boolean getFinishWrite() { * * *
      -     * If `true`, this indicates that the write is complete. Sending any
      +     * Optional. If `true`, this indicates that the write is complete. Sending any
            * `WriteObjectRequest`s subsequent to one in which `finish_write` is `true`
            * will cause an error.
            * For a non-resumable write (where the upload_id was not set in the first
      @@ -2072,7 +2105,7 @@ public boolean getFinishWrite() {
            * stream.
            * 
      * - * bool finish_write = 7; + * bool finish_write = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The finishWrite to set. * @return This builder for chaining. @@ -2089,7 +2122,7 @@ public Builder setFinishWrite(boolean value) { * * *
      -     * If `true`, this indicates that the write is complete. Sending any
      +     * Optional. If `true`, this indicates that the write is complete. Sending any
            * `WriteObjectRequest`s subsequent to one in which `finish_write` is `true`
            * will cause an error.
            * For a non-resumable write (where the upload_id was not set in the first
      @@ -2097,7 +2130,7 @@ public Builder setFinishWrite(boolean value) {
            * stream.
            * 
      * - * bool finish_write = 7; + * bool finish_write = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -2119,10 +2152,13 @@ public Builder clearFinishWrite() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -2134,10 +2170,13 @@ public boolean hasCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -2155,10 +2194,13 @@ public com.google.storage.v2.CommonObjectRequestParams getCommonObjectRequestPar * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams value) { @@ -2179,10 +2221,13 @@ public Builder setCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder setCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams.Builder builderForValue) { @@ -2200,10 +2245,13 @@ public Builder setCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder mergeCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams value) { @@ -2230,10 +2278,13 @@ public Builder mergeCommonObjectRequestParams( * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public Builder clearCommonObjectRequestParams() { bitField0_ = (bitField0_ & ~0x00000040); @@ -2250,10 +2301,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.CommonObjectRequestParams.Builder getCommonObjectRequestParamsBuilder() { @@ -2266,10 +2320,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ public com.google.storage.v2.CommonObjectRequestParamsOrBuilder getCommonObjectRequestParamsOrBuilder() { @@ -2286,10 +2343,13 @@ public Builder clearCommonObjectRequestParams() { * * *
      -     * A set of parameters common to Storage API requests concerning an object.
      +     * Optional. A set of parameters common to Storage API requests concerning an
      +     * object.
            * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.CommonObjectRequestParams, diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectRequestOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectRequestOrBuilder.java index 35be344c15..1850e2c0ea 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectRequestOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectRequestOrBuilder.java @@ -175,13 +175,15 @@ public interface WriteObjectRequestOrBuilder * * *
      -   * Checksums for the complete object. If the checksums computed by the service
      -   * don't match the specified checksums the call will fail. May only be
      -   * provided in the first or last request (either with first_message, or
      -   * finish_write set).
      +   * Optional. Checksums for the complete object. If the checksums computed by
      +   * the service don't match the specified checksums the call will fail. May
      +   * only be provided in the first or last request (either with first_message,
      +   * or finish_write set).
          * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 6; + * + * .google.storage.v2.ObjectChecksums object_checksums = 6 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the objectChecksums field is set. */ @@ -191,13 +193,15 @@ public interface WriteObjectRequestOrBuilder * * *
      -   * Checksums for the complete object. If the checksums computed by the service
      -   * don't match the specified checksums the call will fail. May only be
      -   * provided in the first or last request (either with first_message, or
      -   * finish_write set).
      +   * Optional. Checksums for the complete object. If the checksums computed by
      +   * the service don't match the specified checksums the call will fail. May
      +   * only be provided in the first or last request (either with first_message,
      +   * or finish_write set).
          * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 6; + * + * .google.storage.v2.ObjectChecksums object_checksums = 6 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The objectChecksums. */ @@ -207,13 +211,15 @@ public interface WriteObjectRequestOrBuilder * * *
      -   * Checksums for the complete object. If the checksums computed by the service
      -   * don't match the specified checksums the call will fail. May only be
      -   * provided in the first or last request (either with first_message, or
      -   * finish_write set).
      +   * Optional. Checksums for the complete object. If the checksums computed by
      +   * the service don't match the specified checksums the call will fail. May
      +   * only be provided in the first or last request (either with first_message,
      +   * or finish_write set).
          * 
      * - * .google.storage.v2.ObjectChecksums object_checksums = 6; + * + * .google.storage.v2.ObjectChecksums object_checksums = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.ObjectChecksumsOrBuilder getObjectChecksumsOrBuilder(); @@ -221,7 +227,7 @@ public interface WriteObjectRequestOrBuilder * * *
      -   * If `true`, this indicates that the write is complete. Sending any
      +   * Optional. If `true`, this indicates that the write is complete. Sending any
          * `WriteObjectRequest`s subsequent to one in which `finish_write` is `true`
          * will cause an error.
          * For a non-resumable write (where the upload_id was not set in the first
      @@ -229,7 +235,7 @@ public interface WriteObjectRequestOrBuilder
          * stream.
          * 
      * - * bool finish_write = 7; + * bool finish_write = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The finishWrite. */ @@ -239,10 +245,13 @@ public interface WriteObjectRequestOrBuilder * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return Whether the commonObjectRequestParams field is set. */ @@ -252,10 +261,13 @@ public interface WriteObjectRequestOrBuilder * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * * * @return The commonObjectRequestParams. */ @@ -265,10 +277,13 @@ public interface WriteObjectRequestOrBuilder * * *
      -   * A set of parameters common to Storage API requests concerning an object.
      +   * Optional. A set of parameters common to Storage API requests concerning an
      +   * object.
          * 
      * - * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8; + * + * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ com.google.storage.v2.CommonObjectRequestParamsOrBuilder getCommonObjectRequestParamsOrBuilder(); diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectSpec.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectSpec.java index 663b91bbbb..e53d319c84 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectSpec.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectSpec.java @@ -123,12 +123,12 @@ public com.google.storage.v2.ObjectOrBuilder getResourceOrBuilder() { * * *
      -   * Apply a predefined set of access controls to this object.
      +   * Optional. Apply a predefined set of access controls to this object.
          * Valid values are "authenticatedRead", "bucketOwnerFullControl",
          * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
          * 
      * - * string predefined_acl = 7; + * string predefined_acl = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The predefinedAcl. */ @@ -149,12 +149,12 @@ public java.lang.String getPredefinedAcl() { * * *
      -   * Apply a predefined set of access controls to this object.
      +   * Optional. Apply a predefined set of access controls to this object.
          * Valid values are "authenticatedRead", "bucketOwnerFullControl",
          * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
          * 
      * - * string predefined_acl = 7; + * string predefined_acl = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for predefinedAcl. */ @@ -1165,12 +1165,12 @@ public com.google.storage.v2.ObjectOrBuilder getResourceOrBuilder() { * * *
      -     * Apply a predefined set of access controls to this object.
      +     * Optional. Apply a predefined set of access controls to this object.
            * Valid values are "authenticatedRead", "bucketOwnerFullControl",
            * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
            * 
      * - * string predefined_acl = 7; + * string predefined_acl = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The predefinedAcl. */ @@ -1190,12 +1190,12 @@ public java.lang.String getPredefinedAcl() { * * *
      -     * Apply a predefined set of access controls to this object.
      +     * Optional. Apply a predefined set of access controls to this object.
            * Valid values are "authenticatedRead", "bucketOwnerFullControl",
            * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
            * 
      * - * string predefined_acl = 7; + * string predefined_acl = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for predefinedAcl. */ @@ -1215,12 +1215,12 @@ public com.google.protobuf.ByteString getPredefinedAclBytes() { * * *
      -     * Apply a predefined set of access controls to this object.
      +     * Optional. Apply a predefined set of access controls to this object.
            * Valid values are "authenticatedRead", "bucketOwnerFullControl",
            * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
            * 
      * - * string predefined_acl = 7; + * string predefined_acl = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The predefinedAcl to set. * @return This builder for chaining. @@ -1239,12 +1239,12 @@ public Builder setPredefinedAcl(java.lang.String value) { * * *
      -     * Apply a predefined set of access controls to this object.
      +     * Optional. Apply a predefined set of access controls to this object.
            * Valid values are "authenticatedRead", "bucketOwnerFullControl",
            * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
            * 
      * - * string predefined_acl = 7; + * string predefined_acl = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -1259,12 +1259,12 @@ public Builder clearPredefinedAcl() { * * *
      -     * Apply a predefined set of access controls to this object.
      +     * Optional. Apply a predefined set of access controls to this object.
            * Valid values are "authenticatedRead", "bucketOwnerFullControl",
            * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
            * 
      * - * string predefined_acl = 7; + * string predefined_acl = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for predefinedAcl to set. * @return This builder for chaining. diff --git a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectSpecOrBuilder.java b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectSpecOrBuilder.java index f520e3c6ef..e7de8f4c8a 100644 --- a/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectSpecOrBuilder.java +++ b/proto-google-cloud-storage-v2/src/main/java/com/google/storage/v2/WriteObjectSpecOrBuilder.java @@ -65,12 +65,12 @@ public interface WriteObjectSpecOrBuilder * * *
      -   * Apply a predefined set of access controls to this object.
      +   * Optional. Apply a predefined set of access controls to this object.
          * Valid values are "authenticatedRead", "bucketOwnerFullControl",
          * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
          * 
      * - * string predefined_acl = 7; + * string predefined_acl = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The predefinedAcl. */ @@ -80,12 +80,12 @@ public interface WriteObjectSpecOrBuilder * * *
      -   * Apply a predefined set of access controls to this object.
      +   * Optional. Apply a predefined set of access controls to this object.
          * Valid values are "authenticatedRead", "bucketOwnerFullControl",
          * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
          * 
      * - * string predefined_acl = 7; + * string predefined_acl = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for predefinedAcl. */ 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 1ca9e9bcde..f17ad6ad95 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 @@ -115,22 +115,34 @@ service Storage { // Gets the IAM policy for a specified bucket. // The `resource` field in the request should be - // `projects/_/buckets/{bucket}`. + // `projects/_/buckets/{bucket}` for a bucket, or + // `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` + // for a managed folder. rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.routing) = { routing_parameters { field: "resource" path_template: "{bucket=**}" } + routing_parameters { + field: "resource" + path_template: "{bucket=projects/*/buckets/*}/**" + } }; option (google.api.method_signature) = "resource"; } // Updates an IAM policy for the specified bucket. // The `resource` field in the request should be - // `projects/_/buckets/{bucket}`. + // `projects/_/buckets/{bucket}` for a bucket, or + // `projects/_/buckets/{bucket}/managedFolders/{managedFolder}` + // for a managed folder. rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.routing) = { routing_parameters { field: "resource" path_template: "{bucket=**}" } + routing_parameters { + field: "resource" + path_template: "{bucket=projects/*/buckets/*}/**" + } }; option (google.api.method_signature) = "resource,policy"; } @@ -514,7 +526,9 @@ message GetBucketRequest { // Request message for CreateBucket. message CreateBucketRequest { - // Required. The project to which this bucket will belong. + // Required. The project to which this bucket will belong. This field must + // either be empty or `projects/_`. The project ID that owns this bucket + // should be specified in the `bucket.project` field. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -522,29 +536,30 @@ message CreateBucketRequest { } ]; - // Properties of the new bucket being inserted. + // Optional. Properties of the new bucket being inserted. // The name of the bucket is specified in the `bucket_id` field. Populating // `bucket.name` field will result in an error. // The project of the bucket must be specified in the `bucket.project` field. // This field must be in `projects/{projectIdentifier}` format, // {projectIdentifier} can be the project ID or project number. The `parent` // field must be either empty or `projects/_`. - Bucket bucket = 2; + Bucket bucket = 2 [(google.api.field_behavior) = OPTIONAL]; // Required. The ID to use for this bucket, which will become the final // component of the bucket's resource name. For example, the value `foo` might // result in a bucket with the name `projects/123456/buckets/foo`. string bucket_id = 3 [(google.api.field_behavior) = REQUIRED]; - // Apply a predefined set of access controls to this bucket. + // Optional. Apply a predefined set of access controls to this bucket. // Valid values are "authenticatedRead", "private", "projectPrivate", // "publicRead", or "publicReadWrite". - string predefined_acl = 6; + string predefined_acl = 6 [(google.api.field_behavior) = OPTIONAL]; - // Apply a predefined set of default object access controls to this bucket. - // Valid values are "authenticatedRead", "bucketOwnerFullControl", + // Optional. Apply a predefined set of default object access controls to this + // bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl", // "bucketOwnerRead", "private", "projectPrivate", or "publicRead". - string predefined_default_object_acl = 7; + string predefined_default_object_acl = 7 + [(google.api.field_behavior) = OPTIONAL]; } // Request message for ListBuckets. @@ -557,18 +572,18 @@ message ListBucketsRequest { } ]; - // Maximum number of buckets to return in a single response. The service will - // use this parameter or 1,000 items, whichever is smaller. If "acl" is - // present in the read_mask, the service will use this parameter of 200 items, - // whichever is smaller. - int32 page_size = 2; + // Optional. Maximum number of buckets to return in a single response. The + // service will use this parameter or 1,000 items, whichever is smaller. If + // "acl" is present in the read_mask, the service will use this parameter of + // 200 items, whichever is smaller. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // A previously-returned page token representing part of the larger set of - // results to view. - string page_token = 3; + // Optional. A previously-returned page token representing part of the larger + // set of results to view. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - // Filter results to buckets whose names begin with this prefix. - string prefix = 4; + // Optional. Filter results to buckets whose names begin with this prefix. + string prefix = 4 [(google.api.field_behavior) = OPTIONAL]; // Mask specifying which fields to read from each result. // If no mask is specified, will default to all fields except items.owner, @@ -614,15 +629,16 @@ message UpdateBucketRequest { // this value. optional int64 if_metageneration_not_match = 3; - // Apply a predefined set of access controls to this bucket. + // Optional. Apply a predefined set of access controls to this bucket. // Valid values are "authenticatedRead", "private", "projectPrivate", // "publicRead", or "publicReadWrite". - string predefined_acl = 8; + string predefined_acl = 8 [(google.api.field_behavior) = OPTIONAL]; - // Apply a predefined set of default object access controls to this bucket. - // Valid values are "authenticatedRead", "bucketOwnerFullControl", + // Optional. Apply a predefined set of default object access controls to this + // bucket. Valid values are "authenticatedRead", "bucketOwnerFullControl", // "bucketOwnerRead", "private", "projectPrivate", or "publicRead". - string predefined_default_object_acl = 9; + string predefined_default_object_acl = 9 + [(google.api.field_behavior) = OPTIONAL]; // Required. List of fields to be updated. // @@ -652,23 +668,27 @@ message ComposeObjectRequest { // same bucket. string name = 1 [(google.api.field_behavior) = REQUIRED]; - // The generation of this object to use as the source. - int64 generation = 2; + // Optional. The generation of this object to use as the source. + int64 generation = 2 [(google.api.field_behavior) = OPTIONAL]; - // Conditions that must be met for this operation to execute. - ObjectPreconditions object_preconditions = 3; + // Optional. Conditions that must be met for this operation to execute. + ObjectPreconditions object_preconditions = 3 + [(google.api.field_behavior) = OPTIONAL]; } // Required. Properties of the resulting object. Object destination = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of source objects that will be concatenated into a single object. - repeated SourceObject source_objects = 2; + // Optional. The list of source objects that will be concatenated into a + // single object. + repeated SourceObject source_objects = 2 + [(google.api.field_behavior) = OPTIONAL]; - // Apply a predefined set of access controls to the destination object. - // Valid values are "authenticatedRead", "bucketOwnerFullControl", + // Optional. Apply a predefined set of access controls to the destination + // object. Valid values are "authenticatedRead", "bucketOwnerFullControl", // "bucketOwnerRead", "private", "projectPrivate", or "publicRead". - string destination_predefined_acl = 9; + string destination_predefined_acl = 9 + [(google.api.field_behavior) = OPTIONAL]; // Makes the operation conditional on whether the object's current generation // matches the given value. Setting to 0 makes the operation succeed only if @@ -679,20 +699,26 @@ message ComposeObjectRequest { // metageneration matches the given value. optional int64 if_metageneration_match = 5; - // Resource name of the Cloud KMS key, of the form + // Optional. Resource name of the Cloud KMS key, of the form // `projects/my-project/locations/my-location/keyRings/my-kr/cryptoKeys/my-key`, // that will be used to encrypt the object. Overrides the object // metadata's `kms_key_name` value, if any. - string kms_key = 6 [(google.api.resource_reference) = { - type: "cloudkms.googleapis.com/CryptoKey" - }]; + string kms_key = 6 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKey" + } + ]; - // A set of parameters common to Storage API requests concerning an object. - CommonObjectRequestParams common_object_request_params = 7; + // Optional. A set of parameters common to Storage API requests concerning an + // object. + CommonObjectRequestParams common_object_request_params = 7 + [(google.api.field_behavior) = OPTIONAL]; - // The checksums of the complete object. This will be validated against the - // combined checksums of the component objects. - ObjectChecksums object_checksums = 10; + // Optional. The checksums of the complete object. This will be validated + // against the combined checksums of the component objects. + ObjectChecksums object_checksums = 10 + [(google.api.field_behavior) = OPTIONAL]; } // Message for deleting an object. @@ -709,9 +735,9 @@ message DeleteObjectRequest { // `CancelResumableWrite`. string object = 2 [(google.api.field_behavior) = REQUIRED]; - // If present, permanently deletes a specific revision of this object (as - // opposed to the latest version, the default). - int64 generation = 4; + // Optional. If present, permanently deletes a specific revision of this + // object (as opposed to the latest version, the default). + int64 generation = 4 [(google.api.field_behavior) = OPTIONAL]; // Makes the operation conditional on whether the object's current generation // matches the given value. Setting to 0 makes the operation succeed only if @@ -732,8 +758,10 @@ message DeleteObjectRequest { // metageneration does not match the given value. optional int64 if_metageneration_not_match = 8; - // A set of parameters common to Storage API requests concerning an object. - CommonObjectRequestParams common_object_request_params = 10; + // Optional. A set of parameters common to Storage API requests concerning an + // object. + CommonObjectRequestParams common_object_request_params = 10 + [(google.api.field_behavior) = OPTIONAL]; } // Message for restoring an object. @@ -782,8 +810,10 @@ message RestoreObjectRequest { // Return an error if bucket has UBLA enabled. optional bool copy_source_acl = 9; - // A set of parameters common to Storage API requests concerning an object. - CommonObjectRequestParams common_object_request_params = 8; + // Optional. A set of parameters common to Storage API requests concerning an + // object. + CommonObjectRequestParams common_object_request_params = 8 + [(google.api.field_behavior) = OPTIONAL]; } // Message for canceling an in-progress resumable upload. @@ -809,12 +839,12 @@ message ReadObjectRequest { // Required. The name of the object to read. string object = 2 [(google.api.field_behavior) = REQUIRED]; - // If present, selects a specific revision of this object (as opposed - // to the latest version, the default). - int64 generation = 3; + // Optional. If present, selects a specific revision of this object (as + // opposed to the latest version, the default). + int64 generation = 3 [(google.api.field_behavior) = OPTIONAL]; - // The offset for the first byte to return in the read, relative to the start - // of the object. + // Optional. The offset for the first byte to return in the read, relative to + // the start of the object. // // A negative `read_offset` value will be interpreted as the number of bytes // back from the end of the object to be returned. For example, if an object's @@ -822,16 +852,17 @@ message ReadObjectRequest { // `read_limit` = 3 would return bytes 10 through 12 of the object. Requesting // a negative offset with magnitude larger than the size of the object will // return the entire object. - int64 read_offset = 4; + int64 read_offset = 4 [(google.api.field_behavior) = OPTIONAL]; - // The maximum number of `data` bytes the server is allowed to return in the - // sum of all `Object` messages. A `read_limit` of zero indicates that there - // is no limit, and a negative `read_limit` will cause an error. + // Optional. The maximum number of `data` bytes the server is allowed to + // return in the sum of all `Object` messages. A `read_limit` of zero + // indicates that there is no limit, and a negative `read_limit` will cause an + // error. // // If the stream returns fewer bytes than allowed by the `read_limit` and no // error occurred, the stream includes all data from the `read_offset` to the // end of the resource. - int64 read_limit = 5; + int64 read_limit = 5 [(google.api.field_behavior) = OPTIONAL]; // Makes the operation conditional on whether the object's current generation // matches the given value. Setting to 0 makes the operation succeed only if @@ -852,8 +883,10 @@ message ReadObjectRequest { // metageneration does not match the given value. optional int64 if_metageneration_not_match = 9; - // A set of parameters common to Storage API requests concerning an object. - CommonObjectRequestParams common_object_request_params = 10; + // Optional. A set of parameters common to Storage API requests concerning an + // object. + CommonObjectRequestParams common_object_request_params = 10 + [(google.api.field_behavior) = OPTIONAL]; // Mask specifying which fields to read. // The checksummed_data field and its children will always be present. @@ -874,9 +907,9 @@ message GetObjectRequest { // Required. Name of the object. string object = 2 [(google.api.field_behavior) = REQUIRED]; - // If present, selects a specific revision of this object (as opposed to the - // latest version, the default). - int64 generation = 3; + // Optional. If present, selects a specific revision of this object (as + // opposed to the latest version, the default). + int64 generation = 3 [(google.api.field_behavior) = OPTIONAL]; // If true, return the soft-deleted version of this object. optional bool soft_deleted = 11; @@ -900,8 +933,10 @@ message GetObjectRequest { // metageneration does not match the given value. optional int64 if_metageneration_not_match = 7; - // A set of parameters common to Storage API requests concerning an object. - CommonObjectRequestParams common_object_request_params = 8; + // Optional. A set of parameters common to Storage API requests concerning an + // object. + CommonObjectRequestParams common_object_request_params = 8 + [(google.api.field_behavior) = OPTIONAL]; // Mask specifying which fields to read. // If no mask is specified, will default to all fields except metadata.acl and @@ -951,9 +986,9 @@ message BidiReadObjectSpec { // Required. The name of the object to read. string object = 2 [(google.api.field_behavior) = REQUIRED]; - // If present, selects a specific revision of this object (as opposed - // to the latest version, the default). - int64 generation = 3; + // Optional. If present, selects a specific revision of this object (as + // opposed to the latest version, the default). + int64 generation = 3 [(google.api.field_behavior) = OPTIONAL]; // Makes the operation conditional on whether the object's current generation // matches the given value. Setting to 0 makes the operation succeed only if @@ -974,8 +1009,10 @@ message BidiReadObjectSpec { // metageneration does not match the given value. optional int64 if_metageneration_not_match = 7; - // A set of parameters common to Storage API requests concerning an object. - CommonObjectRequestParams common_object_request_params = 8; + // Optional. A set of parameters common to Storage API requests concerning an + // object. + CommonObjectRequestParams common_object_request_params = 8 + [(google.api.field_behavior) = OPTIONAL]; // Mask specifying which fields to read. // The checksummed_data field and its children will always be present. @@ -999,17 +1036,19 @@ message BidiReadObjectSpec { // Request message for BidiReadObject. message BidiReadObjectRequest { - // The first message of each stream should set this field. If this is not - // the first message, an error will be returned. Describes the object to read. - BidiReadObjectSpec read_object_spec = 1; - - // Provides a list of 0 or more (up to 100) ranges to read. If a single range - // is large enough to require multiple responses, they are guaranteed to be - // delivered in increasing offset order. There are no ordering guarantees - // across ranges. When no ranges are provided, the response message will not - // include ObjectRangeData. For full object downloads, the offset and size can - // be set to 0. - repeated ReadRange read_ranges = 8; + // Optional. The first message of each stream should set this field. If this + // is not the first message, an error will be returned. Describes the object + // to read. + BidiReadObjectSpec read_object_spec = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Provides a list of 0 or more (up to 100) ranges to read. If a + // single range is large enough to require multiple responses, they are + // guaranteed to be delivered in increasing offset order. There are no + // ordering guarantees across ranges. When no ranges are provided, the + // response message will not include ObjectRangeData. For full object + // downloads, the offset and size can be set to 0. + repeated ReadRange read_ranges = 8 [(google.api.field_behavior) = OPTIONAL]; } // Response message for BidiReadObject. @@ -1144,10 +1183,10 @@ message WriteObjectSpec { // Required. Destination object, including its name and its metadata. Object resource = 1 [(google.api.field_behavior) = REQUIRED]; - // Apply a predefined set of access controls to this object. + // Optional. Apply a predefined set of access controls to this object. // Valid values are "authenticatedRead", "bucketOwnerFullControl", // "bucketOwnerRead", "private", "projectPrivate", or "publicRead". - string predefined_acl = 7; + string predefined_acl = 7 [(google.api.field_behavior) = OPTIONAL]; // Makes the operation conditional on whether the object's current // generation matches the given value. Setting to 0 makes the operation @@ -1217,22 +1256,24 @@ message WriteObjectRequest { ChecksummedData checksummed_data = 4; } - // Checksums for the complete object. If the checksums computed by the service - // don't match the specified checksums the call will fail. May only be - // provided in the first or last request (either with first_message, or - // finish_write set). - ObjectChecksums object_checksums = 6; + // Optional. Checksums for the complete object. If the checksums computed by + // the service don't match the specified checksums the call will fail. May + // only be provided in the first or last request (either with first_message, + // or finish_write set). + ObjectChecksums object_checksums = 6 [(google.api.field_behavior) = OPTIONAL]; - // If `true`, this indicates that the write is complete. Sending any + // Optional. If `true`, this indicates that the write is complete. Sending any // `WriteObjectRequest`s subsequent to one in which `finish_write` is `true` // will cause an error. // For a non-resumable write (where the upload_id was not set in the first // message), it is an error not to set this field in the final message of the // stream. - bool finish_write = 7; + bool finish_write = 7 [(google.api.field_behavior) = OPTIONAL]; - // A set of parameters common to Storage API requests concerning an object. - CommonObjectRequestParams common_object_request_params = 8; + // Optional. A set of parameters common to Storage API requests concerning an + // object. + CommonObjectRequestParams common_object_request_params = 8 + [(google.api.field_behavior) = OPTIONAL]; } // Response message for WriteObject. @@ -1318,40 +1359,42 @@ message BidiWriteObjectRequest { ChecksummedData checksummed_data = 4; } - // Checksums for the complete object. If the checksums computed by the service - // don't match the specified checksums the call will fail. May only be - // provided in the first request or the - // last request (with finish_write set). - ObjectChecksums object_checksums = 6; - - // For each BidiWriteObjectRequest where state_lookup is `true` or the client - // closes the stream, the service will send a BidiWriteObjectResponse - // containing the current persisted size. The persisted size sent in responses - // covers all the bytes the server has persisted thus far and can be used to - // decide what data is safe for the client to drop. Note that the object's - // current size reported by the BidiWriteObjectResponse may lag behind the - // number of bytes written by the client. This field is ignored if - // `finish_write` is set to true. - bool state_lookup = 7; - - // Persists data written on the stream, up to and including the current - // message, to permanent storage. This option should be used sparingly as it - // may reduce performance. Ongoing writes will periodically be persisted on - // the server even when `flush` is not set. This field is ignored if + // Optional. Checksums for the complete object. If the checksums computed by + // the service don't match the specified checksums the call will fail. May + // only be provided in the first request or the last request (with + // finish_write set). + ObjectChecksums object_checksums = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. For each BidiWriteObjectRequest where state_lookup is `true` or + // the client closes the stream, the service will send a + // BidiWriteObjectResponse containing the current persisted size. The + // persisted size sent in responses covers all the bytes the server has + // persisted thus far and can be used to decide what data is safe for the + // client to drop. Note that the object's current size reported by the + // BidiWriteObjectResponse may lag behind the number of bytes written by the + // client. This field is ignored if `finish_write` is set to true. + bool state_lookup = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Persists data written on the stream, up to and including the + // current message, to permanent storage. This option should be used sparingly + // as it may reduce performance. Ongoing writes will periodically be persisted + // on the server even when `flush` is not set. This field is ignored if // `finish_write` is set to true since there's no need to checkpoint or flush // if this message completes the write. - bool flush = 8; + bool flush = 8 [(google.api.field_behavior) = OPTIONAL]; - // If `true`, this indicates that the write is complete. Sending any + // Optional. If `true`, this indicates that the write is complete. Sending any // `WriteObjectRequest`s subsequent to one in which `finish_write` is `true` // will cause an error. // For a non-resumable write (where the upload_id was not set in the first // message), it is an error not to set this field in the final message of the // stream. - bool finish_write = 9; + bool finish_write = 9 [(google.api.field_behavior) = OPTIONAL]; - // A set of parameters common to Storage API requests concerning an object. - CommonObjectRequestParams common_object_request_params = 10; + // Optional. A set of parameters common to Storage API requests concerning an + // object. + CommonObjectRequestParams common_object_request_params = 10 + [(google.api.field_behavior) = OPTIONAL]; } // Response message for BidiWriteObject. @@ -1381,37 +1424,36 @@ message ListObjectsRequest { (google.api.resource_reference) = { type: "storage.googleapis.com/Bucket" } ]; - // Maximum number of `items` plus `prefixes` to return + // Optional. Maximum number of `items` plus `prefixes` to return // in a single page of responses. As duplicate `prefixes` are // omitted, fewer total results may be returned than requested. The service // will use this parameter or 1,000 items, whichever is smaller. - int32 page_size = 2; + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // A previously-returned page token representing part of the larger set of - // results to view. - string page_token = 3; + // Optional. A previously-returned page token representing part of the larger + // set of results to view. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - // If set, returns results in a directory-like mode. `items` will contain - // only objects whose names, aside from the `prefix`, do not - // contain `delimiter`. Objects whose names, aside from the - // `prefix`, contain `delimiter` will have their name, - // truncated after the `delimiter`, returned in - // `prefixes`. Duplicate `prefixes` are omitted. - string delimiter = 4; + // Optional. If set, returns results in a directory-like mode. `items` will + // contain only objects whose names, aside from the `prefix`, do not contain + // `delimiter`. Objects whose names, aside from the `prefix`, contain + // `delimiter` will have their name, truncated after the `delimiter`, returned + // in `prefixes`. Duplicate `prefixes` are omitted. + string delimiter = 4 [(google.api.field_behavior) = OPTIONAL]; - // If true, objects that end in exactly one instance of `delimiter` + // Optional. If true, objects that end in exactly one instance of `delimiter` // will have their metadata included in `items` in addition to // `prefixes`. - bool include_trailing_delimiter = 5; + bool include_trailing_delimiter = 5 [(google.api.field_behavior) = OPTIONAL]; - // Filter results to objects whose names begin with this prefix. - string prefix = 6; + // Optional. Filter results to objects whose names begin with this prefix. + string prefix = 6 [(google.api.field_behavior) = OPTIONAL]; - // If `true`, lists all versions of an object as distinct results. + // Optional. If `true`, lists all versions of an object as distinct results. // For more information, see // [Object // Versioning](https://cloud.google.com/storage/docs/object-versioning). - bool versions = 7; + bool versions = 7 [(google.api.field_behavior) = OPTIONAL]; // Mask specifying which fields to read from each result. // If no mask is specified, will default to all fields except items.acl and @@ -1453,8 +1495,10 @@ message QueryWriteStatusRequest { // being requested. string upload_id = 1 [(google.api.field_behavior) = REQUIRED]; - // A set of parameters common to Storage API requests concerning an object. - CommonObjectRequestParams common_object_request_params = 2; + // Optional. A set of parameters common to Storage API requests concerning an + // object. + CommonObjectRequestParams common_object_request_params = 2 + [(google.api.field_behavior) = OPTIONAL]; } // Response object for `QueryWriteStatus`. @@ -1502,23 +1546,26 @@ message RewriteObjectRequest { (google.api.resource_reference) = { type: "storage.googleapis.com/Bucket" } ]; - // The name of the Cloud KMS key that will be used to encrypt the destination - // object. The Cloud KMS key must be located in same location as the object. - // If the parameter is not specified, the request uses the destination - // bucket's default encryption key, if any, or else the Google-managed - // encryption key. - string destination_kms_key = 27 [(google.api.resource_reference) = { - type: "cloudkms.googleapis.com/CryptoKey" - }]; + // Optional. The name of the Cloud KMS key that will be used to encrypt the + // destination object. The Cloud KMS key must be located in same location as + // the object. If the parameter is not specified, the request uses the + // destination bucket's default encryption key, if any, or else the + // Google-managed encryption key. + string destination_kms_key = 27 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKey" + } + ]; - // Properties of the destination, post-rewrite object. + // Optional. Properties of the destination, post-rewrite object. // The `name`, `bucket` and `kms_key` fields must not be populated (these // values are specified in the `destination_name`, `destination_bucket`, and // `destination_kms_key` fields). // If `destination` is present it will be used to construct the destination // object's metadata; otherwise the destination object's metadata will be // copied from the source object. - Object destination = 1; + Object destination = 1 [(google.api.field_behavior) = OPTIONAL]; // Required. Name of the bucket in which to find the source object. string source_bucket = 2 [ @@ -1529,21 +1576,22 @@ message RewriteObjectRequest { // Required. Name of the source object. string source_object = 3 [(google.api.field_behavior) = REQUIRED]; - // If present, selects a specific revision of the source object (as opposed to - // the latest version, the default). - int64 source_generation = 4; + // Optional. If present, selects a specific revision of the source object (as + // opposed to the latest version, the default). + int64 source_generation = 4 [(google.api.field_behavior) = OPTIONAL]; - // Include this field (from the previous rewrite response) on each rewrite - // request after the first one, until the rewrite response 'done' flag is - // true. Calls that provide a rewriteToken can omit all other request fields, - // but if included those fields must match the values provided in the first - // rewrite request. - string rewrite_token = 5; + // Optional. Include this field (from the previous rewrite response) on each + // rewrite request after the first one, until the rewrite response 'done' flag + // is true. Calls that provide a rewriteToken can omit all other request + // fields, but if included those fields must match the values provided in the + // first rewrite request. + string rewrite_token = 5 [(google.api.field_behavior) = OPTIONAL]; - // Apply a predefined set of access controls to the destination object. - // Valid values are "authenticatedRead", "bucketOwnerFullControl", + // Optional. Apply a predefined set of access controls to the destination + // object. Valid values are "authenticatedRead", "bucketOwnerFullControl", // "bucketOwnerRead", "private", "projectPrivate", or "publicRead". - string destination_predefined_acl = 28; + string destination_predefined_acl = 28 + [(google.api.field_behavior) = OPTIONAL]; // Makes the operation conditional on whether the object's current generation // matches the given value. Setting to 0 makes the operation succeed only if @@ -1580,36 +1628,42 @@ message RewriteObjectRequest { // metageneration does not match the given value. optional int64 if_source_metageneration_not_match = 14; - // The maximum number of bytes that will be rewritten per rewrite request. - // Most callers - // shouldn't need to specify this parameter - it is primarily in place to - // support testing. If specified the value must be an integral multiple of - // 1 MiB (1048576). Also, this only applies to requests where the source and - // destination span locations and/or storage classes. Finally, this value must - // not change across rewrite calls else you'll get an error that the - // `rewriteToken` is invalid. - int64 max_bytes_rewritten_per_call = 15; - - // The algorithm used to encrypt the source object, if any. Used if the source - // object was encrypted with a Customer-Supplied Encryption Key. - string copy_source_encryption_algorithm = 16; - - // The raw bytes (not base64-encoded) AES-256 encryption key used to encrypt - // the source object, if it was encrypted with a Customer-Supplied Encryption - // Key. - bytes copy_source_encryption_key_bytes = 21; - - // The raw bytes (not base64-encoded) SHA256 hash of the encryption key used - // to encrypt the source object, if it was encrypted with a Customer-Supplied + // Optional. The maximum number of bytes that will be rewritten per rewrite + // request. Most callers shouldn't need to specify this parameter - it is + // primarily in place to support testing. If specified the value must be an + // integral multiple of 1 MiB (1048576). Also, this only applies to requests + // where the source and destination span locations and/or storage classes. + // Finally, this value must not change across rewrite calls else you'll get an + // error that the `rewriteToken` is invalid. + int64 max_bytes_rewritten_per_call = 15 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The algorithm used to encrypt the source object, if any. Used if + // the source object was encrypted with a Customer-Supplied Encryption Key. + string copy_source_encryption_algorithm = 16 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The raw bytes (not base64-encoded) AES-256 encryption key used to + // encrypt the source object, if it was encrypted with a Customer-Supplied // Encryption Key. - bytes copy_source_encryption_key_sha256_bytes = 22; + bytes copy_source_encryption_key_bytes = 21 + [(google.api.field_behavior) = OPTIONAL]; - // A set of parameters common to Storage API requests concerning an object. - CommonObjectRequestParams common_object_request_params = 19; + // Optional. The raw bytes (not base64-encoded) SHA256 hash of the encryption + // key used to encrypt the source object, if it was encrypted with a + // Customer-Supplied Encryption Key. + bytes copy_source_encryption_key_sha256_bytes = 22 + [(google.api.field_behavior) = OPTIONAL]; - // The checksums of the complete object. This will be used to validate the - // destination object after rewriting. - ObjectChecksums object_checksums = 29; + // Optional. A set of parameters common to Storage API requests concerning an + // object. + CommonObjectRequestParams common_object_request_params = 19 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The checksums of the complete object. This will be used to + // validate the destination object after rewriting. + ObjectChecksums object_checksums = 29 + [(google.api.field_behavior) = OPTIONAL]; } // A rewrite response. @@ -1720,15 +1774,17 @@ message StartResumableWriteRequest { WriteObjectSpec write_object_spec = 1 [(google.api.field_behavior) = REQUIRED]; - // A set of parameters common to Storage API requests related to an object. - CommonObjectRequestParams common_object_request_params = 3; + // Optional. A set of parameters common to Storage API requests related to an + // object. + CommonObjectRequestParams common_object_request_params = 3 + [(google.api.field_behavior) = OPTIONAL]; - // The checksums of the complete object. This is used to validate the - // uploaded object. For each upload, `object_checksums` can be provided when - // initiating a resumable upload with`StartResumableWriteRequest` or when + // Optional. The checksums of the complete object. This is used to validate + // the uploaded object. For each upload, `object_checksums` can be provided + // when initiating a resumable upload with`StartResumableWriteRequest` or when // completing a write with `WriteObjectRequest` with // `finish_write` set to `true`. - ObjectChecksums object_checksums = 5; + ObjectChecksums object_checksums = 5 [(google.api.field_behavior) = OPTIONAL]; } // Response object for `StartResumableWrite`. @@ -1769,10 +1825,10 @@ message UpdateObjectRequest { // metageneration does not match the given value. optional int64 if_metageneration_not_match = 5; - // Apply a predefined set of access controls to this object. + // Optional. Apply a predefined set of access controls to this object. // Valid values are "authenticatedRead", "bucketOwnerFullControl", // "bucketOwnerRead", "private", "projectPrivate", or "publicRead". - string predefined_acl = 10; + string predefined_acl = 10 [(google.api.field_behavior) = OPTIONAL]; // Required. List of fields to be updated. // @@ -1785,23 +1841,26 @@ message UpdateObjectRequest { google.protobuf.FieldMask update_mask = 7 [(google.api.field_behavior) = REQUIRED]; - // A set of parameters common to Storage API requests concerning an object. - CommonObjectRequestParams common_object_request_params = 8; + // Optional. A set of parameters common to Storage API requests concerning an + // object. + CommonObjectRequestParams common_object_request_params = 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 - // feature. - string encryption_algorithm = 1; + // Optional. Encryption algorithm used with the Customer-Supplied Encryption + // Keys feature. + string encryption_algorithm = 1 [(google.api.field_behavior) = OPTIONAL]; - // Encryption key used with the Customer-Supplied Encryption Keys feature. - // In raw bytes format (not base64-encoded). - bytes encryption_key_bytes = 4; + // Optional. Encryption key used with the Customer-Supplied Encryption Keys + // feature. In raw bytes format (not base64-encoded). + bytes encryption_key_bytes = 4 [(google.api.field_behavior) = OPTIONAL]; - // SHA256 hash of encryption key used with the Customer-Supplied Encryption - // Keys feature. - bytes encryption_key_sha256_bytes = 5; + // Optional. SHA256 hash of encryption key used with the Customer-Supplied + // Encryption Keys feature. + bytes encryption_key_sha256_bytes = 5 + [(google.api.field_behavior) = OPTIONAL]; } // Shared constants. @@ -1898,8 +1957,8 @@ message Bucket { // Billing properties of a bucket. message Billing { - // When set to true, Requester Pays is enabled for this bucket. - bool requester_pays = 1; + // Optional. When set to true, Requester Pays is enabled for this bucket. + bool requester_pays = 1 [(google.api.field_behavior) = OPTIONAL]; } // Cross-Origin Response sharing (CORS) properties for a bucket. @@ -1907,34 +1966,39 @@ message Bucket { // https://cloud.google.com/storage/docs/cross-origin. // For more on CORS in general, see https://tools.ietf.org/html/rfc6454. message Cors { - // The list of Origins eligible to receive CORS response headers. See - // [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins. + // Optional. The list of Origins eligible to receive CORS response headers. + // See [https://tools.ietf.org/html/rfc6454][RFC 6454] for more on origins. // Note: "*" is permitted in the list of origins, and means "any Origin". - repeated string origin = 1; + repeated string origin = 1 [(google.api.field_behavior) = OPTIONAL]; - // The list of HTTP methods on which to include CORS response headers, + // Optional. The list of HTTP methods on which to include CORS response + // headers, // (`GET`, `OPTIONS`, `POST`, etc) Note: "*" is permitted in the list of // methods, and means "any method". - repeated string method = 2; + repeated string method = 2 [(google.api.field_behavior) = OPTIONAL]; - // The list of HTTP headers other than the + // Optional. The list of HTTP headers other than the // [https://www.w3.org/TR/cors/#simple-response-header][simple response // headers] to give permission for the user-agent to share across domains. - repeated string response_header = 3; + repeated string response_header = 3 + [(google.api.field_behavior) = OPTIONAL]; - // The value, in seconds, to return in the + // Optional. The value, in seconds, to return in the // [https://www.w3.org/TR/cors/#access-control-max-age-response-header][Access-Control-Max-Age // header] used in preflight responses. - int32 max_age_seconds = 4; + int32 max_age_seconds = 4 [(google.api.field_behavior) = OPTIONAL]; } // Encryption properties of a bucket. message Encryption { - // The name of the Cloud KMS key that will be used to encrypt objects - // inserted into this bucket, if no encryption method is specified. - string default_kms_key = 1 [(google.api.resource_reference) = { - type: "cloudkms.googleapis.com/CryptoKey" - }]; + // Optional. The name of the Cloud KMS key that will be used to encrypt + // objects inserted into this bucket, if no encryption method is specified. + string default_kms_key = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKey" + } + ]; } // Bucket restriction options. @@ -1942,22 +2006,26 @@ message Bucket { // Settings for Uniform Bucket level access. // See https://cloud.google.com/storage/docs/uniform-bucket-level-access. message UniformBucketLevelAccess { - // If set, access checks only use bucket-level IAM policies or above. - bool enabled = 1; + // Optional. If set, access checks only use bucket-level IAM policies or + // above. + bool enabled = 1 [(google.api.field_behavior) = OPTIONAL]; - // The deadline time for changing + // Optional. The deadline time for changing // `iam_config.uniform_bucket_level_access.enabled` from `true` to // `false`. Mutable until the specified deadline is reached, but not // afterward. - google.protobuf.Timestamp lock_time = 2; + google.protobuf.Timestamp lock_time = 2 + [(google.api.field_behavior) = OPTIONAL]; } - // Bucket restriction options currently enforced on the bucket. - UniformBucketLevelAccess uniform_bucket_level_access = 1; + // Optional. Bucket restriction options currently enforced on the bucket. + UniformBucketLevelAccess uniform_bucket_level_access = 1 + [(google.api.field_behavior) = OPTIONAL]; - // Whether IAM will enforce public access prevention. Valid values are - // "enforced" or "inherited". - string public_access_prevention = 3; + // Optional. Whether IAM will enforce public access prevention. Valid values + // are "enforced" or "inherited". + string public_access_prevention = 3 + [(google.api.field_behavior) = OPTIONAL]; } // Lifecycle properties of a bucket. @@ -1968,13 +2036,14 @@ message Bucket { message Rule { // An action to take on an object. message Action { - // Type of the action. Currently, only `Delete`, `SetStorageClass`, and - // `AbortIncompleteMultipartUpload` are supported. - string type = 1; - - // Target storage class. Required iff the type of the action is - // SetStorageClass. - string storage_class = 2; + // Optional. Type of the action. Currently, only `Delete`, + // `SetStorageClass`, and `AbortIncompleteMultipartUpload` are + // supported. + string type = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Target storage class. Required iff the type of the action + // is SetStorageClass. + string storage_class = 2 [(google.api.field_behavior) = OPTIONAL]; } // A condition of an object which triggers some action. @@ -1985,9 +2054,10 @@ message Bucket { // condition. optional int32 age_days = 1; - // This condition is satisfied when an object is created before midnight - // of the specified date in UTC. - google.type.Date created_before = 2; + // Optional. This condition is satisfied when an object is created + // before midnight of the specified date in UTC. + google.type.Date created_before = 2 + [(google.api.field_behavior) = OPTIONAL]; // Relevant only for versioned objects. If the value is // `true`, this condition matches live objects; if the value @@ -1999,20 +2069,22 @@ message Bucket { // the live version) newer than this version of the object. optional int32 num_newer_versions = 4; - // Objects having any of the storage classes specified by this condition - // will be matched. Values include `MULTI_REGIONAL`, `REGIONAL`, - // `NEARLINE`, `COLDLINE`, `STANDARD`, and + // Optional. Objects having any of the storage classes specified by this + // condition will be matched. Values include `MULTI_REGIONAL`, + // `REGIONAL`, `NEARLINE`, `COLDLINE`, `STANDARD`, and // `DURABLE_REDUCED_AVAILABILITY`. - repeated string matches_storage_class = 5; + repeated string matches_storage_class = 5 + [(google.api.field_behavior) = OPTIONAL]; // Number of days that have elapsed since the custom timestamp set on an // object. // The value of the field must be a nonnegative integer. optional int32 days_since_custom_time = 7; - // An object matches this condition if the custom timestamp set on the - // object is before the specified date in UTC. - google.type.Date custom_time_before = 8; + // Optional. An object matches this condition if the custom timestamp + // set on the object is before the specified date in UTC. + google.type.Date custom_time_before = 8 + [(google.api.field_behavior) = OPTIONAL]; // This condition is relevant only for versioned objects. An object // version satisfies this condition only if these many days have been @@ -2021,57 +2093,62 @@ message Bucket { // eligible for Lifecycle action as soon as it becomes noncurrent. optional int32 days_since_noncurrent_time = 9; - // This condition is relevant only for versioned objects. An object - // version satisfies this condition only if it became noncurrent before - // the specified date in UTC. - google.type.Date noncurrent_time_before = 10; - - // List of object name prefixes. If any prefix exactly matches the - // beginning of the object name, the condition evaluates to true. - repeated string matches_prefix = 11; - - // List of object name suffixes. If any suffix exactly matches the - // end of the object name, the condition evaluates to true. - repeated string matches_suffix = 12; + // Optional. This condition is relevant only for versioned objects. An + // object version satisfies this condition only if it became noncurrent + // before the specified date in UTC. + google.type.Date noncurrent_time_before = 10 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. List of object name prefixes. If any prefix exactly matches + // the beginning of the object name, the condition evaluates to true. + repeated string matches_prefix = 11 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. List of object name suffixes. If any suffix exactly matches + // the end of the object name, the condition evaluates to true. + repeated string matches_suffix = 12 + [(google.api.field_behavior) = OPTIONAL]; } - // The action to take. - Action action = 1; + // Optional. The action to take. + Action action = 1 [(google.api.field_behavior) = OPTIONAL]; - // The condition(s) under which the action will be taken. - Condition condition = 2; + // Optional. The condition(s) under which the action will be taken. + Condition condition = 2 [(google.api.field_behavior) = OPTIONAL]; } - // A lifecycle management rule, which is made of an action to take and the - // condition(s) under which the action will be taken. - repeated Rule rule = 1; + // Optional. A lifecycle management rule, which is made of an action to take + // and the condition(s) under which the action will be taken. + repeated Rule rule = 1 [(google.api.field_behavior) = OPTIONAL]; } // Logging-related properties of a bucket. message Logging { - // The destination bucket where the current bucket's logs should be placed, - // using path format (like `projects/123456/buckets/foo`). - string log_bucket = 1; + // Optional. The destination bucket where the current bucket's logs should + // be placed, using path format (like `projects/123456/buckets/foo`). + string log_bucket = 1 [(google.api.field_behavior) = OPTIONAL]; - // A prefix for log object names. - string log_object_prefix = 2; + // Optional. A prefix for log object names. + string log_object_prefix = 2 [(google.api.field_behavior) = OPTIONAL]; } // Retention policy properties of a bucket. message RetentionPolicy { - // Server-determined value that indicates the time from which policy was - // enforced and effective. - google.protobuf.Timestamp effective_time = 1; - - // Once locked, an object retention policy cannot be modified. - bool is_locked = 2; - - // The duration that objects need to be retained. Retention duration must be - // greater than zero and less than 100 years. Note that enforcement of - // retention periods less than a day is not guaranteed. Such periods should - // only be used for testing purposes. Any `nanos` value specified will be - // rounded down to the nearest second. - google.protobuf.Duration retention_duration = 4; + // Optional. Server-determined value that indicates the time from which + // policy was enforced and effective. + google.protobuf.Timestamp effective_time = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Once locked, an object retention policy cannot be modified. + bool is_locked = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The duration that objects need to be retained. Retention + // duration must be greater than zero and less than 100 years. Note that + // enforcement of retention periods less than a day is not guaranteed. Such + // periods should only be used for testing purposes. Any `nanos` value + // specified will be rounded down to the nearest second. + google.protobuf.Duration retention_duration = 4 + [(google.api.field_behavior) = OPTIONAL]; } // Soft delete policy properties of a bucket. @@ -2089,40 +2166,40 @@ message Bucket { // For more on Cloud Storage versioning, see // https://cloud.google.com/storage/docs/object-versioning. message Versioning { - // While set to true, versioning is fully enabled for this bucket. - bool enabled = 1; + // Optional. While set to true, versioning is fully enabled for this bucket. + bool enabled = 1 [(google.api.field_behavior) = OPTIONAL]; } // Properties of a bucket related to accessing the contents as a static // website. For more on hosting a static website via Cloud Storage, see // https://cloud.google.com/storage/docs/hosting-static-website. message Website { - // If the requested object path is missing, the service will ensure the path - // has a trailing '/', append this suffix, and attempt to retrieve the - // resulting object. This allows the creation of `index.html` + // Optional. If the requested object path is missing, the service will + // ensure the path has a trailing '/', append this suffix, and attempt to + // retrieve the resulting object. This allows the creation of `index.html` // objects to represent directory pages. - string main_page_suffix = 1; + string main_page_suffix = 1 [(google.api.field_behavior) = OPTIONAL]; - // If the requested object path is missing, and any + // Optional. If the requested object path is missing, and any // `mainPageSuffix` object is missing, if applicable, the service // will return the named object from this bucket as the content for a // [https://tools.ietf.org/html/rfc7231#section-6.5.4][404 Not Found] // result. - string not_found_page = 2; + string not_found_page = 2 [(google.api.field_behavior) = OPTIONAL]; } // Configuration for Custom Dual Regions. It should specify precisely two // eligible regions within the same Multiregion. More information on regions // may be found [https://cloud.google.com/storage/docs/locations][here]. message CustomPlacementConfig { - // List of locations to use for data placement. - repeated string data_locations = 1; + // Optional. List of locations to use for data placement. + repeated string data_locations = 1 [(google.api.field_behavior) = OPTIONAL]; } // Configuration for a bucket's Autoclass feature. message Autoclass { - // Enables Autoclass. - bool enabled = 1; + // Optional. Enables Autoclass. + bool enabled = 1 [(google.api.field_behavior) = OPTIONAL]; // Output only. Latest instant at which the `enabled` field was set to true // after being disabled/unconfigured or set to false after being enabled. If @@ -2142,15 +2219,69 @@ message Bucket { [(google.api.field_behavior) = OUTPUT_ONLY]; } + // The [bucket IP + // filtering](https://cloud.google.com/storage/docs/ip-filtering-overview) + // configuration. Specifies the network sources that can access the bucket, as + // well as its underlying objects. + message IpFilter { + // The public network IP address ranges that can access the bucket and its + // data. + message PublicNetworkSource { + // Optional. The list of IPv4 and IPv6 cidr blocks that are allowed to + // operate or access the bucket and its underlying objects. + repeated string allowed_ip_cidr_ranges = 1 + [(google.api.field_behavior) = OPTIONAL]; + } + + // The list of VPC networks that can access the bucket. + message VpcNetworkSource { + // Name of the network. + // + // Format: `projects/PROJECT_ID/global/networks/NETWORK_NAME` + optional string network = 1; + + // Optional. The list of public or private IPv4 and IPv6 CIDR ranges that + // can access the bucket. In the CIDR IP address block, the specified IP + // address must be properly truncated, meaning all the host bits must be + // zero or else the input is considered malformed. For example, + // `192.0.2.0/24` is accepted but `192.0.2.1/24` is not. Similarly, for + // IPv6, `2001:db8::/32` is accepted whereas `2001:db8::1/32` is not. + repeated string allowed_ip_cidr_ranges = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + + // The state of the IP filter configuration. Valid values are `Enabled` and + // `Disabled`. When set to `Enabled`, IP filtering rules are applied to a + // bucket and all incoming requests to the bucket are evaluated against + // these rules. When set to `Disabled`, IP filtering rules are not applied + // to a bucket.". + optional string mode = 1; + + // Public IPs allowed to operate or access the bucket. + optional PublicNetworkSource public_network_source = 2; + + // Optional. The list of network sources that are allowed to access + // operations on the bucket or the underlying objects. + repeated VpcNetworkSource vpc_network_sources = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether or not to allow VPCs from orgs different than the + // bucket's parent org to access the bucket. When set to true, validations + // on the existence of the VPCs won't be performed. If set to false, each + // VPC network source will be checked to belong to the same org as the + // bucket as well as validated for existence. + bool allow_cross_org_vpcs = 4 [(google.api.field_behavior) = OPTIONAL]; + } + // Configuration for a bucket's hierarchical namespace feature. message HierarchicalNamespace { // Optional. Enables the hierarchical namespace feature. bool enabled = 1 [(google.api.field_behavior) = OPTIONAL]; } - // Immutable. The name of the bucket. + // Identifier. The name of the bucket. // Format: `projects/{project}/buckets/{bucket}` - string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Output only. The user-chosen part of the bucket name. The `{bucket}` // portion of the `name` field. For globally unique buckets, this is equal to @@ -2165,6 +2296,7 @@ message Bucket { // Immutable. The project which owns this bucket, in the format of // "projects/{projectIdentifier}". // {projectIdentifier} can be the project ID or project number. + // Output values will always be in project number format. string project = 3 [ (google.api.field_behavior) = IMMUTABLE, (google.api.resource_reference) = { @@ -2187,115 +2319,120 @@ message Bucket { // multi-region, etc). string location_type = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The bucket's default storage class, used whenever no storageClass is - // specified for a newly-created object. This defines how objects in the + // Optional. The bucket's default storage class, used whenever no storageClass + // is specified for a newly-created object. This defines how objects in the // bucket are stored and determines the SLA and the cost of storage. // If this value is not specified when the bucket is created, it will default // to `STANDARD`. For more information, see // https://developers.google.com/storage/docs/storage-classes. - string storage_class = 7; + string storage_class = 7 [(google.api.field_behavior) = OPTIONAL]; - // The recovery point objective for cross-region replication of the bucket. - // Applicable only for dual- and multi-region buckets. "DEFAULT" uses default - // replication. "ASYNC_TURBO" enables turbo replication, valid for dual-region - // buckets only. If rpo is not specified when the bucket is created, it - // defaults to "DEFAULT". For more information, see + // Optional. The recovery point objective for cross-region replication of the + // bucket. Applicable only for dual- and multi-region buckets. "DEFAULT" uses + // default replication. "ASYNC_TURBO" enables turbo replication, valid for + // dual-region buckets only. If rpo is not specified when the bucket is + // created, it defaults to "DEFAULT". For more information, see // https://cloud.google.com/storage/docs/availability-durability#turbo-replication. - string rpo = 27; + string rpo = 27 [(google.api.field_behavior) = OPTIONAL]; - // Access controls on the bucket. + // Optional. Access controls on the bucket. // If iam_config.uniform_bucket_level_access is enabled on this bucket, // requests to set, read, or modify acl is an error. - repeated BucketAccessControl acl = 8; + repeated BucketAccessControl acl = 8 [(google.api.field_behavior) = OPTIONAL]; - // Default access controls to apply to new objects when no ACL is provided. - // If iam_config.uniform_bucket_level_access is enabled on this bucket, - // requests to set, read, or modify acl is an error. - repeated ObjectAccessControl default_object_acl = 9; + // Optional. Default access controls to apply to new objects when no ACL is + // provided. If iam_config.uniform_bucket_level_access is enabled on this + // bucket, requests to set, read, or modify acl is an error. + repeated ObjectAccessControl default_object_acl = 9 + [(google.api.field_behavior) = OPTIONAL]; - // The bucket's lifecycle config. See + // Optional. The bucket's lifecycle config. See // [https://developers.google.com/storage/docs/lifecycle]Lifecycle Management] // for more information. - Lifecycle lifecycle = 10; + Lifecycle lifecycle = 10 [(google.api.field_behavior) = OPTIONAL]; // Output only. The creation time of the bucket. google.protobuf.Timestamp create_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource Sharing] - // (CORS) config. - repeated Cors cors = 12; + // Optional. The bucket's [https://www.w3.org/TR/cors/][Cross-Origin Resource + // Sharing] (CORS) config. + repeated Cors cors = 12 [(google.api.field_behavior) = OPTIONAL]; // Output only. The modification time of the bucket. google.protobuf.Timestamp update_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The default value for event-based hold on newly created objects in this - // bucket. Event-based hold is a way to retain objects indefinitely until an - // event occurs, signified by the - // hold's release. After being released, such objects will be subject to - // bucket-level retention (if any). One sample use case of this flag is for - // banks to hold loan documents for at least 3 years after loan is paid in - // full. Here, bucket-level retention is 3 years and the event is loan being - // paid in full. In this example, these objects will be held intact for any - // number of years until the event has occurred (event-based hold on the - // object is released) and then 3 more years after that. That means retention - // duration of the objects begins from the moment event-based hold - // transitioned from true to false. Objects under event-based hold cannot be - // deleted, overwritten or archived until the hold is removed. - bool default_event_based_hold = 14; - - // User-provided labels, in key/value pairs. - map labels = 15; - - // The bucket's website config, controlling how the service behaves + // Optional. The default value for event-based hold on newly created objects + // in this bucket. Event-based hold is a way to retain objects indefinitely + // until an event occurs, signified by the hold's release. After being + // released, such objects will be subject to bucket-level retention (if any). + // One sample use case of this flag is for banks to hold loan documents for at + // least 3 years after loan is paid in full. Here, bucket-level retention is 3 + // years and the event is loan being paid in full. In this example, these + // objects will be held intact for any number of years until the event has + // occurred (event-based hold on the object is released) and then 3 more years + // after that. That means retention duration of the objects begins from the + // moment event-based hold transitioned from true to false. Objects under + // event-based hold cannot be deleted, overwritten or archived until the hold + // is removed. + bool default_event_based_hold = 14 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User-provided labels, in key/value pairs. + map labels = 15 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The bucket's website config, controlling how the service behaves // when accessing bucket contents as a web site. See the // [https://cloud.google.com/storage/docs/static-website][Static Website // Examples] for more information. - Website website = 16; + Website website = 16 [(google.api.field_behavior) = OPTIONAL]; - // The bucket's versioning config. - Versioning versioning = 17; + // Optional. The bucket's versioning config. + Versioning versioning = 17 [(google.api.field_behavior) = OPTIONAL]; - // The bucket's logging config, which defines the destination bucket + // Optional. The bucket's logging config, which defines the destination bucket // and name prefix (if any) for the current bucket's logs. - Logging logging = 18; + Logging logging = 18 [(google.api.field_behavior) = OPTIONAL]; // Output only. The owner of the bucket. This is always the project team's // owner group. Owner owner = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Encryption config for a bucket. - Encryption encryption = 20; + // Optional. Encryption config for a bucket. + Encryption encryption = 20 [(google.api.field_behavior) = OPTIONAL]; - // The bucket's billing config. - Billing billing = 21; + // Optional. The bucket's billing config. + Billing billing = 21 [(google.api.field_behavior) = OPTIONAL]; - // The bucket's retention policy. The retention policy enforces a minimum - // retention time for all objects contained in the bucket, based on their - // creation time. Any attempt to overwrite or delete objects younger than the - // retention period will result in a PERMISSION_DENIED error. An unlocked - // retention policy can be modified or removed from the bucket via a + // Optional. The bucket's retention policy. The retention policy enforces a + // minimum retention time for all objects contained in the bucket, based on + // their creation time. Any attempt to overwrite or delete objects younger + // than the retention period will result in a PERMISSION_DENIED error. An + // unlocked retention policy can be modified or removed from the bucket via a // storage.buckets.update operation. A locked retention policy cannot be // removed or shortened in duration for the lifetime of the bucket. // Attempting to remove or decrease period of a locked retention policy will // result in a PERMISSION_DENIED error. - RetentionPolicy retention_policy = 22; + RetentionPolicy retention_policy = 22 + [(google.api.field_behavior) = OPTIONAL]; - // The bucket's IAM config. - IamConfig iam_config = 23; + // Optional. The bucket's IAM config. + IamConfig iam_config = 23 [(google.api.field_behavior) = OPTIONAL]; - // Reserved for future use. - bool satisfies_pzs = 25; + // Optional. Reserved for future use. + bool satisfies_pzs = 25 [(google.api.field_behavior) = OPTIONAL]; - // Configuration that, if present, specifies the data placement for a + // Optional. Configuration that, if present, specifies the data placement for + // a // [https://cloud.google.com/storage/docs/locations#location-dr][configurable // dual-region]. - CustomPlacementConfig custom_placement_config = 26; + CustomPlacementConfig custom_placement_config = 26 + [(google.api.field_behavior) = OPTIONAL]; - // The bucket's Autoclass configuration. If there is no configuration, the - // Autoclass feature will be disabled and have no effect on the bucket. - Autoclass autoclass = 28; + // Optional. The bucket's Autoclass configuration. If there is no + // configuration, the Autoclass feature will be disabled and have no effect on + // the bucket. + Autoclass autoclass = 28 [(google.api.field_behavior) = OPTIONAL]; // Optional. The bucket's hierarchical namespace configuration. If there is no // configuration, the hierarchical namespace feature will be disabled and have @@ -2307,17 +2444,20 @@ message Bucket { // soft-deleted objects from being permanently deleted. SoftDeletePolicy soft_delete_policy = 31 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The bucket's IP filter configuration. + optional IpFilter ip_filter = 38 [(google.api.field_behavior) = OPTIONAL]; } // An access-control entry. message BucketAccessControl { - // The access permission for the entity. - string role = 1; + // Optional. The access permission for the entity. + string role = 1 [(google.api.field_behavior) = OPTIONAL]; - // The ID of the access-control entry. - string id = 2; + // Optional. The ID of the access-control entry. + string id = 2 [(google.api.field_behavior) = OPTIONAL]; - // The entity holding the permission, in one of the following forms: + // Optional. The entity holding the permission, in one of the following forms: // * `user-{userid}` // * `user-{email}` // * `group-{groupid}` @@ -2335,29 +2475,29 @@ message BucketAccessControl { // `domain-example.com` // For project entities, `project-{team}-{projectnumber}` format will be // returned on response. - string entity = 3; + string entity = 3 [(google.api.field_behavior) = OPTIONAL]; // Output only. The alternative entity format, if exists. For project // entities, `project-{team}-{projectid}` format will be returned on response. string entity_alt = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The ID for the entity, if any. - string entity_id = 4; + // Optional. The ID for the entity, if any. + string entity_id = 4 [(google.api.field_behavior) = OPTIONAL]; - // The etag of the BucketAccessControl. + // Optional. The etag of the BucketAccessControl. // If included in the metadata of an update or delete request message, the // operation operation will only be performed if the etag matches that of the // bucket's BucketAccessControl. - string etag = 8; + string etag = 8 [(google.api.field_behavior) = OPTIONAL]; - // The email address associated with the entity, if any. - string email = 5; + // Optional. The email address associated with the entity, if any. + string email = 5 [(google.api.field_behavior) = OPTIONAL]; - // The domain associated with the entity, if any. - string domain = 6; + // Optional. The domain associated with the entity, if any. + string domain = 6 [(google.api.field_behavior) = OPTIONAL]; - // The project team associated with the entity, if any. - ProjectTeam project_team = 7; + // Optional. The project team associated with the entity, if any. + ProjectTeam project_team = 7 [(google.api.field_behavior) = OPTIONAL]; } // Message used to convey content being read or written, along with an optional @@ -2378,29 +2518,57 @@ message ObjectChecksums { // object matches this checksum. optional fixed32 crc32c = 1; - // 128 bit MD5 hash of the object data. + // Optional. 128 bit MD5 hash of the object data. // For more information about using the MD5 hash, see // [https://cloud.google.com/storage/docs/hashes-etags#json-api][Hashes and // ETags: Best Practices]. // Not all objects will provide an MD5 hash. For example, composite objects // provide only crc32c hashes. This value is equivalent to running `cat // object.txt | openssl md5 -binary` - bytes md5_hash = 2; + bytes md5_hash = 2 [(google.api.field_behavior) = OPTIONAL]; } // Describes the Customer-Supplied Encryption Key mechanism used to store an // Object's data at rest. message CustomerEncryption { - // The encryption algorithm. - string encryption_algorithm = 1; + // Optional. The encryption algorithm. + string encryption_algorithm = 1 [(google.api.field_behavior) = OPTIONAL]; - // SHA256 hash value of the encryption key. + // Optional. SHA256 hash value of the encryption key. // In raw bytes format (not base64-encoded). - bytes key_sha256_bytes = 3; + bytes key_sha256_bytes = 3 [(google.api.field_behavior) = OPTIONAL]; } // An object. message Object { + // Specifies retention parameters of the object. Objects under retention + // cannot be deleted or overwritten until their retention expires. + message Retention { + // Retention mode values. + enum Mode { + // No specified mode. Object is not under retention. + MODE_UNSPECIFIED = 0; + + // Retention period may be decreased or increased. + // The Retention configuration may be removed. + // The mode may be changed to locked. + UNLOCKED = 1; + + // Retention period may be increased. + // The Retention configuration cannot be removed. + // The mode cannot be changed. + LOCKED = 2; + } + + // Optional. The mode of the Retention. + Mode mode = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The timestamp that the object needs to be retained until. + // Value cannot be set in the past or more than 100 years in the future. + google.protobuf.Timestamp retain_until_time = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + // Immutable. The name of this object. Nearly any sequence of unicode // characters is valid. See // [Guidelines](https://cloud.google.com/storage/docs/objects#naming). @@ -2416,11 +2584,11 @@ message Object { (google.api.resource_reference) = { type: "storage.googleapis.com/Bucket" } ]; - // The etag of the object. + // Optional. The etag of the object. // If included in the metadata of an update or delete request message, the // operation will only be performed if the etag matches that of the live // object. - string etag = 27; + string etag = 27 [(google.api.field_behavior) = OPTIONAL]; // Immutable. The content generation of this object. Used for object // versioning. @@ -2438,35 +2606,36 @@ message Object { // generation of a particular object. int64 metageneration = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Storage class of the object. - string storage_class = 5; + // Optional. Storage class of the object. + string storage_class = 5 [(google.api.field_behavior) = OPTIONAL]; // Output only. Content-Length of the object data in bytes, matching // [https://tools.ietf.org/html/rfc7230#section-3.3.2][RFC 7230 §3.3.2]. int64 size = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Content-Encoding of the object data, matching + // Optional. Content-Encoding of the object data, matching // [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2] - string content_encoding = 7; + string content_encoding = 7 [(google.api.field_behavior) = OPTIONAL]; - // Content-Disposition of the object data, matching + // Optional. Content-Disposition of the object data, matching // [https://tools.ietf.org/html/rfc6266][RFC 6266]. - string content_disposition = 8; + string content_disposition = 8 [(google.api.field_behavior) = OPTIONAL]; - // Cache-Control directive for the object data, matching + // Optional. Cache-Control directive for the object data, matching // [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2]. // If omitted, and the object is accessible to all anonymous users, the // default will be `public, max-age=3600`. - string cache_control = 9; + string cache_control = 9 [(google.api.field_behavior) = OPTIONAL]; - // Access controls on the object. + // Optional. Access controls on the object. // If iam_config.uniform_bucket_level_access is enabled on the parent // bucket, requests to set, read, or modify acl is an error. - repeated ObjectAccessControl acl = 10; + repeated ObjectAccessControl acl = 10 + [(google.api.field_behavior) = OPTIONAL]; - // Content-Language of the object data, matching + // Optional. Content-Language of the object data, matching // [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2]. - string content_language = 11; + string content_language = 11 [(google.api.field_behavior) = OPTIONAL]; // Output only. If this object is noncurrent, this is the time when the object // became noncurrent. @@ -2477,11 +2646,11 @@ message Object { google.protobuf.Timestamp finalize_time = 36 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Content-Type of the object data, matching + // Optional. Content-Type of the object data, matching // [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5]. // If an object is stored without a Content-Type, it is served as // `application/octet-stream`. - string content_type = 13; + string content_type = 13 [(google.api.field_behavior) = OPTIONAL]; // Output only. The creation time of the object. google.protobuf.Timestamp create_time = 14 @@ -2507,35 +2676,39 @@ message Object { google.protobuf.Timestamp update_time = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Cloud KMS Key used to encrypt this object, if the object is encrypted by - // such a key. - string kms_key = 18 [(google.api.resource_reference) = { - type: "cloudkms.googleapis.com/CryptoKey" - }]; + // Optional. Cloud KMS Key used to encrypt this object, if the object is + // encrypted by such a key. + string kms_key = 18 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKey" + } + ]; // Output only. The time at which the object's storage class was last changed. // When the object is initially created, it will be set to time_created. google.protobuf.Timestamp update_storage_class_time = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Whether an object is under temporary hold. While this flag is set to true, - // the object is protected against deletion and overwrites. A common use case - // of this flag is regulatory investigations where objects need to be retained - // while the investigation is ongoing. Note that unlike event-based hold, - // temporary hold does not impact retention expiration time of an object. - bool temporary_hold = 20; - - // A server-determined value that specifies the earliest time that the - // object's retention period expires. - // Note 1: This field is not provided for objects with an active event-based - // hold, since retention expiration is unknown until the hold is removed. - // Note 2: This value can be provided even when temporary hold is set (so that - // the user can reason about policy without having to first unset the - // temporary hold). - google.protobuf.Timestamp retention_expire_time = 21; - - // User-provided metadata, in key/value pairs. - map metadata = 22; + // Optional. Whether an object is under temporary hold. While this flag is set + // to true, the object is protected against deletion and overwrites. A common + // use case of this flag is regulatory investigations where objects need to be + // retained while the investigation is ongoing. Note that unlike event-based + // hold, temporary hold does not impact retention expiration time of an + // object. + bool temporary_hold = 20 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A server-determined value that specifies the earliest time that + // the object's retention period expires. Note 1: This field is not provided + // for objects with an active event-based hold, since retention expiration is + // unknown until the hold is removed. Note 2: This value can be provided even + // when temporary hold is set (so that the user can reason about policy + // without having to first unset the temporary hold). + google.protobuf.Timestamp retention_expire_time = 21 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User-provided metadata, in key/value pairs. + map metadata = 22 [(google.api.field_behavior) = OPTIONAL]; // Whether an object is under event-based hold. // An event-based hold is a way to force the retention of an object until @@ -2554,12 +2727,14 @@ message Object { // the object. Owner owner = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Metadata of Customer-Supplied Encryption Key, if the object is encrypted by - // such a key. - CustomerEncryption customer_encryption = 25; + // Optional. Metadata of Customer-Supplied Encryption Key, if the object is + // encrypted by such a key. + CustomerEncryption customer_encryption = 25 + [(google.api.field_behavior) = OPTIONAL]; - // A user-specified timestamp set on an object. - google.protobuf.Timestamp custom_time = 26; + // Optional. A user-specified timestamp set on an object. + google.protobuf.Timestamp custom_time = 26 + [(google.api.field_behavior) = OPTIONAL]; // Output only. This is the time when the object became soft-deleted. // @@ -2574,20 +2749,25 @@ message Object { // Otherwise, the object will not be accessible. optional google.protobuf.Timestamp hard_delete_time = 29 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Retention configuration of this object. + // May only be configured if the bucket has object retention enabled. + Retention retention = 30 [(google.api.field_behavior) = OPTIONAL]; } // An access-control entry. message ObjectAccessControl { - // The access permission for the entity. One of the following values: + // Optional. The access permission for the entity. One of the following + // values: // * `READER` // * `WRITER` // * `OWNER` - string role = 1; + string role = 1 [(google.api.field_behavior) = OPTIONAL]; - // The ID of the access-control entry. - string id = 2; + // Optional. The ID of the access-control entry. + string id = 2 [(google.api.field_behavior) = OPTIONAL]; - // The entity holding the permission, in one of the following forms: + // Optional. The entity holding the permission, in one of the following forms: // * `user-{userid}` // * `user-{email}` // * `group-{groupid}` @@ -2605,29 +2785,29 @@ message ObjectAccessControl { // `domain-example.com`. // For project entities, `project-{team}-{projectnumber}` format will be // returned on response. - string entity = 3; + string entity = 3 [(google.api.field_behavior) = OPTIONAL]; // Output only. The alternative entity format, if exists. For project // entities, `project-{team}-{projectid}` format will be returned on response. string entity_alt = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The ID for the entity, if any. - string entity_id = 4; + // Optional. The ID for the entity, if any. + string entity_id = 4 [(google.api.field_behavior) = OPTIONAL]; - // The etag of the ObjectAccessControl. + // Optional. The etag of the ObjectAccessControl. // If included in the metadata of an update or delete request message, the // operation will only be performed if the etag matches that of the live // object's ObjectAccessControl. - string etag = 8; + string etag = 8 [(google.api.field_behavior) = OPTIONAL]; - // The email address associated with the entity, if any. - string email = 5; + // Optional. The email address associated with the entity, if any. + string email = 5 [(google.api.field_behavior) = OPTIONAL]; - // The domain associated with the entity, if any. - string domain = 6; + // Optional. The domain associated with the entity, if any. + string domain = 6 [(google.api.field_behavior) = OPTIONAL]; - // The project team associated with the entity, if any. - ProjectTeam project_team = 7; + // Optional. The project team associated with the entity, if any. + ProjectTeam project_team = 7 [(google.api.field_behavior) = OPTIONAL]; } // The result of a call to Objects.ListObjects @@ -2646,20 +2826,20 @@ message ListObjectsResponse { // Represents the Viewers, Editors, or Owners of a given project. message ProjectTeam { - // The project number. - string project_number = 1; + // Optional. The project number. + string project_number = 1 [(google.api.field_behavior) = OPTIONAL]; - // The team. - string team = 2; + // Optional. The team. + string team = 2 [(google.api.field_behavior) = OPTIONAL]; } // The owner of a specific resource. message Owner { - // The entity, in the form `user-`*userId*. - string entity = 1; + // Optional. The entity, in the form `user-`*userId*. + string entity = 1 [(google.api.field_behavior) = OPTIONAL]; - // The ID for the entity. - string entity_id = 2; + // Optional. The ID for the entity. + string entity_id = 2 [(google.api.field_behavior) = OPTIONAL]; } // Specifies a requested range of bytes to download. From 5290ab1602d92c522e57183019e76de77fdfa1f3 Mon Sep 17 00:00:00 2001 From: BenWhitehead Date: Thu, 22 May 2025 16:11:48 -0400 Subject: [PATCH 08/22] test: update error message classifier for rapid bucket creation failure again (#3115) * test: update error message classifier for rapid bucket creation failure again * chore: case-insensitive --- .../cloud/storage/it/runner/registry/BucketInfoShim.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/google-cloud-storage/src/test/java/com/google/cloud/storage/it/runner/registry/BucketInfoShim.java b/google-cloud-storage/src/test/java/com/google/cloud/storage/it/runner/registry/BucketInfoShim.java index 96fbd57ed9..0c98189503 100644 --- a/google-cloud-storage/src/test/java/com/google/cloud/storage/it/runner/registry/BucketInfoShim.java +++ b/google-cloud-storage/src/test/java/com/google/cloud/storage/it/runner/registry/BucketInfoShim.java @@ -23,6 +23,7 @@ import com.google.cloud.storage.StorageException; import com.google.cloud.storage.it.BucketCleaner; import com.google.storage.control.v2.StorageControlClient; +import java.util.Locale; /** Shim to lift a BucketInfo to be a managed bucket instance */ final class BucketInfoShim implements ManagedLifecycle { @@ -53,9 +54,10 @@ public void start() { try { createdBucket = s.create(bucketInfo).asBucketInfo(); } catch (StorageException se) { - String msg = se.getMessage(); + String msg = se.getMessage().toLowerCase(Locale.US); if (se.getCode() == 400 && (msg.contains("not a valid zone in location")) - || msg.contains("custom placement config")) { + || msg.contains("custom placement config") + || msg.contains("zonal")) { assumeTrue( "Skipping test due to bucket setup unavailable in current zone. (" + msg + ")", false); } From 2bda9a0aff2c8747d27b2b2f0f4ce7b011088b03 Mon Sep 17 00:00:00 2001 From: BenWhitehead Date: Thu, 22 May 2025 17:05:08 -0400 Subject: [PATCH 09/22] test: switch all test logging to slf4j instead of j.u.l (#3108) OpenTelemetry brought with it slf4j and we already have logback configured for tests. Update our tests to use slf4j directly instead of java.util.logging. --- ...BidiUnbufferedWritableByteChannelTest.java | 7 +++-- ...apicUnbufferedWritableByteChannelTest.java | 11 +++---- .../retry/ITRetryConformanceTest.java | 19 ++++++------ .../conformance/retry/RetryTestFixture.java | 23 ++++++++++----- .../conformance/retry/RpcMethodMappings.java | 9 +++--- .../cloud/storage/it/BucketCleaner.java | 28 +++++++++--------- .../GrpcPlainRequestLoggingInterceptor.java | 16 +++++----- .../storage/it/ITBlobWriteChannelTest.java | 2 -- .../cloud/storage/it/ITNotificationTest.java | 8 ++--- .../it/runner/StorageITLeafRunner.java | 4 +-- .../storage/it/runner/registry/TestBench.java | 29 +++++++++---------- 11 files changed, 80 insertions(+), 76 deletions(-) diff --git a/google-cloud-storage/src/test/java/com/google/cloud/storage/ITGapicBidiUnbufferedWritableByteChannelTest.java b/google-cloud-storage/src/test/java/com/google/cloud/storage/ITGapicBidiUnbufferedWritableByteChannelTest.java index b8de62b0d0..475ba6b35c 100644 --- a/google-cloud-storage/src/test/java/com/google/cloud/storage/ITGapicBidiUnbufferedWritableByteChannelTest.java +++ b/google-cloud-storage/src/test/java/com/google/cloud/storage/ITGapicBidiUnbufferedWritableByteChannelTest.java @@ -48,11 +48,12 @@ import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.function.BiConsumer; -import java.util.logging.Logger; import java.util.stream.Collector; import java.util.stream.Collectors; import org.checkerframework.checker.nullness.qual.NonNull; import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public final class ITGapicBidiUnbufferedWritableByteChannelTest { @@ -830,7 +831,7 @@ public void incremental_partialSuccess() throws Exception { } static class BidiWriteService extends StorageImplBase { - private static final Logger LOGGER = Logger.getLogger(BidiWriteService.class.getName()); + private static final Logger LOGGER = LoggerFactory.getLogger(BidiWriteService.class); private final BiConsumer, List> c; @@ -878,7 +879,7 @@ private static void logUnexpectedRequest( .map(l -> l.stream().map(StorageV2ProtoUtils::fmtProto).collect(oneLine)) .collect(joining), build.stream().map(StorageV2ProtoUtils::fmtProto).collect(oneLine)); - LOGGER.warning(msg); + LOGGER.warn(msg); } @Override diff --git a/google-cloud-storage/src/test/java/com/google/cloud/storage/ITGapicUnbufferedWritableByteChannelTest.java b/google-cloud-storage/src/test/java/com/google/cloud/storage/ITGapicUnbufferedWritableByteChannelTest.java index 2b1e09ba6c..a31fc0c337 100644 --- a/google-cloud-storage/src/test/java/com/google/cloud/storage/ITGapicUnbufferedWritableByteChannelTest.java +++ b/google-cloud-storage/src/test/java/com/google/cloud/storage/ITGapicUnbufferedWritableByteChannelTest.java @@ -51,14 +51,15 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.BiConsumer; -import java.util.logging.Logger; import java.util.stream.Collector; import java.util.stream.Collectors; import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public final class ITGapicUnbufferedWritableByteChannelTest { private static final Logger LOGGER = - Logger.getLogger(ITGapicUnbufferedWritableByteChannelTest.class.getName()); + LoggerFactory.getLogger(ITGapicUnbufferedWritableByteChannelTest.class); private static final Hasher HASHER = Hasher.enabled(); private static final ChunkSegmenter segmenter = @@ -202,7 +203,7 @@ public void resumableUpload() throws IOException, InterruptedException, Executio c.close(); } catch (PermissionDeniedException ignore) { for (String debugMessage : debugMessages) { - LOGGER.warning(debugMessage); + LOGGER.warn(debugMessage); } } assertThat(result.get()).isEqualTo(resp5); @@ -331,7 +332,7 @@ public void resumableUpload_finalizeWhenWriteAndCloseCalledEvenWhenQuantumAligne } static class DirectWriteService extends StorageImplBase { - private static final Logger LOGGER = Logger.getLogger(DirectWriteService.class.getName()); + private static final Logger LOGGER = LoggerFactory.getLogger(DirectWriteService.class); private final BiConsumer, List> c; private ImmutableList.Builder requests; @@ -368,7 +369,7 @@ private static void logUnexpectedRequest( .map(l -> l.stream().map(StorageV2ProtoUtils::fmtProto).collect(oneLine)) .collect(joining), build.stream().map(StorageV2ProtoUtils::fmtProto).collect(oneLine)); - LOGGER.warning(msg); + LOGGER.warn(msg); } @Override diff --git a/google-cloud-storage/src/test/java/com/google/cloud/storage/conformance/retry/ITRetryConformanceTest.java b/google-cloud-storage/src/test/java/com/google/cloud/storage/conformance/retry/ITRetryConformanceTest.java index 1729c6ffeb..1cfd80cd69 100644 --- a/google-cloud-storage/src/test/java/com/google/cloud/storage/conformance/retry/ITRetryConformanceTest.java +++ b/google-cloud-storage/src/test/java/com/google/cloud/storage/conformance/retry/ITRetryConformanceTest.java @@ -63,7 +63,6 @@ import java.util.Set; import java.util.function.BiPredicate; import java.util.function.Predicate; -import java.util.logging.Logger; import java.util.stream.Collectors; import org.checkerframework.checker.nullness.qual.Nullable; import org.junit.After; @@ -71,6 +70,8 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Load and dynamically generate a series of test cases to verify if the {@link Storage} and @@ -86,7 +87,7 @@ @Parameterized(RetryConformanceParameterProvider.class) @ParallelFriendly public class ITRetryConformanceTest { - private static final Logger LOGGER = Logger.getLogger(ITRetryConformanceTest.class.getName()); + private static final Logger LOGGER = LoggerFactory.getLogger(ITRetryConformanceTest.class); private RetryTestFixture retryTestFixture; @@ -100,7 +101,7 @@ public class ITRetryConformanceTest { @Before public void setUp() throws Throwable { - LOGGER.fine("Running setup..."); + LOGGER.trace("Running setup..."); retryTestFixture = retryParameter.retryTestFixture; testRetryConformance = retryParameter.testRetryConformance; mapping = retryParameter.rpcMethodMapping; @@ -111,12 +112,12 @@ public void setUp() throws Throwable { // the case setup fails for some reason ctx = ctx(nonTestStorage, empty()); ctx = mapping.getSetup().apply(ctx, testRetryConformance).leftMap(s -> testStorage); - LOGGER.fine("Running setup complete"); + LOGGER.trace("Running setup complete"); } @After public void tearDown() throws Throwable { - LOGGER.fine("Running teardown..."); + LOGGER.trace("Running teardown..."); if (ctx != null) { ctx = ctx.leftMap(s -> nonTestStorage); getReplaceStorageInObjectsFromCtx() @@ -124,7 +125,7 @@ public void tearDown() throws Throwable { .apply(ctx, testRetryConformance); } retryTestFixture.finished(null); - LOGGER.fine("Running teardown complete"); + LOGGER.trace("Running teardown complete"); } /** @@ -133,7 +134,7 @@ public void tearDown() throws Throwable { */ @Test public void test() throws Throwable { - LOGGER.fine("Running test..."); + LOGGER.trace("Running test..."); assertThat(ctx).isNotNull(); try { ctx = @@ -146,7 +147,7 @@ public void test() throws Throwable { retryTestFixture.failed(e, null); throw e; } - LOGGER.fine("Running test complete"); + LOGGER.trace("Running test complete"); } /** @@ -374,7 +375,7 @@ private void validateGeneratedTestCases( .collect(Collectors.toSet())); if (!unusedMappings.isEmpty()) { - LOGGER.warning( + LOGGER.warn( String.format( Locale.US, "Declared but unused mappings with ids: [%s]", diff --git a/google-cloud-storage/src/test/java/com/google/cloud/storage/conformance/retry/RetryTestFixture.java b/google-cloud-storage/src/test/java/com/google/cloud/storage/conformance/retry/RetryTestFixture.java index 028336c50c..c5a61c79f8 100644 --- a/google-cloud-storage/src/test/java/com/google/cloud/storage/conformance/retry/RetryTestFixture.java +++ b/google-cloud-storage/src/test/java/com/google/cloud/storage/conformance/retry/RetryTestFixture.java @@ -29,11 +29,12 @@ import com.google.common.collect.ImmutableMap; import java.io.IOException; import java.util.Locale; -import java.util.logging.Logger; import org.junit.AssumptionViolatedException; import org.junit.rules.TestRule; import org.junit.rules.TestWatcher; import org.junit.runner.Description; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A JUnit 4 {@link TestRule} which integrates with {@link TestBench} and {@link @@ -44,7 +45,7 @@ *

      Provides pre-configured instances of {@link Storage} for setup/teardown & test. */ final class RetryTestFixture extends TestWatcher { - private static final Logger LOGGER = Logger.getLogger(RetryTestFixture.class.getName()); + private static final Logger LOGGER = LoggerFactory.getLogger(RetryTestFixture.class); private static final int STATUS_CODE_NOT_IMPLEMENTED = 501; private final CleanupStrategy cleanupStrategy; @@ -83,7 +84,7 @@ public Storage getTestStorage() { @Override protected void starting(Description description) { - LOGGER.fine("Setting up retry_test resource..."); + LOGGER.trace("Setting up retry_test resource..."); RetryTestResource retryTestResource = RetryTestResource.newRetryTestResource( testRetryConformance.getMethod(), @@ -93,20 +94,26 @@ protected void starting(Description description) { retryTest = testBench.createRetryTest(retryTestResource); } catch (HttpResponseException e) { if (e.getStatusCode() == STATUS_CODE_NOT_IMPLEMENTED) { - throw new AssumptionViolatedException( - "Testbench not yet implemented for " + retryTestResource); + AssumptionViolatedException exception = + new AssumptionViolatedException( + "Testbench not yet implemented for " + retryTestResource); + // make skips due to not implemented more terse + // we know where this comes from, we don't need the full stack trace for each of the + // 200+ occurrences. + exception.setStackTrace(new StackTraceElement[0]); + throw exception; } else { throw new RuntimeException(e); } } catch (IOException e) { throw new RuntimeException(e); } - LOGGER.fine("Setting up retry_test resource complete"); + LOGGER.trace("Setting up retry_test resource complete"); } @Override protected void finished(Description description) { - LOGGER.fine("Verifying end state of retry_test resource..."); + LOGGER.trace("Verifying end state of retry_test resource..."); try (Storage ignore1 = nonTestStorage; Storage ignore2 = testStorage) { // use try-with to shut down grpc resources try { @@ -117,7 +124,7 @@ protected void finished(Description description) { } } } finally { - LOGGER.fine("Verifying end state of retry_test resource complete"); + LOGGER.trace("Verifying end state of retry_test resource complete"); if ((shouldCleanup(testSuccess, testSkipped)) && retryTest != null) { testBench.deleteRetryTest(retryTest); retryTest = null; diff --git a/google-cloud-storage/src/test/java/com/google/cloud/storage/conformance/retry/RpcMethodMappings.java b/google-cloud-storage/src/test/java/com/google/cloud/storage/conformance/retry/RpcMethodMappings.java index ef481f7898..9ed0177e35 100644 --- a/google-cloud-storage/src/test/java/com/google/cloud/storage/conformance/retry/RpcMethodMappings.java +++ b/google-cloud-storage/src/test/java/com/google/cloud/storage/conformance/retry/RpcMethodMappings.java @@ -105,8 +105,9 @@ import java.util.OptionalInt; import java.util.Set; import java.util.concurrent.TimeUnit; -import java.util.logging.Logger; import java.util.stream.Collectors; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A class which serves to try and organize all of the {@link RpcMethodMapping} for the retry @@ -120,7 +121,7 @@ @Immutable @SuppressWarnings("Guava") final class RpcMethodMappings { - private static final Logger LOGGER = Logger.getLogger(RpcMethodMappings.class.getName()); + private static final Logger LOGGER = LoggerFactory.getLogger(RpcMethodMappings.class); private static final Predicate groupIsDownload = methodGroupIs("storage.objects.download"); @@ -224,7 +225,7 @@ private void validateMappingDefinitions(ArrayList a) { private void reportMappingSummary() { int mappingCount = funcMap.values().stream().mapToInt(m -> 1).sum(); - LOGGER.info("Current total number of mappings defined: " + mappingCount); + LOGGER.info("Current total number of mappings defined: {}", mappingCount); String counts = funcMap.asMap().entrySet().stream() .map( @@ -244,7 +245,7 @@ private void reportMappingSummary() { }) .sorted() .collect(Collectors.joining("\n", "\n", "")); - LOGGER.info("Current number of mappings per rpc method: " + counts); + LOGGER.info("Current number of mappings per rpc method: {}", counts); OptionalInt max = funcMap.values().stream().map(RpcMethodMapping::getMappingId).mapToInt(i -> i).max(); if (max.isPresent()) { diff --git a/google-cloud-storage/src/test/java/com/google/cloud/storage/it/BucketCleaner.java b/google-cloud-storage/src/test/java/com/google/cloud/storage/it/BucketCleaner.java index a5d2650295..67c8f65d4b 100644 --- a/google-cloud-storage/src/test/java/com/google/cloud/storage/it/BucketCleaner.java +++ b/google-cloud-storage/src/test/java/com/google/cloud/storage/it/BucketCleaner.java @@ -42,18 +42,18 @@ import java.util.Comparator; import java.util.List; import java.util.Locale; -import java.util.logging.Level; -import java.util.logging.Logger; import java.util.stream.Collectors; import java.util.stream.Stream; import java.util.stream.StreamSupport; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public final class BucketCleaner { - private static final Logger LOGGER = Logger.getLogger(BucketCleaner.class.getName()); + private static final Logger LOGGER = LoggerFactory.getLogger(BucketCleaner.class); public static void doCleanup(String bucketName, Storage s) { - LOGGER.fine("Starting bucket cleanup..."); + LOGGER.trace("Starting bucket cleanup..."); String projectId = s.getOptions().getProjectId(); try { // TODO: probe bucket existence, a bad test could have deleted the bucket @@ -73,16 +73,16 @@ public static void doCleanup(String bucketName, Storage s) { if (!anyFailedObjectDeletes) { s.delete(bucketName, BucketSourceOption.userProject(projectId)); } else { - LOGGER.warning("Unable to delete bucket due to previous failed object deletes"); + LOGGER.warn("Unable to delete bucket due to previous failed object deletes"); } - LOGGER.fine("Bucket cleanup complete"); + LOGGER.trace("Bucket cleanup complete"); } catch (Exception e) { - LOGGER.log(Level.SEVERE, e, () -> "Error during bucket cleanup."); + LOGGER.error("Error during bucket cleanup."); } } public static void doCleanup(String bucketName, Storage s, StorageControlClient ctrl) { - LOGGER.warning("Starting bucket cleanup: " + bucketName); + LOGGER.warn("Starting bucket cleanup: {}", bucketName); String projectId = s.getOptions().getProjectId(); try { // TODO: probe bucket existence, a bad test could have deleted the bucket @@ -140,7 +140,7 @@ public static void doCleanup(String bucketName, Storage s, StorageControlClient folder -> { String formatted = String.format(Locale.US, "folder = %s", folder.getName()); - LOGGER.warning(formatted); + LOGGER.warn(formatted); boolean success = true; try { ctrl.deleteFolderCallable() @@ -176,7 +176,7 @@ public static void doCleanup(String bucketName, Storage s, StorageControlClient managedFolder -> { String formatted = String.format(Locale.US, "managedFolder = %s", managedFolder.getName()); - LOGGER.warning(formatted); + LOGGER.warn(formatted); boolean success = true; try { ctrl.deleteManagedFolderCallable() @@ -214,7 +214,7 @@ public static void doCleanup(String bucketName, Storage s, StorageControlClient if (!anyFailedObjectDelete && !anyFailedFolderDelete && !anyFailedManagedFolderDelete) { s.delete(bucketName, BucketSourceOption.userProject(projectId)); } else { - LOGGER.warning( + LOGGER.warn( String.format( Locale.US, "Unable to delete bucket %s due to previous failed %s deletes", @@ -222,9 +222,9 @@ public static void doCleanup(String bucketName, Storage s, StorageControlClient failed)); } - LOGGER.warning("Bucket cleanup complete: " + bucketName); + LOGGER.warn("Bucket cleanup complete: {}", bucketName); } catch (Exception e) { - LOGGER.log(Level.SEVERE, e, () -> "Error during bucket cleanup."); + LOGGER.error("Error during bucket cleanup."); } } @@ -234,7 +234,7 @@ private static boolean getIfAnyFailedAndReport( deleteResults.stream().filter(r -> !r.success).collect(Collectors.toList()); failedDeletes.forEach( r -> - LOGGER.warning( + LOGGER.warn( String.format( Locale.US, "Failed to delete %s %s/%s", resourceType, bucketName, r.name))); return !failedDeletes.isEmpty(); diff --git a/google-cloud-storage/src/test/java/com/google/cloud/storage/it/GrpcPlainRequestLoggingInterceptor.java b/google-cloud-storage/src/test/java/com/google/cloud/storage/it/GrpcPlainRequestLoggingInterceptor.java index 276927e062..0f61952488 100644 --- a/google-cloud-storage/src/test/java/com/google/cloud/storage/it/GrpcPlainRequestLoggingInterceptor.java +++ b/google-cloud-storage/src/test/java/com/google/cloud/storage/it/GrpcPlainRequestLoggingInterceptor.java @@ -50,11 +50,11 @@ import java.util.Set; import java.util.function.Function; import java.util.function.Supplier; -import java.util.logging.Level; -import java.util.logging.Logger; import java.util.stream.Collectors; import java.util.stream.Stream; import org.checkerframework.checker.nullness.qual.NonNull; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Client side interceptor which will log gRPC request, headers, response, status and trailers in @@ -67,7 +67,7 @@ public final class GrpcPlainRequestLoggingInterceptor implements ClientInterceptor { private static final Logger LOGGER = - Logger.getLogger(GrpcPlainRequestLoggingInterceptor.class.getName()); + LoggerFactory.getLogger(GrpcPlainRequestLoggingInterceptor.class); private static final GrpcPlainRequestLoggingInterceptor INSTANCE = new GrpcPlainRequestLoggingInterceptor(); @@ -117,14 +117,13 @@ public ClientCall interceptCall( @Override public void start(Listener responseListener, Metadata headers) { if (headers.containsKey(X_GOOG_REQUEST_PARAMS)) { - LOGGER.log(Level.CONFIG, () -> String.format(">>> headers = %s", headers)); + LOGGER.atDebug().log(() -> String.format(">>> headers = %s", headers)); } SimpleForwardingClientCallListener listener = new SimpleForwardingClientCallListener(responseListener) { @Override public void onMessage(RespT message) { - LOGGER.log( - Level.CONFIG, + LOGGER.atDebug().log( () -> String.format( Locale.US, @@ -136,7 +135,7 @@ public void onMessage(RespT message) { @Override public void onClose(Status status, Metadata trailers) { - LOGGER.log(Level.CONFIG, lazyOnCloseLogString(status, trailers)); + LOGGER.atDebug().log(lazyOnCloseLogString(status, trailers)); super.onClose(status, trailers); } }; @@ -145,8 +144,7 @@ public void onClose(Status status, Metadata trailers) { @Override public void sendMessage(ReqT message) { - LOGGER.log( - Level.CONFIG, + LOGGER.atDebug().log( () -> String.format( Locale.US, diff --git a/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITBlobWriteChannelTest.java b/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITBlobWriteChannelTest.java index 8697b07c31..d910a68def 100644 --- a/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITBlobWriteChannelTest.java +++ b/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITBlobWriteChannelTest.java @@ -63,7 +63,6 @@ import java.util.Arrays; import java.util.Locale; import java.util.Optional; -import java.util.logging.Logger; import org.junit.Test; import org.junit.runner.RunWith; @@ -71,7 +70,6 @@ @SingleBackend(Backend.TEST_BENCH) public final class ITBlobWriteChannelTest { - private static final Logger LOGGER = Logger.getLogger(ITBlobWriteChannelTest.class.getName()); private static final String NOW_STRING; private static final String BLOB_STRING_CONTENT = "Hello Google Cloud Storage!"; diff --git a/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITNotificationTest.java b/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITNotificationTest.java index b666a9eec4..5e4e2497cf 100644 --- a/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITNotificationTest.java +++ b/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITNotificationTest.java @@ -39,12 +39,12 @@ import java.util.List; import java.util.Locale; import java.util.Map; -import java.util.logging.Level; -import java.util.logging.Logger; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; @RunWith(StorageITRunner.class) @CrossRun( @@ -53,7 +53,7 @@ public class ITNotificationTest { private static final Notification.PayloadFormat PAYLOAD_FORMAT = PayloadFormat.JSON_API_V1; private static final Map CUSTOM_ATTRIBUTES = ImmutableMap.of("label1", "value1"); - private static final Logger log = Logger.getLogger(ITNotificationTest.class.getName()); + private static final Logger LOGGER = LoggerFactory.getLogger(ITNotificationTest.class); private static final String DOES_NOT_EXIST_ID = "something-that-does-not-exist-probably"; @Inject public Backend backend; @@ -110,7 +110,7 @@ public void cleanup() { topicAdminClient.deleteTopic(topic); topicAdminClient.close(); } catch (Exception e) { - log.log(Level.WARNING, "Error while trying to delete topic and shutdown topic client", e); + LOGGER.warn("Error while trying to delete topic and shutdown topic client", e); } topicAdminClient = null; } diff --git a/google-cloud-storage/src/test/java/com/google/cloud/storage/it/runner/StorageITLeafRunner.java b/google-cloud-storage/src/test/java/com/google/cloud/storage/it/runner/StorageITLeafRunner.java index cb4ddbf8a1..d8e0a78460 100644 --- a/google-cloud-storage/src/test/java/com/google/cloud/storage/it/runner/StorageITLeafRunner.java +++ b/google-cloud-storage/src/test/java/com/google/cloud/storage/it/runner/StorageITLeafRunner.java @@ -26,7 +26,6 @@ import java.util.List; import java.util.Locale; import java.util.Objects; -import java.util.logging.Logger; import org.checkerframework.checker.nullness.qual.Nullable; import org.junit.ClassRule; import org.junit.Rule; @@ -36,6 +35,7 @@ import org.junit.runners.model.FrameworkMethod; import org.junit.runners.model.InitializationError; import org.junit.runners.model.TestClass; +import org.slf4j.LoggerFactory; final class StorageITLeafRunner extends BlockJUnit4ClassRunner { private final CrossRunIntersection crossRunIntersection; @@ -111,7 +111,7 @@ protected void validateTestMethods(List errors) { "Using @Test(timeout = 1), @Rule Timeout or @ClassRule Timeout can break multi-thread" + " and Fixture support of StorageITRunner. Please refactor your test to detect a" + " timeout in the test itself."; - Logger.getLogger(StorageITRunner.class.getName()).warning(msg); + LoggerFactory.getLogger(StorageITRunner.class).warn(msg); } } super.validateTestMethods(errors); diff --git a/google-cloud-storage/src/test/java/com/google/cloud/storage/it/runner/registry/TestBench.java b/google-cloud-storage/src/test/java/com/google/cloud/storage/it/runner/registry/TestBench.java index 3cc9360fde..7734794a9f 100644 --- a/google-cloud-storage/src/test/java/com/google/cloud/storage/it/runner/registry/TestBench.java +++ b/google-cloud-storage/src/test/java/com/google/cloud/storage/it/runner/registry/TestBench.java @@ -58,10 +58,10 @@ import java.util.Locale; import java.util.Optional; import java.util.concurrent.TimeUnit; -import java.util.logging.Level; -import java.util.logging.Logger; import java.util.regex.Matcher; import java.util.regex.Pattern; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * A {@link ManagedLifecycle} which integrates with the command = ImmutableList.of("docker", "kill", containerName); - System.out.println("command = " + command); - LOGGER.log(Level.WARNING, command.toString()); + LOGGER.warn(command.toString()); Process shutdownProcess = new ProcessBuilder(command).start(); shutdownProcess.waitFor(5, TimeUnit.SECONDS); int shutdownProcessExitValue = shutdownProcess.exitValue(); - LOGGER.warning("Container exit value = " + shutdownProcessExitValue); + LOGGER.warn("Container exit value = {}", shutdownProcessExitValue); } // wait for the server to shutdown @@ -373,10 +370,10 @@ public boolean shouldRetry(Throwable previousThrowable, List previousResponse private void dumpServerLogs(Path outFile, Path errFile) throws IOException { try { - LOGGER.warning("Dumping contents of stdout"); + LOGGER.warn("Dumping contents of stdout"); dumpServerLog("stdout", outFile.toFile()); } finally { - LOGGER.warning("Dumping contents of stderr"); + LOGGER.warn("Dumping contents of stderr"); dumpServerLog("stderr", errFile.toFile()); } } @@ -385,7 +382,7 @@ private void dumpServerLog(String prefix, File out) throws IOException { try (BufferedReader reader = new BufferedReader(new FileReader(out))) { String line; while ((line = reader.readLine()) != null) { - LOGGER.warning("<" + prefix + "> " + line); + LOGGER.warn("<{}> {}", prefix, line); } } } From 8a6ee99dafa6d353de91652c31531e923eb2bb6d Mon Sep 17 00:00:00 2001 From: cloud-java-bot <122572305+cloud-java-bot@users.noreply.github.com> Date: Tue, 27 May 2025 11:47:50 -0400 Subject: [PATCH 10/22] chore: Update generation configuration at Tue May 27 02:30:05 UTC 2025 (#3117) * chore: Update generation configuration at Fri May 23 02:30:02 UTC 2025 * chore: Update generation configuration at Sat May 24 02:28:47 UTC 2025 * chore: generate libraries at Sat May 24 02:29:23 UTC 2025 * chore: Update generation configuration at Tue May 27 02:30:05 UTC 2025 --- README.md | 2 +- generation_config.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ce251217b6..136f52a388 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ If you are using Maven without the BOM, add this to your dependencies: If you are using Gradle 5.x or later, add this to your dependencies: ```Groovy -implementation platform('com.google.cloud:libraries-bom:26.60.0') +implementation platform('com.google.cloud:libraries-bom:26.61.0') implementation 'com.google.cloud:google-cloud-storage' ``` diff --git a/generation_config.yaml b/generation_config.yaml index 33a17fbdaf..38cb5d07f1 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,6 +1,6 @@ gapic_generator_version: 2.58.0 -googleapis_commitish: 488c8cc0d41aca4b4f33748ab6166129edcfd836 -libraries_bom_version: 26.60.0 +googleapis_commitish: 9bed6f077867e387960082891ec0e1b8bb254a47 +libraries_bom_version: 26.61.0 libraries: - api_shortname: storage name_pretty: Cloud Storage From dbb1ac3b026ff74cc8276c6e41e309d6622b3aeb Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 27 May 2025 17:48:12 +0200 Subject: [PATCH 11/22] chore(deps): update dependency com.google.cloud:libraries-bom to v26.61.0 (#3116) --- samples/snippets/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 619806920a..4b0492b841 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -31,7 +31,7 @@ com.google.cloud libraries-bom - 26.60.0 + 26.61.0 pom import From e1be49e6c987daccf9542c15c6ba418c007d2fb7 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 27 May 2025 17:48:33 +0200 Subject: [PATCH 12/22] deps: update dependency com.google.apis:google-api-services-storage to v1-rev20250521-2.0.0 (#3118) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6b130f6eb3..dadb2c1088 100644 --- a/pom.xml +++ b/pom.xml @@ -87,7 +87,7 @@ com.google.apis google-api-services-storage - v1-rev20250509-2.0.0 + v1-rev20250521-2.0.0 com.google.cloud From 64bbb608033f757cb6e31e75a78740d8ed1dccab Mon Sep 17 00:00:00 2001 From: BenWhitehead Date: Wed, 28 May 2025 10:38:37 -0400 Subject: [PATCH 13/22] feat: expose BucketInfo.getProject as a BigInteger (#3119) Expose publicly the project field which was previously internal only. This field represents the project number of the project the bucket belongs to. This field is still OUTPUT_ONLY, and as such does hot have a setter exposed for it. Fixes #3023 --- .../java/com/google/cloud/storage/Bucket.java | 3 +- .../com/google/cloud/storage/BucketInfo.java | 19 +++++--- .../google/cloud/storage/GrpcConversions.java | 8 ++-- .../google/cloud/storage/GrpcStorageImpl.java | 7 +-- .../google/cloud/storage/JsonConversions.java | 12 +----- .../com/google/cloud/storage/Storage.java | 6 ++- .../java/com/google/cloud/storage/Utils.java | 23 ++++++++++ .../google/cloud/storage/GrpcUtilsTest.java | 43 +++++++++++++++++++ .../storage/it/ITBucketReadMaskTest.java | 1 + .../storage/it/ITOptionRegressionTest.java | 4 +- .../jqwik/BucketArbitraryProvider.java | 4 +- .../storage/jqwik/StorageArbitraries.java | 21 +++++++++ 12 files changed, 124 insertions(+), 27 deletions(-) diff --git a/google-cloud-storage/src/main/java/com/google/cloud/storage/Bucket.java b/google-cloud-storage/src/main/java/com/google/cloud/storage/Bucket.java index db2eba8366..7d25cde129 100644 --- a/google-cloud-storage/src/main/java/com/google/cloud/storage/Bucket.java +++ b/google-cloud-storage/src/main/java/com/google/cloud/storage/Bucket.java @@ -35,6 +35,7 @@ import java.io.InputStream; import java.io.ObjectInputStream; import java.io.Serializable; +import java.math.BigInteger; import java.security.Key; import java.time.Duration; import java.time.OffsetDateTime; @@ -502,7 +503,7 @@ public Builder setName(String name) { } @Override - Builder setProject(String project) { + Builder setProject(BigInteger project) { infoBuilder.setProject(project); return this; } diff --git a/google-cloud-storage/src/main/java/com/google/cloud/storage/BucketInfo.java b/google-cloud-storage/src/main/java/com/google/cloud/storage/BucketInfo.java index c9ade02303..3899c703a7 100644 --- a/google-cloud-storage/src/main/java/com/google/cloud/storage/BucketInfo.java +++ b/google-cloud-storage/src/main/java/com/google/cloud/storage/BucketInfo.java @@ -45,6 +45,7 @@ import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; +import java.math.BigInteger; import java.time.Duration; import java.time.OffsetDateTime; import java.util.ArrayList; @@ -80,7 +81,7 @@ public class BucketInfo implements Serializable { private static final long serialVersionUID = 4793572058456298945L; private final String generatedId; - private final String project; + private final BigInteger project; private final String name; private final Acl.Entity owner; private final String selfLink; @@ -1657,7 +1658,7 @@ public boolean isLive() { public abstract static class Builder { Builder() {} - abstract Builder setProject(String project); + abstract Builder setProject(BigInteger project); /** Sets the bucket's name. */ public abstract Builder setName(String name); @@ -1923,7 +1924,7 @@ public Builder setRetentionPeriodDuration(Duration retentionPeriod) { static final class BuilderImpl extends Builder { private String generatedId; - private String project; + private BigInteger project; private String name; private Acl.Entity owner; private String selfLink; @@ -2007,7 +2008,10 @@ public Builder setName(String name) { } @Override - Builder setProject(String project) { + Builder setProject(BigInteger project) { + if (!Objects.equals(this.project, project)) { + modifiedFields.add(BucketField.PROJECT); + } this.project = project; return this; } @@ -2637,7 +2641,8 @@ private Builder clearDeleteLifecycleRules() { modifiedFields = builder.modifiedFields.build(); } - String getProject() { + /** The project number of the project the bucket belongs to */ + public BigInteger getProject() { return project; } @@ -2993,6 +2998,7 @@ public Builder toBuilder() { public int hashCode() { return Objects.hash( generatedId, + project, name, owner, selfLink, @@ -3022,6 +3028,7 @@ public int hashCode() { locationType, objectRetention, softDeletePolicy, + customPlacementConfig, hierarchicalNamespace, logging); } @@ -3036,6 +3043,7 @@ public boolean equals(Object o) { } BucketInfo that = (BucketInfo) o; return Objects.equals(generatedId, that.generatedId) + && Objects.equals(project, that.project) && Objects.equals(name, that.name) && Objects.equals(owner, that.owner) && Objects.equals(selfLink, that.selfLink) @@ -3063,6 +3071,7 @@ public boolean equals(Object o) { && Objects.equals(iamConfiguration, that.iamConfiguration) && Objects.equals(autoclass, that.autoclass) && Objects.equals(locationType, that.locationType) + && Objects.equals(customPlacementConfig, that.customPlacementConfig) && Objects.equals(objectRetention, that.objectRetention) && Objects.equals(softDeletePolicy, that.softDeletePolicy) && Objects.equals(hierarchicalNamespace, that.hierarchicalNamespace) diff --git a/google-cloud-storage/src/main/java/com/google/cloud/storage/GrpcConversions.java b/google-cloud-storage/src/main/java/com/google/cloud/storage/GrpcConversions.java index 39d5986db6..4d9d5e31d2 100644 --- a/google-cloud-storage/src/main/java/com/google/cloud/storage/GrpcConversions.java +++ b/google-cloud-storage/src/main/java/com/google/cloud/storage/GrpcConversions.java @@ -20,7 +20,7 @@ import static com.google.cloud.storage.Utils.bucketNameCodec; import static com.google.cloud.storage.Utils.ifNonNull; import static com.google.cloud.storage.Utils.lift; -import static com.google.cloud.storage.Utils.projectNameCodec; +import static com.google.cloud.storage.Utils.projectNumberResourceCodec; import com.google.api.pathtemplate.PathTemplate; import com.google.cloud.Binding; @@ -204,7 +204,9 @@ Codec policyCodec() { private BucketInfo bucketInfoDecode(Bucket from) { BucketInfo.Builder to = new BucketInfo.BuilderImpl(bucketNameCodec.decode(from.getName())); - to.setProject(projectNameCodec.decode(from.getProject())); + if (!from.getProject().isEmpty()) { + to.setProject(projectNumberResourceCodec.decode(from.getProject())); + } to.setGeneratedId(from.getBucketId()); maybeDecodeRetentionPolicy(from, to); ifNonNull(from.getLocation(), to::setLocation); @@ -304,7 +306,7 @@ private BucketInfo bucketInfoDecode(Bucket from) { private Bucket bucketInfoEncode(BucketInfo from) { Bucket.Builder to = Bucket.newBuilder(); to.setName(bucketNameCodec.encode(from.getName())); - ifNonNull(from.getProject(), projectNameCodec::encode, to::setProject); + ifNonNull(from.getProject(), projectNumberResourceCodec::encode, to::setProject); ifNonNull(from.getGeneratedId(), to::setBucketId); maybeEncodeRetentionPolicy(from, to); ifNonNull(from.getLocation(), to::setLocation); diff --git a/google-cloud-storage/src/main/java/com/google/cloud/storage/GrpcStorageImpl.java b/google-cloud-storage/src/main/java/com/google/cloud/storage/GrpcStorageImpl.java index 8a838604ca..50b3596c99 100644 --- a/google-cloud-storage/src/main/java/com/google/cloud/storage/GrpcStorageImpl.java +++ b/google-cloud-storage/src/main/java/com/google/cloud/storage/GrpcStorageImpl.java @@ -26,6 +26,7 @@ import static com.google.cloud.storage.StorageV2ProtoUtils.objectAclEntityOrAltEq; import static com.google.cloud.storage.Utils.bucketNameCodec; import static com.google.cloud.storage.Utils.ifNonNull; +import static com.google.cloud.storage.Utils.projectNameCodec; import static com.google.common.base.MoreObjects.firstNonNull; import static java.util.Objects.requireNonNull; @@ -216,15 +217,15 @@ public Bucket create(BucketInfo bucketInfo, BucketTargetOption... options) { Opts opts = Opts.unwrap(options).resolveFrom(bucketInfo).prepend(defaultOpts); GrpcCallContext grpcCallContext = opts.grpcMetadataMapper().apply(GrpcCallContext.createDefault()); - if (bucketInfo.getProject() == null || bucketInfo.getProject().trim().isEmpty()) { - bucketInfo = bucketInfo.toBuilder().setProject(getOptions().getProjectId()).build(); - } com.google.storage.v2.Bucket bucket = codecs.bucketInfo().encode(bucketInfo); CreateBucketRequest.Builder builder = CreateBucketRequest.newBuilder() .setBucket(bucket) .setBucketId(bucketInfo.getName()) .setParent("projects/_"); + if (bucketInfo.getProject() == null) { + builder.getBucketBuilder().setProject(projectNameCodec.encode(getOptions().getProjectId())); + } CreateBucketRequest req = opts.createBucketsRequest().apply(builder).build(); GrpcCallContext merge = Utils.merge(grpcCallContext, Retrying.newCallContext()); return retrier.run( diff --git a/google-cloud-storage/src/main/java/com/google/cloud/storage/JsonConversions.java b/google-cloud-storage/src/main/java/com/google/cloud/storage/JsonConversions.java index 12562cb020..7f9da1f588 100644 --- a/google-cloud-storage/src/main/java/com/google/cloud/storage/JsonConversions.java +++ b/google-cloud-storage/src/main/java/com/google/cloud/storage/JsonConversions.java @@ -22,7 +22,6 @@ import static com.google.cloud.storage.Utils.ifNonNull; import static com.google.cloud.storage.Utils.lift; import static com.google.cloud.storage.Utils.nullableDateTimeCodec; -import static com.google.cloud.storage.Utils.projectNameCodec; import static com.google.common.base.MoreObjects.firstNonNull; import com.google.api.client.util.Data; @@ -90,10 +89,6 @@ @InternalApi final class JsonConversions { static final JsonConversions INSTANCE = new JsonConversions(); - // gRPC has a Bucket.project property that apiary doesn't have yet. - // when converting from gRPC to apiary or vice-versa we want to preserve this property. Until - // such a time as the apiary model has a project field, we manually apply it with this name. - private static final String PROJECT_ID_FIELD_NAME = "x_project"; private final Codec entityCodec = Codec.of(this::entityEncode, this::entityDecode); @@ -394,7 +389,7 @@ private SoftDeletePolicy softDeletePolicyDecode(Bucket.SoftDeletePolicy from) { private Bucket bucketInfoEncode(BucketInfo from) { Bucket to = new Bucket(); - ifNonNull(from.getProject(), projectNameCodec::encode, p -> to.set(PROJECT_ID_FIELD_NAME, p)); + ifNonNull(from.getProject(), to::setProjectNumber); ifNonNull(from.getAcl(), toListOf(bucketAcl()::encode), to::setAcl); ifNonNull(from.getCors(), toListOf(cors()::encode), to::setCors); ifNonNull(from.getCreateTimeOffsetDateTime(), dateTimeCodec::encode, to::setTimeCreated); @@ -477,10 +472,7 @@ private Bucket bucketInfoEncode(BucketInfo from) { @SuppressWarnings("deprecation") private BucketInfo bucketInfoDecode(com.google.api.services.storage.model.Bucket from) { BucketInfo.Builder to = new BucketInfo.BuilderImpl(from.getName()); - ifNonNull( - from.get(PROJECT_ID_FIELD_NAME), - lift(String.class::cast).andThen(projectNameCodec::decode), - to::setProject); + ifNonNull(from.getProjectNumber(), to::setProject); ifNonNull(from.getAcl(), toListOf(bucketAcl()::decode), to::setAcl); ifNonNull(from.getCors(), toListOf(cors()::decode), to::setCors); ifNonNull(from.getDefaultObjectAcl(), toListOf(objectAcl()::decode), to::setDefaultAcl); diff --git a/google-cloud-storage/src/main/java/com/google/cloud/storage/Storage.java b/google-cloud-storage/src/main/java/com/google/cloud/storage/Storage.java index 301792e148..d2c38763e5 100644 --- a/google-cloud-storage/src/main/java/com/google/cloud/storage/Storage.java +++ b/google-cloud-storage/src/main/java/com/google/cloud/storage/Storage.java @@ -62,6 +62,7 @@ import java.io.ObjectInputStream; import java.io.OutputStream; import java.io.Serializable; +import java.math.BigInteger; import java.net.URL; import java.net.URLConnection; import java.nio.file.Path; @@ -190,7 +191,10 @@ enum BucketField implements FieldSelector, NamedField { SOFT_DELETE_POLICY( "softDeletePolicy", "soft_delete_policy", - com.google.api.services.storage.model.Bucket.SoftDeletePolicy.class); + com.google.api.services.storage.model.Bucket.SoftDeletePolicy.class), + + @TransportCompatibility({Transport.HTTP, Transport.GRPC}) + PROJECT("projectNumber", "project", BigInteger.class); static final List REQUIRED_FIELDS = ImmutableList.of(NAME); private static final Map JSON_FIELD_NAME_INDEX; diff --git a/google-cloud-storage/src/main/java/com/google/cloud/storage/Utils.java b/google-cloud-storage/src/main/java/com/google/cloud/storage/Utils.java index 0e436bd0dc..4bc73dacdd 100644 --- a/google-cloud-storage/src/main/java/com/google/cloud/storage/Utils.java +++ b/google-cloud-storage/src/main/java/com/google/cloud/storage/Utils.java @@ -25,6 +25,7 @@ import com.google.cloud.storage.Conversions.Codec; import com.google.cloud.storage.UnifiedOpts.NamedField; import com.google.common.annotations.VisibleForTesting; +import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.MapDifference; @@ -33,6 +34,7 @@ import com.google.common.primitives.Ints; import com.google.storage.v2.BucketName; import com.google.storage.v2.ProjectName; +import java.math.BigInteger; import java.time.Duration; import java.time.Instant; import java.time.OffsetDateTime; @@ -174,6 +176,27 @@ final class Utils { } }); + /** + * Define a Codec which encapsulates the logic necessary to handle encoding and decoding project + * numbers. + */ + static final Codec<@NonNull BigInteger, @NonNull String> projectNumberResourceCodec = + Codec.of( + projectNumber -> { + requireNonNull(projectNumber, "projectNumber must be non null"); + return ProjectName.format(projectNumber.toString()); + }, + projectNumberResource -> { + requireNonNull(projectNumberResource, "projectNumberResource must be non null"); + Preconditions.checkArgument( + ProjectName.isParsableFrom(projectNumberResource), + "projectNumberResource '%s' is not parsable as a %s", + projectNumberResource, + ProjectName.class.getName()); + ProjectName parse = ProjectName.parse(projectNumberResource); + return new BigInteger(parse.getProject()); + }); + static final Codec crc32cCodec = Codec.of(Utils::crc32cEncode, Utils::crc32cDecode); diff --git a/google-cloud-storage/src/test/java/com/google/cloud/storage/GrpcUtilsTest.java b/google-cloud-storage/src/test/java/com/google/cloud/storage/GrpcUtilsTest.java index 06dfcca5bc..9ca5bcd1b7 100644 --- a/google-cloud-storage/src/test/java/com/google/cloud/storage/GrpcUtilsTest.java +++ b/google-cloud-storage/src/test/java/com/google/cloud/storage/GrpcUtilsTest.java @@ -16,8 +16,14 @@ package com.google.cloud.storage; +import static com.google.common.truth.Truth.assertThat; +import static org.junit.Assert.assertThrows; + +import com.google.cloud.storage.Conversions.Codec; import java.io.IOException; +import java.math.BigInteger; import java.util.Collections; +import org.checkerframework.checker.nullness.qual.NonNull; import org.junit.Test; public final class GrpcUtilsTest { @@ -26,4 +32,41 @@ public final class GrpcUtilsTest { public void closeAll_noNpeIfNullStream() throws IOException { GrpcUtils.closeAll(Collections.singletonList(null)); } + + @Test + public void projectNumberResourceCodec_simple() { + Codec<@NonNull BigInteger, @NonNull String> codec = Utils.projectNumberResourceCodec; + + String encode = codec.encode(new BigInteger("34567892123")); + assertThat(encode).isEqualTo("projects/34567892123"); + + BigInteger decode = codec.decode(encode); + assertThat(decode).isEqualTo(new BigInteger("34567892123")); + } + + @Test + public void projectNumberResourceCodec_decode_illegalArgumentException_whenUnParsable() { + String bad = "not-a-projects/123081892932"; + IllegalArgumentException iae = + assertThrows( + IllegalArgumentException.class, () -> Utils.projectNumberResourceCodec.decode(bad)); + + assertThat(iae).hasMessageThat().contains(bad); + } + + @Test + public void projectNumberResourceCodec_decode_nonNull() { + assertThrows(NullPointerException.class, () -> Utils.projectNumberResourceCodec.decode(null)); + } + + @Test + public void projectNumberResourceCodec_encode_nonNull() { + assertThrows(NullPointerException.class, () -> Utils.projectNumberResourceCodec.encode(null)); + } + + @Test + public void projectNumberResourceCodec_decode_notProjectNumber() { + String bad = "projects/not-a-number"; + assertThrows(NumberFormatException.class, () -> Utils.projectNumberResourceCodec.decode(bad)); + } } diff --git a/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITBucketReadMaskTest.java b/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITBucketReadMaskTest.java index c4c3c40591..36991f1b83 100644 --- a/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITBucketReadMaskTest.java +++ b/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITBucketReadMaskTest.java @@ -98,6 +98,7 @@ public static final class BucketReadMaskTestParameters implements ParametersProv public ImmutableList parameters() { ImmutableList> args = ImmutableList.of( + new Args<>(BucketField.PROJECT, LazyAssertion.equal()), new Args<>(BucketField.ACL, LazyAssertion.equal()), new Args<>(BucketField.AUTOCLASS, LazyAssertion.equal()), new Args<>(BucketField.BILLING, LazyAssertion.equal()), diff --git a/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITOptionRegressionTest.java b/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITOptionRegressionTest.java index 130bd0e11a..905fe5478c 100644 --- a/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITOptionRegressionTest.java +++ b/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITOptionRegressionTest.java @@ -328,7 +328,7 @@ public void storage_BucketGetOption_fields_BucketField() { "website", "softDeletePolicy", "hierarchicalNamespace", - "website"); + "projectNumber"); s.get( b.getName(), BucketGetOption.fields(TestUtils.filterOutHttpOnlyBucketFields(BucketField.values()))); @@ -821,7 +821,7 @@ public void storage_BucketListOption_fields_BucketField() { "items/website", "items/softDeletePolicy", "items/hierarchicalNamespace", - "items/website"); + "items/projectNumber"); s.list(BucketListOption.fields(TestUtils.filterOutHttpOnlyBucketFields(BucketField.values()))); requestAuditing.assertQueryParam("fields", expected, splitOnCommaToSet()); } diff --git a/google-cloud-storage/src/test/java/com/google/cloud/storage/jqwik/BucketArbitraryProvider.java b/google-cloud-storage/src/test/java/com/google/cloud/storage/jqwik/BucketArbitraryProvider.java index c5d361ea34..1839c32b4f 100644 --- a/google-cloud-storage/src/test/java/com/google/cloud/storage/jqwik/BucketArbitraryProvider.java +++ b/google-cloud-storage/src/test/java/com/google/cloud/storage/jqwik/BucketArbitraryProvider.java @@ -18,7 +18,7 @@ import static com.google.cloud.storage.PackagePrivateMethodWorkarounds.ifNonNull; -import com.google.cloud.storage.jqwik.StorageArbitraries.ProjectID; +import com.google.cloud.storage.jqwik.StorageArbitraries.ProjectNumber; import com.google.storage.v2.Bucket; import com.google.storage.v2.BucketName; import com.google.storage.v2.ProjectName; @@ -76,7 +76,7 @@ public Set> provideFor(TypeUsage targetType, SubtypeProvider subtyp StorageArbitraries.etag()) .as(Tuple::of), Combinators.combine( - StorageArbitraries.projectID().map(ProjectID::toProjectName), + StorageArbitraries.projectNumber().map(ProjectNumber::toProjectName), StorageArbitraries .alnum() // ignored for now, tuples can't be a single element ) diff --git a/google-cloud-storage/src/test/java/com/google/cloud/storage/jqwik/StorageArbitraries.java b/google-cloud-storage/src/test/java/com/google/cloud/storage/jqwik/StorageArbitraries.java index 8750a2932c..f5ee93ce0e 100644 --- a/google-cloud-storage/src/test/java/com/google/cloud/storage/jqwik/StorageArbitraries.java +++ b/google-cloud-storage/src/test/java/com/google/cloud/storage/jqwik/StorageArbitraries.java @@ -138,6 +138,10 @@ public static Arbitrary projectID() { .as((first, mid, last) -> new ProjectID(first + mid + last)); } + public static Arbitrary projectNumber() { + return Arbitraries.bigIntegers().greaterOrEqual(BigInteger.ONE).map(ProjectNumber::new); + } + public static Arbitrary kmsKey() { return Arbitraries.of("kms-key1", "kms-key2").injectNull(0.75); } @@ -444,6 +448,23 @@ public ProjectName toProjectName() { } } + public static final class ProjectNumber { + + private final BigInteger value; + + private ProjectNumber(BigInteger value) { + this.value = value; + } + + public BigInteger get() { + return value; + } + + public ProjectName toProjectName() { + return ProjectName.of(value.toString()); + } + } + public static Objects objects() { return Objects.INSTANCE; } From b4039f6e36c3f1af1edb4fd3d80d992f14d9c2f8 Mon Sep 17 00:00:00 2001 From: cloud-java-bot <122572305+cloud-java-bot@users.noreply.github.com> Date: Wed, 28 May 2025 10:39:39 -0400 Subject: [PATCH 14/22] chore: Update generation configuration at Wed May 28 02:30:24 UTC 2025 (#3122) * chore: Update generation configuration at Wed May 28 02:30:24 UTC 2025 * chore: generate libraries at Wed May 28 02:30:58 UTC 2025 --- README.md | 2 +- generation_config.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 136f52a388..2fe6cd50ba 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: com.google.cloud libraries-bom - 26.60.0 + 26.61.0 pom import diff --git a/generation_config.yaml b/generation_config.yaml index 38cb5d07f1..e488357ee3 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.58.0 -googleapis_commitish: 9bed6f077867e387960082891ec0e1b8bb254a47 +googleapis_commitish: 361c4941ccff4b02f608a0c1af63dcb65a888358 libraries_bom_version: 26.61.0 libraries: - api_shortname: storage From 0f92f950e34eba1684575ec9dd919c0845c107bd Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 28 May 2025 20:13:55 +0200 Subject: [PATCH 15/22] test(deps): update dependency com.google.cloud.opentelemetry:exporter-trace to v0.35.0 (#3121) --- google-cloud-storage/pom.xml | 2 +- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/google-cloud-storage/pom.xml b/google-cloud-storage/pom.xml index 66fe1d9060..957b1db062 100644 --- a/google-cloud-storage/pom.xml +++ b/google-cloud-storage/pom.xml @@ -167,7 +167,7 @@ com.google.cloud.opentelemetry exporter-trace - 0.34.0 + 0.35.0 test diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index caa32daa96..f8fe86e7f9 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -79,7 +79,7 @@ com.google.cloud.opentelemetry exporter-trace - 0.34.0 + 0.35.0 com.google.cloud.opentelemetry diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 0727335a2e..8c683428f4 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -71,7 +71,7 @@ com.google.cloud.opentelemetry exporter-trace - 0.34.0 + 0.35.0 com.google.cloud.opentelemetry diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 4b0492b841..80249e4a44 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -82,7 +82,7 @@ com.google.cloud.opentelemetry exporter-trace - 0.34.0 + 0.35.0 com.google.cloud.opentelemetry From a6ab7c5fd2c7f1f911fa9d9a2ac418f4f5a2aa83 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 28 May 2025 20:19:18 +0200 Subject: [PATCH 16/22] build(deps): update dependency org.codehaus.mojo:exec-maven-plugin to v3.5.1 (#3120) --- google-cloud-storage/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google-cloud-storage/pom.xml b/google-cloud-storage/pom.xml index 957b1db062..c4126c7ffb 100644 --- a/google-cloud-storage/pom.xml +++ b/google-cloud-storage/pom.xml @@ -487,7 +487,7 @@ org.codehaus.mojo exec-maven-plugin - 3.5.0 + 3.5.1 From e09e1991d84faa54e90d358ad5958473b3465102 Mon Sep 17 00:00:00 2001 From: BenWhitehead Date: Wed, 28 May 2025 16:14:57 -0400 Subject: [PATCH 17/22] chore: samples overhaul (#3109) * Centralize environment variables resolution in new Env utility class * Leverage StorageITRunner and associated fixtures * Condense PubSubNotification test classes into one class that can all share a topic * Replace usages of the word file with blob (GCS doesn't have files, and our library always presents Blob as its name for a gcs object) * Use TemporaryBucket for tests which depend on specific bucket state. 1. Avoids contention between tests trying to change bucket state 2. Avoids the "too many bucket modifications" error from gcs due to bucket mutations 3. Makes it possible, for running tests in parallel in the future * Update samples to apply try-with-resource to TransferManager and Storage instances * Avoid using syntax classes in tests (use storage.x(blob) instead of blob.x()) * Add ITCleanupOldBucketsTest --- samples/install-without-bom/pom.xml | 19 + samples/snapshot/pom.xml | 19 + samples/snippets/pom.xml | 19 + .../QuickstartStorageControlSample.java | 2 +- .../{AddFileOwner.java => AddBlobOwner.java} | 6 +- .../object/BatchSetObjectMetadata.java | 50 +- .../storage/object/DownloadByteRange.java | 2 +- .../storage/object/DownloadObject.java | 25 +- .../storage/object/DownloadPublicObject.java | 4 +- .../{PrintFileAcl.java => PrintBlobAcl.java} | 4 +- ...lForUser.java => PrintBlobAclForUser.java} | 22 +- ...oveFileOwner.java => RemoveBlobOwner.java} | 4 +- .../storage/object/SetObjectMetadata.java | 4 +- .../storage/transfermanager/DownloadMany.java | 32 +- .../test/java/com/example/storage/Env.java | 31 + .../com/example/storage/ITBucketSnippets.java | 2 +- .../storage/ITCleanupOldBucketsTest.java | 78 +++ .../com/example/storage/ITHmacSnippets.java | 15 +- .../com/example/storage/ITObjectSnippets.java | 594 ++++++++++-------- .../example/storage/ITStorageSnippets.java | 2 +- .../example/storage/QuickstartSampleIT.java | 30 +- .../java/com/example/storage/TestBase.java | 43 +- .../bucket/AddBucketDefaultOwnerTest.java | 25 +- .../storage/bucket/AddBucketOwnerTest.java | 27 +- .../example/storage/bucket/AutoclassTest.java | 8 +- .../bucket/CreateBucketDualRegionTest.java | 7 +- .../CreateBucketPubSubNotificationTest.java | 99 --- .../DeleteBucketPubSubNotificationTest.java | 120 ---- .../bucket/ListPubSubNotificationsTest.java | 104 --- .../PrintBucketAclFilterByUserTest.java | 44 -- .../storage/bucket/PrintBucketAclTest.java | 45 +- .../bucket/PrintPubSubNotificationTest.java | 100 --- .../bucket/PubSubNotificationTest.java | 157 +++++ .../bucket/RemoveBucketDefaultOwnerTest.java | 55 +- .../storage/bucket/RemoveBucketOwnerTest.java | 61 +- ...leOwnerTest.java => AddBlobOwnerTest.java} | 24 +- .../object/DownloadBytesRangeTest.java | 17 +- ...Test.java => PrintBlobAclForUserTest.java} | 33 +- ...FileAclTest.java => PrintBlobAclTest.java} | 23 +- ...wnerTest.java => RemoveBlobOwnerTest.java} | 39 +- .../ITTransferManagerSamples.java | 192 +++--- 41 files changed, 1128 insertions(+), 1059 deletions(-) rename samples/snippets/src/main/java/com/example/storage/object/{AddFileOwner.java => AddBlobOwner.java} (94%) rename samples/snippets/src/main/java/com/example/storage/object/{PrintFileAcl.java => PrintBlobAcl.java} (95%) rename samples/snippets/src/main/java/com/example/storage/object/{PrintFileAclForUser.java => PrintBlobAclForUser.java} (68%) rename samples/snippets/src/main/java/com/example/storage/object/{RemoveFileOwner.java => RemoveBlobOwner.java} (96%) create mode 100644 samples/snippets/src/test/java/com/example/storage/Env.java create mode 100644 samples/snippets/src/test/java/com/example/storage/ITCleanupOldBucketsTest.java delete mode 100644 samples/snippets/src/test/java/com/example/storage/bucket/CreateBucketPubSubNotificationTest.java delete mode 100644 samples/snippets/src/test/java/com/example/storage/bucket/DeleteBucketPubSubNotificationTest.java delete mode 100644 samples/snippets/src/test/java/com/example/storage/bucket/ListPubSubNotificationsTest.java delete mode 100644 samples/snippets/src/test/java/com/example/storage/bucket/PrintBucketAclFilterByUserTest.java delete mode 100644 samples/snippets/src/test/java/com/example/storage/bucket/PrintPubSubNotificationTest.java create mode 100644 samples/snippets/src/test/java/com/example/storage/bucket/PubSubNotificationTest.java rename samples/snippets/src/test/java/com/example/storage/object/{AddFileOwnerTest.java => AddBlobOwnerTest.java} (54%) rename samples/snippets/src/test/java/com/example/storage/object/{PrintFileAclForUserTest.java => PrintBlobAclForUserTest.java} (54%) rename samples/snippets/src/test/java/com/example/storage/object/{PrintFileAclTest.java => PrintBlobAclTest.java} (57%) rename samples/snippets/src/test/java/com/example/storage/object/{RemoveFileOwnerTest.java => RemoveBlobOwnerTest.java} (56%) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index f8fe86e7f9..5c845a05fc 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -69,6 +69,12 @@ 1.139.4 test + + com.google.cloud + google-cloud-kms + 2.66.0 + test + com.google.cloud google-cloud-storage @@ -76,6 +82,19 @@ tests test + + + org.slf4j + jul-to-slf4j + 2.0.17 + test + + + ch.qos.logback + logback-classic + 1.3.15 + test + com.google.cloud.opentelemetry exporter-trace diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 8c683428f4..a17b3c2c9e 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -61,6 +61,12 @@ 1.139.4 test + + com.google.cloud + google-cloud-kms + 2.66.0 + test + com.google.cloud google-cloud-storage @@ -68,6 +74,19 @@ tests test + + + org.slf4j + jul-to-slf4j + 2.0.17 + test + + + ch.qos.logback + logback-classic + 1.3.15 + test + com.google.cloud.opentelemetry exporter-trace diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 80249e4a44..36cb3d3e10 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -79,6 +79,12 @@ 1.139.4 test + + com.google.cloud + google-cloud-kms + 2.66.0 + test + com.google.cloud.opentelemetry exporter-trace @@ -97,6 +103,19 @@ tests test + + + org.slf4j + jul-to-slf4j + 2.0.17 + test + + + ch.qos.logback + logback-classic + 1.3.15 + test + diff --git a/samples/snippets/src/main/java/com/example/storage/QuickstartStorageControlSample.java b/samples/snippets/src/main/java/com/example/storage/QuickstartStorageControlSample.java index 28ad20d183..51458e8c1b 100644 --- a/samples/snippets/src/main/java/com/example/storage/QuickstartStorageControlSample.java +++ b/samples/snippets/src/main/java/com/example/storage/QuickstartStorageControlSample.java @@ -34,7 +34,7 @@ public static void main(String... args) throws Exception { .setName(StorageLayoutName.format("_", bucketName)) .build(); StorageLayout response = storageControlClient.getStorageLayout(request); - System.out.printf("Performed getStorageLayout request for %s", response.getName()); + System.out.printf("Performed getStorageLayout request for %s%n", response.getName()); } } } diff --git a/samples/snippets/src/main/java/com/example/storage/object/AddFileOwner.java b/samples/snippets/src/main/java/com/example/storage/object/AddBlobOwner.java similarity index 94% rename from samples/snippets/src/main/java/com/example/storage/object/AddFileOwner.java rename to samples/snippets/src/main/java/com/example/storage/object/AddBlobOwner.java index 394bc15b6f..75c4c88d53 100644 --- a/samples/snippets/src/main/java/com/example/storage/object/AddFileOwner.java +++ b/samples/snippets/src/main/java/com/example/storage/object/AddBlobOwner.java @@ -26,9 +26,9 @@ import com.google.cloud.storage.Storage; import com.google.cloud.storage.StorageOptions; -public class AddFileOwner { +public class AddBlobOwner { - public static void addFileOwner( + public static void addBlobOwner( String projectId, String bucketName, String userEmail, String blobName) { // The ID of your GCP project // String projectId = "your-project-id"; @@ -50,7 +50,7 @@ public static void addFileOwner( System.out.println( "Added user " + userEmail - + " as an owner on file " + + " as an owner on blob " + blobName + " in bucket " + bucketName); diff --git a/samples/snippets/src/main/java/com/example/storage/object/BatchSetObjectMetadata.java b/samples/snippets/src/main/java/com/example/storage/object/BatchSetObjectMetadata.java index d7db73597b..90c6a136f0 100644 --- a/samples/snippets/src/main/java/com/example/storage/object/BatchSetObjectMetadata.java +++ b/samples/snippets/src/main/java/com/example/storage/object/BatchSetObjectMetadata.java @@ -19,15 +19,21 @@ // [START storage_batch_request] import com.google.api.gax.paging.Page; import com.google.cloud.storage.Blob; +import com.google.cloud.storage.BlobInfo; import com.google.cloud.storage.Storage; import com.google.cloud.storage.StorageBatch; +import com.google.cloud.storage.StorageBatchResult; +import com.google.cloud.storage.StorageException; import com.google.cloud.storage.StorageOptions; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.Objects; +import java.util.stream.Collectors; public class BatchSetObjectMetadata { public static void batchSetObjectMetadata( - String projectId, String bucketName, String directoryPrefix) { + String projectId, String bucketName, String pathPrefix) { // The ID of your GCP project // String projectId = "your-project-id"; @@ -36,7 +42,7 @@ public static void batchSetObjectMetadata( // The directory prefix. All objects in the bucket with this prefix will have their metadata // updated - // String directoryPrefix = "yourDirectory/"; + // String pathPrefix = "yourPath/"; Storage storage = StorageOptions.newBuilder().setProjectId(projectId).build().getService(); Map newMetadata = new HashMap<>(); @@ -44,24 +50,48 @@ public static void batchSetObjectMetadata( Page blobs = storage.list( bucketName, - Storage.BlobListOption.prefix(directoryPrefix), - Storage.BlobListOption.currentDirectory()); + Storage.BlobListOption.prefix(pathPrefix), + Storage.BlobListOption.delimiter("/")); StorageBatch batchRequest = storage.batch(); // Add all blobs with the given prefix to the batch request - for (Blob blob : blobs.iterateAll()) { - batchRequest.update(blob.toBuilder().setMetadata(newMetadata).build()); - } + List> batchResults = + blobs + .streamAll() + .map(blob -> batchRequest.update(blob.toBuilder().setMetadata(newMetadata).build())) + .collect(Collectors.toList()); // Execute the batch request batchRequest.submit(); + List failures = + batchResults.stream() + .map( + r -> { + try { + BlobInfo blob = r.get(); + return null; + } catch (StorageException e) { + return e; + } + }) + .filter(Objects::nonNull) + .collect(Collectors.toList()); System.out.println( - "All blobs in bucket " + (batchResults.size() - failures.size()) + + " blobs in bucket " + bucketName + " with prefix '" - + directoryPrefix - + "' had their metadata updated."); + + pathPrefix + + "' had their metadata updated successfully."); + + if (!failures.isEmpty()) { + System.out.println("While processing, there were " + failures.size() + " failures"); + + for (StorageException failure : failures) { + failure.printStackTrace(System.out); + } + } } } // [END storage_batch_request] diff --git a/samples/snippets/src/main/java/com/example/storage/object/DownloadByteRange.java b/samples/snippets/src/main/java/com/example/storage/object/DownloadByteRange.java index b7327a72bc..e64bbb7c80 100644 --- a/samples/snippets/src/main/java/com/example/storage/object/DownloadByteRange.java +++ b/samples/snippets/src/main/java/com/example/storage/object/DownloadByteRange.java @@ -66,7 +66,7 @@ public static void downloadByteRange( ByteStreams.copy(from, to); System.out.printf( - "%s downloaded to %s from byte %d to byte %d", + "%s downloaded to %s from byte %d to byte %d%n", blobId.toGsUtilUri(), destFileName, startByte, endBytes); } } diff --git a/samples/snippets/src/main/java/com/example/storage/object/DownloadObject.java b/samples/snippets/src/main/java/com/example/storage/object/DownloadObject.java index 8f0f848e44..d7982f6c53 100644 --- a/samples/snippets/src/main/java/com/example/storage/object/DownloadObject.java +++ b/samples/snippets/src/main/java/com/example/storage/object/DownloadObject.java @@ -18,7 +18,6 @@ // [START storage_download_file] -import com.google.cloud.storage.Blob; import com.google.cloud.storage.BlobId; import com.google.cloud.storage.Storage; import com.google.cloud.storage.StorageOptions; @@ -26,7 +25,8 @@ public class DownloadObject { public static void downloadObject( - String projectId, String bucketName, String objectName, String destFilePath) { + String projectId, String bucketName, String objectName, String destFilePath) + throws Exception { // The ID of your GCP project // String projectId = "your-project-id"; @@ -39,18 +39,19 @@ public static void downloadObject( // The path to which the file should be downloaded // String destFilePath = "/local/path/to/file.txt"; - Storage storage = StorageOptions.newBuilder().setProjectId(projectId).build().getService(); + StorageOptions storageOptions = StorageOptions.newBuilder().setProjectId(projectId).build(); + try (Storage storage = storageOptions.getService()) { - Blob blob = storage.get(BlobId.of(bucketName, objectName)); - blob.downloadTo(Paths.get(destFilePath)); + storage.downloadTo(BlobId.of(bucketName, objectName), Paths.get(destFilePath)); - System.out.println( - "Downloaded object " - + objectName - + " from bucket name " - + bucketName - + " to " - + destFilePath); + System.out.println( + "Downloaded object " + + objectName + + " from bucket name " + + bucketName + + " to " + + destFilePath); + } } } // [END storage_download_file] diff --git a/samples/snippets/src/main/java/com/example/storage/object/DownloadPublicObject.java b/samples/snippets/src/main/java/com/example/storage/object/DownloadPublicObject.java index b8072893d4..feb966b1e0 100644 --- a/samples/snippets/src/main/java/com/example/storage/object/DownloadPublicObject.java +++ b/samples/snippets/src/main/java/com/example/storage/object/DownloadPublicObject.java @@ -18,7 +18,6 @@ // [START storage_download_public_file] -import com.google.cloud.storage.Blob; import com.google.cloud.storage.BlobId; import com.google.cloud.storage.Storage; import com.google.cloud.storage.StorageOptions; @@ -39,8 +38,7 @@ public static void downloadPublicObject( // Instantiate an anonymous Google Cloud Storage client, which can only access public files Storage storage = StorageOptions.getUnauthenticatedInstance().getService(); - Blob blob = storage.get(BlobId.of(bucketName, publicObjectName)); - blob.downloadTo(destFilePath); + storage.downloadTo(BlobId.of(bucketName, publicObjectName), destFilePath); System.out.println( "Downloaded public object " diff --git a/samples/snippets/src/main/java/com/example/storage/object/PrintFileAcl.java b/samples/snippets/src/main/java/com/example/storage/object/PrintBlobAcl.java similarity index 95% rename from samples/snippets/src/main/java/com/example/storage/object/PrintFileAcl.java rename to samples/snippets/src/main/java/com/example/storage/object/PrintBlobAcl.java index 5fbcad0c78..34089a56f9 100644 --- a/samples/snippets/src/main/java/com/example/storage/object/PrintFileAcl.java +++ b/samples/snippets/src/main/java/com/example/storage/object/PrintBlobAcl.java @@ -25,9 +25,9 @@ import com.google.cloud.storage.StorageOptions; import java.util.List; -public class PrintFileAcl { +public class PrintBlobAcl { - public static void printFileAcl(String bucketName, String blobName) { + public static void printBlobAcl(String bucketName, String blobName) { // The ID to give your GCS bucket // String bucketName = "your-unique-bucket-name"; diff --git a/samples/snippets/src/main/java/com/example/storage/object/PrintFileAclForUser.java b/samples/snippets/src/main/java/com/example/storage/object/PrintBlobAclForUser.java similarity index 68% rename from samples/snippets/src/main/java/com/example/storage/object/PrintFileAclForUser.java rename to samples/snippets/src/main/java/com/example/storage/object/PrintBlobAclForUser.java index d150cfa935..60d7bc22e9 100644 --- a/samples/snippets/src/main/java/com/example/storage/object/PrintFileAclForUser.java +++ b/samples/snippets/src/main/java/com/example/storage/object/PrintBlobAclForUser.java @@ -25,9 +25,10 @@ import com.google.cloud.storage.Storage; import com.google.cloud.storage.StorageOptions; -public class PrintFileAclForUser { +public class PrintBlobAclForUser { - public static void printFileAclForUser(String bucketName, String blobName, String userEmail) { + public static void printBlobAclForUser(String bucketName, String blobName, String userEmail) + throws Exception { // The ID to give your GCS bucket // String bucketName = "your-unique-bucket-name"; @@ -38,14 +39,15 @@ public static void printFileAclForUser(String bucketName, String blobName, Strin // The email of the user whose acl is being retrieved. // String userEmail = "someuser@domain.com" - Storage storage = StorageOptions.newBuilder().build().getService(); - Blob blob = storage.get(BlobId.of(bucketName, blobName)); - Acl blobAcl = blob.getAcl(new User(userEmail)); - if (blobAcl != null) { - String userRole = blobAcl.getRole().name(); - System.out.println("User " + userEmail + " has role " + userRole); - } else { - System.out.println("User " + userEmail + " not found"); + try (Storage storage = StorageOptions.newBuilder().build().getService()) { + Blob blob = storage.get(BlobId.of(bucketName, blobName)); + Acl blobAcl = blob.getAcl(new User(userEmail)); + if (blobAcl != null) { + String userRole = blobAcl.getRole().name(); + System.out.println("User " + userEmail + " has role " + userRole); + } else { + System.out.println("User " + userEmail + " not found"); + } } } } diff --git a/samples/snippets/src/main/java/com/example/storage/object/RemoveFileOwner.java b/samples/snippets/src/main/java/com/example/storage/object/RemoveBlobOwner.java similarity index 96% rename from samples/snippets/src/main/java/com/example/storage/object/RemoveFileOwner.java rename to samples/snippets/src/main/java/com/example/storage/object/RemoveBlobOwner.java index bb6c35a9a3..ecbb0e41df 100644 --- a/samples/snippets/src/main/java/com/example/storage/object/RemoveFileOwner.java +++ b/samples/snippets/src/main/java/com/example/storage/object/RemoveBlobOwner.java @@ -24,9 +24,9 @@ import com.google.cloud.storage.Storage; import com.google.cloud.storage.StorageOptions; -public class RemoveFileOwner { +public class RemoveBlobOwner { - public static void removeFileOwner( + public static void removeBlobOwner( String projectId, String bucketName, String userEmail, String blobName) { // The ID of your GCP project // String projectId = "your-project-id"; diff --git a/samples/snippets/src/main/java/com/example/storage/object/SetObjectMetadata.java b/samples/snippets/src/main/java/com/example/storage/object/SetObjectMetadata.java index 5fde73f384..ae05011e8e 100644 --- a/samples/snippets/src/main/java/com/example/storage/object/SetObjectMetadata.java +++ b/samples/snippets/src/main/java/com/example/storage/object/SetObjectMetadata.java @@ -20,6 +20,7 @@ import com.google.cloud.storage.Blob; import com.google.cloud.storage.BlobId; +import com.google.cloud.storage.BlobInfo; import com.google.cloud.storage.Storage; import com.google.cloud.storage.StorageOptions; import java.util.HashMap; @@ -53,7 +54,8 @@ public static void setObjectMetadata(String projectId, String bucketName, String // Does an upsert operation, if the key already exists it's replaced by the new value, otherwise // it's added. - blob.toBuilder().setMetadata(newMetadata).build().update(precondition); + BlobInfo pendingUpdate = blob.toBuilder().setMetadata(newMetadata).build(); + storage.update(pendingUpdate, precondition); System.out.println( "Updated custom metadata for object " + objectName + " in bucket " + bucketName); diff --git a/samples/snippets/src/main/java/com/example/storage/transfermanager/DownloadMany.java b/samples/snippets/src/main/java/com/example/storage/transfermanager/DownloadMany.java index aae4d80596..a79e18cdcf 100644 --- a/samples/snippets/src/main/java/com/example/storage/transfermanager/DownloadMany.java +++ b/samples/snippets/src/main/java/com/example/storage/transfermanager/DownloadMany.java @@ -28,24 +28,26 @@ class DownloadMany { public static void downloadManyBlobs( - String bucketName, List blobs, Path destinationDirectory) { + String bucketName, List blobs, Path destinationDirectory) throws Exception { - TransferManager transferManager = TransferManagerConfig.newBuilder().build().getService(); - ParallelDownloadConfig parallelDownloadConfig = - ParallelDownloadConfig.newBuilder() - .setBucketName(bucketName) - .setDownloadDirectory(destinationDirectory) - .build(); + try (TransferManager transferManager = + TransferManagerConfig.newBuilder().build().getService()) { + ParallelDownloadConfig parallelDownloadConfig = + ParallelDownloadConfig.newBuilder() + .setBucketName(bucketName) + .setDownloadDirectory(destinationDirectory) + .build(); - List results = - transferManager.downloadBlobs(blobs, parallelDownloadConfig).getDownloadResults(); + List results = + transferManager.downloadBlobs(blobs, parallelDownloadConfig).getDownloadResults(); - for (DownloadResult result : results) { - System.out.println( - "Download of " - + result.getInput().getName() - + " completed with status " - + result.getStatus()); + for (DownloadResult result : results) { + System.out.println( + "Download of " + + result.getInput().getName() + + " completed with status " + + result.getStatus()); + } } } } diff --git a/samples/snippets/src/test/java/com/example/storage/Env.java b/samples/snippets/src/test/java/com/example/storage/Env.java new file mode 100644 index 0000000000..91ab9d725c --- /dev/null +++ b/samples/snippets/src/test/java/com/example/storage/Env.java @@ -0,0 +1,31 @@ +/* + * Copyright 2025 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 + * + * http://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.example.storage; + +import com.google.cloud.storage.Acl.User; + +public final class Env { + + public static final String IT_SERVICE_ACCOUNT_EMAIL = System.getenv("IT_SERVICE_ACCOUNT_EMAIL"); + public static final User IT_SERVICE_ACCOUNT_USER = new User(IT_SERVICE_ACCOUNT_EMAIL); + public static final String GOOGLE_CLOUD_PROJECT = System.getenv("GOOGLE_CLOUD_PROJECT"); + public static final String GOOGLE_CLOUD_PROJECT_NUMBER = + System.getenv("GOOGLE_CLOUD_PROJECT_NUMBER"); + public static final String JOB_TYPE = System.getenv("JOB_TYPE"); + + private Env() {} +} diff --git a/samples/snippets/src/test/java/com/example/storage/ITBucketSnippets.java b/samples/snippets/src/test/java/com/example/storage/ITBucketSnippets.java index 58444c6eca..051bd05e23 100644 --- a/samples/snippets/src/test/java/com/example/storage/ITBucketSnippets.java +++ b/samples/snippets/src/test/java/com/example/storage/ITBucketSnippets.java @@ -111,7 +111,7 @@ public class ITBucketSnippets { private static final Logger log = Logger.getLogger(ITBucketSnippets.class.getName()); private static final String BUCKET = RemoteStorageHelper.generateBucketName(); - private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); + private static final String PROJECT_ID = Env.GOOGLE_CLOUD_PROJECT; private static final String KMS_KEY_NAME = "projects/cloud-java-ci-sample/locations/us/keyRings/" + "gcs_test_kms_key_ring/cryptoKeys/gcs_kms_key_one"; diff --git a/samples/snippets/src/test/java/com/example/storage/ITCleanupOldBucketsTest.java b/samples/snippets/src/test/java/com/example/storage/ITCleanupOldBucketsTest.java new file mode 100644 index 0000000000..0360aa189f --- /dev/null +++ b/samples/snippets/src/test/java/com/example/storage/ITCleanupOldBucketsTest.java @@ -0,0 +1,78 @@ +/* + * Copyright 2025 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 + * + * http://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.example.storage; + +import com.google.api.gax.paging.Page; +import com.google.cloud.storage.Bucket; +import com.google.cloud.storage.BucketInfo; +import com.google.cloud.storage.Storage; +import com.google.cloud.storage.Storage.BucketField; +import com.google.cloud.storage.Storage.BucketListOption; +import com.google.cloud.storage.TransportCompatibility.Transport; +import com.google.cloud.storage.it.BucketCleaner; +import com.google.cloud.storage.it.runner.StorageITRunner; +import com.google.cloud.storage.it.runner.annotations.Backend; +import com.google.cloud.storage.it.runner.annotations.Inject; +import com.google.cloud.storage.it.runner.annotations.SingleBackend; +import com.google.cloud.storage.it.runner.annotations.StorageFixture; +import com.google.common.collect.ImmutableList; +import com.google.storage.control.v2.StorageControlClient; +import java.time.Instant; +import java.time.OffsetDateTime; +import java.time.ZoneOffset; +import java.util.UUID; +import org.junit.Test; +import org.junit.runner.RunWith; + +@RunWith(StorageITRunner.class) +@SingleBackend(Backend.PROD) +public final class ITCleanupOldBucketsTest { + + @Inject + @StorageFixture(Transport.HTTP) + public Storage storage; + @Inject + public StorageControlClient ctrl; + @Inject + public BucketInfo bucket; + + @Test + public void cleanupOldBuckets() { + Page page = storage.list( + BucketListOption.fields(BucketField.NAME, BucketField.TIME_CREATED)); + + String bucketNamePrefix = bucket.getName().substring(0, UUID.randomUUID().toString().length()); + + OffsetDateTime now = Instant.now().atOffset(ZoneOffset.UTC); + OffsetDateTime twentyFourHoursAgo = now.minusHours(24); + + ImmutableList bucketsToClean = page.streamAll() + .map(Bucket::asBucketInfo) + .filter(bucket -> { + OffsetDateTime ctime = bucket.getCreateTimeOffsetDateTime(); + String name = bucket.getName(); + return ctime.isBefore(twentyFourHoursAgo) + && (name.startsWith("gcloud") || name.startsWith(bucketNamePrefix)); + }) + .map(BucketInfo::getName) + .collect(ImmutableList.toImmutableList()); + + for (String bucketName : bucketsToClean) { + BucketCleaner.doCleanup(bucketName, storage, ctrl); + } + } +} diff --git a/samples/snippets/src/test/java/com/example/storage/ITHmacSnippets.java b/samples/snippets/src/test/java/com/example/storage/ITHmacSnippets.java index 4e27749621..db548e8877 100644 --- a/samples/snippets/src/test/java/com/example/storage/ITHmacSnippets.java +++ b/samples/snippets/src/test/java/com/example/storage/ITHmacSnippets.java @@ -19,6 +19,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; +import static org.junit.Assume.assumeFalse; import com.example.storage.hmac.ActivateHmacKey; import com.example.storage.hmac.CreateHmacKey; @@ -33,10 +34,8 @@ import com.google.cloud.storage.HmacKey.HmacKeyState; import com.google.cloud.storage.ServiceAccount; import com.google.cloud.storage.Storage; -import com.google.cloud.testing.junit4.MultipleAttemptsRule; import org.junit.Assert; import org.junit.Before; -import org.junit.Rule; import org.junit.Test; public class ITHmacSnippets extends TestBase { @@ -46,11 +45,19 @@ public class ITHmacSnippets extends TestBase { @Before public void before() { + // Skip running Hmac snippet tests in CI + // All of our samples CI uses a single service account. Each service account can only have 5 + // HMAC keys. + // We have 6 test scenarios defined. + // If more than one build is running at the same time they will fight with each other's limit + // These samples have not materially changed since 2022-03 (as of 2025-05). + // Additionally, we have more robust integration tests for HMAC operations in the library + // itself. + assumeFalse("skipping hmac snippet tests in CI due to racy interactions", + "samples".equals(Env.JOB_TYPE)); cleanUpHmacKeys(ServiceAccount.of(HMAC_KEY_TEST_SERVICE_ACCOUNT)); } - @Rule public MultipleAttemptsRule multipleAttemptsRule = new MultipleAttemptsRule(5, 2000L); - private void cleanUpHmacKeys(ServiceAccount serviceAccount) { Page metadatas = storage.listHmacKeys(Storage.ListHmacKeysOption.serviceAccount(serviceAccount)); diff --git a/samples/snippets/src/test/java/com/example/storage/ITObjectSnippets.java b/samples/snippets/src/test/java/com/example/storage/ITObjectSnippets.java index 61dbeb47aa..6db8a5ca45 100644 --- a/samples/snippets/src/test/java/com/example/storage/ITObjectSnippets.java +++ b/samples/snippets/src/test/java/com/example/storage/ITObjectSnippets.java @@ -16,6 +16,8 @@ package com.example.storage; +import static com.example.storage.Env.GOOGLE_CLOUD_PROJECT; +import static com.google.common.truth.Truth.assertThat; import static java.nio.charset.StandardCharsets.UTF_8; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; @@ -57,17 +59,24 @@ import com.example.storage.object.UploadKmsEncryptedObject; import com.example.storage.object.UploadObject; import com.example.storage.object.UploadObjectFromMemory; +import com.google.cloud.kms.v1.CryptoKey; import com.google.cloud.storage.Acl; import com.google.cloud.storage.Blob; import com.google.cloud.storage.BlobId; import com.google.cloud.storage.BlobInfo; +import com.google.cloud.storage.Bucket; import com.google.cloud.storage.BucketInfo; -import com.google.cloud.storage.Storage; +import com.google.cloud.storage.BucketInfo.IamConfiguration; +import com.google.cloud.storage.DataGenerator; +import com.google.cloud.storage.Storage.BlobTargetOption; +import com.google.cloud.storage.Storage.BlobWriteOption; +import com.google.cloud.storage.Storage.BucketTargetOption; import com.google.cloud.storage.StorageClass; +import com.google.cloud.storage.TmpFile; import com.google.cloud.storage.it.BucketCleaner; -import com.google.cloud.storage.testing.RemoteStorageHelper; -import com.google.cloud.testing.junit4.MultipleAttemptsRule; -import com.google.cloud.testing.junit4.StdOutCaptureRule; +import com.google.cloud.storage.it.TemporaryBucket; +import com.google.cloud.storage.it.runner.annotations.Inject; +import com.google.cloud.storage.it.runner.registry.KmsFixture; import com.google.common.collect.ImmutableMap; import com.google.common.io.BaseEncoding; import java.io.File; @@ -76,126 +85,118 @@ import java.io.OutputStream; import java.net.URL; import java.nio.file.Files; +import java.nio.file.Path; import java.time.Duration; import java.util.Date; -import java.util.Map; import java.util.Random; -import java.util.logging.Logger; import javax.net.ssl.HttpsURLConnection; -import org.junit.AfterClass; import org.junit.Assert; -import org.junit.BeforeClass; import org.junit.Rule; import org.junit.Test; -import org.junit.rules.ExpectedException; +import org.junit.rules.TemporaryFolder; -public class ITObjectSnippets { +public class ITObjectSnippets extends TestBase { - private static final Logger log = Logger.getLogger(ITObjectSnippets.class.getName()); - private static final String BUCKET = RemoteStorageHelper.generateBucketName(); - private static final String BLOB = "blob"; private static final String STRING_CONTENT = "Hello, World!"; private static final byte[] CONTENT = STRING_CONTENT.getBytes(UTF_8); - private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); - private static final String KMS_KEY_NAME = - "projects/cloud-java-ci-sample/locations/us/keyRings/" - + "gcs_test_kms_key_ring/cryptoKeys/gcs_kms_key_one"; - private static Storage storage; + @Rule public final TemporaryFolder tmpDir = new TemporaryFolder(); - @Rule public final StdOutCaptureRule stdOutCaptureRule = new StdOutCaptureRule(); - - @Rule public MultipleAttemptsRule multipleAttemptsRule = new MultipleAttemptsRule(5); - - @Rule public ExpectedException thrown = ExpectedException.none(); - - @BeforeClass - public static void beforeClass() { - RemoteStorageHelper helper = RemoteStorageHelper.create(); - storage = helper.getOptions().getService(); - storage.create(BucketInfo.of(BUCKET)); - storage.create(BlobInfo.newBuilder(BUCKET, BLOB).build(), CONTENT); - } - - @AfterClass - public static void afterClass() throws Exception { - try (Storage ignore = storage) { - BucketCleaner.doCleanup(BUCKET, storage); - } - } + @Inject public KmsFixture kmsFixture; @Test public void testChangeObjectStorageClass() { - Blob blob = storage.get(BUCKET, BLOB); - Assert.assertNotEquals(StorageClass.COLDLINE, blob.getStorageClass()); - ChangeObjectStorageClass.changeObjectStorageClass(PROJECT_ID, BUCKET, BLOB); - assertEquals(StorageClass.COLDLINE, storage.get(BUCKET, BLOB).getStorageClass()); - assertArrayEquals(CONTENT, storage.get(BUCKET, BLOB).getContent()); + String objectName = generator.randomObjectName(); + BlobInfo gen1 = storage.create(info(objectName), CONTENT, BlobTargetOption.doesNotExist()); + Assert.assertNotEquals(StorageClass.COLDLINE, gen1.getStorageClass()); + ChangeObjectStorageClass.changeObjectStorageClass( + GOOGLE_CLOUD_PROJECT, bucket.getName(), objectName); + Blob gen2 = storage.get(bucket.getName(), objectName); + assertEquals(StorageClass.COLDLINE, gen2.getStorageClass()); + assertArrayEquals(CONTENT, gen2.getContent()); } @Test public void testCopyObject() throws Exception { - String newBucket = RemoteStorageHelper.generateBucketName(); - storage.create(BucketInfo.newBuilder(newBucket).build()); - try { - CopyObject.copyObject(PROJECT_ID, BUCKET, BLOB, newBucket); - assertNotNull(storage.get(newBucket, BLOB)); - } finally { - storage.delete(newBucket, BLOB); - storage.delete(newBucket); + try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() + .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) + .setStorage(storage) + .build()) { + + String newBucket = tmpBucket.getBucket().getName(); + + String objectName = generator.randomObjectName(); + storage.create(info(objectName)); + CopyObject.copyObject(GOOGLE_CLOUD_PROJECT, bucket.getName(), objectName, newBucket); + assertNotNull(storage.get(newBucket, objectName)); } } @Test public void testDeleteObject() { - String blob = "deletethisblob"; - storage.create(BlobInfo.newBuilder(BlobId.of(BUCKET, blob)).build()); - assertNotNull(storage.get(BUCKET, blob)); - DeleteObject.deleteObject(PROJECT_ID, BUCKET, blob); - assertNull(storage.get(BUCKET, blob)); + String blob = generator.randomObjectName(); + storage.create(BlobInfo.newBuilder(BlobId.of(bucket.getName(), blob)).build()); + assertNotNull(storage.get(bucket.getName(), blob)); + DeleteObject.deleteObject(GOOGLE_CLOUD_PROJECT, bucket.getName(), blob); + assertNull(storage.get(bucket.getName(), blob)); } @Test - public void testDownloadObject() throws IOException { - File tempFile = File.createTempFile("file", ".txt"); - try { - DownloadObject.downloadObject(PROJECT_ID, BUCKET, BLOB, tempFile.getPath()); - assertEquals("Hello, World!", new String(Files.readAllBytes(tempFile.toPath()))); - } finally { - tempFile.delete(); + public void testDownloadObject() throws Exception { + Path baseDir = tmpDir.getRoot().toPath(); + try (TmpFile file1 = DataGenerator.base64Characters().tempFile(baseDir, 13)) { + String objectName = generator.randomObjectName(); + storage.createFrom(info(objectName), file1.getPath(), BlobWriteOption.doesNotExist()); + DownloadObject.downloadObject( + GOOGLE_CLOUD_PROJECT, bucket.getName(), objectName, file1.getPath().toString()); + byte[] expected = Files.readAllBytes(file1.getPath()); + byte[] actual = storage.readAllBytes(bucket.getName(), objectName); + assertArrayEquals(expected, actual); } } @Test public void testDownloadObjectIntoMemory() throws IOException { - DownloadObjectIntoMemory.downloadObjectIntoMemory(PROJECT_ID, BUCKET, BLOB); - String snippetOutput = stdOutCaptureRule.getCapturedOutputAsUtf8String(); + String objectName = generator.randomObjectName(); + storage.create(info(objectName), CONTENT, BlobTargetOption.doesNotExist()); + DownloadObjectIntoMemory.downloadObjectIntoMemory( + GOOGLE_CLOUD_PROJECT, bucket.getName(), objectName); + String snippetOutput = stdOut.getCapturedOutputAsUtf8String(); + assertThat(snippetOutput).contains("The contents of " + objectName); } @Test - public void testDownloadPublicObject() throws IOException { - String publicBlob = "publicblob" + System.currentTimeMillis(); - BlobId publicBlobId = BlobId.of(BUCKET, publicBlob); - storage.create(BlobInfo.newBuilder(publicBlobId).build(), CONTENT); - storage.createAcl(publicBlobId, Acl.of(Acl.User.ofAllUsers(), Acl.Role.READER)); - File tempFile = File.createTempFile("file", ".txt"); - try { - DownloadPublicObject.downloadPublicObject(BUCKET, publicBlob, tempFile.toPath()); + public void testDownloadPublicObject() throws Exception { + try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() + .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()) + .setIamConfiguration(IamConfiguration.newBuilder() + .setIsUniformBucketLevelAccessEnabled(false) + .build()) + .build()) + .setStorage(storage) + .build()) { + String bucketName = tmpBucket.getBucket().getName(); + + String publicBlob = generator.randomObjectName(); + BlobId publicBlobId = BlobId.of(bucketName, publicBlob); + Blob gen1 = storage.create(BlobInfo.newBuilder(publicBlobId).build(), CONTENT, + BlobTargetOption.doesNotExist()); + storage.createAcl(gen1.getBlobId(), Acl.of(Acl.User.ofAllUsers(), Acl.Role.READER)); + File tempFile = tmpDir.newFile("file.txt"); + DownloadPublicObject.downloadPublicObject(bucketName, publicBlob, tempFile.toPath()); assertEquals("Hello, World!", new String(Files.readAllBytes(tempFile.toPath()))); - } finally { - tempFile.delete(); } } @Test public void testGetObjectMetadata() { - String blobName = "test-create-empty-blob"; - BlobId blobId = BlobId.of(BUCKET, blobName); + String blobName = generator.randomObjectName(); + BlobId blobId = BlobId.of(bucket.getName(), blobName); BlobInfo blobInfo = BlobInfo.newBuilder(blobId).setMetadata(ImmutableMap.of("k", "v")).build(); Blob remoteBlob = storage.create(blobInfo, CONTENT); assertNotNull(remoteBlob); - GetObjectMetadata.getObjectMetadata(PROJECT_ID, BUCKET, blobName); - String snippetOutput = stdOutCaptureRule.getCapturedOutputAsUtf8String(); + GetObjectMetadata.getObjectMetadata(GOOGLE_CLOUD_PROJECT, bucket.getName(), blobName); + String snippetOutput = stdOut.getCapturedOutputAsUtf8String(); assertTrue(snippetOutput.contains("Bucket: " + remoteBlob.getBucket())); assertTrue(snippetOutput.contains("Bucket: " + remoteBlob.getBucket())); assertTrue(snippetOutput.contains("CacheControl: " + remoteBlob.getCacheControl())); @@ -230,132 +231,174 @@ public void testGetObjectMetadata() { @Test public void testListObjects() { - ListObjects.listObjects(PROJECT_ID, BUCKET); - String snippetOutput = stdOutCaptureRule.getCapturedOutputAsUtf8String(); - assertTrue(snippetOutput.contains(BLOB)); + String name1 = generator.randomObjectName(); + storage.create(info(name1), BlobTargetOption.doesNotExist()); + ListObjects.listObjects(GOOGLE_CLOUD_PROJECT, bucket.getName()); + String snippetOutput = stdOut.getCapturedOutputAsUtf8String(); + assertTrue(snippetOutput.contains(name1)); } @Test public void testListObjectsWithPrefix() { - storage.create(BlobInfo.newBuilder(BlobId.of(BUCKET, "a/1.txt")).build()); - storage.create(BlobInfo.newBuilder(BlobId.of(BUCKET, "a/b/2.txt")).build()); - storage.create(BlobInfo.newBuilder(BlobId.of(BUCKET, "a/b/3.txt")).build()); - ListObjectsWithPrefix.listObjectsWithPrefix(PROJECT_ID, BUCKET, "a/"); - String snippetOutput = stdOutCaptureRule.getCapturedOutputAsUtf8String(); + String prefix = generator.randomObjectName(); + storage.create(BlobInfo.newBuilder(bucket.getName(), prefix + "a/1.txt").build()); + storage.create(BlobInfo.newBuilder(bucket.getName(), prefix + "a/b/2.txt").build()); + storage.create(BlobInfo.newBuilder(bucket.getName(), prefix + "a/b/3.txt").build()); + ListObjectsWithPrefix.listObjectsWithPrefix( + GOOGLE_CLOUD_PROJECT, bucket.getName(), prefix + "a/"); + String snippetOutput = stdOut.getCapturedOutputAsUtf8String(); assertTrue(snippetOutput.contains("a/1.txt")); assertTrue(snippetOutput.contains("a/b/")); assertFalse(snippetOutput.contains("a/b/2.txt")); } @Test - public void testMoveObject() { - String blob = "movethisblob"; - String newBlob = "movedthisblob"; - - storage.create(BlobInfo.newBuilder(BlobId.of(BUCKET, blob)).build()); - assertNotNull(storage.get(BUCKET, blob)); - String newBucket = RemoteStorageHelper.generateBucketName(); - storage.create(BucketInfo.newBuilder(newBucket).build()); - try { - MoveObject.moveObject(PROJECT_ID, BUCKET, blob, newBucket, newBlob); + public void testMoveObject() throws Exception { + String blob = generator.randomObjectName(); + String newBlob = generator.randomObjectName(); + + try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() + .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) + .setStorage(storage) + .build()) { + + String newBucket = tmpBucket.getBucket().getName(); + BlobInfo gen1 = + storage.create(BlobInfo.newBuilder(BlobId.of(newBucket, blob)).build()); + MoveObject.moveObject(GOOGLE_CLOUD_PROJECT, newBucket, blob, newBucket, newBlob); assertNotNull(storage.get(newBucket, newBlob)); - assertNull(storage.get(BUCKET, blob)); - } finally { - storage.delete(newBucket, newBlob); - storage.delete(newBucket); + assertNull(storage.get(bucket.getName(), blob)); } } @Test public void testSetObjectMetadata() { - SetObjectMetadata.setObjectMetadata(PROJECT_ID, BUCKET, BLOB); - Map metadata = storage.get(BUCKET, BLOB).getMetadata(); - assertEquals("value", metadata.get("keyToAddOrUpdate")); + String bucketName = bucket.getName(); + String name1 = generator.randomObjectName(); + BlobInfo b1Gen1 = storage.create(BlobInfo.newBuilder(bucketName, name1).build()); + + SetObjectMetadata.setObjectMetadata(GOOGLE_CLOUD_PROJECT, bucket.getName(), name1); + BlobInfo b1Gen2 = storage.get(bucketName, name1); + assertThat(b1Gen2).isNotNull(); + assertThat(b1Gen2.getMetadata()).containsAtLeast("keyToAddOrUpdate", "value"); } @Test public void testUploadObject() throws IOException { - File tempFile = File.createTempFile("file", ".txt"); - try { - Files.write(tempFile.toPath(), CONTENT); - UploadObject.uploadObject(PROJECT_ID, BUCKET, "uploadobjecttest", tempFile.getPath()); - assertArrayEquals(CONTENT, storage.get(BUCKET, "uploadobjecttest").getContent()); - } finally { - tempFile.delete(); + Path baseDir = tmpDir.getRoot().toPath(); + try (TmpFile file1 = DataGenerator.base64Characters().tempFile(baseDir, 13)) { + String objectName = generator.randomObjectName(); + UploadObject.uploadObject( + GOOGLE_CLOUD_PROJECT, bucket.getName(), objectName, file1.getPath().toString()); + byte[] expected = Files.readAllBytes(file1.getPath()); + byte[] actual = storage.readAllBytes(bucket.getName(), objectName); + assertArrayEquals(expected, actual); } } @Test public void testUploadObjectFromMemory() throws IOException { + String objectName = "uploadobjectfrommemorytest"; UploadObjectFromMemory.uploadObjectFromMemory( - PROJECT_ID, BUCKET, "uploadobjectfrommemorytest", STRING_CONTENT); - final byte[] output = storage.get(BUCKET, "uploadobjectfrommemorytest").getContent(); + GOOGLE_CLOUD_PROJECT, bucket.getName(), objectName, STRING_CONTENT); + final byte[] output = storage.get(bucket.getName(), objectName).getContent(); assertEquals(STRING_CONTENT, new String(output, UTF_8)); } @Test public void testObjectCSEKOperations() throws IOException { GenerateEncryptionKey.generateEncryptionKey(); - String snippetOutput = stdOutCaptureRule.getCapturedOutputAsUtf8String(); + String snippetOutput = stdOut.getCapturedOutputAsUtf8String(); String encryptionKey = snippetOutput.split(": ")[1].trim(); - File tempFile = File.createTempFile("file", ".txt"); - File downloadFile = File.createTempFile("dlfile", ".txt"); + File tempFile = tmpDir.newFile("file.txt"); + File downloadFile = tmpDir.newFile("dlfile.txt"); String encryptedBlob = "uploadencryptedobjecttest"; Files.write(tempFile.toPath(), CONTENT); UploadEncryptedObject.uploadEncryptedObject( - PROJECT_ID, BUCKET, encryptedBlob, tempFile.getPath(), encryptionKey); + GOOGLE_CLOUD_PROJECT, bucket.getName(), encryptedBlob, tempFile.getPath(), encryptionKey); DownloadEncryptedObject.downloadEncryptedObject( - PROJECT_ID, BUCKET, encryptedBlob, downloadFile.toPath(), encryptionKey); + GOOGLE_CLOUD_PROJECT, + bucket.getName(), + encryptedBlob, + downloadFile.toPath(), + encryptionKey); assertArrayEquals(CONTENT, Files.readAllBytes(downloadFile.toPath())); byte[] key = new byte[32]; new Random().nextBytes(key); String newEncryptionKey = BaseEncoding.base64().encode(key); RotateObjectEncryptionKey.rotateObjectEncryptionKey( - PROJECT_ID, BUCKET, encryptedBlob, encryptionKey, newEncryptionKey); - File newDownloadFile = File.createTempFile("newdownloadfile", ".txt"); + GOOGLE_CLOUD_PROJECT, bucket.getName(), encryptedBlob, encryptionKey, newEncryptionKey); + File newDownloadFile = tmpDir.newFile("newdownloadfile.txt"); DownloadEncryptedObject.downloadEncryptedObject( - PROJECT_ID, BUCKET, encryptedBlob, newDownloadFile.toPath(), newEncryptionKey); + GOOGLE_CLOUD_PROJECT, + bucket.getName(), + encryptedBlob, + newDownloadFile.toPath(), + newEncryptionKey); assertArrayEquals(CONTENT, Files.readAllBytes(newDownloadFile.toPath())); - assertNull(storage.get(BUCKET, encryptedBlob).getKmsKeyName()); + assertNull(storage.get(bucket.getName(), encryptedBlob).getKmsKeyName()); + CryptoKey key1 = kmsFixture.getKey1(); ChangeObjectCsekToKms.changeObjectFromCsekToKms( - PROJECT_ID, BUCKET, encryptedBlob, newEncryptionKey, KMS_KEY_NAME); - assertTrue(storage.get(BUCKET, encryptedBlob).getKmsKeyName().contains(KMS_KEY_NAME)); + GOOGLE_CLOUD_PROJECT, + bucket.getName(), + encryptedBlob, + newEncryptionKey, + key1.getName()); + assertTrue( + storage + .get(bucket.getName(), encryptedBlob) + .getKmsKeyName() + .contains(key1. getName())); } @Test - public void testObjectVersioningOperations() { - storage.get(BUCKET).toBuilder().setVersioningEnabled(true).build().update(); - String versionedBlob = "versionedblob"; - final Blob originalBlob = - storage.create(BlobInfo.newBuilder(BUCKET, versionedBlob).build(), CONTENT); - byte[] content2 = "Hello, World 2".getBytes(UTF_8); - storage.create(BlobInfo.newBuilder(BUCKET, versionedBlob).build(), content2); - - ListObjectsWithOldVersions.listObjectsWithOldVersions(PROJECT_ID, BUCKET); - String snippetOutput = stdOutCaptureRule.getCapturedOutputAsUtf8String(); - - snippetOutput = snippetOutput.replaceFirst(versionedBlob, ""); - assertTrue(snippetOutput.contains(versionedBlob)); - - CopyOldVersionOfObject.copyOldVersionOfObject( - PROJECT_ID, BUCKET, versionedBlob, originalBlob.getGeneration(), "copiedblob"); - assertArrayEquals(CONTENT, storage.get(BUCKET, "copiedblob").getContent()); - - DeleteOldVersionOfObject.deleteOldVersionOfObject( - PROJECT_ID, BUCKET, versionedBlob, originalBlob.getGeneration()); - assertNull(storage.get(BlobId.of(BUCKET, versionedBlob, originalBlob.getGeneration()))); - assertNotNull(storage.get(BUCKET, versionedBlob)); + public void testObjectVersioningOperations() throws Exception { + try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() + .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()) + .setVersioningEnabled(true).build()) + .setStorage(storage) + .build()) { + String bucketName = tmpBucket.getBucket().getName(); + + String versionedBlob = generator.randomObjectName(); + final Blob originalBlob = + storage.create(BlobInfo.newBuilder(bucketName, versionedBlob).build(), CONTENT); + byte[] content2 = "Hello, World 2".getBytes(UTF_8); + storage.create(BlobInfo.newBuilder(bucketName, versionedBlob).build(), content2); + + ListObjectsWithOldVersions.listObjectsWithOldVersions(GOOGLE_CLOUD_PROJECT, bucketName); + String snippetOutput = stdOut.getCapturedOutputAsUtf8String(); + + snippetOutput = snippetOutput.replaceFirst(versionedBlob, ""); + assertTrue(snippetOutput.contains(versionedBlob)); + + String copiedblob = generator.randomObjectName(); + CopyOldVersionOfObject.copyOldVersionOfObject( + GOOGLE_CLOUD_PROJECT, + bucketName, + versionedBlob, + originalBlob.getGeneration(), + copiedblob); + assertArrayEquals(CONTENT, storage.get(bucketName, copiedblob).getContent()); + + DeleteOldVersionOfObject.deleteOldVersionOfObject( + GOOGLE_CLOUD_PROJECT, bucketName, versionedBlob, originalBlob.getGeneration()); + assertNull( + storage.get(BlobId.of(bucketName, versionedBlob, originalBlob.getGeneration()))); + assertNotNull(storage.get(bucketName, versionedBlob)); + } } @Test public void testV4SignedURLs() throws IOException { String tempObject = "test-upload-signed-url-object"; - GenerateV4PutObjectSignedUrl.generateV4PutObjectSignedUrl(PROJECT_ID, BUCKET, tempObject); - String snippetOutput = stdOutCaptureRule.getCapturedOutputAsUtf8String(); + GenerateV4PutObjectSignedUrl.generateV4PutObjectSignedUrl( + GOOGLE_CLOUD_PROJECT, bucket.getName(), tempObject); + String snippetOutput = stdOut.getCapturedOutputAsUtf8String(); String url = snippetOutput.split("\n")[1]; URL uploadUrl = new URL(url); HttpsURLConnection connection = (HttpsURLConnection) uploadUrl.openConnection(); @@ -366,8 +409,9 @@ public void testV4SignedURLs() throws IOException { out.write(CONTENT); assertEquals(connection.getResponseCode(), 200); } - GenerateV4GetObjectSignedUrl.generateV4GetObjectSignedUrl(PROJECT_ID, BUCKET, tempObject); - snippetOutput = stdOutCaptureRule.getCapturedOutputAsUtf8String(); + GenerateV4GetObjectSignedUrl.generateV4GetObjectSignedUrl( + GOOGLE_CLOUD_PROJECT, bucket.getName(), tempObject); + snippetOutput = stdOut.getCapturedOutputAsUtf8String(); url = snippetOutput.split("\n")[5]; URL downloadUrl = new URL(url); connection = (HttpsURLConnection) downloadUrl.openConnection(); @@ -380,159 +424,187 @@ public void testV4SignedURLs() throws IOException { @Test public void testMakeObjectPublic() { - String aclBlob = "acl-test-blob"; + String aclBlob = generator.randomObjectName(); assertNull( - storage.create(BlobInfo.newBuilder(BUCKET, aclBlob).build()).getAcl(Acl.User.ofAllUsers())); - MakeObjectPublic.makeObjectPublic(PROJECT_ID, BUCKET, aclBlob); - assertNotNull(storage.get(BUCKET, aclBlob).getAcl(Acl.User.ofAllUsers())); + storage + .create(BlobInfo.newBuilder(bucket.getName(), aclBlob).build()) + .getAcl(Acl.User.ofAllUsers())); + MakeObjectPublic.makeObjectPublic(GOOGLE_CLOUD_PROJECT, bucket.getName(), aclBlob); + assertNotNull(storage.get(bucket.getName(), aclBlob).getAcl(Acl.User.ofAllUsers())); } @Test public void testComposeObject() { - String firstObject = "firstObject"; - String secondObject = "secondObject"; - String targetObject = "targetObject"; - storage.create(BlobInfo.newBuilder(BUCKET, firstObject).build(), firstObject.getBytes(UTF_8)); - storage.create(BlobInfo.newBuilder(BUCKET, secondObject).build(), secondObject.getBytes(UTF_8)); + String firstObject = generator.randomObjectName(); + String secondObject = generator.randomObjectName(); + String targetObject = generator.randomObjectName(); + storage.create( + BlobInfo.newBuilder(bucket.getName(), firstObject).build(), firstObject.getBytes(UTF_8)); + storage.create( + BlobInfo.newBuilder(bucket.getName(), secondObject).build(), secondObject.getBytes(UTF_8)); - ComposeObject.composeObject(BUCKET, firstObject, secondObject, targetObject, PROJECT_ID); + ComposeObject.composeObject( + bucket.getName(), firstObject, secondObject, targetObject, GOOGLE_CLOUD_PROJECT); - assertArrayEquals( - "firstObjectsecondObject".getBytes(UTF_8), storage.get(BUCKET, targetObject).getContent()); + String got = stdOut.getCapturedOutputAsUtf8String(); + assertThat(got).contains(firstObject); + assertThat(got).contains(secondObject); + assertThat(got).contains(targetObject); } @Test public void testStreamUploadDownload() throws Exception { - StreamObjectUpload.streamObjectUpload(PROJECT_ID, BUCKET, "streamBlob", "hello world"); - File file = File.createTempFile("stream", "test"); + String blobName = generator.randomObjectName(); + StreamObjectUpload.streamObjectUpload( + GOOGLE_CLOUD_PROJECT, bucket.getName(), blobName, "hello world"); + String got1 = stdOut.getCapturedOutputAsUtf8String(); + assertThat(got1).contains(blobName); + assertThat(got1).contains("WriteChannel"); + + File file = tmpDir.newFile(); StreamObjectDownload.streamObjectDownload( - PROJECT_ID, BUCKET, "streamBlob", file.getAbsolutePath()); - assertArrayEquals(Files.readAllBytes(file.toPath()), "hello world".getBytes()); - file.delete(); + GOOGLE_CLOUD_PROJECT, bucket.getName(), blobName, file.getAbsolutePath()); + String got2 = stdOut.getCapturedOutputAsUtf8String(); + assertThat(got2).contains(blobName); + assertThat(got2).contains("ReadChannel"); } @Test public void testUploadKMSEncryptedObject() { - String blobName = "kms-encrypted-blob"; - UploadKmsEncryptedObject.uploadKmsEncryptedObject(PROJECT_ID, BUCKET, blobName, KMS_KEY_NAME); - assertNotNull(storage.get(BUCKET, blobName)); + String blobName = generator.randomObjectName(); + UploadKmsEncryptedObject.uploadKmsEncryptedObject( + GOOGLE_CLOUD_PROJECT, bucket.getName(), blobName, kmsFixture.getKey1().getName()); + assertNotNull(storage.get(bucket.getName(), blobName)); } @Test public void testBatchSetObjectMetadata() { - storage.create(BlobInfo.newBuilder(BUCKET, "b/1.txt").build()); - storage.create(BlobInfo.newBuilder(BUCKET, "b/2.txt").build()); - - BatchSetObjectMetadata.batchSetObjectMetadata(PROJECT_ID, BUCKET, "b/"); - - Map firstBlobMetadata = storage.get(BUCKET, "b/1.txt").getMetadata(); - Map secondBlobMetadata = storage.get(BUCKET, "b/2.txt").getMetadata(); - - assertEquals("value", firstBlobMetadata.get("keyToAddOrUpdate")); - assertEquals("value", secondBlobMetadata.get("keyToAddOrUpdate")); + String prefix = generator.randomObjectName(); + String name1 = prefix + "/1.txt"; + String name2 = prefix + "/2.txt"; + String bucketName = bucket.getName(); + BlobInfo b1Gen1 = storage.create(BlobInfo.newBuilder(bucketName, name1).build()); + BlobInfo b2Gen1 = storage.create(BlobInfo.newBuilder(bucketName, name2).build()); + + BatchSetObjectMetadata.batchSetObjectMetadata(GOOGLE_CLOUD_PROJECT, bucketName, prefix + "/"); + + BlobInfo b1Gen2 = storage.get(bucketName, name1); + BlobInfo b2Gen2 = storage.get(bucketName, name2); + assertThat(b1Gen2).isNotNull(); + assertThat(b2Gen2).isNotNull(); + assertThat(b1Gen2.getMetadata()).containsAtLeast("keyToAddOrUpdate", "value"); + assertThat(b2Gen2.getMetadata()).containsAtLeast("keyToAddOrUpdate", "value"); } @Test public void testSetObjectRetentionPolicy() { - String tempBucket = RemoteStorageHelper.generateBucketName(); - storage.create( - BucketInfo.of(tempBucket), Storage.BucketTargetOption.enableObjectRetention(true)); - String retentionBlob = "retentionblob"; - storage.create(BlobInfo.newBuilder(tempBucket, retentionBlob).build()); - assertNull(storage.get(tempBucket, retentionBlob).getRetention()); + BucketInfo bucketInfo = BucketInfo.newBuilder(generator.randomBucketName()).build(); + Bucket tmpBucket = storage.create(bucketInfo, BucketTargetOption.enableObjectRetention(true)); + String tempBucket = tmpBucket.getName(); try { - SetObjectRetentionPolicy.setObjectRetentionPolicy(PROJECT_ID, tempBucket, retentionBlob); - assertNotNull(storage.get(tempBucket, retentionBlob).getRetention()); - } finally { - storage.get(tempBucket, retentionBlob).toBuilder() - .setRetention(null) - .build() - .update(Storage.BlobTargetOption.overrideUnlockedRetention(true)); - storage.delete(tempBucket, retentionBlob); - storage.delete(tempBucket); + String retentionBlob = generator.randomObjectName(); + BlobInfo gen1 = storage.create(BlobInfo.newBuilder(tempBucket, retentionBlob).build()); + assertNull(storage.get(tempBucket, retentionBlob).getRetention()); + try { + SetObjectRetentionPolicy.setObjectRetentionPolicy( + GOOGLE_CLOUD_PROJECT, tempBucket, retentionBlob); + assertNotNull(storage.get(tempBucket, retentionBlob).getRetention()); + } finally { + storage.update( + gen1.toBuilder().setRetention(null).build(), + BlobTargetOption.overrideUnlockedRetention(true)); + } + } finally { + BucketCleaner.doCleanup(tempBucket, storage); } } @Test - public void testListSoftDeletedObjects() { - // This is already the default, but we set it here in case the default ever changes - storage.get(BUCKET).toBuilder() - .setSoftDeletePolicy( - BucketInfo.SoftDeletePolicy.newBuilder() + public void testListSoftDeletedObjects() throws Exception { + try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() + .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()) + // This is already the default, but we set it here in case the default ever changes + .setSoftDeletePolicy( + BucketInfo.SoftDeletePolicy.newBuilder() .setRetentionDuration(Duration.ofDays(7)) .build()) - .build() - .update(); + .build()) + .setStorage(storage) + .build()) { + String bucketName = tmpBucket.getBucket().getName(); - String blob = "softdelobj"; - storage.create(BlobInfo.newBuilder(BlobId.of(BUCKET, blob)).build()); - storage.delete(BlobId.of(BUCKET, blob)); + String blob = generator.randomObjectName(); + storage.create(BlobInfo.newBuilder(BlobId.of(bucketName, blob)).build()); + storage.delete(BlobId.of(bucketName, blob)); - ListSoftDeletedObjects.listSoftDeletedObjects(PROJECT_ID, BUCKET); + ListSoftDeletedObjects.listSoftDeletedObjects(GOOGLE_CLOUD_PROJECT, bucketName); - String snippetOutput = stdOutCaptureRule.getCapturedOutputAsUtf8String(); + String snippetOutput = stdOut.getCapturedOutputAsUtf8String(); - assertTrue(snippetOutput.contains(blob)); + assertTrue(snippetOutput.contains(blob)); + } } @Test - public void testListSoftDeletedVersionsOfObject() { - // This is already the default, but we set it here in case the default ever changes - storage.get(BUCKET).toBuilder() - .setSoftDeletePolicy( - BucketInfo.SoftDeletePolicy.newBuilder() - .setRetentionDuration(Duration.ofDays(7)) - .build()) - .build() - .update(); - - System.out.println(storage.get(BUCKET).getSoftDeletePolicy().toString()); - - String blob = "softdelobj1"; - storage.create(BlobInfo.newBuilder(BlobId.of(BUCKET, blob)).build()); - storage.delete(BlobId.of(BUCKET, blob)); - - String blob2 = "softdelobj2"; - storage.create(BlobInfo.newBuilder(BlobId.of(BUCKET, blob2)).build()); - storage.delete(BlobId.of(BUCKET, blob2)); - - ListSoftDeletedVersionsOfObject.listSoftDeletedVersionOfObject(PROJECT_ID, BUCKET, blob); - - String snippetOutput = stdOutCaptureRule.getCapturedOutputAsUtf8String(); - - assertTrue(snippetOutput.contains(blob)); - assertFalse(snippetOutput.contains(blob2)); + public void testListSoftDeletedVersionsOfObject() throws Exception { + try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() + .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()) + // This is already the default, but we set it here in case the default ever changes + .setSoftDeletePolicy( + BucketInfo.SoftDeletePolicy.newBuilder() + .setRetentionDuration(Duration.ofDays(7)) + .build()) + .build()) + .setStorage(storage) + .build()) { + String bucketName = tmpBucket.getBucket().getName(); + + System.out.println(storage.get(bucketName).getSoftDeletePolicy().toString()); + + String blob = generator.randomObjectName(); + storage.create(BlobInfo.newBuilder(BlobId.of(bucketName, blob)).build()); + storage.delete(BlobId.of(bucketName, blob)); + + String blob2 = generator.randomObjectName(); + storage.create(BlobInfo.newBuilder(BlobId.of(bucketName, blob2)).build()); + storage.delete(BlobId.of(bucketName, blob2)); + + ListSoftDeletedVersionsOfObject.listSoftDeletedVersionOfObject( + GOOGLE_CLOUD_PROJECT, bucketName, blob); + + String snippetOutput = stdOut.getCapturedOutputAsUtf8String(); + + assertTrue(snippetOutput.contains(blob)); + assertFalse(snippetOutput.contains(blob2)); + } } @Test - public void testRestoreSoftDeletedObject() { - String bucket = RemoteStorageHelper.generateBucketName(); - - storage.create(BucketInfo.of(bucket)); - try { - // This is already the default, but we set it here in case the default ever changes - storage.get(bucket).toBuilder() - .setSoftDeletePolicy( - BucketInfo.SoftDeletePolicy.newBuilder() - .setRetentionDuration(Duration.ofDays(7)) - .build()) - .build() - .update(); - - String blob = "restorableobj"; - - long gen = - storage.create(BlobInfo.newBuilder(BlobId.of(bucket, blob)).build()).getGeneration(); - storage.delete(BlobId.of(bucket, blob)); - - assertNull(storage.get(BlobId.of(bucket, blob))); - - RestoreSoftDeletedObject.restoreSoftDeletedObject(PROJECT_ID, bucket, blob, gen); - - assertNotNull(storage.get(BlobId.of(bucket, blob))); - } finally { - RemoteStorageHelper.forceDelete(storage, bucket); + public void testRestoreSoftDeletedObject() throws Exception { + try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() + .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()) + // This is already the default, but we set it here in case the default ever changes + .setSoftDeletePolicy( + BucketInfo.SoftDeletePolicy.newBuilder() + .setRetentionDuration(Duration.ofDays(7)) + .build()) + .build()) + .setStorage(storage) + .build()) { + String bucketName = tmpBucket.getBucket().getName(); + + String blob = generator.randomObjectName(); + + BlobInfo gen1 = storage.create(BlobInfo.newBuilder(BlobId.of(bucketName, blob)).build()); + storage.delete(BlobId.of(bucketName, blob)); + + assertNull(storage.get(BlobId.of(bucketName, blob))); + + RestoreSoftDeletedObject.restoreSoftDeletedObject( + GOOGLE_CLOUD_PROJECT, bucketName, blob, gen1.getGeneration()); + + assertNotNull(storage.get(BlobId.of(bucketName, blob))); } } } diff --git a/samples/snippets/src/test/java/com/example/storage/ITStorageSnippets.java b/samples/snippets/src/test/java/com/example/storage/ITStorageSnippets.java index a320372b44..805eef2f2c 100644 --- a/samples/snippets/src/test/java/com/example/storage/ITStorageSnippets.java +++ b/samples/snippets/src/test/java/com/example/storage/ITStorageSnippets.java @@ -47,7 +47,7 @@ public class ITStorageSnippets { private static final Logger log = Logger.getLogger(ITStorageSnippets.class.getName()); private static final String BUCKET = RemoteStorageHelper.generateBucketName(); private static Storage storage; - private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); + private static final String PROJECT_ID = Env.GOOGLE_CLOUD_PROJECT; @Rule public final StdOutCaptureRule stdOutCaptureRule = new StdOutCaptureRule(); diff --git a/samples/snippets/src/test/java/com/example/storage/QuickstartSampleIT.java b/samples/snippets/src/test/java/com/example/storage/QuickstartSampleIT.java index f4d4512ab7..4450ab8f27 100644 --- a/samples/snippets/src/test/java/com/example/storage/QuickstartSampleIT.java +++ b/samples/snippets/src/test/java/com/example/storage/QuickstartSampleIT.java @@ -18,37 +18,33 @@ import static com.google.common.truth.Truth.assertThat; +import com.google.cloud.storage.Bucket; import com.google.cloud.storage.BucketInfo; import com.google.cloud.storage.Storage; +import com.google.cloud.storage.Storage.BucketField; +import com.google.cloud.storage.Storage.BucketGetOption; import com.google.cloud.storage.StorageOptions; import com.google.cloud.storage.it.BucketCleaner; -import com.google.cloud.testing.junit4.StdOutCaptureRule; import com.google.storage.control.v2.StorageLayoutName; -import java.util.UUID; import org.junit.After; import org.junit.Before; -import org.junit.Rule; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.JUnit4; /** Tests for quickstart sample. */ -@RunWith(JUnit4.class) @SuppressWarnings("checkstyle:abbreviationaswordinname") -public class QuickstartSampleIT { - - @Rule public final StdOutCaptureRule stdOutCaptureRule = new StdOutCaptureRule(); +public class QuickstartSampleIT extends TestBase { private String bucketName; @Before public void setUp() { - bucketName = "java-storage-grpc-" + UUID.randomUUID(); + bucketName = generator.randomBucketName(); } @After - public void tearDown() throws Exception { - try (Storage storage = StorageOptions.getDefaultInstance().getService()) { + public void tearDown() { + Bucket bucket = storage.get(bucketName, BucketGetOption.fields(BucketField.NAME)); + if (bucket != null) { BucketCleaner.doCleanup(bucketName, storage); } } @@ -56,21 +52,21 @@ public void tearDown() throws Exception { @Test public void testQuickstart() throws Exception { QuickstartSample.main(bucketName); - String got = stdOutCaptureRule.getCapturedOutputAsUtf8String(); + String got = stdOut.getCapturedOutputAsUtf8String(); assertThat(got).contains(String.format("Bucket %s created.", bucketName)); } @Test public void testQuickstartGrpc() throws Exception { QuickstartGrpcSample.main(bucketName); - String got = stdOutCaptureRule.getCapturedOutputAsUtf8String(); + String got = stdOut.getCapturedOutputAsUtf8String(); assertThat(got).contains(String.format("Bucket %s created.", bucketName)); } @Test public void testQuickstartGrpcDp() throws Exception { QuickstartGrpcDpSample.main(bucketName); - String got = stdOutCaptureRule.getCapturedOutputAsUtf8String(); + String got = stdOut.getCapturedOutputAsUtf8String(); assertThat(got).contains(String.format("Bucket %s created.", bucketName)); } @@ -79,7 +75,7 @@ public void testQuickstartStorageControl() throws Exception { Storage storageClient = StorageOptions.getDefaultInstance().getService(); storageClient.create(BucketInfo.of(bucketName)); QuickstartStorageControlSample.main(bucketName); - String got = stdOutCaptureRule.getCapturedOutputAsUtf8String(); + String got = stdOut.getCapturedOutputAsUtf8String(); assertThat(got) .contains( String.format( @@ -90,7 +86,7 @@ public void testQuickstartStorageControl() throws Exception { @Test public void testQuickstartOpenTelemetry() throws Exception { QuickstartOpenTelemetrySample.main(); - String got = stdOutCaptureRule.getCapturedOutputAsUtf8String(); + String got = stdOut.getCapturedOutputAsUtf8String(); assertThat(got).contains("Created an instance of storage with OpenTelemetry configured"); } } diff --git a/samples/snippets/src/test/java/com/example/storage/TestBase.java b/samples/snippets/src/test/java/com/example/storage/TestBase.java index 1e314a7472..298225c498 100644 --- a/samples/snippets/src/test/java/com/example/storage/TestBase.java +++ b/samples/snippets/src/test/java/com/example/storage/TestBase.java @@ -16,40 +16,39 @@ package com.example.storage; -import com.google.cloud.storage.Blob; import com.google.cloud.storage.BlobInfo; -import com.google.cloud.storage.Bucket; import com.google.cloud.storage.BucketInfo; import com.google.cloud.storage.Storage; -import com.google.cloud.storage.StorageOptions; -import com.google.cloud.storage.it.BucketCleaner; -import com.google.cloud.storage.testing.RemoteStorageHelper; +import com.google.cloud.storage.Storage.BlobTargetOption; +import com.google.cloud.storage.TransportCompatibility.Transport; +import com.google.cloud.storage.it.runner.StorageITRunner; +import com.google.cloud.storage.it.runner.annotations.Backend; +import com.google.cloud.storage.it.runner.annotations.Inject; +import com.google.cloud.storage.it.runner.annotations.SingleBackend; +import com.google.cloud.storage.it.runner.annotations.StorageFixture; +import com.google.cloud.storage.it.runner.registry.Generator; import com.google.cloud.testing.junit4.StdOutCaptureRule; -import org.junit.After; -import org.junit.Before; +import org.checkerframework.checker.nullness.qual.NonNull; import org.junit.Rule; +import org.junit.runner.RunWith; +@RunWith(StorageITRunner.class) +@SingleBackend(Backend.PROD) public abstract class TestBase { @Rule public StdOutCaptureRule stdOut = new StdOutCaptureRule(); - protected String bucketName; - protected Storage storage; - protected String blobName; - protected Bucket bucket; - protected Blob blob; + @Inject + @StorageFixture(Transport.HTTP) + public Storage storage; + @Inject public BucketInfo bucket; + @Inject public Generator generator; - @Before - public void setUp() { - blobName = "blob"; - bucketName = RemoteStorageHelper.generateBucketName(); - storage = StorageOptions.getDefaultInstance().getService(); - bucket = storage.create(BucketInfo.of(bucketName)); - blob = storage.create(BlobInfo.newBuilder(bucketName, blobName).build()); + protected BlobInfo info(@NonNull String name) { + return BlobInfo.newBuilder(bucket, name).build(); } - @After - public void tearDown() { - BucketCleaner.doCleanup(bucketName, storage); + protected BlobInfo createEmptyObject() { + return storage.create(info(generator.randomObjectName()), BlobTargetOption.doesNotExist()); } } diff --git a/samples/snippets/src/test/java/com/example/storage/bucket/AddBucketDefaultOwnerTest.java b/samples/snippets/src/test/java/com/example/storage/bucket/AddBucketDefaultOwnerTest.java index 8dbb1786a2..f49ba1e8e2 100644 --- a/samples/snippets/src/test/java/com/example/storage/bucket/AddBucketDefaultOwnerTest.java +++ b/samples/snippets/src/test/java/com/example/storage/bucket/AddBucketDefaultOwnerTest.java @@ -16,24 +16,31 @@ package com.example.storage.bucket; +import static com.example.storage.Env.IT_SERVICE_ACCOUNT_EMAIL; import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertNotNull; +import static com.google.common.truth.Truth.assertWithMessage; import com.example.storage.TestBase; -import com.google.cloud.storage.Acl.User; +import com.google.cloud.storage.BucketInfo; +import com.google.cloud.storage.it.TemporaryBucket; import org.junit.Test; public class AddBucketDefaultOwnerTest extends TestBase { - public static final String IT_SERVICE_ACCOUNT_EMAIL = System.getenv("IT_SERVICE_ACCOUNT_EMAIL"); - @Test - public void testAddBucketDefaultOwner() { + public void testAddBucketDefaultOwner() throws Exception { // Check for user email before the actual test. - assertNotNull("Unable to determine user email", IT_SERVICE_ACCOUNT_EMAIL); + assertWithMessage("Unable to determine user email").that(IT_SERVICE_ACCOUNT_EMAIL).isNotEmpty(); + + try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() + .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) + .setStorage(storage) + .build()) { + + String bucketName = tmpBucket.getBucket().getName(); - AddBucketDefaultOwner.addBucketDefaultOwner(bucketName, IT_SERVICE_ACCOUNT_EMAIL); - assertThat(stdOut.getCapturedOutputAsUtf8String()).contains(IT_SERVICE_ACCOUNT_EMAIL); - assertThat(bucket.getDefaultAcl(new User(IT_SERVICE_ACCOUNT_EMAIL))).isNotNull(); + AddBucketDefaultOwner.addBucketDefaultOwner(bucketName, IT_SERVICE_ACCOUNT_EMAIL); + assertThat(stdOut.getCapturedOutputAsUtf8String()).contains(IT_SERVICE_ACCOUNT_EMAIL); + } } } diff --git a/samples/snippets/src/test/java/com/example/storage/bucket/AddBucketOwnerTest.java b/samples/snippets/src/test/java/com/example/storage/bucket/AddBucketOwnerTest.java index 77c722421a..e35c5a9001 100644 --- a/samples/snippets/src/test/java/com/example/storage/bucket/AddBucketOwnerTest.java +++ b/samples/snippets/src/test/java/com/example/storage/bucket/AddBucketOwnerTest.java @@ -16,25 +16,32 @@ package com.example.storage.bucket; +import static com.example.storage.Env.GOOGLE_CLOUD_PROJECT; +import static com.example.storage.Env.IT_SERVICE_ACCOUNT_EMAIL; import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertNotNull; +import static com.google.common.truth.Truth.assertWithMessage; import com.example.storage.TestBase; -import com.google.cloud.storage.Acl.User; +import com.google.cloud.storage.BucketInfo; +import com.google.cloud.storage.it.TemporaryBucket; import org.junit.Test; public class AddBucketOwnerTest extends TestBase { - public static final String IT_SERVICE_ACCOUNT_EMAIL = System.getenv("IT_SERVICE_ACCOUNT_EMAIL"); - @Test - public void testAddBucketOwner() { + public void testAddBucketOwner() throws Exception { // Check for user email before the actual test. - assertNotNull("Unable to determine user email", IT_SERVICE_ACCOUNT_EMAIL); + assertWithMessage("Unable to determine user email").that(IT_SERVICE_ACCOUNT_EMAIL).isNotEmpty(); + + try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() + .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) + .setStorage(storage) + .build()) { + + String bucketName = tmpBucket.getBucket().getName(); - AddBucketOwner.addBucketOwner( - System.getenv("GOOGLE_CLOUD_PROJECT"), bucketName, IT_SERVICE_ACCOUNT_EMAIL); - assertThat(stdOut.getCapturedOutputAsUtf8String()).contains(IT_SERVICE_ACCOUNT_EMAIL); - assertThat(bucket.getAcl(new User(IT_SERVICE_ACCOUNT_EMAIL))).isNotNull(); + AddBucketOwner.addBucketOwner(GOOGLE_CLOUD_PROJECT, bucketName, IT_SERVICE_ACCOUNT_EMAIL); + assertThat(stdOut.getCapturedOutputAsUtf8String()).contains(IT_SERVICE_ACCOUNT_EMAIL); + } } } diff --git a/samples/snippets/src/test/java/com/example/storage/bucket/AutoclassTest.java b/samples/snippets/src/test/java/com/example/storage/bucket/AutoclassTest.java index 82297c69e0..aa39aae883 100644 --- a/samples/snippets/src/test/java/com/example/storage/bucket/AutoclassTest.java +++ b/samples/snippets/src/test/java/com/example/storage/bucket/AutoclassTest.java @@ -16,6 +16,7 @@ package com.example.storage.bucket; +import static com.example.storage.Env.GOOGLE_CLOUD_PROJECT; import static com.google.common.truth.Truth.assertThat; import com.example.storage.TestBase; @@ -27,8 +28,6 @@ public class AutoclassTest extends TestBase { - private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); - @Test public void testSetGetBucketAutoclass() throws Exception { String autoclassBucket = RemoteStorageHelper.generateBucketName(); @@ -37,11 +36,12 @@ public void testSetGetBucketAutoclass() throws Exception { .setAutoclass(Autoclass.newBuilder().setEnabled(true).build()) .build()); try { - SetBucketAutoclass.setBucketAutoclass(PROJECT_ID, autoclassBucket, StorageClass.NEARLINE); + SetBucketAutoclass.setBucketAutoclass( + GOOGLE_CLOUD_PROJECT, autoclassBucket, StorageClass.NEARLINE); Autoclass autoclass = storage.get(autoclassBucket).getAutoclass(); assertThat(autoclass.getEnabled()).isTrue(); - GetBucketAutoclass.getBucketAutoclass(PROJECT_ID, autoclassBucket); + GetBucketAutoclass.getBucketAutoclass(GOOGLE_CLOUD_PROJECT, autoclassBucket); assertThat(stdOut.getCapturedOutputAsUtf8String()) .contains(autoclass.getToggleTime().toString()); } finally { diff --git a/samples/snippets/src/test/java/com/example/storage/bucket/CreateBucketDualRegionTest.java b/samples/snippets/src/test/java/com/example/storage/bucket/CreateBucketDualRegionTest.java index d4910c67c8..9b1ce9c74e 100644 --- a/samples/snippets/src/test/java/com/example/storage/bucket/CreateBucketDualRegionTest.java +++ b/samples/snippets/src/test/java/com/example/storage/bucket/CreateBucketDualRegionTest.java @@ -16,6 +16,7 @@ package com.example.storage.bucket; +import static com.example.storage.Env.GOOGLE_CLOUD_PROJECT; import static com.google.common.truth.Truth.assertThat; import static org.junit.Assert.assertNotNull; @@ -25,14 +26,12 @@ public class CreateBucketDualRegionTest extends TestBase { - private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); - @Test public void testCreateBucketDualRegion() { - assertNotNull("Unable to determine Project ID", PROJECT_ID); + assertNotNull("Unable to determine Project ID", GOOGLE_CLOUD_PROJECT); String newBucket = RemoteStorageHelper.generateBucketName(); CreateBucketDualRegion.createBucketDualRegion( - PROJECT_ID, newBucket, "US", "US-EAST1", "US-WEST1"); + GOOGLE_CLOUD_PROJECT, newBucket, "US", "US-EAST1", "US-WEST1"); assertThat(stdOut.getCapturedOutputAsUtf8String()).contains("US-WEST1"); assertThat(stdOut.getCapturedOutputAsUtf8String()).contains("US-EAST1"); assertThat(stdOut.getCapturedOutputAsUtf8String()).contains("Created bucket"); diff --git a/samples/snippets/src/test/java/com/example/storage/bucket/CreateBucketPubSubNotificationTest.java b/samples/snippets/src/test/java/com/example/storage/bucket/CreateBucketPubSubNotificationTest.java deleted file mode 100644 index 7bfd95242e..0000000000 --- a/samples/snippets/src/test/java/com/example/storage/bucket/CreateBucketPubSubNotificationTest.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright 2022 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 - * - * http://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.example.storage.bucket; - -import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertNotNull; - -import com.example.storage.TestBase; -import com.google.cloud.pubsub.v1.TopicAdminClient; -import com.google.cloud.storage.Notification; -import com.google.cloud.storage.NotificationInfo.EventType; -import com.google.common.collect.ImmutableMap; -import com.google.iam.v1.Binding; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.SetIamPolicyRequest; -import java.io.IOException; -import java.util.Map; -import java.util.UUID; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -public class CreateBucketPubSubNotificationTest extends TestBase { - - private static final Notification.PayloadFormat PAYLOAD_FORMAT = - Notification.PayloadFormat.JSON_API_V1.JSON_API_V1; - private static final Map CUSTOM_ATTRIBUTES = ImmutableMap.of("label1", "value1"); - private static final String PROJECT = System.getenv("GOOGLE_CLOUD_PROJECT"); - private static final String PROJECT_NUMBER = System.getenv("GOOGLE_CLOUD_PROJECT_NUMBER"); - - private static final String ID = UUID.randomUUID().toString().substring(0, 8); - private static final String TOPIC = - String.format("projects/%s/topics/new-topic-create-%s", PROJECT, ID); - private static final String OBJECT_NAME_PREFIX = "index.html"; - private static final EventType[] EVENT_TYPES = { - EventType.OBJECT_FINALIZE, EventType.OBJECT_METADATA_UPDATE - }; - private static TopicAdminClient topicAdminClient; - - @BeforeClass - public static void configureTopicAdminClient() throws IOException { - if (PROJECT != null) { - topicAdminClient = TopicAdminClient.create(); - topicAdminClient.createTopic(TOPIC); - GetIamPolicyRequest getIamPolicyRequest = - GetIamPolicyRequest.newBuilder().setResource(TOPIC).build(); - com.google.iam.v1.Policy policy = topicAdminClient.getIamPolicy(getIamPolicyRequest); - // For available bindings identities, see - // https://cloud.google.com/iam/docs/overview#concepts_related_identity - String member = - PROJECT_NUMBER != null - ? "serviceAccount:service-" - + PROJECT_NUMBER - + "@gs-project-accounts.iam.gserviceaccount.com" - : "allAuthenticatedUsers"; - Binding binding = Binding.newBuilder().setRole("roles/owner").addMembers(member).build(); - SetIamPolicyRequest setIamPolicyRequest = - SetIamPolicyRequest.newBuilder() - .setResource(TOPIC) - .setPolicy(policy.toBuilder().addBindings(binding).build()) - .build(); - topicAdminClient.setIamPolicy(setIamPolicyRequest); - } - } - - @AfterClass - public static void deleteTopicAndClient() { - /* Delete the Pub/Sub topic */ - if (topicAdminClient != null) { - topicAdminClient.deleteTopic(TOPIC); - topicAdminClient.close(); - } - } - - @Test - public void testCreateBucketPubSubNotification() { - // Check that we can access project value and that topic admin client came up successfully - assertNotNull("Unable to determine project", PROJECT); - assertNotNull("Topic Admin Client did not start up", topicAdminClient); - - com.example.storage.bucket.CreateBucketPubSubNotification.createBucketPubSubNotification( - bucketName, TOPIC, CUSTOM_ATTRIBUTES, EVENT_TYPES, OBJECT_NAME_PREFIX, PAYLOAD_FORMAT); - assertThat(stdOut.getCapturedOutputAsUtf8String()).contains(TOPIC); - } -} diff --git a/samples/snippets/src/test/java/com/example/storage/bucket/DeleteBucketPubSubNotificationTest.java b/samples/snippets/src/test/java/com/example/storage/bucket/DeleteBucketPubSubNotificationTest.java deleted file mode 100644 index aab1073b38..0000000000 --- a/samples/snippets/src/test/java/com/example/storage/bucket/DeleteBucketPubSubNotificationTest.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright 2022 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 - * - * http://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.example.storage.bucket; - -import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertNotNull; - -import com.example.storage.TestBase; -import com.google.cloud.pubsub.v1.TopicAdminClient; -import com.google.cloud.storage.Notification; -import com.google.cloud.storage.NotificationInfo; -import com.google.cloud.testing.junit4.MultipleAttemptsRule; -import com.google.common.collect.ImmutableMap; -import com.google.iam.v1.Binding; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.SetIamPolicyRequest; -import java.io.IOException; -import java.util.Map; -import java.util.UUID; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Rule; -import org.junit.Test; - -public class DeleteBucketPubSubNotificationTest extends TestBase { - - @Rule public MultipleAttemptsRule multipleAttemptsRule = new MultipleAttemptsRule(5); - - private static final Notification.PayloadFormat PAYLOAD_FORMAT = - Notification.PayloadFormat.JSON_API_V1.JSON_API_V1; - private static final Map CUSTOM_ATTRIBUTES = ImmutableMap.of("label1", "value1"); - private static final String PROJECT = System.getenv("GOOGLE_CLOUD_PROJECT"); - private static final String PROJECT_NUMBER = System.getenv("GOOGLE_CLOUD_PROJECT_NUMBER"); - - private static final String ID = UUID.randomUUID().toString().substring(0, 8); - private static final String TOPIC = - String.format("projects/%s/topics/new-topic-delete-%s", PROJECT, ID); - private static TopicAdminClient topicAdminClient; - private static final NotificationInfo notificationInfo = - NotificationInfo.newBuilder(TOPIC) - .setCustomAttributes(CUSTOM_ATTRIBUTES) - .setPayloadFormat(PAYLOAD_FORMAT) - .build(); - - @BeforeClass - public static void configureTopicAdminClient() throws IOException { - if (PROJECT != null) { - topicAdminClient = TopicAdminClient.create(); - topicAdminClient.createTopic(TOPIC); - GetIamPolicyRequest getIamPolicyRequest = - GetIamPolicyRequest.newBuilder().setResource(TOPIC).build(); - com.google.iam.v1.Policy policy = topicAdminClient.getIamPolicy(getIamPolicyRequest); - // For available bindings identities, see - // https://cloud.google.com/iam/docs/overview#concepts_related_identity - String member = - PROJECT_NUMBER != null - ? "serviceAccount:service-" - + PROJECT_NUMBER - + "@gs-project-accounts.iam.gserviceaccount.com" - : "allAuthenticatedUsers"; - Binding binding = Binding.newBuilder().setRole("roles/owner").addMembers(member).build(); - SetIamPolicyRequest setIamPolicyRequest = - SetIamPolicyRequest.newBuilder() - .setResource(TOPIC) - .setPolicy(policy.toBuilder().addBindings(binding).build()) - .build(); - topicAdminClient.setIamPolicy(setIamPolicyRequest); - } - } - - @AfterClass - public static void deleteTopicAndClient() { - /* Delete the Pub/Sub topic */ - if (topicAdminClient != null) { - topicAdminClient.deleteTopic(TOPIC); - topicAdminClient.close(); - } - } - - @Test - public void testDeleteBucketPubSubNotification() { - // Check that we can access project value and that topic admin client came up successfully - assertNotNull("Unable to determine project", PROJECT); - assertNotNull("Topic Admin Client did not start up", topicAdminClient); - - Notification notification = storage.createNotification(bucketName, notificationInfo); - com.example.storage.bucket.DeleteBucketPubSubNotification.deleteBucketPubSubNotification( - bucketName, notification.getNotificationId()); - assertThat(stdOut.getCapturedOutputAsUtf8String()) - .contains("Successfully deleted notification"); - } - - @Test - public void testNotificationNotFound() { - // Check that we can access project value and that topic admin client came up successfully - assertNotNull("Unable to determine project", PROJECT); - assertNotNull("Topic Admin Client did not start up", topicAdminClient); - Notification notification = storage.createNotification(bucketName, notificationInfo); - // Do a delete first. - storage.deleteNotification(bucketName, notification.getNotificationId()); - // Now try to delete again. - com.example.storage.bucket.DeleteBucketPubSubNotification.deleteBucketPubSubNotification( - bucketName, notification.getNotificationId()); - assertThat(stdOut.getCapturedOutputAsUtf8String()).contains("Failed to find notification"); - } -} diff --git a/samples/snippets/src/test/java/com/example/storage/bucket/ListPubSubNotificationsTest.java b/samples/snippets/src/test/java/com/example/storage/bucket/ListPubSubNotificationsTest.java deleted file mode 100644 index 88a4613e7a..0000000000 --- a/samples/snippets/src/test/java/com/example/storage/bucket/ListPubSubNotificationsTest.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright 2022 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 - * - * http://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.example.storage.bucket; - -import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertNotNull; - -import com.example.storage.TestBase; -import com.google.cloud.pubsub.v1.TopicAdminClient; -import com.google.cloud.storage.Notification; -import com.google.cloud.storage.NotificationInfo; -import com.google.cloud.testing.junit4.MultipleAttemptsRule; -import com.google.common.collect.ImmutableMap; -import com.google.iam.v1.Binding; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.SetIamPolicyRequest; -import java.io.IOException; -import java.util.Map; -import java.util.UUID; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Rule; -import org.junit.Test; - -public class ListPubSubNotificationsTest extends TestBase { - - @Rule public MultipleAttemptsRule multipleAttemptsRule = new MultipleAttemptsRule(5); - - private static final Notification.PayloadFormat PAYLOAD_FORMAT = - Notification.PayloadFormat.JSON_API_V1.JSON_API_V1; - private static final Map CUSTOM_ATTRIBUTES = ImmutableMap.of("label1", "value1"); - private static final String PROJECT = System.getenv("GOOGLE_CLOUD_PROJECT"); - private static final String PROJECT_NUMBER = System.getenv("GOOGLE_CLOUD_PROJECT_NUMBER"); - - private static final String ID = UUID.randomUUID().toString().substring(0, 8); - private static final String TOPIC = - String.format("projects/%s/topics/new-topic-list-%s", PROJECT, ID); - private static TopicAdminClient topicAdminClient; - - @BeforeClass - public static void configureTopicAdminClient() throws IOException { - if (PROJECT != null) { - topicAdminClient = TopicAdminClient.create(); - topicAdminClient.createTopic(TOPIC); - GetIamPolicyRequest getIamPolicyRequest = - GetIamPolicyRequest.newBuilder().setResource(TOPIC).build(); - com.google.iam.v1.Policy policy = topicAdminClient.getIamPolicy(getIamPolicyRequest); - // For available bindings identities, see - // https://cloud.google.com/iam/docs/overview#concepts_related_identity - String member = - PROJECT_NUMBER != null - ? "serviceAccount:service-" - + PROJECT_NUMBER - + "@gs-project-accounts.iam.gserviceaccount.com" - : "allAuthenticatedUsers"; - Binding binding = Binding.newBuilder().setRole("roles/owner").addMembers(member).build(); - SetIamPolicyRequest setIamPolicyRequest = - SetIamPolicyRequest.newBuilder() - .setResource(TOPIC) - .setPolicy(policy.toBuilder().addBindings(binding).build()) - .build(); - topicAdminClient.setIamPolicy(setIamPolicyRequest); - } - } - - @AfterClass - public static void deleteTopicAndClient() { - /* Delete the Pub/Sub topic */ - if (topicAdminClient != null) { - topicAdminClient.deleteTopic(TOPIC); - topicAdminClient.close(); - } - } - - @Test - public void testListBucketPubSubNotification() { - // Check that we can access project value and that topic admin client came up successfully - assertNotNull("Unable to determine project", PROJECT); - assertNotNull("Topic Admin Client did not start up", topicAdminClient); - - NotificationInfo notificationInfo = - NotificationInfo.newBuilder(TOPIC) - .setCustomAttributes(CUSTOM_ATTRIBUTES) - .setPayloadFormat(PAYLOAD_FORMAT) - .build(); - storage.createNotification(bucketName, notificationInfo); - ListPubSubNotifications.listPubSubNotifications(bucketName); - assertThat(stdOut.getCapturedOutputAsUtf8String()).contains(TOPIC); - } -} diff --git a/samples/snippets/src/test/java/com/example/storage/bucket/PrintBucketAclFilterByUserTest.java b/samples/snippets/src/test/java/com/example/storage/bucket/PrintBucketAclFilterByUserTest.java deleted file mode 100644 index 95443a237c..0000000000 --- a/samples/snippets/src/test/java/com/example/storage/bucket/PrintBucketAclFilterByUserTest.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 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 - * - * http://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.example.storage.bucket; - -import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertNotNull; - -import com.example.storage.TestBase; -import com.google.cloud.storage.Acl; -import com.google.cloud.storage.Acl.Entity; -import com.google.cloud.storage.Acl.Role; -import com.google.cloud.storage.Acl.User; -import org.junit.Test; - -public class PrintBucketAclFilterByUserTest extends TestBase { - - public static final String IT_SERVICE_ACCOUNT_EMAIL = System.getenv("IT_SERVICE_ACCOUNT_EMAIL"); - - @Test - public void testPrintBucketAclByUser() { - // Check for user email before the actual test. - assertNotNull("Unable to determine user email", IT_SERVICE_ACCOUNT_EMAIL); - - Entity testUser = new User(IT_SERVICE_ACCOUNT_EMAIL); - storage.createAcl(bucketName, Acl.of(testUser, Role.READER)); - PrintBucketAclFilterByUser.printBucketAclFilterByUser(bucketName, IT_SERVICE_ACCOUNT_EMAIL); - assertThat(stdOut.getCapturedOutputAsUtf8String()).contains(IT_SERVICE_ACCOUNT_EMAIL); - assertThat(stdOut.getCapturedOutputAsUtf8String()).contains(Role.READER.name()); - } -} diff --git a/samples/snippets/src/test/java/com/example/storage/bucket/PrintBucketAclTest.java b/samples/snippets/src/test/java/com/example/storage/bucket/PrintBucketAclTest.java index 399cbe65bf..2fff1e8fd1 100644 --- a/samples/snippets/src/test/java/com/example/storage/bucket/PrintBucketAclTest.java +++ b/samples/snippets/src/test/java/com/example/storage/bucket/PrintBucketAclTest.java @@ -16,28 +16,53 @@ package com.example.storage.bucket; +import static com.example.storage.Env.GOOGLE_CLOUD_PROJECT; +import static com.example.storage.Env.IT_SERVICE_ACCOUNT_EMAIL; +import static com.example.storage.Env.IT_SERVICE_ACCOUNT_USER; import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertNotNull; +import static com.google.common.truth.Truth.assertWithMessage; import com.example.storage.TestBase; import com.google.cloud.storage.Acl; -import com.google.cloud.storage.Acl.Entity; import com.google.cloud.storage.Acl.Role; -import com.google.cloud.storage.Acl.User; +import com.google.cloud.storage.BucketInfo; +import com.google.cloud.storage.it.TemporaryBucket; import org.junit.Test; public class PrintBucketAclTest extends TestBase { - public static final String IT_SERVICE_ACCOUNT_EMAIL = System.getenv("IT_SERVICE_ACCOUNT_EMAIL"); + @Test + public void testPrintBucketAcls() throws Exception { + // Check for user email before the actual test. + assertWithMessage("Unable to determine user email").that(IT_SERVICE_ACCOUNT_EMAIL).isNotEmpty(); + + try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() + .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) + .setStorage(storage) + .build()) { + + String bucketName = tmpBucket.getBucket().getName(); + storage.createAcl(bucketName, Acl.of(IT_SERVICE_ACCOUNT_USER, Role.READER)); + PrintBucketAcl.printBucketAcl(GOOGLE_CLOUD_PROJECT, bucketName); + assertThat(stdOut.getCapturedOutputAsUtf8String()).contains("READER: USER"); + } + } @Test - public void testPrintBucketAcls() { + public void testPrintBucketAclByUser() throws Exception { // Check for user email before the actual test. - assertNotNull("Unable to determine user email", IT_SERVICE_ACCOUNT_EMAIL); + assertWithMessage("Unable to determine user email").that(IT_SERVICE_ACCOUNT_EMAIL).isNotEmpty(); + + try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() + .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) + .setStorage(storage) + .build()) { - Entity testUser = new User(IT_SERVICE_ACCOUNT_EMAIL); - storage.createAcl(bucketName, Acl.of(testUser, Role.READER)); - PrintBucketAcl.printBucketAcl(System.getenv("GOOGLE_CLOUD_PROJECT"), bucketName); - assertThat(stdOut.getCapturedOutputAsUtf8String()).contains("READER: USER"); + String bucketName = tmpBucket.getBucket().getName(); + storage.createAcl(bucketName, Acl.of(IT_SERVICE_ACCOUNT_USER, Role.READER)); + PrintBucketAclFilterByUser.printBucketAclFilterByUser(bucketName, IT_SERVICE_ACCOUNT_EMAIL); + assertThat(stdOut.getCapturedOutputAsUtf8String()).contains(IT_SERVICE_ACCOUNT_EMAIL); + assertThat(stdOut.getCapturedOutputAsUtf8String()).contains(Role.READER.name()); + } } } diff --git a/samples/snippets/src/test/java/com/example/storage/bucket/PrintPubSubNotificationTest.java b/samples/snippets/src/test/java/com/example/storage/bucket/PrintPubSubNotificationTest.java deleted file mode 100644 index d342795a85..0000000000 --- a/samples/snippets/src/test/java/com/example/storage/bucket/PrintPubSubNotificationTest.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright 2022 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 - * - * http://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.example.storage.bucket; - -import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertNotNull; - -import com.example.storage.TestBase; -import com.google.cloud.pubsub.v1.TopicAdminClient; -import com.google.cloud.storage.Notification; -import com.google.cloud.storage.NotificationInfo; -import com.google.common.collect.ImmutableMap; -import com.google.iam.v1.Binding; -import com.google.iam.v1.GetIamPolicyRequest; -import com.google.iam.v1.SetIamPolicyRequest; -import java.io.IOException; -import java.util.Map; -import java.util.UUID; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -public class PrintPubSubNotificationTest extends TestBase { - - private static final Notification.PayloadFormat PAYLOAD_FORMAT = - Notification.PayloadFormat.JSON_API_V1.JSON_API_V1; - private static final Map CUSTOM_ATTRIBUTES = ImmutableMap.of("label1", "value1"); - private static final String PROJECT = System.getenv("GOOGLE_CLOUD_PROJECT"); - private static final String PROJECT_NUMBER = System.getenv("GOOGLE_CLOUD_PROJECT_NUMBER"); - - private static final String ID = UUID.randomUUID().toString().substring(0, 8); - private static final String TOPIC = - String.format("projects/%s/topics/new-topic-print-%s", PROJECT, ID); - private static TopicAdminClient topicAdminClient; - - @BeforeClass - public static void configureTopicAdminClient() throws IOException { - if (PROJECT != null) { - topicAdminClient = TopicAdminClient.create(); - topicAdminClient.createTopic(TOPIC); - GetIamPolicyRequest getIamPolicyRequest = - GetIamPolicyRequest.newBuilder().setResource(TOPIC).build(); - com.google.iam.v1.Policy policy = topicAdminClient.getIamPolicy(getIamPolicyRequest); - // For available bindings identities, see - // https://cloud.google.com/iam/docs/overview#concepts_related_identity - String member = - PROJECT_NUMBER != null - ? "serviceAccount:service-" - + PROJECT_NUMBER - + "@gs-project-accounts.iam.gserviceaccount.com" - : "allAuthenticatedUsers"; - Binding binding = Binding.newBuilder().setRole("roles/owner").addMembers(member).build(); - SetIamPolicyRequest setIamPolicyRequest = - SetIamPolicyRequest.newBuilder() - .setResource(TOPIC) - .setPolicy(policy.toBuilder().addBindings(binding).build()) - .build(); - topicAdminClient.setIamPolicy(setIamPolicyRequest); - } - } - - @AfterClass - public static void deleteTopicAndClient() { - /* Delete the Pub/Sub topic */ - if (topicAdminClient != null) { - topicAdminClient.deleteTopic(TOPIC); - topicAdminClient.close(); - } - } - - @Test - public void testPrintBucketPubSubNotification() { - // Check that we can access project value and that topic admin client came up successfully - assertNotNull("Unable to determine project", PROJECT); - assertNotNull("Topic Admin Client did not start up", topicAdminClient); - - NotificationInfo notificationInfo = - NotificationInfo.newBuilder(TOPIC) - .setCustomAttributes(CUSTOM_ATTRIBUTES) - .setPayloadFormat(PAYLOAD_FORMAT) - .build(); - Notification notification = storage.createNotification(bucketName, notificationInfo); - PrintPubSubNotification.printPubSubNotification(bucketName, notification.getNotificationId()); - assertThat(stdOut.getCapturedOutputAsUtf8String()).contains(TOPIC); - } -} diff --git a/samples/snippets/src/test/java/com/example/storage/bucket/PubSubNotificationTest.java b/samples/snippets/src/test/java/com/example/storage/bucket/PubSubNotificationTest.java new file mode 100644 index 0000000000..3cccbaa10a --- /dev/null +++ b/samples/snippets/src/test/java/com/example/storage/bucket/PubSubNotificationTest.java @@ -0,0 +1,157 @@ +/* + * Copyright 2022 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 + * + * http://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.example.storage.bucket; + +import static com.example.storage.Env.GOOGLE_CLOUD_PROJECT; +import static com.example.storage.Env.GOOGLE_CLOUD_PROJECT_NUMBER; +import static com.google.common.truth.Truth.assertThat; + +import com.example.storage.TestBase; +import com.google.cloud.pubsub.v1.TopicAdminClient; +import com.google.cloud.storage.Notification; +import com.google.cloud.storage.NotificationInfo; +import com.google.cloud.storage.NotificationInfo.EventType; +import com.google.common.collect.ImmutableMap; +import com.google.iam.v1.Binding; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.SetIamPolicyRequest; +import java.io.IOException; +import java.util.Map; +import java.util.UUID; +import java.util.concurrent.TimeUnit; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class PubSubNotificationTest extends TestBase { + + private static final Map CUSTOM_ATTRIBUTES = ImmutableMap.of("label1", "value1"); + + private static final String OBJECT_NAME_PREFIX = "index.html"; + private static final EventType[] EVENT_TYPES = { + EventType.OBJECT_FINALIZE, EventType.OBJECT_METADATA_UPDATE + }; + private static TopicAdminClient topicAdminClient; + + private String bucketName; + private String topic; + private NotificationInfo notificationInfo; + + @BeforeClass + public static void configureTopicAdminClient() throws IOException { + topicAdminClient = TopicAdminClient.create(); + } + + @AfterClass + public static void deleteTopicAndClient() throws InterruptedException { + /* Delete the Pub/Sub topic */ + if (topicAdminClient != null) { + topicAdminClient.shutdownNow(); + topicAdminClient.awaitTermination(5, TimeUnit.SECONDS); + } + } + + @Before + public void setUp() { + assertThat(GOOGLE_CLOUD_PROJECT).isNotNull(); + + bucketName = bucket.getName(); + + String id = UUID.randomUUID().toString().substring(0, 8); + topic = String.format("projects/%s/topics/new-topic-%s", GOOGLE_CLOUD_PROJECT, id); + topicAdminClient.createTopic(topic); + GetIamPolicyRequest getIamPolicyRequest = + GetIamPolicyRequest.newBuilder().setResource(topic).build(); + com.google.iam.v1.Policy policy = topicAdminClient.getIamPolicy(getIamPolicyRequest); + // For available bindings identities, see + // https://cloud.google.com/iam/docs/overview#concepts_related_identity + String member = + GOOGLE_CLOUD_PROJECT_NUMBER != null + ? String.format( + "serviceAccount:service-%s@gs-project-accounts.iam.gserviceaccount.com", + GOOGLE_CLOUD_PROJECT_NUMBER) + : "allAuthenticatedUsers"; + Binding binding = Binding.newBuilder().setRole("roles/owner").addMembers(member).build(); + SetIamPolicyRequest setIamPolicyRequest = + SetIamPolicyRequest.newBuilder() + .setResource(topic) + .setPolicy(policy.toBuilder().addBindings(binding).build()) + .build(); + topicAdminClient.setIamPolicy(setIamPolicyRequest); + + notificationInfo = + NotificationInfo.newBuilder(topic) + .setCustomAttributes(CUSTOM_ATTRIBUTES) + .setPayloadFormat(Notification.PayloadFormat.JSON_API_V1) + .build(); + } + + @After + public void tearDown() { + if (topic != null) { + topicAdminClient.deleteTopic(topic); + } + } + + @Test + public void testCreateBucketPubSubNotification() { + CreateBucketPubSubNotification.createBucketPubSubNotification( + bucketName, + topic, + CUSTOM_ATTRIBUTES, + EVENT_TYPES, + OBJECT_NAME_PREFIX, + Notification.PayloadFormat.JSON_API_V1); + assertThat(stdOut.getCapturedOutputAsUtf8String()).contains(topic); + } + + @Test + public void testDeleteBucketPubSubNotification() { + Notification notification = storage.createNotification(bucketName, notificationInfo); + DeleteBucketPubSubNotification.deleteBucketPubSubNotification( + bucketName, notification.getNotificationId()); + assertThat(stdOut.getCapturedOutputAsUtf8String()) + .contains("Successfully deleted notification"); + } + + @Test + public void testNotificationNotFound() { + Notification notification = storage.createNotification(bucketName, notificationInfo); + // Do a delete first. + storage.deleteNotification(bucketName, notification.getNotificationId()); + // Now try to delete again. + DeleteBucketPubSubNotification.deleteBucketPubSubNotification( + bucketName, notification.getNotificationId()); + assertThat(stdOut.getCapturedOutputAsUtf8String()).contains("Failed to find notification"); + } + + @Test + public void testListBucketPubSubNotification() { + storage.createNotification(bucketName, notificationInfo); + ListPubSubNotifications.listPubSubNotifications(bucketName); + assertThat(stdOut.getCapturedOutputAsUtf8String()).contains(topic); + } + + @Test + public void testPrintBucketPubSubNotification() { + Notification notification = storage.createNotification(bucketName, notificationInfo); + PrintPubSubNotification.printPubSubNotification(bucketName, notification.getNotificationId()); + assertThat(stdOut.getCapturedOutputAsUtf8String()).contains(topic); + } +} diff --git a/samples/snippets/src/test/java/com/example/storage/bucket/RemoveBucketDefaultOwnerTest.java b/samples/snippets/src/test/java/com/example/storage/bucket/RemoveBucketDefaultOwnerTest.java index 8af2f1ef9c..d5e8ad8658 100644 --- a/samples/snippets/src/test/java/com/example/storage/bucket/RemoveBucketDefaultOwnerTest.java +++ b/samples/snippets/src/test/java/com/example/storage/bucket/RemoveBucketDefaultOwnerTest.java @@ -16,39 +16,54 @@ package com.example.storage.bucket; +import static com.example.storage.Env.IT_SERVICE_ACCOUNT_EMAIL; +import static com.example.storage.Env.IT_SERVICE_ACCOUNT_USER; import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertNotNull; +import static com.google.common.truth.Truth.assertWithMessage; import com.example.storage.TestBase; import com.google.cloud.storage.Acl; import com.google.cloud.storage.Acl.Role; -import com.google.cloud.storage.Acl.User; +import com.google.cloud.storage.BucketInfo; +import com.google.cloud.storage.it.TemporaryBucket; import org.junit.Test; public class RemoveBucketDefaultOwnerTest extends TestBase { - public static final String IT_SERVICE_ACCOUNT_EMAIL = System.getenv("IT_SERVICE_ACCOUNT_EMAIL"); - @Test - public void testRemoveBucketDefaultOwner() { + public void testRemoveBucketDefaultOwner() throws Exception { // Check for user email before the actual test. - assertNotNull("Unable to determine user email", IT_SERVICE_ACCOUNT_EMAIL); - // Add User as Default Owner - Acl newDefaultOwner = Acl.of(new User(IT_SERVICE_ACCOUNT_EMAIL), Role.OWNER); - bucket.createDefaultAcl(newDefaultOwner); - - // Remove User as Default owner - RemoveBucketDefaultOwner.removeBucketDefaultOwner(bucketName, IT_SERVICE_ACCOUNT_EMAIL); - assertThat(stdOut.getCapturedOutputAsUtf8String()).contains(IT_SERVICE_ACCOUNT_EMAIL); - assertThat(stdOut.getCapturedOutputAsUtf8String()).contains("Removed user"); - assertThat(bucket.getDefaultAcl(new User(IT_SERVICE_ACCOUNT_EMAIL))).isNull(); + assertWithMessage("Unable to determine user email").that(IT_SERVICE_ACCOUNT_EMAIL).isNotEmpty(); + try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() + .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) + .setStorage(storage) + .build()) { + + String bucketName = tmpBucket.getBucket().getName(); + + // Add User as Default Owner + Acl newDefaultOwner = Acl.of(IT_SERVICE_ACCOUNT_USER, Role.OWNER); + storage.createDefaultAcl(bucketName, newDefaultOwner); + + // Remove User as Default owner + RemoveBucketDefaultOwner.removeBucketDefaultOwner(bucketName, IT_SERVICE_ACCOUNT_EMAIL); + assertThat(stdOut.getCapturedOutputAsUtf8String()).contains(IT_SERVICE_ACCOUNT_EMAIL); + assertThat(stdOut.getCapturedOutputAsUtf8String()).contains("Removed user"); + } } @Test - public void testUserNotFound() { - // Remove User without Default Owner Permissions - RemoveBucketDefaultOwner.removeBucketDefaultOwner(bucketName, IT_SERVICE_ACCOUNT_EMAIL); - assertThat(stdOut.getCapturedOutputAsUtf8String()).contains(IT_SERVICE_ACCOUNT_EMAIL); - assertThat(stdOut.getCapturedOutputAsUtf8String()).contains("was not found"); + public void testUserNotFound() throws Exception { + try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() + .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) + .setStorage(storage) + .build()) { + + String bucketName = tmpBucket.getBucket().getName(); + // Remove User without Default Owner Permissions + RemoveBucketDefaultOwner.removeBucketDefaultOwner(bucketName, IT_SERVICE_ACCOUNT_EMAIL); + assertThat(stdOut.getCapturedOutputAsUtf8String()).contains(IT_SERVICE_ACCOUNT_EMAIL); + assertThat(stdOut.getCapturedOutputAsUtf8String()).contains("was not found"); + } } } diff --git a/samples/snippets/src/test/java/com/example/storage/bucket/RemoveBucketOwnerTest.java b/samples/snippets/src/test/java/com/example/storage/bucket/RemoveBucketOwnerTest.java index add09380fb..2d0e7bb2a2 100644 --- a/samples/snippets/src/test/java/com/example/storage/bucket/RemoveBucketOwnerTest.java +++ b/samples/snippets/src/test/java/com/example/storage/bucket/RemoveBucketOwnerTest.java @@ -16,41 +16,58 @@ package com.example.storage.bucket; +import static com.example.storage.Env.GOOGLE_CLOUD_PROJECT; +import static com.example.storage.Env.IT_SERVICE_ACCOUNT_EMAIL; +import static com.example.storage.Env.IT_SERVICE_ACCOUNT_USER; import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertNotNull; +import static com.google.common.truth.Truth.assertWithMessage; import com.example.storage.TestBase; import com.google.cloud.storage.Acl; import com.google.cloud.storage.Acl.Role; -import com.google.cloud.storage.Acl.User; +import com.google.cloud.storage.BucketInfo; +import com.google.cloud.storage.it.TemporaryBucket; import org.junit.Test; public class RemoveBucketOwnerTest extends TestBase { - public static final String IT_SERVICE_ACCOUNT_EMAIL = System.getenv("IT_SERVICE_ACCOUNT_EMAIL"); - @Test - public void testRemoveBucketOwner() { + public void testRemoveBucketOwner() throws Exception { // Check for user email before the actual test. - assertNotNull("Unable to determine user email", IT_SERVICE_ACCOUNT_EMAIL); - // Add User as Owner - Acl newOwner = Acl.of(new User(IT_SERVICE_ACCOUNT_EMAIL), Role.OWNER); - bucket.createAcl(newOwner); - - // Remove User as owner - RemoveBucketOwner.removeBucketOwner( - System.getenv("GOOGLE_CLOUD_PROJECT"), bucketName, IT_SERVICE_ACCOUNT_EMAIL); - assertThat(stdOut.getCapturedOutputAsUtf8String()).contains(IT_SERVICE_ACCOUNT_EMAIL); - assertThat(stdOut.getCapturedOutputAsUtf8String()).contains("Removed user"); - assertThat(bucket.getAcl(new User(IT_SERVICE_ACCOUNT_EMAIL))).isNull(); + assertWithMessage("Unable to determine user email").that(IT_SERVICE_ACCOUNT_EMAIL).isNotEmpty(); + + try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() + .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) + .setStorage(storage) + .build()) { + + String bucketName = tmpBucket.getBucket().getName(); + // Add User as Owner + Acl newOwner = Acl.of(IT_SERVICE_ACCOUNT_USER, Role.OWNER); + storage.createAcl(bucketName, newOwner); + + // Remove User as owner + RemoveBucketOwner.removeBucketOwner( + GOOGLE_CLOUD_PROJECT, bucketName, IT_SERVICE_ACCOUNT_EMAIL); + assertThat(stdOut.getCapturedOutputAsUtf8String()).contains(IT_SERVICE_ACCOUNT_EMAIL); + assertThat(stdOut.getCapturedOutputAsUtf8String()).contains("Removed user"); + } } @Test - public void testUserNotFound() { - // Remove User without Owner Permissions - RemoveBucketOwner.removeBucketOwner( - System.getenv("GOOGLE_CLOUD_PROJECT"), bucketName, IT_SERVICE_ACCOUNT_EMAIL); - assertThat(stdOut.getCapturedOutputAsUtf8String()).contains(IT_SERVICE_ACCOUNT_EMAIL); - assertThat(stdOut.getCapturedOutputAsUtf8String()).contains("was not found"); + public void testUserNotFound() throws Exception { + try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() + .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) + .setStorage(storage) + .build()) { + + String bucketName = tmpBucket.getBucket().getName(); + + // Remove User without Owner Permissions + RemoveBucketOwner.removeBucketOwner( + GOOGLE_CLOUD_PROJECT, bucketName, IT_SERVICE_ACCOUNT_EMAIL); + assertThat(stdOut.getCapturedOutputAsUtf8String()).contains(IT_SERVICE_ACCOUNT_EMAIL); + assertThat(stdOut.getCapturedOutputAsUtf8String()).contains("was not found"); + } } } diff --git a/samples/snippets/src/test/java/com/example/storage/object/AddFileOwnerTest.java b/samples/snippets/src/test/java/com/example/storage/object/AddBlobOwnerTest.java similarity index 54% rename from samples/snippets/src/test/java/com/example/storage/object/AddFileOwnerTest.java rename to samples/snippets/src/test/java/com/example/storage/object/AddBlobOwnerTest.java index 7d56878a76..09d3c76e53 100644 --- a/samples/snippets/src/test/java/com/example/storage/object/AddFileOwnerTest.java +++ b/samples/snippets/src/test/java/com/example/storage/object/AddBlobOwnerTest.java @@ -16,26 +16,30 @@ package com.example.storage.object; +import static com.example.storage.Env.GOOGLE_CLOUD_PROJECT; +import static com.example.storage.Env.IT_SERVICE_ACCOUNT_EMAIL; +import static com.example.storage.Env.IT_SERVICE_ACCOUNT_USER; import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertNotNull; +import static com.google.common.truth.Truth.assertWithMessage; import com.example.storage.TestBase; -import com.google.cloud.storage.Acl.User; +import com.google.cloud.storage.BlobId; +import com.google.cloud.storage.BlobInfo; import org.junit.Test; -public class AddFileOwnerTest extends TestBase { - - public static final String IT_SERVICE_ACCOUNT_EMAIL = System.getenv("IT_SERVICE_ACCOUNT_EMAIL"); +public class AddBlobOwnerTest extends TestBase { @Test - public void testAddFileOwner() { + public void testAddBlobOwner() { // Check for user email before the actual test. - assertNotNull("Unable to determine user email", IT_SERVICE_ACCOUNT_EMAIL); + assertWithMessage("Unable to determine user email").that(IT_SERVICE_ACCOUNT_EMAIL).isNotEmpty(); + BlobInfo gen1 = createEmptyObject(); + BlobId id = gen1.getBlobId(); // Add Ownership to the file. - AddFileOwner.addFileOwner( - System.getenv("GOOGLE_CLOUD_PROJECT"), bucketName, IT_SERVICE_ACCOUNT_EMAIL, blobName); + AddBlobOwner.addBlobOwner( + GOOGLE_CLOUD_PROJECT, id.getBucket(), IT_SERVICE_ACCOUNT_EMAIL, id.getName()); assertThat(stdOut.getCapturedOutputAsUtf8String()).contains(IT_SERVICE_ACCOUNT_EMAIL); - assertThat(blob.getAcl(new User(IT_SERVICE_ACCOUNT_EMAIL))).isNotNull(); + assertThat(storage.getAcl(id, IT_SERVICE_ACCOUNT_USER)).isNotNull(); } } diff --git a/samples/snippets/src/test/java/com/example/storage/object/DownloadBytesRangeTest.java b/samples/snippets/src/test/java/com/example/storage/object/DownloadBytesRangeTest.java index c20be6793d..21db918ad8 100644 --- a/samples/snippets/src/test/java/com/example/storage/object/DownloadBytesRangeTest.java +++ b/samples/snippets/src/test/java/com/example/storage/object/DownloadBytesRangeTest.java @@ -18,7 +18,11 @@ import static com.google.common.truth.Truth.assertThat; +import com.example.storage.Env; import com.example.storage.TestBase; +import com.google.cloud.storage.BlobId; +import com.google.cloud.storage.BlobInfo; +import com.google.cloud.storage.Storage.BlobTargetOption; import java.io.File; import java.io.IOException; import java.nio.file.Files; @@ -43,7 +47,11 @@ public void testDownloadByteRange() throws IOException { 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' }; - blob = storage.create(blob, bytes); + BlobInfo gen1 = storage.create( + BlobInfo.newBuilder(bucket, generator.randomObjectName()).build(), + bytes, + BlobTargetOption.doesNotExist() + ); File file = tmp.newFile(); @@ -53,10 +61,11 @@ public void testDownloadByteRange() throws IOException { try { String destFileName = file.getAbsolutePath(); + BlobId id = gen1.getBlobId(); DownloadByteRange.downloadByteRange( - System.getenv("GOOGLE_CLOUD_PROJECT"), - bucketName, - blobName, + Env.GOOGLE_CLOUD_PROJECT, + id.getBucket(), + id.getName(), startByte, endBytes, destFileName); diff --git a/samples/snippets/src/test/java/com/example/storage/object/PrintFileAclForUserTest.java b/samples/snippets/src/test/java/com/example/storage/object/PrintBlobAclForUserTest.java similarity index 54% rename from samples/snippets/src/test/java/com/example/storage/object/PrintFileAclForUserTest.java rename to samples/snippets/src/test/java/com/example/storage/object/PrintBlobAclForUserTest.java index 20c728ed3c..829396235c 100644 --- a/samples/snippets/src/test/java/com/example/storage/object/PrintFileAclForUserTest.java +++ b/samples/snippets/src/test/java/com/example/storage/object/PrintBlobAclForUserTest.java @@ -16,40 +16,45 @@ package com.example.storage.object; +import static com.example.storage.Env.IT_SERVICE_ACCOUNT_USER; import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertNotNull; +import static com.google.common.truth.Truth.assertWithMessage; +import com.example.storage.Env; import com.example.storage.TestBase; import com.google.cloud.storage.Acl; -import com.google.cloud.storage.Acl.Entity; import com.google.cloud.storage.Acl.Role; -import com.google.cloud.storage.Acl.User; +import com.google.cloud.storage.BlobId; +import com.google.cloud.storage.BlobInfo; import org.junit.Test; -public class PrintFileAclForUserTest extends TestBase { +public class PrintBlobAclForUserTest extends TestBase { - public static final String IT_SERVICE_ACCOUNT_EMAIL = System.getenv("IT_SERVICE_ACCOUNT_EMAIL"); + public static final String IT_SERVICE_ACCOUNT_EMAIL = Env.IT_SERVICE_ACCOUNT_EMAIL; @Test - public void testPrintBucketAclByUser() { + public void testPrintBucketAclByUser() throws Exception { // Check for user email before the actual test. - assertNotNull("Unable to determine user email", IT_SERVICE_ACCOUNT_EMAIL); + assertWithMessage("Unable to determine user email").that(IT_SERVICE_ACCOUNT_EMAIL).isNotEmpty(); - Entity testUser = new User(IT_SERVICE_ACCOUNT_EMAIL); - blob.createAcl(Acl.of(testUser, Role.READER)); - PrintFileAclForUser.printFileAclForUser(bucketName, blobName, IT_SERVICE_ACCOUNT_EMAIL); + BlobInfo gen1 = createEmptyObject(); + BlobId id = gen1.getBlobId(); + storage.createAcl(id, Acl.of(IT_SERVICE_ACCOUNT_USER, Role.READER)); + PrintBlobAclForUser.printBlobAclForUser(id.getBucket(), id.getName(), IT_SERVICE_ACCOUNT_EMAIL); assertThat(stdOut.getCapturedOutputAsUtf8String()).contains(IT_SERVICE_ACCOUNT_EMAIL); assertThat(stdOut.getCapturedOutputAsUtf8String()).contains(Role.READER.name()); } @Test - public void testUserNotFound() { + public void testUserNotFound() throws Exception { // Check for user email before the actual test. - assertNotNull("Unable to determine user email", IT_SERVICE_ACCOUNT_EMAIL); + assertWithMessage("Unable to determine user email").that(IT_SERVICE_ACCOUNT_EMAIL).isNotEmpty(); + BlobInfo gen1 = createEmptyObject(); + BlobId id = gen1.getBlobId(); // Delete Acl just in case to make sure the User ACL is not present - blob.deleteAcl(new User(IT_SERVICE_ACCOUNT_EMAIL)); - PrintFileAclForUser.printFileAclForUser(bucketName, blobName, IT_SERVICE_ACCOUNT_EMAIL); + storage.deleteAcl(id, IT_SERVICE_ACCOUNT_USER); + PrintBlobAclForUser.printBlobAclForUser(id.getBucket(), id.getName(), IT_SERVICE_ACCOUNT_EMAIL); assertThat(stdOut.getCapturedOutputAsUtf8String()).contains(IT_SERVICE_ACCOUNT_EMAIL); assertThat(stdOut.getCapturedOutputAsUtf8String()).contains("not found"); } diff --git a/samples/snippets/src/test/java/com/example/storage/object/PrintFileAclTest.java b/samples/snippets/src/test/java/com/example/storage/object/PrintBlobAclTest.java similarity index 57% rename from samples/snippets/src/test/java/com/example/storage/object/PrintFileAclTest.java rename to samples/snippets/src/test/java/com/example/storage/object/PrintBlobAclTest.java index 23bf7e7cae..04eb9e65bd 100644 --- a/samples/snippets/src/test/java/com/example/storage/object/PrintFileAclTest.java +++ b/samples/snippets/src/test/java/com/example/storage/object/PrintBlobAclTest.java @@ -16,28 +16,31 @@ package com.example.storage.object; +import static com.example.storage.Env.IT_SERVICE_ACCOUNT_USER; import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertNotNull; +import static com.google.common.truth.Truth.assertWithMessage; +import com.example.storage.Env; import com.example.storage.TestBase; import com.google.cloud.storage.Acl; -import com.google.cloud.storage.Acl.Entity; import com.google.cloud.storage.Acl.Role; -import com.google.cloud.storage.Acl.User; +import com.google.cloud.storage.BlobId; +import com.google.cloud.storage.BlobInfo; import org.junit.Test; -public class PrintFileAclTest extends TestBase { +public class PrintBlobAclTest extends TestBase { - public static final String IT_SERVICE_ACCOUNT_EMAIL = System.getenv("IT_SERVICE_ACCOUNT_EMAIL"); + public static final String IT_SERVICE_ACCOUNT_EMAIL = Env.IT_SERVICE_ACCOUNT_EMAIL; @Test - public void testPrintFileAcls() { + public void testPrintBlobAcls() { // Check for user email before the actual test. - assertNotNull("Unable to determine user email", IT_SERVICE_ACCOUNT_EMAIL); + assertWithMessage("Unable to determine user email").that(IT_SERVICE_ACCOUNT_EMAIL).isNotEmpty(); - Entity testUser = new User(IT_SERVICE_ACCOUNT_EMAIL); - blob.createAcl(Acl.of(testUser, Role.READER)); - PrintFileAcl.printFileAcl(bucketName, blobName); + BlobInfo gen1 = createEmptyObject(); + BlobId id = gen1.getBlobId(); + storage.createAcl(id, Acl.of(IT_SERVICE_ACCOUNT_USER, Role.READER)); + PrintBlobAcl.printBlobAcl(id.getBucket(), id.getName()); assertThat(stdOut.getCapturedOutputAsUtf8String()).contains("READER: USER"); } } diff --git a/samples/snippets/src/test/java/com/example/storage/object/RemoveFileOwnerTest.java b/samples/snippets/src/test/java/com/example/storage/object/RemoveBlobOwnerTest.java similarity index 56% rename from samples/snippets/src/test/java/com/example/storage/object/RemoveFileOwnerTest.java rename to samples/snippets/src/test/java/com/example/storage/object/RemoveBlobOwnerTest.java index 9d8936c789..325054041a 100644 --- a/samples/snippets/src/test/java/com/example/storage/object/RemoveFileOwnerTest.java +++ b/samples/snippets/src/test/java/com/example/storage/object/RemoveBlobOwnerTest.java @@ -16,48 +16,49 @@ package com.example.storage.object; +import static com.example.storage.Env.GOOGLE_CLOUD_PROJECT; +import static com.example.storage.Env.IT_SERVICE_ACCOUNT_EMAIL; +import static com.example.storage.Env.IT_SERVICE_ACCOUNT_USER; import static com.google.common.truth.Truth.assertThat; -import static org.junit.Assert.assertNotNull; +import static com.google.common.truth.Truth.assertWithMessage; import com.example.storage.TestBase; import com.google.cloud.storage.Acl; import com.google.cloud.storage.Acl.Role; -import com.google.cloud.storage.Acl.User; -import com.google.cloud.testing.junit4.MultipleAttemptsRule; -import org.junit.Rule; +import com.google.cloud.storage.BlobId; +import com.google.cloud.storage.BlobInfo; import org.junit.Test; -public class RemoveFileOwnerTest extends TestBase { - - @Rule public MultipleAttemptsRule multipleAttemptsRule = new MultipleAttemptsRule(5); - - public static final String IT_SERVICE_ACCOUNT_EMAIL = System.getenv("IT_SERVICE_ACCOUNT_EMAIL"); +public class RemoveBlobOwnerTest extends TestBase { @Test - public void testRemoveFileOwner() { + public void testRemoveBlobOwner() { // Check for user email before the actual test. - assertNotNull("Unable to determine user email", IT_SERVICE_ACCOUNT_EMAIL); + assertWithMessage("Unable to determine user email").that(IT_SERVICE_ACCOUNT_EMAIL).isNotEmpty(); + BlobInfo gen1 = createEmptyObject(); + BlobId id = gen1.getBlobId(); // Add User as Owner - Acl newFileOwner = Acl.of(new User(IT_SERVICE_ACCOUNT_EMAIL), Role.OWNER); - blob.createAcl(newFileOwner); + Acl newFileOwner = Acl.of(IT_SERVICE_ACCOUNT_USER, Role.OWNER); + storage.createAcl(id, newFileOwner); // Remove User as owner - RemoveFileOwner.removeFileOwner( - System.getenv("GOOGLE_CLOUD_PROJECT"), bucketName, IT_SERVICE_ACCOUNT_EMAIL, blobName); + RemoveBlobOwner.removeBlobOwner( + GOOGLE_CLOUD_PROJECT, id.getBucket(), IT_SERVICE_ACCOUNT_EMAIL, id.getName()); assertThat(stdOut.getCapturedOutputAsUtf8String()).contains(IT_SERVICE_ACCOUNT_EMAIL); assertThat(stdOut.getCapturedOutputAsUtf8String()).contains("Removed user"); - assertThat(blob.getAcl(new User(IT_SERVICE_ACCOUNT_EMAIL))).isNull(); } @Test public void testUserNotFound() { // Check for user email before the actual test. - assertNotNull("Unable to determine user email", IT_SERVICE_ACCOUNT_EMAIL); + assertWithMessage("Unable to determine user email").that(IT_SERVICE_ACCOUNT_EMAIL).isNotEmpty(); + BlobInfo gen1 = createEmptyObject(); + BlobId id = gen1.getBlobId(); // Remove User without Owner Permissions - RemoveFileOwner.removeFileOwner( - System.getenv("GOOGLE_CLOUD_PROJECT"), bucketName, IT_SERVICE_ACCOUNT_EMAIL, blobName); + RemoveBlobOwner.removeBlobOwner( + GOOGLE_CLOUD_PROJECT, id.getBucket(), IT_SERVICE_ACCOUNT_EMAIL, id.getName()); assertThat(stdOut.getCapturedOutputAsUtf8String()).contains(IT_SERVICE_ACCOUNT_EMAIL); assertThat(stdOut.getCapturedOutputAsUtf8String()).contains("was not found"); } diff --git a/samples/snippets/src/test/java/com/example/storage/transfermanager/ITTransferManagerSamples.java b/samples/snippets/src/test/java/com/example/storage/transfermanager/ITTransferManagerSamples.java index 89b52d5215..232222c08d 100644 --- a/samples/snippets/src/test/java/com/example/storage/transfermanager/ITTransferManagerSamples.java +++ b/samples/snippets/src/test/java/com/example/storage/transfermanager/ITTransferManagerSamples.java @@ -17,129 +17,141 @@ package com.example.storage.transfermanager; +import static com.example.storage.Env.GOOGLE_CLOUD_PROJECT; +import static com.google.cloud.storage.TestUtils.assertAll; import static com.google.common.truth.Truth.assertThat; +import com.example.storage.TestBase; import com.google.cloud.storage.BlobInfo; import com.google.cloud.storage.BucketInfo; -import com.google.cloud.storage.Storage; -import com.google.cloud.storage.it.BucketCleaner; -import com.google.cloud.storage.testing.RemoteStorageHelper; -import com.google.cloud.testing.junit4.StdOutCaptureRule; +import com.google.cloud.storage.DataGenerator; +import com.google.cloud.storage.Storage.BlobTargetOption; +import com.google.cloud.storage.TmpFile; +import com.google.cloud.storage.it.TemporaryBucket; import com.google.common.collect.ImmutableList; -import java.io.File; import java.io.IOException; import java.nio.file.Path; -import java.util.Arrays; -import java.util.Collections; import java.util.List; -import org.junit.AfterClass; -import org.junit.BeforeClass; +import java.util.stream.Stream; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; -public class ITTransferManagerSamples { - private static final String BUCKET = RemoteStorageHelper.generateBucketName(); - private static Storage storage; - private static List blobs; - private static List bigBlob; - private static final String PROJECT_ID = System.getenv("GOOGLE_CLOUD_PROJECT"); - @Rule public final StdOutCaptureRule stdOutCaptureRule = new StdOutCaptureRule(); - @Rule public final TemporaryFolder tmp = new TemporaryFolder(); - @Rule public final TemporaryFolder tmpDirectory = new TemporaryFolder(); +public class ITTransferManagerSamples extends TestBase { - @BeforeClass - public static void beforeClass() { - RemoteStorageHelper helper = RemoteStorageHelper.create(); - storage = helper.getOptions().getService(); - storage.create(BucketInfo.of(BUCKET)); - blobs = - Arrays.asList( - BlobInfo.newBuilder(BUCKET, "blob1").build(), - BlobInfo.newBuilder(BUCKET, "blob2").build(), - BlobInfo.newBuilder(BUCKET, "blob3").build()); - for (BlobInfo blob : blobs) { - storage.create(blob); - } - } - - @AfterClass - public static void afterClass() throws Exception { - try (Storage ignore = storage) { - BucketCleaner.doCleanup(BUCKET, storage); - } - } + @Rule public final TemporaryFolder downloadDirectory = new TemporaryFolder(); + @Rule public final TemporaryFolder uploadDirectory = new TemporaryFolder(); @Test public void uploadFiles() throws Exception { - File tmpFile = File.createTempFile("file", ".txt"); - File tmpFile2 = File.createTempFile("file2", ".txt"); - File tmpFile3 = File.createTempFile("file3", ".txt"); - List files = ImmutableList.of(tmpFile.toPath(), tmpFile2.toPath(), tmpFile3.toPath()); - UploadMany.uploadManyFiles(BUCKET, files); - String snippetOutput = stdOutCaptureRule.getCapturedOutputAsUtf8String(); - assertThat(snippetOutput.contains("file")).isTrue(); - assertThat(snippetOutput.contains("file2")).isTrue(); - assertThat(snippetOutput.contains("file3")).isTrue(); + Path baseDir = uploadDirectory.getRoot().toPath(); + try ( + TmpFile file1 = DataGenerator.base64Characters().tempFile(baseDir, 13); + TmpFile file2 = DataGenerator.base64Characters().tempFile(baseDir, 17); + TmpFile file3 = DataGenerator.base64Characters().tempFile(baseDir, 19) + ) { + List files = Stream.of(file1, file2, file3) + .map(TmpFile::getPath) + .collect(ImmutableList.toImmutableList()); + UploadMany.uploadManyFiles(bucket.getName(), files); + String snippetOutput = stdOut.getCapturedOutputAsUtf8String(); + assertAll( + () -> assertThat(snippetOutput).contains(file1.getPath().getFileName().toString()), + () -> assertThat(snippetOutput).contains(file2.getPath().getFileName().toString()), + () -> assertThat(snippetOutput).contains(file3.getPath().getFileName().toString()) + ); + } } @Test - public void uploadDirectory() throws IOException { - File tmpFile = tmpDirectory.newFile("fileDirUpload.txt"); - File tmpFile2 = tmpDirectory.newFile("fileDirUpload2.txt"); - File tmpFile3 = tmpDirectory.newFile("fileDirUpload3.txt"); - UploadDirectory.uploadDirectoryContents(BUCKET, tmpDirectory.getRoot().toPath()); - String snippetOutput = stdOutCaptureRule.getCapturedOutputAsUtf8String(); - assertThat(snippetOutput.contains("fileDirUpload.txt")).isTrue(); - assertThat(snippetOutput.contains("fileDirUpload2.txt")).isTrue(); - assertThat(snippetOutput.contains("fileDirUpload3.txt")).isTrue(); + public void uploadDirectory() throws Exception { + Path baseDir = uploadDirectory.getRoot().toPath(); + try ( + TmpFile file1 = DataGenerator.base64Characters().tempFile(baseDir, 13); + TmpFile file2 = DataGenerator.base64Characters().tempFile(baseDir, 17); + TmpFile file3 = DataGenerator.base64Characters().tempFile(baseDir, 19) + ) { + UploadDirectory.uploadDirectoryContents(bucket.getName(), baseDir); + String snippetOutput = stdOut.getCapturedOutputAsUtf8String(); + assertAll( + () -> assertThat(snippetOutput).contains(file1.getPath().getFileName().toString()), + () -> assertThat(snippetOutput).contains(file2.getPath().getFileName().toString()), + () -> assertThat(snippetOutput).contains(file3.getPath().getFileName().toString()) + ); + } } @Test - public void downloadBucket() { - String downloadFullBucketName = RemoteStorageHelper.generateBucketName(); - storage.create(BucketInfo.of(downloadFullBucketName)); - List bucketBlobs = - Arrays.asList( - BlobInfo.newBuilder(downloadFullBucketName, "bucketb1").build(), - BlobInfo.newBuilder(downloadFullBucketName, "bucketb2").build(), - BlobInfo.newBuilder(downloadFullBucketName, "bucketb3").build()); - for (BlobInfo blob : bucketBlobs) { - storage.create(blob); + public void downloadBucket() throws Exception { + try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() + .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) + .setStorage(storage) + .build()) { + BucketInfo bucket = tmpBucket.getBucket(); + String name1 = generator.randomObjectName(); + String name2 = generator.randomObjectName(); + String name3 = generator.randomObjectName(); + Stream.of(name1, name2, name3) + .map(name -> BlobInfo.newBuilder(bucket, name).build()) + .forEach(info -> storage.create(info, BlobTargetOption.doesNotExist())); + DownloadBucket.downloadBucketContents( + GOOGLE_CLOUD_PROJECT, bucket.getName(), downloadDirectory.getRoot().toPath()); + String snippetOutput = stdOut.getCapturedOutputAsUtf8String(); + assertAll( + () -> assertThat(snippetOutput).contains(name1), + () -> assertThat(snippetOutput).contains(name2), + () -> assertThat(snippetOutput).contains(name3) + ); } - DownloadBucket.downloadBucketContents( - PROJECT_ID, downloadFullBucketName, tmp.getRoot().toPath()); - String snippetOutput = stdOutCaptureRule.getCapturedOutputAsUtf8String(); - assertThat(snippetOutput.contains("bucketb1")).isTrue(); - assertThat(snippetOutput.contains("bucketb2")).isTrue(); - assertThat(snippetOutput.contains("bucketb3")).isTrue(); } @Test - public void downloadFiles() { - DownloadMany.downloadManyBlobs(BUCKET, blobs, tmp.getRoot().toPath()); - String snippetOutput = stdOutCaptureRule.getCapturedOutputAsUtf8String(); - assertThat(snippetOutput.contains("blob1")).isTrue(); - assertThat(snippetOutput.contains("blob2")).isTrue(); - assertThat(snippetOutput.contains("blob3")).isTrue(); + public void downloadBlobs() throws Exception { + String name1 = generator.randomObjectName(); + String name2 = generator.randomObjectName(); + String name3 = generator.randomObjectName(); + List blobs = Stream.of(name1, name2, name3) + .map(this::info) + .map(info -> storage.create(info, BlobTargetOption.doesNotExist())) + .collect(ImmutableList.toImmutableList()); + DownloadMany.downloadManyBlobs(bucket.getName(), blobs, downloadDirectory.getRoot().toPath()); + String snippetOutput = stdOut.getCapturedOutputAsUtf8String(); + assertAll( + () -> assertThat(snippetOutput).contains(name1), + () -> assertThat(snippetOutput).contains(name2), + () -> assertThat(snippetOutput).contains(name3) + ); } @Test public void uploadAllowPCU() throws IOException { - File tmpFile = tmpDirectory.newFile("fileDirUpload.txt"); - AllowParallelCompositeUpload.parallelCompositeUploadAllowed( - BUCKET, Collections.singletonList(tmpFile.toPath())); - String snippetOutput = stdOutCaptureRule.getCapturedOutputAsUtf8String(); - assertThat(snippetOutput.contains("fileDirUpload.txt")).isTrue(); + Path baseDir = uploadDirectory.getRoot().toPath(); + try ( + TmpFile file1 = DataGenerator.base64Characters().tempFile(baseDir, 313 * 1024 * 1024) + ) { + AllowParallelCompositeUpload.parallelCompositeUploadAllowed( + bucket.getName(), ImmutableList.of(file1.getPath())); + String snippetOutput = stdOut.getCapturedOutputAsUtf8String(); + assertThat(snippetOutput).contains(file1.getPath().getFileName().toString()); + } } @Test - public void downloadAllowDivideAndConquer() { + public void downloadAllowDivideAndConquer() throws Exception { + String name1 = generator.randomObjectName(); + String name2 = generator.randomObjectName(); + String name3 = generator.randomObjectName(); + List blobs = Stream.of(name1, name2, name3) + .map(this::info) + .map(info -> storage.create(info, BlobTargetOption.doesNotExist())) + .collect(ImmutableList.toImmutableList()); AllowDivideAndConquerDownload.divideAndConquerDownloadAllowed( - blobs, BUCKET, tmp.getRoot().toPath()); - String snippetOutput = stdOutCaptureRule.getCapturedOutputAsUtf8String(); - assertThat(snippetOutput.contains("blob1")).isTrue(); - assertThat(snippetOutput.contains("blob2")).isTrue(); - assertThat(snippetOutput.contains("blob3")).isTrue(); + blobs, bucket.getName(), downloadDirectory.getRoot().toPath()); + String snippetOutput = stdOut.getCapturedOutputAsUtf8String(); + assertAll( + () -> assertThat(snippetOutput).contains(name1), + () -> assertThat(snippetOutput).contains(name2), + () -> assertThat(snippetOutput).contains(name3) + ); } } From a9115e4e07a9954e8021ce6b3db4cadd1083f3ab Mon Sep 17 00:00:00 2001 From: cloud-java-bot <122572305+cloud-java-bot@users.noreply.github.com> Date: Thu, 29 May 2025 16:14:04 -0400 Subject: [PATCH 18/22] chore: Update generation configuration at Thu May 29 02:30:15 UTC 2025 (#3124) * chore: Update generation configuration at Thu May 29 02:30:15 UTC 2025 * chore: generate libraries at Thu May 29 02:30:49 UTC 2025 * chore: reformat samples --- README.md | 8 +- generation_config.yaml | 2 +- .../storage/ITCleanupOldBucketsTest.java | 33 +++-- .../com/example/storage/ITHmacSnippets.java | 3 +- .../com/example/storage/ITObjectSnippets.java | 137 ++++++++++-------- .../java/com/example/storage/TestBase.java | 1 + .../bucket/AddBucketDefaultOwnerTest.java | 9 +- .../storage/bucket/AddBucketOwnerTest.java | 9 +- .../storage/bucket/PrintBucketAclTest.java | 18 ++- .../bucket/RemoveBucketDefaultOwnerTest.java | 18 ++- .../storage/bucket/RemoveBucketOwnerTest.java | 18 ++- .../object/DownloadBytesRangeTest.java | 10 +- .../ITTransferManagerSamples.java | 65 ++++----- 13 files changed, 172 insertions(+), 159 deletions(-) diff --git a/README.md b/README.md index 2fe6cd50ba..8ccfe727cb 100644 --- a/README.md +++ b/README.md @@ -363,7 +363,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-storage/tree/ | Delete Managed Folder | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/managedfolders/DeleteManagedFolder.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/managedfolders/DeleteManagedFolder.java) | | Get Managed Folder | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/managedfolders/GetManagedFolder.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/managedfolders/GetManagedFolder.java) | | List Managed Folders | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/managedfolders/ListManagedFolders.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/managedfolders/ListManagedFolders.java) | -| Add File Owner | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/AddFileOwner.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/AddFileOwner.java) | +| Add Blob Owner | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/AddBlobOwner.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/AddBlobOwner.java) | | Batch Set Object Metadata | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/BatchSetObjectMetadata.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/BatchSetObjectMetadata.java) | | Change Object Csek To Kms | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/ChangeObjectCsekToKms.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/ChangeObjectCsekToKms.java) | | Change Object Storage Class | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/ChangeObjectStorageClass.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/ChangeObjectStorageClass.java) | @@ -389,11 +389,11 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-storage/tree/ | List Soft Deleted Versions Of Object | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/ListSoftDeletedVersionsOfObject.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/ListSoftDeletedVersionsOfObject.java) | | Make Object Public | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/MakeObjectPublic.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/MakeObjectPublic.java) | | Move Object | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/MoveObject.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/MoveObject.java) | -| Print File Acl | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/PrintFileAcl.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/PrintFileAcl.java) | -| Print File Acl For User | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/PrintFileAclForUser.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/PrintFileAclForUser.java) | +| Print Blob Acl | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/PrintBlobAcl.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/PrintBlobAcl.java) | +| Print Blob Acl For User | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/PrintBlobAclForUser.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/PrintBlobAclForUser.java) | | Release Event Based Hold | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/ReleaseEventBasedHold.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/ReleaseEventBasedHold.java) | | Release Temporary Hold | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/ReleaseTemporaryHold.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/ReleaseTemporaryHold.java) | -| Remove File Owner | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/RemoveFileOwner.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/RemoveFileOwner.java) | +| Remove Blob Owner | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/RemoveBlobOwner.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/RemoveBlobOwner.java) | | Restore Soft Deleted Object | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/RestoreSoftDeletedObject.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/RestoreSoftDeletedObject.java) | | Rotate Object Encryption Key | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/RotateObjectEncryptionKey.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/RotateObjectEncryptionKey.java) | | Set Event Based Hold | [source code](https://github.com/googleapis/java-storage/blob/main/samples/snippets/src/main/java/com/example/storage/object/SetEventBasedHold.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-storage&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/storage/object/SetEventBasedHold.java) | diff --git a/generation_config.yaml b/generation_config.yaml index e488357ee3..319587aa7b 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.58.0 -googleapis_commitish: 361c4941ccff4b02f608a0c1af63dcb65a888358 +googleapis_commitish: ea40277431fb821fd5a9b1eb8227535846388770 libraries_bom_version: 26.61.0 libraries: - api_shortname: storage diff --git a/samples/snippets/src/test/java/com/example/storage/ITCleanupOldBucketsTest.java b/samples/snippets/src/test/java/com/example/storage/ITCleanupOldBucketsTest.java index 0360aa189f..ba21e58ea8 100644 --- a/samples/snippets/src/test/java/com/example/storage/ITCleanupOldBucketsTest.java +++ b/samples/snippets/src/test/java/com/example/storage/ITCleanupOldBucketsTest.java @@ -45,31 +45,32 @@ public final class ITCleanupOldBucketsTest { @Inject @StorageFixture(Transport.HTTP) public Storage storage; - @Inject - public StorageControlClient ctrl; - @Inject - public BucketInfo bucket; + + @Inject public StorageControlClient ctrl; + @Inject public BucketInfo bucket; @Test public void cleanupOldBuckets() { - Page page = storage.list( - BucketListOption.fields(BucketField.NAME, BucketField.TIME_CREATED)); + Page page = + storage.list(BucketListOption.fields(BucketField.NAME, BucketField.TIME_CREATED)); String bucketNamePrefix = bucket.getName().substring(0, UUID.randomUUID().toString().length()); OffsetDateTime now = Instant.now().atOffset(ZoneOffset.UTC); OffsetDateTime twentyFourHoursAgo = now.minusHours(24); - ImmutableList bucketsToClean = page.streamAll() - .map(Bucket::asBucketInfo) - .filter(bucket -> { - OffsetDateTime ctime = bucket.getCreateTimeOffsetDateTime(); - String name = bucket.getName(); - return ctime.isBefore(twentyFourHoursAgo) - && (name.startsWith("gcloud") || name.startsWith(bucketNamePrefix)); - }) - .map(BucketInfo::getName) - .collect(ImmutableList.toImmutableList()); + ImmutableList bucketsToClean = + page.streamAll() + .map(Bucket::asBucketInfo) + .filter( + bucket -> { + OffsetDateTime ctime = bucket.getCreateTimeOffsetDateTime(); + String name = bucket.getName(); + return ctime.isBefore(twentyFourHoursAgo) + && (name.startsWith("gcloud") || name.startsWith(bucketNamePrefix)); + }) + .map(BucketInfo::getName) + .collect(ImmutableList.toImmutableList()); for (String bucketName : bucketsToClean) { BucketCleaner.doCleanup(bucketName, storage, ctrl); diff --git a/samples/snippets/src/test/java/com/example/storage/ITHmacSnippets.java b/samples/snippets/src/test/java/com/example/storage/ITHmacSnippets.java index db548e8877..632142a618 100644 --- a/samples/snippets/src/test/java/com/example/storage/ITHmacSnippets.java +++ b/samples/snippets/src/test/java/com/example/storage/ITHmacSnippets.java @@ -53,7 +53,8 @@ public void before() { // These samples have not materially changed since 2022-03 (as of 2025-05). // Additionally, we have more robust integration tests for HMAC operations in the library // itself. - assumeFalse("skipping hmac snippet tests in CI due to racy interactions", + assumeFalse( + "skipping hmac snippet tests in CI due to racy interactions", "samples".equals(Env.JOB_TYPE)); cleanUpHmacKeys(ServiceAccount.of(HMAC_KEY_TEST_SERVICE_ACCOUNT)); } diff --git a/samples/snippets/src/test/java/com/example/storage/ITObjectSnippets.java b/samples/snippets/src/test/java/com/example/storage/ITObjectSnippets.java index 6db8a5ca45..50ffdd5492 100644 --- a/samples/snippets/src/test/java/com/example/storage/ITObjectSnippets.java +++ b/samples/snippets/src/test/java/com/example/storage/ITObjectSnippets.java @@ -118,10 +118,11 @@ public void testChangeObjectStorageClass() { @Test public void testCopyObject() throws Exception { - try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() - .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) - .setStorage(storage) - .build()) { + try (TemporaryBucket tmpBucket = + TemporaryBucket.newBuilder() + .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) + .setStorage(storage) + .build()) { String newBucket = tmpBucket.getBucket().getName(); @@ -167,20 +168,24 @@ public void testDownloadObjectIntoMemory() throws IOException { @Test public void testDownloadPublicObject() throws Exception { - try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() - .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()) - .setIamConfiguration(IamConfiguration.newBuilder() - .setIsUniformBucketLevelAccessEnabled(false) - .build()) - .build()) - .setStorage(storage) - .build()) { + try (TemporaryBucket tmpBucket = + TemporaryBucket.newBuilder() + .setBucketInfo( + BucketInfo.newBuilder(generator.randomBucketName()) + .setIamConfiguration( + IamConfiguration.newBuilder() + .setIsUniformBucketLevelAccessEnabled(false) + .build()) + .build()) + .setStorage(storage) + .build()) { String bucketName = tmpBucket.getBucket().getName(); String publicBlob = generator.randomObjectName(); BlobId publicBlobId = BlobId.of(bucketName, publicBlob); - Blob gen1 = storage.create(BlobInfo.newBuilder(publicBlobId).build(), CONTENT, - BlobTargetOption.doesNotExist()); + Blob gen1 = + storage.create( + BlobInfo.newBuilder(publicBlobId).build(), CONTENT, BlobTargetOption.doesNotExist()); storage.createAcl(gen1.getBlobId(), Acl.of(Acl.User.ofAllUsers(), Acl.Role.READER)); File tempFile = tmpDir.newFile("file.txt"); DownloadPublicObject.downloadPublicObject(bucketName, publicBlob, tempFile.toPath()); @@ -257,14 +262,14 @@ public void testMoveObject() throws Exception { String blob = generator.randomObjectName(); String newBlob = generator.randomObjectName(); - try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() - .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) - .setStorage(storage) - .build()) { + try (TemporaryBucket tmpBucket = + TemporaryBucket.newBuilder() + .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) + .setStorage(storage) + .build()) { String newBucket = tmpBucket.getBucket().getName(); - BlobInfo gen1 = - storage.create(BlobInfo.newBuilder(BlobId.of(newBucket, blob)).build()); + BlobInfo gen1 = storage.create(BlobInfo.newBuilder(BlobId.of(newBucket, blob)).build()); MoveObject.moveObject(GOOGLE_CLOUD_PROJECT, newBucket, blob, newBucket, newBlob); assertNotNull(storage.get(newBucket, newBlob)); assertNull(storage.get(bucket.getName(), blob)); @@ -343,25 +348,21 @@ public void testObjectCSEKOperations() throws IOException { assertNull(storage.get(bucket.getName(), encryptedBlob).getKmsKeyName()); CryptoKey key1 = kmsFixture.getKey1(); ChangeObjectCsekToKms.changeObjectFromCsekToKms( - GOOGLE_CLOUD_PROJECT, - bucket.getName(), - encryptedBlob, - newEncryptionKey, - key1.getName()); + GOOGLE_CLOUD_PROJECT, bucket.getName(), encryptedBlob, newEncryptionKey, key1.getName()); assertTrue( - storage - .get(bucket.getName(), encryptedBlob) - .getKmsKeyName() - .contains(key1. getName())); + storage.get(bucket.getName(), encryptedBlob).getKmsKeyName().contains(key1.getName())); } @Test public void testObjectVersioningOperations() throws Exception { - try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() - .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()) - .setVersioningEnabled(true).build()) - .setStorage(storage) - .build()) { + try (TemporaryBucket tmpBucket = + TemporaryBucket.newBuilder() + .setBucketInfo( + BucketInfo.newBuilder(generator.randomBucketName()) + .setVersioningEnabled(true) + .build()) + .setStorage(storage) + .build()) { String bucketName = tmpBucket.getBucket().getName(); String versionedBlob = generator.randomObjectName(); @@ -387,8 +388,7 @@ public void testObjectVersioningOperations() throws Exception { DeleteOldVersionOfObject.deleteOldVersionOfObject( GOOGLE_CLOUD_PROJECT, bucketName, versionedBlob, originalBlob.getGeneration()); - assertNull( - storage.get(BlobId.of(bucketName, versionedBlob, originalBlob.getGeneration()))); + assertNull(storage.get(BlobId.of(bucketName, versionedBlob, originalBlob.getGeneration()))); assertNotNull(storage.get(bucketName, versionedBlob)); } } @@ -522,16 +522,19 @@ public void testSetObjectRetentionPolicy() { @Test public void testListSoftDeletedObjects() throws Exception { - try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() - .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()) - // This is already the default, but we set it here in case the default ever changes - .setSoftDeletePolicy( - BucketInfo.SoftDeletePolicy.newBuilder() - .setRetentionDuration(Duration.ofDays(7)) - .build()) - .build()) - .setStorage(storage) - .build()) { + try (TemporaryBucket tmpBucket = + TemporaryBucket.newBuilder() + .setBucketInfo( + BucketInfo.newBuilder(generator.randomBucketName()) + // This is already the default, but we set it here in case the default ever + // changes + .setSoftDeletePolicy( + BucketInfo.SoftDeletePolicy.newBuilder() + .setRetentionDuration(Duration.ofDays(7)) + .build()) + .build()) + .setStorage(storage) + .build()) { String bucketName = tmpBucket.getBucket().getName(); String blob = generator.randomObjectName(); @@ -548,16 +551,19 @@ public void testListSoftDeletedObjects() throws Exception { @Test public void testListSoftDeletedVersionsOfObject() throws Exception { - try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() - .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()) - // This is already the default, but we set it here in case the default ever changes - .setSoftDeletePolicy( - BucketInfo.SoftDeletePolicy.newBuilder() - .setRetentionDuration(Duration.ofDays(7)) + try (TemporaryBucket tmpBucket = + TemporaryBucket.newBuilder() + .setBucketInfo( + BucketInfo.newBuilder(generator.randomBucketName()) + // This is already the default, but we set it here in case the default ever + // changes + .setSoftDeletePolicy( + BucketInfo.SoftDeletePolicy.newBuilder() + .setRetentionDuration(Duration.ofDays(7)) + .build()) .build()) - .build()) - .setStorage(storage) - .build()) { + .setStorage(storage) + .build()) { String bucketName = tmpBucket.getBucket().getName(); System.out.println(storage.get(bucketName).getSoftDeletePolicy().toString()); @@ -582,16 +588,19 @@ public void testListSoftDeletedVersionsOfObject() throws Exception { @Test public void testRestoreSoftDeletedObject() throws Exception { - try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() - .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()) - // This is already the default, but we set it here in case the default ever changes - .setSoftDeletePolicy( - BucketInfo.SoftDeletePolicy.newBuilder() - .setRetentionDuration(Duration.ofDays(7)) + try (TemporaryBucket tmpBucket = + TemporaryBucket.newBuilder() + .setBucketInfo( + BucketInfo.newBuilder(generator.randomBucketName()) + // This is already the default, but we set it here in case the default ever + // changes + .setSoftDeletePolicy( + BucketInfo.SoftDeletePolicy.newBuilder() + .setRetentionDuration(Duration.ofDays(7)) + .build()) .build()) - .build()) - .setStorage(storage) - .build()) { + .setStorage(storage) + .build()) { String bucketName = tmpBucket.getBucket().getName(); String blob = generator.randomObjectName(); diff --git a/samples/snippets/src/test/java/com/example/storage/TestBase.java b/samples/snippets/src/test/java/com/example/storage/TestBase.java index 298225c498..2ca7c37020 100644 --- a/samples/snippets/src/test/java/com/example/storage/TestBase.java +++ b/samples/snippets/src/test/java/com/example/storage/TestBase.java @@ -41,6 +41,7 @@ public abstract class TestBase { @Inject @StorageFixture(Transport.HTTP) public Storage storage; + @Inject public BucketInfo bucket; @Inject public Generator generator; diff --git a/samples/snippets/src/test/java/com/example/storage/bucket/AddBucketDefaultOwnerTest.java b/samples/snippets/src/test/java/com/example/storage/bucket/AddBucketDefaultOwnerTest.java index f49ba1e8e2..83975c1dfb 100644 --- a/samples/snippets/src/test/java/com/example/storage/bucket/AddBucketDefaultOwnerTest.java +++ b/samples/snippets/src/test/java/com/example/storage/bucket/AddBucketDefaultOwnerTest.java @@ -32,10 +32,11 @@ public void testAddBucketDefaultOwner() throws Exception { // Check for user email before the actual test. assertWithMessage("Unable to determine user email").that(IT_SERVICE_ACCOUNT_EMAIL).isNotEmpty(); - try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() - .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) - .setStorage(storage) - .build()) { + try (TemporaryBucket tmpBucket = + TemporaryBucket.newBuilder() + .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) + .setStorage(storage) + .build()) { String bucketName = tmpBucket.getBucket().getName(); diff --git a/samples/snippets/src/test/java/com/example/storage/bucket/AddBucketOwnerTest.java b/samples/snippets/src/test/java/com/example/storage/bucket/AddBucketOwnerTest.java index e35c5a9001..f95bacfbb8 100644 --- a/samples/snippets/src/test/java/com/example/storage/bucket/AddBucketOwnerTest.java +++ b/samples/snippets/src/test/java/com/example/storage/bucket/AddBucketOwnerTest.java @@ -33,10 +33,11 @@ public void testAddBucketOwner() throws Exception { // Check for user email before the actual test. assertWithMessage("Unable to determine user email").that(IT_SERVICE_ACCOUNT_EMAIL).isNotEmpty(); - try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() - .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) - .setStorage(storage) - .build()) { + try (TemporaryBucket tmpBucket = + TemporaryBucket.newBuilder() + .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) + .setStorage(storage) + .build()) { String bucketName = tmpBucket.getBucket().getName(); diff --git a/samples/snippets/src/test/java/com/example/storage/bucket/PrintBucketAclTest.java b/samples/snippets/src/test/java/com/example/storage/bucket/PrintBucketAclTest.java index 2fff1e8fd1..58872f403b 100644 --- a/samples/snippets/src/test/java/com/example/storage/bucket/PrintBucketAclTest.java +++ b/samples/snippets/src/test/java/com/example/storage/bucket/PrintBucketAclTest.java @@ -36,10 +36,11 @@ public void testPrintBucketAcls() throws Exception { // Check for user email before the actual test. assertWithMessage("Unable to determine user email").that(IT_SERVICE_ACCOUNT_EMAIL).isNotEmpty(); - try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() - .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) - .setStorage(storage) - .build()) { + try (TemporaryBucket tmpBucket = + TemporaryBucket.newBuilder() + .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) + .setStorage(storage) + .build()) { String bucketName = tmpBucket.getBucket().getName(); storage.createAcl(bucketName, Acl.of(IT_SERVICE_ACCOUNT_USER, Role.READER)); @@ -53,10 +54,11 @@ public void testPrintBucketAclByUser() throws Exception { // Check for user email before the actual test. assertWithMessage("Unable to determine user email").that(IT_SERVICE_ACCOUNT_EMAIL).isNotEmpty(); - try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() - .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) - .setStorage(storage) - .build()) { + try (TemporaryBucket tmpBucket = + TemporaryBucket.newBuilder() + .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) + .setStorage(storage) + .build()) { String bucketName = tmpBucket.getBucket().getName(); storage.createAcl(bucketName, Acl.of(IT_SERVICE_ACCOUNT_USER, Role.READER)); diff --git a/samples/snippets/src/test/java/com/example/storage/bucket/RemoveBucketDefaultOwnerTest.java b/samples/snippets/src/test/java/com/example/storage/bucket/RemoveBucketDefaultOwnerTest.java index d5e8ad8658..8aecd0f6c9 100644 --- a/samples/snippets/src/test/java/com/example/storage/bucket/RemoveBucketDefaultOwnerTest.java +++ b/samples/snippets/src/test/java/com/example/storage/bucket/RemoveBucketDefaultOwnerTest.java @@ -34,10 +34,11 @@ public class RemoveBucketDefaultOwnerTest extends TestBase { public void testRemoveBucketDefaultOwner() throws Exception { // Check for user email before the actual test. assertWithMessage("Unable to determine user email").that(IT_SERVICE_ACCOUNT_EMAIL).isNotEmpty(); - try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() - .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) - .setStorage(storage) - .build()) { + try (TemporaryBucket tmpBucket = + TemporaryBucket.newBuilder() + .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) + .setStorage(storage) + .build()) { String bucketName = tmpBucket.getBucket().getName(); @@ -54,10 +55,11 @@ public void testRemoveBucketDefaultOwner() throws Exception { @Test public void testUserNotFound() throws Exception { - try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() - .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) - .setStorage(storage) - .build()) { + try (TemporaryBucket tmpBucket = + TemporaryBucket.newBuilder() + .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) + .setStorage(storage) + .build()) { String bucketName = tmpBucket.getBucket().getName(); // Remove User without Default Owner Permissions diff --git a/samples/snippets/src/test/java/com/example/storage/bucket/RemoveBucketOwnerTest.java b/samples/snippets/src/test/java/com/example/storage/bucket/RemoveBucketOwnerTest.java index 2d0e7bb2a2..6008cab6a7 100644 --- a/samples/snippets/src/test/java/com/example/storage/bucket/RemoveBucketOwnerTest.java +++ b/samples/snippets/src/test/java/com/example/storage/bucket/RemoveBucketOwnerTest.java @@ -36,10 +36,11 @@ public void testRemoveBucketOwner() throws Exception { // Check for user email before the actual test. assertWithMessage("Unable to determine user email").that(IT_SERVICE_ACCOUNT_EMAIL).isNotEmpty(); - try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() - .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) - .setStorage(storage) - .build()) { + try (TemporaryBucket tmpBucket = + TemporaryBucket.newBuilder() + .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) + .setStorage(storage) + .build()) { String bucketName = tmpBucket.getBucket().getName(); // Add User as Owner @@ -56,10 +57,11 @@ public void testRemoveBucketOwner() throws Exception { @Test public void testUserNotFound() throws Exception { - try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() - .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) - .setStorage(storage) - .build()) { + try (TemporaryBucket tmpBucket = + TemporaryBucket.newBuilder() + .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) + .setStorage(storage) + .build()) { String bucketName = tmpBucket.getBucket().getName(); diff --git a/samples/snippets/src/test/java/com/example/storage/object/DownloadBytesRangeTest.java b/samples/snippets/src/test/java/com/example/storage/object/DownloadBytesRangeTest.java index 21db918ad8..5ad25abe01 100644 --- a/samples/snippets/src/test/java/com/example/storage/object/DownloadBytesRangeTest.java +++ b/samples/snippets/src/test/java/com/example/storage/object/DownloadBytesRangeTest.java @@ -47,11 +47,11 @@ public void testDownloadByteRange() throws IOException { 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' }; - BlobInfo gen1 = storage.create( - BlobInfo.newBuilder(bucket, generator.randomObjectName()).build(), - bytes, - BlobTargetOption.doesNotExist() - ); + BlobInfo gen1 = + storage.create( + BlobInfo.newBuilder(bucket, generator.randomObjectName()).build(), + bytes, + BlobTargetOption.doesNotExist()); File file = tmp.newFile(); diff --git a/samples/snippets/src/test/java/com/example/storage/transfermanager/ITTransferManagerSamples.java b/samples/snippets/src/test/java/com/example/storage/transfermanager/ITTransferManagerSamples.java index 232222c08d..97fb2cea9c 100644 --- a/samples/snippets/src/test/java/com/example/storage/transfermanager/ITTransferManagerSamples.java +++ b/samples/snippets/src/test/java/com/example/storage/transfermanager/ITTransferManagerSamples.java @@ -45,48 +45,44 @@ public class ITTransferManagerSamples extends TestBase { @Test public void uploadFiles() throws Exception { Path baseDir = uploadDirectory.getRoot().toPath(); - try ( - TmpFile file1 = DataGenerator.base64Characters().tempFile(baseDir, 13); + try (TmpFile file1 = DataGenerator.base64Characters().tempFile(baseDir, 13); TmpFile file2 = DataGenerator.base64Characters().tempFile(baseDir, 17); - TmpFile file3 = DataGenerator.base64Characters().tempFile(baseDir, 19) - ) { - List files = Stream.of(file1, file2, file3) - .map(TmpFile::getPath) - .collect(ImmutableList.toImmutableList()); + TmpFile file3 = DataGenerator.base64Characters().tempFile(baseDir, 19)) { + List files = + Stream.of(file1, file2, file3) + .map(TmpFile::getPath) + .collect(ImmutableList.toImmutableList()); UploadMany.uploadManyFiles(bucket.getName(), files); String snippetOutput = stdOut.getCapturedOutputAsUtf8String(); assertAll( () -> assertThat(snippetOutput).contains(file1.getPath().getFileName().toString()), () -> assertThat(snippetOutput).contains(file2.getPath().getFileName().toString()), - () -> assertThat(snippetOutput).contains(file3.getPath().getFileName().toString()) - ); + () -> assertThat(snippetOutput).contains(file3.getPath().getFileName().toString())); } } @Test public void uploadDirectory() throws Exception { Path baseDir = uploadDirectory.getRoot().toPath(); - try ( - TmpFile file1 = DataGenerator.base64Characters().tempFile(baseDir, 13); + try (TmpFile file1 = DataGenerator.base64Characters().tempFile(baseDir, 13); TmpFile file2 = DataGenerator.base64Characters().tempFile(baseDir, 17); - TmpFile file3 = DataGenerator.base64Characters().tempFile(baseDir, 19) - ) { + TmpFile file3 = DataGenerator.base64Characters().tempFile(baseDir, 19)) { UploadDirectory.uploadDirectoryContents(bucket.getName(), baseDir); String snippetOutput = stdOut.getCapturedOutputAsUtf8String(); assertAll( () -> assertThat(snippetOutput).contains(file1.getPath().getFileName().toString()), () -> assertThat(snippetOutput).contains(file2.getPath().getFileName().toString()), - () -> assertThat(snippetOutput).contains(file3.getPath().getFileName().toString()) - ); + () -> assertThat(snippetOutput).contains(file3.getPath().getFileName().toString())); } } @Test public void downloadBucket() throws Exception { - try (TemporaryBucket tmpBucket = TemporaryBucket.newBuilder() - .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) - .setStorage(storage) - .build()) { + try (TemporaryBucket tmpBucket = + TemporaryBucket.newBuilder() + .setBucketInfo(BucketInfo.newBuilder(generator.randomBucketName()).build()) + .setStorage(storage) + .build()) { BucketInfo bucket = tmpBucket.getBucket(); String name1 = generator.randomObjectName(); String name2 = generator.randomObjectName(); @@ -100,8 +96,7 @@ public void downloadBucket() throws Exception { assertAll( () -> assertThat(snippetOutput).contains(name1), () -> assertThat(snippetOutput).contains(name2), - () -> assertThat(snippetOutput).contains(name3) - ); + () -> assertThat(snippetOutput).contains(name3)); } } @@ -110,25 +105,23 @@ public void downloadBlobs() throws Exception { String name1 = generator.randomObjectName(); String name2 = generator.randomObjectName(); String name3 = generator.randomObjectName(); - List blobs = Stream.of(name1, name2, name3) - .map(this::info) - .map(info -> storage.create(info, BlobTargetOption.doesNotExist())) - .collect(ImmutableList.toImmutableList()); + List blobs = + Stream.of(name1, name2, name3) + .map(this::info) + .map(info -> storage.create(info, BlobTargetOption.doesNotExist())) + .collect(ImmutableList.toImmutableList()); DownloadMany.downloadManyBlobs(bucket.getName(), blobs, downloadDirectory.getRoot().toPath()); String snippetOutput = stdOut.getCapturedOutputAsUtf8String(); assertAll( () -> assertThat(snippetOutput).contains(name1), () -> assertThat(snippetOutput).contains(name2), - () -> assertThat(snippetOutput).contains(name3) - ); + () -> assertThat(snippetOutput).contains(name3)); } @Test public void uploadAllowPCU() throws IOException { Path baseDir = uploadDirectory.getRoot().toPath(); - try ( - TmpFile file1 = DataGenerator.base64Characters().tempFile(baseDir, 313 * 1024 * 1024) - ) { + try (TmpFile file1 = DataGenerator.base64Characters().tempFile(baseDir, 313 * 1024 * 1024)) { AllowParallelCompositeUpload.parallelCompositeUploadAllowed( bucket.getName(), ImmutableList.of(file1.getPath())); String snippetOutput = stdOut.getCapturedOutputAsUtf8String(); @@ -141,17 +134,17 @@ public void downloadAllowDivideAndConquer() throws Exception { String name1 = generator.randomObjectName(); String name2 = generator.randomObjectName(); String name3 = generator.randomObjectName(); - List blobs = Stream.of(name1, name2, name3) - .map(this::info) - .map(info -> storage.create(info, BlobTargetOption.doesNotExist())) - .collect(ImmutableList.toImmutableList()); + List blobs = + Stream.of(name1, name2, name3) + .map(this::info) + .map(info -> storage.create(info, BlobTargetOption.doesNotExist())) + .collect(ImmutableList.toImmutableList()); AllowDivideAndConquerDownload.divideAndConquerDownloadAllowed( blobs, bucket.getName(), downloadDirectory.getRoot().toPath()); String snippetOutput = stdOut.getCapturedOutputAsUtf8String(); assertAll( () -> assertThat(snippetOutput).contains(name1), () -> assertThat(snippetOutput).contains(name2), - () -> assertThat(snippetOutput).contains(name3) - ); + () -> assertThat(snippetOutput).contains(name3)); } } From 31cd058dcaf5a891ecb7a955602b09634d912560 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 4 Jun 2025 16:45:56 +0200 Subject: [PATCH 19/22] deps: update sdk-platform-java dependencies (#3129) --- .github/workflows/hermetic_library_generation.yaml | 2 +- .github/workflows/unmanaged_dependency_check.yaml | 2 +- google-cloud-storage-bom/pom.xml | 2 +- pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/hermetic_library_generation.yaml b/.github/workflows/hermetic_library_generation.yaml index ea4c275a23..b984ab43a1 100644 --- a/.github/workflows/hermetic_library_generation.yaml +++ b/.github/workflows/hermetic_library_generation.yaml @@ -43,7 +43,7 @@ jobs: with: fetch-depth: 0 token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }} - - uses: googleapis/sdk-platform-java/.github/scripts@v2.58.0 + - uses: googleapis/sdk-platform-java/.github/scripts@v2.59.0 if: env.SHOULD_RUN == 'true' with: base_ref: ${{ github.base_ref }} diff --git a/.github/workflows/unmanaged_dependency_check.yaml b/.github/workflows/unmanaged_dependency_check.yaml index 17daf44d4c..9e2ad8b3dc 100644 --- a/.github/workflows/unmanaged_dependency_check.yaml +++ b/.github/workflows/unmanaged_dependency_check.yaml @@ -17,6 +17,6 @@ jobs: # repository .kokoro/build.sh - name: Unmanaged dependency check - uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v3.48.0 + uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v3.49.0 with: bom-path: google-cloud-storage-bom/pom.xml diff --git a/google-cloud-storage-bom/pom.xml b/google-cloud-storage-bom/pom.xml index 35adcf376c..a895f5152c 100644 --- a/google-cloud-storage-bom/pom.xml +++ b/google-cloud-storage-bom/pom.xml @@ -24,7 +24,7 @@ com.google.cloud sdk-platform-java-config - 3.48.0 + 3.49.0 diff --git a/pom.xml b/pom.xml index dadb2c1088..dd7d145d71 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud sdk-platform-java-config - 3.48.0 + 3.49.0 From 2a4499d1686e93e8495f29b5198488d166caaa06 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Wed, 4 Jun 2025 16:51:06 +0200 Subject: [PATCH 20/22] deps: update dependency com.google.apis:google-api-services-storage to v1-rev20250524-2.0.0 (#3127) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index dd7d145d71..3a8a7bbdfb 100644 --- a/pom.xml +++ b/pom.xml @@ -87,7 +87,7 @@ com.google.apis google-api-services-storage - v1-rev20250521-2.0.0 + v1-rev20250524-2.0.0 com.google.cloud From df92bf02e1bc905672722891989ccd2210031039 Mon Sep 17 00:00:00 2001 From: BenWhitehead Date: Wed, 4 Jun 2025 14:04:30 -0400 Subject: [PATCH 21/22] test: update ITObjectTest copy tests to delete blobid instead of blob name (#3131) This will have the generation present making the delete idempotent and retryable. --- .../google/cloud/storage/it/ITObjectTest.java | 93 ++++++++++--------- 1 file changed, 49 insertions(+), 44 deletions(-) diff --git a/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITObjectTest.java b/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITObjectTest.java index f3a79e030a..3b3c3e7dc6 100644 --- a/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITObjectTest.java +++ b/google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITObjectTest.java @@ -902,13 +902,14 @@ public void testCopyBlob() { String targetBlobName = generator.randomObjectName() + "-target"; CopyRequest req = CopyRequest.of(source, BlobId.of(bucket.getName(), targetBlobName)); CopyWriter copyWriter = storage.copy(req); - assertEquals(bucket.getName(), copyWriter.getResult().getBucket()); - assertEquals(targetBlobName, copyWriter.getResult().getName()); - assertEquals(CONTENT_TYPE, copyWriter.getResult().getContentType()); - assertEquals(metadata, copyWriter.getResult().getMetadata()); + Blob gen1 = copyWriter.getResult(); + assertEquals(bucket.getName(), gen1.getBucket()); + assertEquals(targetBlobName, gen1.getName()); + assertEquals(CONTENT_TYPE, gen1.getContentType()); + assertEquals(metadata, gen1.getMetadata()); assertTrue(copyWriter.isDone()); assertTrue(remoteBlob.delete()); - assertTrue(storage.delete(bucket.getName(), targetBlobName)); + assertTrue(storage.delete(gen1.getBlobId())); } @Test @@ -959,14 +960,15 @@ public void testCopyBlobWithPredefinedAcl() { BlobTargetOption.predefinedAcl(PredefinedAcl.PUBLIC_READ)) .build(); CopyWriter copyWriter = storage.copy(req); - assertEquals(bucket.getName(), copyWriter.getResult().getBucket()); - assertEquals(targetBlobName, copyWriter.getResult().getName()); - assertEquals(CONTENT_TYPE, copyWriter.getResult().getContentType()); - assertEquals(metadata, copyWriter.getResult().getMetadata()); - assertNotNull(copyWriter.getResult().getAcl(User.ofAllUsers())); + Blob gen1 = copyWriter.getResult(); + assertEquals(bucket.getName(), gen1.getBucket()); + assertEquals(targetBlobName, gen1.getName()); + assertEquals(CONTENT_TYPE, gen1.getContentType()); + assertEquals(metadata, gen1.getMetadata()); + assertNotNull(gen1.getAcl(User.ofAllUsers())); assertTrue(copyWriter.isDone()); assertTrue(remoteBlob.delete()); - assertTrue(storage.delete(bucket.getName(), targetBlobName)); + assertTrue(storage.delete(gen1.getBlobId())); } @Test @@ -987,36 +989,38 @@ public void testCopyBlobWithEncryptionKeys() { .setContentType(CONTENT_TYPE) .setMetadata(metadata) .build(); - CopyRequest req = + CopyRequest req1 = CopyRequest.newBuilder() .setSource(source) .setTarget(target, BlobTargetOption.encryptionKey(OTHER_BASE64_KEY)) .setSourceOptions(BlobSourceOption.decryptionKey(BASE64_KEY)) .build(); - CopyWriter copyWriter = storage.copy(req); - assertEquals(bucket.getName(), copyWriter.getResult().getBucket()); - assertEquals(targetBlobName, copyWriter.getResult().getName()); - assertEquals(CONTENT_TYPE, copyWriter.getResult().getContentType()); + CopyWriter copyWriter1 = storage.copy(req1); + Blob copy1Gen1 = copyWriter1.getResult(); + assertEquals(bucket.getName(), copy1Gen1.getBucket()); + assertEquals(targetBlobName, copy1Gen1.getName()); + assertEquals(CONTENT_TYPE, copy1Gen1.getContentType()); assertArrayEquals( BLOB_BYTE_CONTENT, - copyWriter.getResult().getContent(Blob.BlobSourceOption.decryptionKey(OTHER_BASE64_KEY))); - assertEquals(metadata, copyWriter.getResult().getMetadata()); - assertTrue(copyWriter.isDone()); - req = + copy1Gen1.getContent(Blob.BlobSourceOption.decryptionKey(OTHER_BASE64_KEY))); + assertEquals(metadata, copy1Gen1.getMetadata()); + assertTrue(copyWriter1.isDone()); + CopyRequest req2 = CopyRequest.newBuilder() .setSource(source) .setTarget(target) .setSourceOptions(BlobSourceOption.decryptionKey(BASE64_KEY)) .build(); - copyWriter = storage.copy(req); - assertEquals(bucket.getName(), copyWriter.getResult().getBucket()); - assertEquals(targetBlobName, copyWriter.getResult().getName()); - assertEquals(CONTENT_TYPE, copyWriter.getResult().getContentType()); - assertArrayEquals(BLOB_BYTE_CONTENT, copyWriter.getResult().getContent()); - assertEquals(metadata, copyWriter.getResult().getMetadata()); - assertTrue(copyWriter.isDone()); + CopyWriter copyWriter2 = storage.copy(req2); + Blob copy2Gen1 = copyWriter2.getResult(); + assertEquals(bucket.getName(), copy2Gen1.getBucket()); + assertEquals(targetBlobName, copy2Gen1.getName()); + assertEquals(CONTENT_TYPE, copy2Gen1.getContentType()); + assertArrayEquals(BLOB_BYTE_CONTENT, copy2Gen1.getContent()); + assertEquals(metadata, copy2Gen1.getMetadata()); + assertTrue(copyWriter2.isDone()); assertTrue(remoteBlob.delete()); - assertTrue(storage.delete(bucket.getName(), targetBlobName)); + assertTrue(storage.delete(copy2Gen1.getBlobId())); } @Test @@ -1035,13 +1039,14 @@ public void testCopyBlobUpdateMetadata() { .build(); CopyRequest req = CopyRequest.of(source, target); CopyWriter copyWriter = storage.copy(req); - assertEquals(bucket.getName(), copyWriter.getResult().getBucket()); - assertEquals(targetBlobName, copyWriter.getResult().getName()); - assertEquals(CONTENT_TYPE, copyWriter.getResult().getContentType()); - assertEquals(metadata, copyWriter.getResult().getMetadata()); + Blob gen1 = copyWriter.getResult(); + assertEquals(bucket.getName(), gen1.getBucket()); + assertEquals(targetBlobName, gen1.getName()); + assertEquals(CONTENT_TYPE, gen1.getContentType()); + assertEquals(metadata, gen1.getMetadata()); assertTrue(copyWriter.isDone()); assertTrue(remoteSourceBlob.delete()); - assertTrue(storage.delete(bucket.getName(), targetBlobName)); + assertTrue(storage.delete(gen1.getBlobId())); } @Test @@ -1059,12 +1064,13 @@ public void testCopyBlobUpdateStorageClass() { BlobInfo.newBuilder(bucket, targetBlobName).setStorageClass(StorageClass.COLDLINE).build(); CopyRequest req = CopyRequest.of(source, targetInfo); CopyWriter copyWriter = storage.copy(req); - assertEquals(bucket.getName(), copyWriter.getResult().getBucket()); - assertEquals(targetBlobName, copyWriter.getResult().getName()); - assertEquals(StorageClass.COLDLINE, copyWriter.getResult().getStorageClass()); + Blob gen1 = copyWriter.getResult(); + assertEquals(bucket.getName(), gen1.getBucket()); + assertEquals(targetBlobName, gen1.getName()); + assertEquals(StorageClass.COLDLINE, gen1.getStorageClass()); assertTrue(copyWriter.isDone()); assertTrue(remoteSourceBlob.delete()); - assertTrue(storage.delete(bucket.getName(), targetBlobName)); + assertTrue(storage.delete(gen1.getBlobId())); } @Test @@ -1079,15 +1085,14 @@ public void testCopyBlobNoContentType() { BlobInfo target = BlobInfo.newBuilder(bucket, targetBlobName).setMetadata(metadata).build(); CopyRequest req = CopyRequest.of(source, target); CopyWriter copyWriter = storage.copy(req); - assertEquals(bucket.getName(), copyWriter.getResult().getBucket()); - assertEquals(targetBlobName, copyWriter.getResult().getName()); - assertTrue( - copyWriter.getResult().getContentType() == null - || copyWriter.getResult().getContentType().isEmpty()); - assertEquals(metadata, copyWriter.getResult().getMetadata()); + Blob gen1 = copyWriter.getResult(); + assertEquals(bucket.getName(), gen1.getBucket()); + assertEquals(targetBlobName, gen1.getName()); + assertTrue(gen1.getContentType() == null || gen1.getContentType().isEmpty()); + assertEquals(metadata, gen1.getMetadata()); assertTrue(copyWriter.isDone()); assertTrue(remoteSourceBlob.delete()); - assertTrue(storage.delete(bucket.getName(), targetBlobName)); + assertTrue(storage.delete(gen1.getBlobId())); } @Test From 1b410044b5eb65f8216435781d97d21ab4f1e317 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 4 Jun 2025 15:12:53 -0400 Subject: [PATCH 22/22] chore(main): release 2.53.0 (#3112) * chore(main): release 2.53.0 * chore: generate libraries at Wed Jun 4 15:12:09 UTC 2025 --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: cloud-java-bot --- CHANGELOG.md | 28 +++++++++++++++++++ README.md | 6 ++-- gapic-google-cloud-storage-v2/pom.xml | 4 +-- google-cloud-storage-bom/pom.xml | 16 +++++------ google-cloud-storage-control/pom.xml | 4 +-- google-cloud-storage/pom.xml | 4 +-- grpc-google-cloud-storage-control-v2/pom.xml | 4 +-- grpc-google-cloud-storage-v2/pom.xml | 4 +-- pom.xml | 16 +++++------ proto-google-cloud-storage-control-v2/pom.xml | 4 +-- proto-google-cloud-storage-v2/pom.xml | 4 +-- samples/snapshot/pom.xml | 6 ++-- storage-shared-benchmarking/pom.xml | 4 +-- versions.txt | 14 +++++----- 14 files changed, 73 insertions(+), 45 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c156efc1da..55076d9f0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # Changelog +## [2.53.0](https://github.com/googleapis/java-storage/compare/v2.52.3...v2.53.0) (2025-06-04) + + +### Features + +* Expose BucketInfo.getProject as a BigInteger ([#3119](https://github.com/googleapis/java-storage/issues/3119)) ([64bbb60](https://github.com/googleapis/java-storage/commit/64bbb608033f757cb6e31e75a78740d8ed1dccab)), closes [#3023](https://github.com/googleapis/java-storage/issues/3023) +* **storagecontrol:** Add Anywhere cache control APIs ([06572b7](https://github.com/googleapis/java-storage/commit/06572b7ced2829cdc00bf648521c024a52d93b3a)) +* **storagecontrol:** Add Client Libraries Storage IntelligenceConfig ([06572b7](https://github.com/googleapis/java-storage/commit/06572b7ced2829cdc00bf648521c024a52d93b3a)) + + +### Bug Fixes + +* **deps:** Update the Java code generator (gapic-generator-java) to 2.58.0 ([06572b7](https://github.com/googleapis/java-storage/commit/06572b7ced2829cdc00bf648521c024a52d93b3a)) + + +### Dependencies + +* Update dependency com.google.apis:google-api-services-storage to v1-rev20250521-2.0.0 ([#3118](https://github.com/googleapis/java-storage/issues/3118)) ([e1be49e](https://github.com/googleapis/java-storage/commit/e1be49e6c987daccf9542c15c6ba418c007d2fb7)) +* Update dependency com.google.apis:google-api-services-storage to v1-rev20250524-2.0.0 ([#3127](https://github.com/googleapis/java-storage/issues/3127)) ([2a4499d](https://github.com/googleapis/java-storage/commit/2a4499d1686e93e8495f29b5198488d166caaa06)) +* Update sdk-platform-java dependencies ([#3129](https://github.com/googleapis/java-storage/issues/3129)) ([31cd058](https://github.com/googleapis/java-storage/commit/31cd058dcaf5a891ecb7a955602b09634d912560)) + + +### Documentation + +* Add explicit Optional annotations to fields that have always been treated as optional ([53b6927](https://github.com/googleapis/java-storage/commit/53b6927de9e5b948e1192e6cf716b88cc872c632)) +* Add note that Bucket.project output format is always project number format ([53b6927](https://github.com/googleapis/java-storage/commit/53b6927de9e5b948e1192e6cf716b88cc872c632)) +* Add note that managedFolders are supported for GetIamPolicy and SetIamPolicy ([53b6927](https://github.com/googleapis/java-storage/commit/53b6927de9e5b948e1192e6cf716b88cc872c632)) + ## [2.52.3](https://github.com/googleapis/java-storage/compare/v2.52.2...v2.52.3) (2025-05-19) diff --git a/README.md b/README.md index 8ccfe727cb..2a78732786 100644 --- a/README.md +++ b/README.md @@ -66,13 +66,13 @@ implementation 'com.google.cloud:google-cloud-storage' If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-storage:2.52.3' +implementation 'com.google.cloud:google-cloud-storage:2.53.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-storage" % "2.52.3" +libraryDependencies += "com.google.cloud" % "google-cloud-storage" % "2.53.0" ``` ## Authentication @@ -515,7 +515,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-storage/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-storage.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-storage/2.52.3 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-storage/2.53.0 [authentication]: https://github.com/googleapis/google-cloud-java#authentication [auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes [predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles diff --git a/gapic-google-cloud-storage-v2/pom.xml b/gapic-google-cloud-storage-v2/pom.xml index fd1bbd0a61..11639f3495 100644 --- a/gapic-google-cloud-storage-v2/pom.xml +++ b/gapic-google-cloud-storage-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc gapic-google-cloud-storage-v2 - 2.52.4-SNAPSHOT + 2.53.0 gapic-google-cloud-storage-v2 GRPC library for gapic-google-cloud-storage-v2 com.google.cloud google-cloud-storage-parent - 2.52.4-SNAPSHOT + 2.53.0 diff --git a/google-cloud-storage-bom/pom.xml b/google-cloud-storage-bom/pom.xml index a895f5152c..7769534981 100644 --- a/google-cloud-storage-bom/pom.xml +++ b/google-cloud-storage-bom/pom.xml @@ -19,7 +19,7 @@ 4.0.0 com.google.cloud google-cloud-storage-bom - 2.52.4-SNAPSHOT + 2.53.0 pom com.google.cloud @@ -69,37 +69,37 @@ com.google.cloud google-cloud-storage - 2.52.4-SNAPSHOT + 2.53.0 com.google.api.grpc gapic-google-cloud-storage-v2 - 2.52.4-SNAPSHOT + 2.53.0 com.google.api.grpc grpc-google-cloud-storage-v2 - 2.52.4-SNAPSHOT + 2.53.0 com.google.api.grpc proto-google-cloud-storage-v2 - 2.52.4-SNAPSHOT + 2.53.0 com.google.cloud google-cloud-storage-control - 2.52.4-SNAPSHOT + 2.53.0 com.google.api.grpc grpc-google-cloud-storage-control-v2 - 2.52.4-SNAPSHOT + 2.53.0 com.google.api.grpc proto-google-cloud-storage-control-v2 - 2.52.4-SNAPSHOT + 2.53.0 diff --git a/google-cloud-storage-control/pom.xml b/google-cloud-storage-control/pom.xml index f52135c3e0..1bddae6be5 100644 --- a/google-cloud-storage-control/pom.xml +++ b/google-cloud-storage-control/pom.xml @@ -5,13 +5,13 @@ 4.0.0 com.google.cloud google-cloud-storage-control - 2.52.4-SNAPSHOT + 2.53.0 google-cloud-storage-control GRPC library for google-cloud-storage-control com.google.cloud google-cloud-storage-parent - 2.52.4-SNAPSHOT + 2.53.0 diff --git a/google-cloud-storage/pom.xml b/google-cloud-storage/pom.xml index c4126c7ffb..a497314eb6 100644 --- a/google-cloud-storage/pom.xml +++ b/google-cloud-storage/pom.xml @@ -2,7 +2,7 @@ 4.0.0 google-cloud-storage - 2.52.4-SNAPSHOT + 2.53.0 jar Google Cloud Storage https://github.com/googleapis/java-storage @@ -12,7 +12,7 @@ com.google.cloud google-cloud-storage-parent - 2.52.4-SNAPSHOT + 2.53.0 google-cloud-storage diff --git a/grpc-google-cloud-storage-control-v2/pom.xml b/grpc-google-cloud-storage-control-v2/pom.xml index 6a79d23147..59ca0307ba 100644 --- a/grpc-google-cloud-storage-control-v2/pom.xml +++ b/grpc-google-cloud-storage-control-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-storage-control-v2 - 2.52.4-SNAPSHOT + 2.53.0 grpc-google-cloud-storage-control-v2 GRPC library for google-cloud-storage com.google.cloud google-cloud-storage-parent - 2.52.4-SNAPSHOT + 2.53.0 diff --git a/grpc-google-cloud-storage-v2/pom.xml b/grpc-google-cloud-storage-v2/pom.xml index ae09078613..d50e4ae593 100644 --- a/grpc-google-cloud-storage-v2/pom.xml +++ b/grpc-google-cloud-storage-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-storage-v2 - 2.52.4-SNAPSHOT + 2.53.0 grpc-google-cloud-storage-v2 GRPC library for grpc-google-cloud-storage-v2 com.google.cloud google-cloud-storage-parent - 2.52.4-SNAPSHOT + 2.53.0 diff --git a/pom.xml b/pom.xml index 3a8a7bbdfb..6c09ad3da1 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-storage-parent pom - 2.52.4-SNAPSHOT + 2.53.0 Storage Parent https://github.com/googleapis/java-storage @@ -82,7 +82,7 @@ com.google.cloud google-cloud-storage - 2.52.4-SNAPSHOT + 2.53.0 com.google.apis @@ -104,32 +104,32 @@ com.google.api.grpc proto-google-cloud-storage-v2 - 2.52.4-SNAPSHOT + 2.53.0 com.google.api.grpc grpc-google-cloud-storage-v2 - 2.52.4-SNAPSHOT + 2.53.0 com.google.api.grpc gapic-google-cloud-storage-v2 - 2.52.4-SNAPSHOT + 2.53.0 com.google.api.grpc grpc-google-cloud-storage-control-v2 - 2.52.4-SNAPSHOT + 2.53.0 com.google.api.grpc proto-google-cloud-storage-control-v2 - 2.52.4-SNAPSHOT + 2.53.0 com.google.cloud google-cloud-storage-control - 2.52.4-SNAPSHOT + 2.53.0 com.google.cloud diff --git a/proto-google-cloud-storage-control-v2/pom.xml b/proto-google-cloud-storage-control-v2/pom.xml index 5dd6fab19d..5623fc3a00 100644 --- a/proto-google-cloud-storage-control-v2/pom.xml +++ b/proto-google-cloud-storage-control-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-storage-control-v2 - 2.52.4-SNAPSHOT + 2.53.0 proto-google-cloud-storage-control-v2 Proto library for proto-google-cloud-storage-control-v2 com.google.cloud google-cloud-storage-parent - 2.52.4-SNAPSHOT + 2.53.0 diff --git a/proto-google-cloud-storage-v2/pom.xml b/proto-google-cloud-storage-v2/pom.xml index 55951e8a4b..c8cd3b061b 100644 --- a/proto-google-cloud-storage-v2/pom.xml +++ b/proto-google-cloud-storage-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-storage-v2 - 2.52.4-SNAPSHOT + 2.53.0 proto-google-cloud-storage-v2 PROTO library for proto-google-cloud-storage-v2 com.google.cloud google-cloud-storage-parent - 2.52.4-SNAPSHOT + 2.53.0 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index a17b3c2c9e..b3728af81f 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,12 +28,12 @@ com.google.cloud google-cloud-storage - 2.52.4-SNAPSHOT + 2.53.0 com.google.cloud google-cloud-storage-control - 2.52.4-SNAPSHOT + 2.53.0 compile @@ -70,7 +70,7 @@ com.google.cloud google-cloud-storage - 2.52.4-SNAPSHOT + 2.53.0 tests test diff --git a/storage-shared-benchmarking/pom.xml b/storage-shared-benchmarking/pom.xml index 69576f5987..74cabe170a 100644 --- a/storage-shared-benchmarking/pom.xml +++ b/storage-shared-benchmarking/pom.xml @@ -10,7 +10,7 @@ com.google.cloud google-cloud-storage-parent - 2.52.4-SNAPSHOT + 2.53.0 @@ -31,7 +31,7 @@ com.google.cloud google-cloud-storage - 2.52.4-SNAPSHOT + 2.53.0 tests diff --git a/versions.txt b/versions.txt index a0c9fc5cf5..eadde9978d 100644 --- a/versions.txt +++ b/versions.txt @@ -1,10 +1,10 @@ # Format: # module:released-version:current-version -google-cloud-storage:2.52.3:2.52.4-SNAPSHOT -gapic-google-cloud-storage-v2:2.52.3:2.52.4-SNAPSHOT -grpc-google-cloud-storage-v2:2.52.3:2.52.4-SNAPSHOT -proto-google-cloud-storage-v2:2.52.3:2.52.4-SNAPSHOT -google-cloud-storage-control:2.52.3:2.52.4-SNAPSHOT -proto-google-cloud-storage-control-v2:2.52.3:2.52.4-SNAPSHOT -grpc-google-cloud-storage-control-v2:2.52.3:2.52.4-SNAPSHOT +google-cloud-storage:2.53.0:2.53.0 +gapic-google-cloud-storage-v2:2.53.0:2.53.0 +grpc-google-cloud-storage-v2:2.53.0:2.53.0 +proto-google-cloud-storage-v2:2.53.0:2.53.0 +google-cloud-storage-control:2.53.0:2.53.0 +proto-google-cloud-storage-control-v2:2.53.0:2.53.0 +grpc-google-cloud-storage-control-v2:2.53.0:2.53.0