From f9bed0c41782dbde4a4cb27f1f0ead2382bfe0cb Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Fri, 6 Feb 2026 18:22:43 -0800 Subject: [PATCH] chore: regenerate kmsinventory client --- .../v1/2.0.0/README.md | 4 +- .../kmsinventory/v1/Kmsinventory.java | 374 +++++++++++++++++- ...sInventoryV1ProtectedResourcesSummary.java | 32 +- .../GoogleCloudKmsInventoryV1Warning.java | 91 +++++ .../v1/2.0.0/pom.xml | 4 +- .../v1/README.md | 4 +- 6 files changed, 490 insertions(+), 19 deletions(-) create mode 100644 clients/google-api-services-kmsinventory/v1/2.0.0/com/google/api/services/kmsinventory/v1/model/GoogleCloudKmsInventoryV1Warning.java diff --git a/clients/google-api-services-kmsinventory/v1/2.0.0/README.md b/clients/google-api-services-kmsinventory/v1/2.0.0/README.md index 24e5daa7931..5afd68c4d03 100644 --- a/clients/google-api-services-kmsinventory/v1/2.0.0/README.md +++ b/clients/google-api-services-kmsinventory/v1/2.0.0/README.md @@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file: com.google.apis google-api-services-kmsinventory - v1-rev20260111-2.0.0 + v1-rev20260201-2.0.0 @@ -35,7 +35,7 @@ repositories { mavenCentral() } dependencies { - implementation 'com.google.apis:google-api-services-kmsinventory:v1-rev20260111-2.0.0' + implementation 'com.google.apis:google-api-services-kmsinventory:v1-rev20260201-2.0.0' } ``` diff --git a/clients/google-api-services-kmsinventory/v1/2.0.0/com/google/api/services/kmsinventory/v1/Kmsinventory.java b/clients/google-api-services-kmsinventory/v1/2.0.0/com/google/api/services/kmsinventory/v1/Kmsinventory.java index 050df379105..c8b97ce03a3 100644 --- a/clients/google-api-services-kmsinventory/v1/2.0.0/com/google/api/services/kmsinventory/v1/Kmsinventory.java +++ b/clients/google-api-services-kmsinventory/v1/2.0.0/com/google/api/services/kmsinventory/v1/Kmsinventory.java @@ -175,14 +175,18 @@ public class ProtectedResources { /** * Returns metadata about the resources protected by the given Cloud KMS CryptoKey in the given - * Cloud organization. + * Cloud organization/project. * * Create a request for the method "protectedResources.search". * * This request holds the parameters needed by the kmsinventory server. After setting any optional * parameters, call the {@link Search#execute()} method to invoke the remote operation. * - * @param scope Required. Resource name of the organization. Example: organizations/123 + * @param scope Required. A scope can be an organization or a project. Resources protected by the crypto key in + * provided scope will be returned. The allowed values are: * + * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/12345678") * + * projects/{PROJECT_ID} (e.g., "projects/foo-bar") * projects/{PROJECT_NUMBER} (e.g., + * "projects/12345678") * @return the request */ public Search search(java.lang.String scope) throws java.io.IOException { @@ -200,7 +204,7 @@ public class Search extends KmsinventoryRequest * - * @param scope Required. Resource name of the organization. Example: organizations/123 + * @param scope Required. A scope can be an organization or a project. Resources protected by the crypto key in + * provided scope will be returned. The allowed values are: * + * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/12345678") * + * projects/{PROJECT_ID} (e.g., "projects/foo-bar") * projects/{PROJECT_NUMBER} (e.g., + * "projects/12345678") * @since 1.13 */ protected Search(java.lang.String scope) { @@ -288,17 +296,32 @@ public Search setUploadProtocol(java.lang.String uploadProtocol) { return (Search) super.setUploadProtocol(uploadProtocol); } - /** Required. Resource name of the organization. Example: organizations/123 */ + /** + * Required. A scope can be an organization or a project. Resources protected by the crypto + * key in provided scope will be returned. The allowed values are: * + * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/12345678") * + * projects/{PROJECT_ID} (e.g., "projects/foo-bar") * projects/{PROJECT_NUMBER} (e.g., + * "projects/12345678") + */ @com.google.api.client.util.Key private java.lang.String scope; - /** Required. Resource name of the organization. Example: organizations/123 + /** Required. A scope can be an organization or a project. Resources protected by the crypto key in + provided scope will be returned. The allowed values are: * organizations/{ORGANIZATION_NUMBER} + (e.g., "organizations/12345678") * projects/{PROJECT_ID} (e.g., "projects/foo-bar") * + projects/{PROJECT_NUMBER} (e.g., "projects/12345678") */ public java.lang.String getScope() { return scope; } - /** Required. Resource name of the organization. Example: organizations/123 */ + /** + * Required. A scope can be an organization or a project. Resources protected by the crypto + * key in provided scope will be returned. The allowed values are: * + * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/12345678") * + * projects/{PROJECT_ID} (e.g., "projects/foo-bar") * projects/{PROJECT_NUMBER} (e.g., + * "projects/12345678") + */ public Search setScope(java.lang.String scope) { if (!getSuppressPatternChecks()) { com.google.api.client.util.Preconditions.checkArgument(SCOPE_PATTERN.matcher(scope).matches(), @@ -730,9 +753,13 @@ public CryptoKeys cryptoKeys() { public class CryptoKeys { /** - * Returns aggregate information about the resources protected by the given Cloud KMS CryptoKey. - * Only resources within the same Cloud organization as the key will be returned. The project that - * holds the key must be part of an organization in order for this call to succeed. + * Returns aggregate information about the resources protected by the given Cloud KMS CryptoKey. By + * default, summary of resources within the same Cloud organization as the key will be returned, + * which requires the KMS organization service account to be configured(refer + * https://docs.cloud.google.com/kms/docs/view-key-usage#required-roles). If the KMS organization + * service account is not configured or key's project is not part of an organization, set + * fallback_scope to `FALLBACK_SCOPE_PROJECT` to retrieve a summary of protected resources within + * the key's project. * * Create a request for the method "cryptoKeys.getProtectedResourcesSummary". * @@ -758,8 +785,12 @@ public class GetProtectedResourcesSummary extends KmsinventoryRequestThe typical use is:

+ *
+     *   {@code Kmsinventory kmsinventory = new Kmsinventory(...);}
+     *   {@code Kmsinventory.ProtectedResources.List request = kmsinventory.protectedResources().list(parameters ...)}
+     * 
+ * + * @return the resource collection + */ + public ProtectedResources protectedResources() { + return new ProtectedResources(); + } + + /** + * The "protectedResources" collection of methods. + */ + public class ProtectedResources { + + /** + * Returns metadata about the resources protected by the given Cloud KMS CryptoKey in the given + * Cloud organization/project. + * + * Create a request for the method "protectedResources.search". + * + * This request holds the parameters needed by the kmsinventory server. After setting any optional + * parameters, call the {@link Search#execute()} method to invoke the remote operation. + * + * @param scope Required. A scope can be an organization or a project. Resources protected by the crypto key in + * provided scope will be returned. The allowed values are: * + * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/12345678") * + * projects/{PROJECT_ID} (e.g., "projects/foo-bar") * projects/{PROJECT_NUMBER} (e.g., + * "projects/12345678") + * @return the request + */ + public Search search(java.lang.String scope) throws java.io.IOException { + Search result = new Search(scope); + initialize(result); + return result; + } + + public class Search extends KmsinventoryRequest { + + private static final String REST_PATH = "v1/{+scope}/protectedResources:search"; + + private final java.util.regex.Pattern SCOPE_PATTERN = + java.util.regex.Pattern.compile("^projects/[^/]+$"); + + /** + * Returns metadata about the resources protected by the given Cloud KMS CryptoKey in the given + * Cloud organization/project. + * + * Create a request for the method "protectedResources.search". + * + * This request holds the parameters needed by the the kmsinventory server. After setting any + * optional parameters, call the {@link Search#execute()} method to invoke the remote operation. + *

{@link + * Search#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must + * be called to initialize this instance immediately after invoking the constructor.

+ * + * @param scope Required. A scope can be an organization or a project. Resources protected by the crypto key in + * provided scope will be returned. The allowed values are: * + * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/12345678") * + * projects/{PROJECT_ID} (e.g., "projects/foo-bar") * projects/{PROJECT_NUMBER} (e.g., + * "projects/12345678") + * @since 1.13 + */ + protected Search(java.lang.String scope) { + super(Kmsinventory.this, "GET", REST_PATH, null, com.google.api.services.kmsinventory.v1.model.GoogleCloudKmsInventoryV1SearchProtectedResourcesResponse.class); + this.scope = com.google.api.client.util.Preconditions.checkNotNull(scope, "Required parameter scope must be specified."); + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(SCOPE_PATTERN.matcher(scope).matches(), + "Parameter scope must conform to the pattern " + + "^projects/[^/]+$"); + } + } + + @Override + public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException { + return super.executeUsingHead(); + } + + @Override + public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException { + return super.buildHttpRequestUsingHead(); + } + + @Override + public Search set$Xgafv(java.lang.String $Xgafv) { + return (Search) super.set$Xgafv($Xgafv); + } + + @Override + public Search setAccessToken(java.lang.String accessToken) { + return (Search) super.setAccessToken(accessToken); + } + + @Override + public Search setAlt(java.lang.String alt) { + return (Search) super.setAlt(alt); + } + + @Override + public Search setCallback(java.lang.String callback) { + return (Search) super.setCallback(callback); + } + + @Override + public Search setFields(java.lang.String fields) { + return (Search) super.setFields(fields); + } + + @Override + public Search setKey(java.lang.String key) { + return (Search) super.setKey(key); + } + + @Override + public Search setOauthToken(java.lang.String oauthToken) { + return (Search) super.setOauthToken(oauthToken); + } + + @Override + public Search setPrettyPrint(java.lang.Boolean prettyPrint) { + return (Search) super.setPrettyPrint(prettyPrint); + } + + @Override + public Search setQuotaUser(java.lang.String quotaUser) { + return (Search) super.setQuotaUser(quotaUser); + } + + @Override + public Search setUploadType(java.lang.String uploadType) { + return (Search) super.setUploadType(uploadType); + } + + @Override + public Search setUploadProtocol(java.lang.String uploadProtocol) { + return (Search) super.setUploadProtocol(uploadProtocol); + } + + /** + * Required. A scope can be an organization or a project. Resources protected by the crypto + * key in provided scope will be returned. The allowed values are: * + * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/12345678") * + * projects/{PROJECT_ID} (e.g., "projects/foo-bar") * projects/{PROJECT_NUMBER} (e.g., + * "projects/12345678") + */ + @com.google.api.client.util.Key + private java.lang.String scope; + + /** Required. A scope can be an organization or a project. Resources protected by the crypto key in + provided scope will be returned. The allowed values are: * organizations/{ORGANIZATION_NUMBER} + (e.g., "organizations/12345678") * projects/{PROJECT_ID} (e.g., "projects/foo-bar") * + projects/{PROJECT_NUMBER} (e.g., "projects/12345678") + */ + public java.lang.String getScope() { + return scope; + } + + /** + * Required. A scope can be an organization or a project. Resources protected by the crypto + * key in provided scope will be returned. The allowed values are: * + * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/12345678") * + * projects/{PROJECT_ID} (e.g., "projects/foo-bar") * projects/{PROJECT_NUMBER} (e.g., + * "projects/12345678") + */ + public Search setScope(java.lang.String scope) { + if (!getSuppressPatternChecks()) { + com.google.api.client.util.Preconditions.checkArgument(SCOPE_PATTERN.matcher(scope).matches(), + "Parameter scope must conform to the pattern " + + "^projects/[^/]+$"); + } + this.scope = scope; + return this; + } + + /** Required. The resource name of the CryptoKey. */ + @com.google.api.client.util.Key + private java.lang.String cryptoKey; + + /** Required. The resource name of the CryptoKey. + */ + public java.lang.String getCryptoKey() { + return cryptoKey; + } + + /** Required. The resource name of the CryptoKey. */ + public Search setCryptoKey(java.lang.String cryptoKey) { + this.cryptoKey = cryptoKey; + return this; + } + + /** + * The maximum number of resources to return. The service may return fewer than this value. + * If unspecified, at most 500 resources will be returned. The maximum value is 500; values + * above 500 will be coerced to 500. + */ + @com.google.api.client.util.Key + private java.lang.Integer pageSize; + + /** The maximum number of resources to return. The service may return fewer than this value. If + unspecified, at most 500 resources will be returned. The maximum value is 500; values above 500 + will be coerced to 500. + */ + public java.lang.Integer getPageSize() { + return pageSize; + } + + /** + * The maximum number of resources to return. The service may return fewer than this value. + * If unspecified, at most 500 resources will be returned. The maximum value is 500; values + * above 500 will be coerced to 500. + */ + public Search setPageSize(java.lang.Integer pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * A page token, received from a previous KeyTrackingService.SearchProtectedResources call. + * Provide this to retrieve the subsequent page. When paginating, all other parameters + * provided to KeyTrackingService.SearchProtectedResources must match the call that provided + * the page token. + */ + @com.google.api.client.util.Key + private java.lang.String pageToken; + + /** A page token, received from a previous KeyTrackingService.SearchProtectedResources call. Provide + this to retrieve the subsequent page. When paginating, all other parameters provided to + KeyTrackingService.SearchProtectedResources must match the call that provided the page token. + */ + public java.lang.String getPageToken() { + return pageToken; + } + + /** + * A page token, received from a previous KeyTrackingService.SearchProtectedResources call. + * Provide this to retrieve the subsequent page. When paginating, all other parameters + * provided to KeyTrackingService.SearchProtectedResources must match the call that provided + * the page token. + */ + public Search setPageToken(java.lang.String pageToken) { + this.pageToken = pageToken; + return this; + } + + /** + * Optional. A list of resource types that this request searches for. If empty, it will + * search all the [trackable resource types](https://cloud.google.com/kms/docs/view-key- + * usage#tracked-resource-types). Regular expressions are also supported. For example: * + * `compute.googleapis.com.*` snapshots resources whose type starts with + * `compute.googleapis.com`. * `.*Image` snapshots resources whose type ends with `Image`. * + * `.*Image.*` snapshots resources whose type contains `Image`. See + * [RE2](https://github.com/google/re2/wiki/Syntax) for all supported regular expression + * syntax. If the regular expression does not match any supported resource type, an + * INVALID_ARGUMENT error will be returned. + */ + @com.google.api.client.util.Key + private java.util.List resourceTypes; + + /** Optional. A list of resource types that this request searches for. If empty, it will search all the + [trackable resource types](https://cloud.google.com/kms/docs/view-key-usage#tracked-resource- + types). Regular expressions are also supported. For example: * `compute.googleapis.com.*` snapshots + resources whose type starts with `compute.googleapis.com`. * `.*Image` snapshots resources whose + type ends with `Image`. * `.*Image.*` snapshots resources whose type contains `Image`. See + [RE2](https://github.com/google/re2/wiki/Syntax) for all supported regular expression syntax. If + the regular expression does not match any supported resource type, an INVALID_ARGUMENT error will + be returned. + */ + public java.util.List getResourceTypes() { + return resourceTypes; + } + + /** + * Optional. A list of resource types that this request searches for. If empty, it will + * search all the [trackable resource types](https://cloud.google.com/kms/docs/view-key- + * usage#tracked-resource-types). Regular expressions are also supported. For example: * + * `compute.googleapis.com.*` snapshots resources whose type starts with + * `compute.googleapis.com`. * `.*Image` snapshots resources whose type ends with `Image`. * + * `.*Image.*` snapshots resources whose type contains `Image`. See + * [RE2](https://github.com/google/re2/wiki/Syntax) for all supported regular expression + * syntax. If the regular expression does not match any supported resource type, an + * INVALID_ARGUMENT error will be returned. + */ + public Search setResourceTypes(java.util.List resourceTypes) { + this.resourceTypes = resourceTypes; + return this; + } + + @Override + public Search set(String parameterName, Object value) { + return (Search) super.set(parameterName, value); + } + } + + } } /** diff --git a/clients/google-api-services-kmsinventory/v1/2.0.0/com/google/api/services/kmsinventory/v1/model/GoogleCloudKmsInventoryV1ProtectedResourcesSummary.java b/clients/google-api-services-kmsinventory/v1/2.0.0/com/google/api/services/kmsinventory/v1/model/GoogleCloudKmsInventoryV1ProtectedResourcesSummary.java index 9b7369a6351..4c74c944682 100644 --- a/clients/google-api-services-kmsinventory/v1/2.0.0/com/google/api/services/kmsinventory/v1/model/GoogleCloudKmsInventoryV1ProtectedResourcesSummary.java +++ b/clients/google-api-services-kmsinventory/v1/2.0.0/com/google/api/services/kmsinventory/v1/model/GoogleCloudKmsInventoryV1ProtectedResourcesSummary.java @@ -18,7 +18,7 @@ /** * Aggregate information about the resources protected by a Cloud KMS key in the same Cloud - * organization as the key. + * organization/project as the key. * *

This is the Java data model class that specifies how to parse/serialize into the JSON that is * transmitted over HTTP when working with the KMS Inventory API. For a detailed explanation see: @@ -74,6 +74,15 @@ public final class GoogleCloudKmsInventoryV1ProtectedResourcesSummary extends co @com.google.api.client.util.Key @com.google.api.client.json.JsonString private java.util.Map resourceTypes; + /** + * Warning messages for the state of response ProtectedResourcesSummary For example, if the + * organization service account is not configured, INSUFFICIENT_PERMISSIONS_PARTIAL_DATA warning + * will be returned. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.util.List warnings; + /** * The number of resources protected by the key grouped by Cloud product. * @return value or {@code null} for none @@ -180,6 +189,27 @@ public GoogleCloudKmsInventoryV1ProtectedResourcesSummary setResourceTypes(java. return this; } + /** + * Warning messages for the state of response ProtectedResourcesSummary For example, if the + * organization service account is not configured, INSUFFICIENT_PERMISSIONS_PARTIAL_DATA warning + * will be returned. + * @return value or {@code null} for none + */ + public java.util.List getWarnings() { + return warnings; + } + + /** + * Warning messages for the state of response ProtectedResourcesSummary For example, if the + * organization service account is not configured, INSUFFICIENT_PERMISSIONS_PARTIAL_DATA warning + * will be returned. + * @param warnings warnings or {@code null} for none + */ + public GoogleCloudKmsInventoryV1ProtectedResourcesSummary setWarnings(java.util.List warnings) { + this.warnings = warnings; + return this; + } + @Override public GoogleCloudKmsInventoryV1ProtectedResourcesSummary set(String fieldName, Object value) { return (GoogleCloudKmsInventoryV1ProtectedResourcesSummary) super.set(fieldName, value); diff --git a/clients/google-api-services-kmsinventory/v1/2.0.0/com/google/api/services/kmsinventory/v1/model/GoogleCloudKmsInventoryV1Warning.java b/clients/google-api-services-kmsinventory/v1/2.0.0/com/google/api/services/kmsinventory/v1/model/GoogleCloudKmsInventoryV1Warning.java new file mode 100644 index 00000000000..3ba18bb3a66 --- /dev/null +++ b/clients/google-api-services-kmsinventory/v1/2.0.0/com/google/api/services/kmsinventory/v1/model/GoogleCloudKmsInventoryV1Warning.java @@ -0,0 +1,91 @@ +/* + * 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. + */ +/* + * This code was generated by https://github.com/googleapis/google-api-java-client-services/ + * Modify at your own risk. + */ + +package com.google.api.services.kmsinventory.v1.model; + +/** + * Warning message specifying various states of response data that might indicate incomplete or + * partial results. + * + *

This is the Java data model class that specifies how to parse/serialize into the JSON that is + * transmitted over HTTP when working with the KMS Inventory API. For a detailed explanation see: + * https://developers.google.com/api-client-library/java/google-http-java-client/json + *

+ * + * @author Google, Inc. + */ +@SuppressWarnings("javadoc") +public final class GoogleCloudKmsInventoryV1Warning extends com.google.api.client.json.GenericJson { + + /** + * The literal message providing context and details about the warnings. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String displayMessage; + + /** + * The specific warning code for the displayed message. + * The value may be {@code null}. + */ + @com.google.api.client.util.Key + private java.lang.String warningCode; + + /** + * The literal message providing context and details about the warnings. + * @return value or {@code null} for none + */ + public java.lang.String getDisplayMessage() { + return displayMessage; + } + + /** + * The literal message providing context and details about the warnings. + * @param displayMessage displayMessage or {@code null} for none + */ + public GoogleCloudKmsInventoryV1Warning setDisplayMessage(java.lang.String displayMessage) { + this.displayMessage = displayMessage; + return this; + } + + /** + * The specific warning code for the displayed message. + * @return value or {@code null} for none + */ + public java.lang.String getWarningCode() { + return warningCode; + } + + /** + * The specific warning code for the displayed message. + * @param warningCode warningCode or {@code null} for none + */ + public GoogleCloudKmsInventoryV1Warning setWarningCode(java.lang.String warningCode) { + this.warningCode = warningCode; + return this; + } + + @Override + public GoogleCloudKmsInventoryV1Warning set(String fieldName, Object value) { + return (GoogleCloudKmsInventoryV1Warning) super.set(fieldName, value); + } + + @Override + public GoogleCloudKmsInventoryV1Warning clone() { + return (GoogleCloudKmsInventoryV1Warning) super.clone(); + } + +} diff --git a/clients/google-api-services-kmsinventory/v1/2.0.0/pom.xml b/clients/google-api-services-kmsinventory/v1/2.0.0/pom.xml index f8a2bf08209..0578f67b5a3 100644 --- a/clients/google-api-services-kmsinventory/v1/2.0.0/pom.xml +++ b/clients/google-api-services-kmsinventory/v1/2.0.0/pom.xml @@ -8,8 +8,8 @@ com.google.apis google-api-services-kmsinventory - v1-rev20260111-2.0.0 - KMS Inventory API v1-rev20260111-2.0.0 + v1-rev20260201-2.0.0 + KMS Inventory API v1-rev20260201-2.0.0 jar 2011 diff --git a/clients/google-api-services-kmsinventory/v1/README.md b/clients/google-api-services-kmsinventory/v1/README.md index 24e5daa7931..5afd68c4d03 100644 --- a/clients/google-api-services-kmsinventory/v1/README.md +++ b/clients/google-api-services-kmsinventory/v1/README.md @@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file: com.google.apis google-api-services-kmsinventory - v1-rev20260111-2.0.0 + v1-rev20260201-2.0.0 @@ -35,7 +35,7 @@ repositories { mavenCentral() } dependencies { - implementation 'com.google.apis:google-api-services-kmsinventory:v1-rev20260111-2.0.0' + implementation 'com.google.apis:google-api-services-kmsinventory:v1-rev20260201-2.0.0' } ```