())
* .build();
* while (true) {
* SearchProtectedResourcesResponse response =
diff --git a/java-kmsinventory/google-cloud-kmsinventory/src/main/java/com/google/cloud/kms/inventory/v1/stub/HttpJsonKeyTrackingServiceStub.java b/java-kmsinventory/google-cloud-kmsinventory/src/main/java/com/google/cloud/kms/inventory/v1/stub/HttpJsonKeyTrackingServiceStub.java
index c28257c30151..045e44f76104 100644
--- a/java-kmsinventory/google-cloud-kmsinventory/src/main/java/com/google/cloud/kms/inventory/v1/stub/HttpJsonKeyTrackingServiceStub.java
+++ b/java-kmsinventory/google-cloud-kmsinventory/src/main/java/com/google/cloud/kms/inventory/v1/stub/HttpJsonKeyTrackingServiceStub.java
@@ -120,6 +120,8 @@ public class HttpJsonKeyTrackingServiceStub extends KeyTrackingServiceStub {
serializer.putQueryParam(fields, "cryptoKey", request.getCryptoKey());
serializer.putQueryParam(fields, "pageSize", request.getPageSize());
serializer.putQueryParam(fields, "pageToken", request.getPageToken());
+ serializer.putQueryParam(
+ fields, "resourceTypes", request.getResourceTypesList());
serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int");
return fields;
})
diff --git a/java-kmsinventory/proto-google-cloud-kmsinventory-v1/src/main/java/com/google/cloud/kms/inventory/v1/KeyTrackingServiceProto.java b/java-kmsinventory/proto-google-cloud-kmsinventory-v1/src/main/java/com/google/cloud/kms/inventory/v1/KeyTrackingServiceProto.java
index 7db8fef4f211..35beb9fc70f4 100644
--- a/java-kmsinventory/proto-google-cloud-kmsinventory-v1/src/main/java/com/google/cloud/kms/inventory/v1/KeyTrackingServiceProto.java
+++ b/java-kmsinventory/proto-google-cloud-kmsinventory-v1/src/main/java/com/google/cloud/kms/inventory/v1/KeyTrackingServiceProto.java
@@ -102,48 +102,49 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ "s/{project}/locations/{location}/keyRing"
+ "s/{key_ring}/cryptoKeys/{crypto_key}/cry"
+ "ptoKeyVersions/{crypto_key_version}/prot"
- + "ectedResourcesSummary\"\262\001\n\037SearchProtecte"
+ + "ectedResourcesSummary\"\320\001\n\037SearchProtecte"
+ "dResourcesRequest\022H\n\005scope\030\002 \001(\tB9\342A\001\002\372A"
+ "2\n0cloudresourcemanager.googleapis.com/O"
+ "rganization\022\036\n\ncrypto_key\030\001 \001(\tB\n\342A\001\002\372A\003"
+ "\n\001*\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_token\030\004 \001"
- + "(\t\"\212\001\n SearchProtectedResourcesResponse\022"
- + "M\n\023protected_resources\030\001 \003(\01320.google.cl"
- + "oud.kms.inventory.v1.ProtectedResource\022\027"
- + "\n\017next_page_token\030\002 \001(\t\"\372\003\n\021ProtectedRes"
- + "ource\022\014\n\004name\030\001 \001(\t\022\017\n\007project\030\002 \001(\t\022\022\n\n"
- + "project_id\030\t \001(\t\022\025\n\rcloud_product\030\010 \001(\t\022"
- + "\025\n\rresource_type\030\003 \001(\t\022\020\n\010location\030\004 \001(\t"
- + "\022L\n\006labels\030\005 \003(\0132<.google.cloud.kms.inve"
- + "ntory.v1.ProtectedResource.LabelsEntry\022I"
- + "\n\022crypto_key_version\030\006 \001(\tB-\372A*\n(cloudkm"
- + "s.googleapis.com/CryptoKeyVersion\022J\n\023cry"
- + "pto_key_versions\030\n \003(\tB-\372A*\n(cloudkms.go"
- + "ogleapis.com/CryptoKeyVersion\0225\n\013create_"
- + "time\030\007 \001(\0132\032.google.protobuf.TimestampB\004"
- + "\342A\001\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu"
- + "e\030\002 \001(\t:\0028\001:\'\352A$\n\037cloudasset.googleapis."
- + "com/Asset\022\001*2\332\004\n\022KeyTrackingService\022\201\002\n\034"
- + "GetProtectedResourcesSummary\022B.google.cl"
- + "oud.kms.inventory.v1.GetProtectedResourc"
- + "esSummaryRequest\0328.google.cloud.kms.inve"
- + "ntory.v1.ProtectedResourcesSummary\"c\332A\004n"
- + "ame\202\323\344\223\002V\022T/v1/{name=projects/*/location"
- + "s/*/keyRings/*/cryptoKeys/**}/protectedR"
- + "esourcesSummary\022\356\001\n\030SearchProtectedResou"
- + "rces\022>.google.cloud.kms.inventory.v1.Sea"
- + "rchProtectedResourcesRequest\032?.google.cl"
- + "oud.kms.inventory.v1.SearchProtectedReso"
- + "urcesResponse\"Q\332A\021scope, crypto_key\202\323\344\223\002"
- + "7\0225/v1/{scope=organizations/*}/protected"
- + "Resources:search\032O\312A\033kmsinventory.google"
- + "apis.com\322A.https://www.googleapis.com/au"
- + "th/cloud-platformB\302\001\n!com.google.cloud.k"
- + "ms.inventory.v1B\027KeyTrackingServiceProto"
- + "P\001Z?cloud.google.com/go/kms/inventory/ap"
- + "iv1/inventorypb;inventorypb\370\001\001\252\002\035Google."
- + "Cloud.Kms.Inventory.V1\312\002\035Google\\Cloud\\Km"
- + "s\\Inventory\\V1b\006proto3"
+ + "(\t\022\034\n\016resource_types\030\005 \003(\tB\004\342A\001\001\"\212\001\n Sea"
+ + "rchProtectedResourcesResponse\022M\n\023protect"
+ + "ed_resources\030\001 \003(\01320.google.cloud.kms.in"
+ + "ventory.v1.ProtectedResource\022\027\n\017next_pag"
+ + "e_token\030\002 \001(\t\"\372\003\n\021ProtectedResource\022\014\n\004n"
+ + "ame\030\001 \001(\t\022\017\n\007project\030\002 \001(\t\022\022\n\nproject_id"
+ + "\030\t \001(\t\022\025\n\rcloud_product\030\010 \001(\t\022\025\n\rresourc"
+ + "e_type\030\003 \001(\t\022\020\n\010location\030\004 \001(\t\022L\n\006labels"
+ + "\030\005 \003(\0132<.google.cloud.kms.inventory.v1.P"
+ + "rotectedResource.LabelsEntry\022I\n\022crypto_k"
+ + "ey_version\030\006 \001(\tB-\372A*\n(cloudkms.googleap"
+ + "is.com/CryptoKeyVersion\022J\n\023crypto_key_ve"
+ + "rsions\030\n \003(\tB-\372A*\n(cloudkms.googleapis.c"
+ + "om/CryptoKeyVersion\0225\n\013create_time\030\007 \001(\013"
+ + "2\032.google.protobuf.TimestampB\004\342A\001\003\032-\n\013La"
+ + "belsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028"
+ + "\001:\'\352A$\n\037cloudasset.googleapis.com/Asset\022"
+ + "\001*2\332\004\n\022KeyTrackingService\022\201\002\n\034GetProtect"
+ + "edResourcesSummary\022B.google.cloud.kms.in"
+ + "ventory.v1.GetProtectedResourcesSummaryR"
+ + "equest\0328.google.cloud.kms.inventory.v1.P"
+ + "rotectedResourcesSummary\"c\332A\004name\202\323\344\223\002V\022"
+ + "T/v1/{name=projects/*/locations/*/keyRin"
+ + "gs/*/cryptoKeys/**}/protectedResourcesSu"
+ + "mmary\022\356\001\n\030SearchProtectedResources\022>.goo"
+ + "gle.cloud.kms.inventory.v1.SearchProtect"
+ + "edResourcesRequest\032?.google.cloud.kms.in"
+ + "ventory.v1.SearchProtectedResourcesRespo"
+ + "nse\"Q\332A\021scope, crypto_key\202\323\344\223\0027\0225/v1/{sc"
+ + "ope=organizations/*}/protectedResources:"
+ + "search\032O\312A\033kmsinventory.googleapis.com\322A"
+ + ".https://www.googleapis.com/auth/cloud-p"
+ + "latformB\302\001\n!com.google.cloud.kms.invento"
+ + "ry.v1B\027KeyTrackingServiceProtoP\001Z?cloud."
+ + "google.com/go/kms/inventory/apiv1/invent"
+ + "orypb;inventorypb\370\001\001\252\002\035Google.Cloud.Kms."
+ + "Inventory.V1\312\002\035Google\\Cloud\\Kms\\Inventor"
+ + "y\\V1b\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -212,7 +213,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_kms_inventory_v1_SearchProtectedResourcesRequest_descriptor,
new java.lang.String[] {
- "Scope", "CryptoKey", "PageSize", "PageToken",
+ "Scope", "CryptoKey", "PageSize", "PageToken", "ResourceTypes",
});
internal_static_google_cloud_kms_inventory_v1_SearchProtectedResourcesResponse_descriptor =
getDescriptor().getMessageTypes().get(3);
diff --git a/java-kmsinventory/proto-google-cloud-kmsinventory-v1/src/main/java/com/google/cloud/kms/inventory/v1/SearchProtectedResourcesRequest.java b/java-kmsinventory/proto-google-cloud-kmsinventory-v1/src/main/java/com/google/cloud/kms/inventory/v1/SearchProtectedResourcesRequest.java
index 3a5925f0c278..0e7a7608ea5a 100644
--- a/java-kmsinventory/proto-google-cloud-kmsinventory-v1/src/main/java/com/google/cloud/kms/inventory/v1/SearchProtectedResourcesRequest.java
+++ b/java-kmsinventory/proto-google-cloud-kmsinventory-v1/src/main/java/com/google/cloud/kms/inventory/v1/SearchProtectedResourcesRequest.java
@@ -43,6 +43,7 @@ private SearchProtectedResourcesRequest() {
scope_ = "";
cryptoKey_ = "";
pageToken_ = "";
+ resourceTypes_ = com.google.protobuf.LazyStringArrayList.emptyList();
}
@java.lang.Override
@@ -264,6 +265,122 @@ public com.google.protobuf.ByteString getPageTokenBytes() {
}
}
+ public static final int RESOURCE_TYPES_FIELD_NUMBER = 5;
+
+ @SuppressWarnings("serial")
+ private com.google.protobuf.LazyStringArrayList resourceTypes_ =
+ com.google.protobuf.LazyStringArrayList.emptyList();
+ /**
+ *
+ *
+ *
+ * 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.
+ *
+ *
+ * repeated string resource_types = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return A list containing the resourceTypes.
+ */
+ public com.google.protobuf.ProtocolStringList getResourceTypesList() {
+ 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.
+ *
+ *
+ * repeated string resource_types = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The count of resourceTypes.
+ */
+ public int getResourceTypesCount() {
+ return resourceTypes_.size();
+ }
+ /**
+ *
+ *
+ *
+ * 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.
+ *
+ *
+ * repeated string resource_types = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param index The index of the element to return.
+ * @return The resourceTypes at the given index.
+ */
+ public java.lang.String getResourceTypes(int index) {
+ return resourceTypes_.get(index);
+ }
+ /**
+ *
+ *
+ *
+ * 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.
+ *
+ *
+ * repeated string resource_types = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the resourceTypes at the given index.
+ */
+ public com.google.protobuf.ByteString getResourceTypesBytes(int index) {
+ return resourceTypes_.getByteString(index);
+ }
+
private byte memoizedIsInitialized = -1;
@java.lang.Override
@@ -290,6 +407,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_);
}
+ for (int i = 0; i < resourceTypes_.size(); i++) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, resourceTypes_.getRaw(i));
+ }
getUnknownFields().writeTo(output);
}
@@ -311,6 +431,14 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_);
}
+ {
+ int dataSize = 0;
+ for (int i = 0; i < resourceTypes_.size(); i++) {
+ dataSize += computeStringSizeNoTag(resourceTypes_.getRaw(i));
+ }
+ size += dataSize;
+ size += 1 * getResourceTypesList().size();
+ }
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
@@ -331,6 +459,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getCryptoKey().equals(other.getCryptoKey())) return false;
if (getPageSize() != other.getPageSize()) return false;
if (!getPageToken().equals(other.getPageToken())) return false;
+ if (!getResourceTypesList().equals(other.getResourceTypesList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -350,6 +479,10 @@ public int hashCode() {
hash = (53 * hash) + getPageSize();
hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER;
hash = (53 * hash) + getPageToken().hashCode();
+ if (getResourceTypesCount() > 0) {
+ hash = (37 * hash) + RESOURCE_TYPES_FIELD_NUMBER;
+ hash = (53 * hash) + getResourceTypesList().hashCode();
+ }
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
@@ -497,6 +630,7 @@ public Builder clear() {
cryptoKey_ = "";
pageSize_ = 0;
pageToken_ = "";
+ resourceTypes_ = com.google.protobuf.LazyStringArrayList.emptyList();
return this;
}
@@ -547,6 +681,10 @@ private void buildPartial0(
if (((from_bitField0_ & 0x00000008) != 0)) {
result.pageToken_ = pageToken_;
}
+ if (((from_bitField0_ & 0x00000010) != 0)) {
+ resourceTypes_.makeImmutable();
+ result.resourceTypes_ = resourceTypes_;
+ }
}
@java.lang.Override
@@ -615,6 +753,16 @@ public Builder mergeFrom(
bitField0_ |= 0x00000008;
onChanged();
}
+ if (!other.resourceTypes_.isEmpty()) {
+ if (resourceTypes_.isEmpty()) {
+ resourceTypes_ = other.resourceTypes_;
+ bitField0_ |= 0x00000010;
+ } else {
+ ensureResourceTypesIsMutable();
+ resourceTypes_.addAll(other.resourceTypes_);
+ }
+ onChanged();
+ }
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
@@ -665,6 +813,13 @@ public Builder mergeFrom(
bitField0_ |= 0x00000008;
break;
} // case 34
+ case 42:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+ ensureResourceTypesIsMutable();
+ resourceTypes_.add(s);
+ break;
+ } // case 42
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
@@ -1124,6 +1279,297 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) {
return this;
}
+ private com.google.protobuf.LazyStringArrayList resourceTypes_ =
+ com.google.protobuf.LazyStringArrayList.emptyList();
+
+ private void ensureResourceTypesIsMutable() {
+ if (!resourceTypes_.isModifiable()) {
+ resourceTypes_ = new com.google.protobuf.LazyStringArrayList(resourceTypes_);
+ }
+ bitField0_ |= 0x00000010;
+ }
+ /**
+ *
+ *
+ *
+ * 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.
+ *
+ *
+ * repeated string resource_types = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return A list containing the resourceTypes.
+ */
+ public com.google.protobuf.ProtocolStringList getResourceTypesList() {
+ resourceTypes_.makeImmutable();
+ 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.
+ *
+ *
+ * repeated string resource_types = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The count of resourceTypes.
+ */
+ public int getResourceTypesCount() {
+ return resourceTypes_.size();
+ }
+ /**
+ *
+ *
+ *
+ * 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.
+ *
+ *
+ * repeated string resource_types = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param index The index of the element to return.
+ * @return The resourceTypes at the given index.
+ */
+ public java.lang.String getResourceTypes(int index) {
+ return resourceTypes_.get(index);
+ }
+ /**
+ *
+ *
+ *
+ * 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.
+ *
+ *
+ * repeated string resource_types = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the resourceTypes at the given index.
+ */
+ public com.google.protobuf.ByteString getResourceTypesBytes(int index) {
+ return resourceTypes_.getByteString(index);
+ }
+ /**
+ *
+ *
+ *
+ * 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.
+ *
+ *
+ * repeated string resource_types = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param index The index to set the value at.
+ * @param value The resourceTypes to set.
+ * @return This builder for chaining.
+ */
+ public Builder setResourceTypes(int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResourceTypesIsMutable();
+ resourceTypes_.set(index, value);
+ bitField0_ |= 0x00000010;
+ onChanged();
+ 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.
+ *
+ *
+ * repeated string resource_types = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The resourceTypes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addResourceTypes(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResourceTypesIsMutable();
+ resourceTypes_.add(value);
+ bitField0_ |= 0x00000010;
+ onChanged();
+ 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.
+ *
+ *
+ * repeated string resource_types = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param values The resourceTypes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllResourceTypes(java.lang.Iterable values) {
+ ensureResourceTypesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resourceTypes_);
+ bitField0_ |= 0x00000010;
+ onChanged();
+ 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.
+ *
+ *
+ * repeated string resource_types = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearResourceTypes() {
+ resourceTypes_ = com.google.protobuf.LazyStringArrayList.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000010);
+ ;
+ onChanged();
+ 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.
+ *
+ *
+ * repeated string resource_types = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The bytes of the resourceTypes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addResourceTypesBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensureResourceTypesIsMutable();
+ resourceTypes_.add(value);
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return this;
+ }
+
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
diff --git a/java-kmsinventory/proto-google-cloud-kmsinventory-v1/src/main/java/com/google/cloud/kms/inventory/v1/SearchProtectedResourcesRequestOrBuilder.java b/java-kmsinventory/proto-google-cloud-kmsinventory-v1/src/main/java/com/google/cloud/kms/inventory/v1/SearchProtectedResourcesRequestOrBuilder.java
index 72356d34ac88..1ff8feaa23c2 100644
--- a/java-kmsinventory/proto-google-cloud-kmsinventory-v1/src/main/java/com/google/cloud/kms/inventory/v1/SearchProtectedResourcesRequestOrBuilder.java
+++ b/java-kmsinventory/proto-google-cloud-kmsinventory-v1/src/main/java/com/google/cloud/kms/inventory/v1/SearchProtectedResourcesRequestOrBuilder.java
@@ -137,4 +137,107 @@ public interface SearchProtectedResourcesRequestOrBuilder
* @return The bytes for pageToken.
*/
com.google.protobuf.ByteString getPageTokenBytes();
+
+ /**
+ *
+ *
+ *
+ * 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.
+ *
+ *
+ * repeated string resource_types = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return A list containing the resourceTypes.
+ */
+ java.util.List getResourceTypesList();
+ /**
+ *
+ *
+ *
+ * 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.
+ *
+ *
+ * repeated string resource_types = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The count of resourceTypes.
+ */
+ int getResourceTypesCount();
+ /**
+ *
+ *
+ *
+ * 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.
+ *
+ *
+ * repeated string resource_types = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param index The index of the element to return.
+ * @return The resourceTypes at the given index.
+ */
+ java.lang.String getResourceTypes(int index);
+ /**
+ *
+ *
+ *
+ * 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.
+ *
+ *
+ * repeated string resource_types = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the resourceTypes at the given index.
+ */
+ com.google.protobuf.ByteString getResourceTypesBytes(int index);
}
diff --git a/java-kmsinventory/proto-google-cloud-kmsinventory-v1/src/main/proto/google/cloud/kms/inventory/v1/key_dashboard_service.proto b/java-kmsinventory/proto-google-cloud-kmsinventory-v1/src/main/proto/google/cloud/kms/inventory/v1/key_dashboard_service.proto
index d85c4ad5b396..fe6353e44cdd 100644
--- a/java-kmsinventory/proto-google-cloud-kmsinventory-v1/src/main/proto/google/cloud/kms/inventory/v1/key_dashboard_service.proto
+++ b/java-kmsinventory/proto-google-cloud-kmsinventory-v1/src/main/proto/google/cloud/kms/inventory/v1/key_dashboard_service.proto
@@ -1,4 +1,4 @@
-// Copyright 2022 Google LLC
+// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/java-kmsinventory/proto-google-cloud-kmsinventory-v1/src/main/proto/google/cloud/kms/inventory/v1/key_tracking_service.proto b/java-kmsinventory/proto-google-cloud-kmsinventory-v1/src/main/proto/google/cloud/kms/inventory/v1/key_tracking_service.proto
index a3f7252cf16d..fa324fd7815b 100644
--- a/java-kmsinventory/proto-google-cloud-kmsinventory-v1/src/main/proto/google/cloud/kms/inventory/v1/key_tracking_service.proto
+++ b/java-kmsinventory/proto-google-cloud-kmsinventory-v1/src/main/proto/google/cloud/kms/inventory/v1/key_tracking_service.proto
@@ -1,4 +1,4 @@
-// Copyright 2022 Google LLC
+// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -139,6 +139,22 @@ message SearchProtectedResourcesRequest {
// [KeyTrackingService.SearchProtectedResources][google.cloud.kms.inventory.v1.KeyTrackingService.SearchProtectedResources]
// must match the call that provided the page token.
string page_token = 4;
+
+ // 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.
+ repeated string resource_types = 5 [(google.api.field_behavior) = OPTIONAL];
}
// Response message for
diff --git a/java-kmsinventory/samples/snippets/generated/com/google/cloud/kms/inventory/v1/keytrackingservice/searchprotectedresources/AsyncSearchProtectedResources.java b/java-kmsinventory/samples/snippets/generated/com/google/cloud/kms/inventory/v1/keytrackingservice/searchprotectedresources/AsyncSearchProtectedResources.java
index 8b84647b88c7..df1dd69d3ff7 100644
--- a/java-kmsinventory/samples/snippets/generated/com/google/cloud/kms/inventory/v1/keytrackingservice/searchprotectedresources/AsyncSearchProtectedResources.java
+++ b/java-kmsinventory/samples/snippets/generated/com/google/cloud/kms/inventory/v1/keytrackingservice/searchprotectedresources/AsyncSearchProtectedResources.java
@@ -22,6 +22,7 @@
import com.google.cloud.kms.inventory.v1.OrganizationName;
import com.google.cloud.kms.inventory.v1.ProtectedResource;
import com.google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest;
+import java.util.ArrayList;
public class AsyncSearchProtectedResources {
@@ -42,6 +43,7 @@ public static void asyncSearchProtectedResources() throws Exception {
.setCryptoKey(OrganizationName.of("[ORGANIZATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
+ .addAllResourceTypes(new ArrayList())
.build();
ApiFuture future =
keyTrackingServiceClient.searchProtectedResourcesPagedCallable().futureCall(request);
diff --git a/java-kmsinventory/samples/snippets/generated/com/google/cloud/kms/inventory/v1/keytrackingservice/searchprotectedresources/AsyncSearchProtectedResourcesPaged.java b/java-kmsinventory/samples/snippets/generated/com/google/cloud/kms/inventory/v1/keytrackingservice/searchprotectedresources/AsyncSearchProtectedResourcesPaged.java
index f9f4811b521f..82bb1ba28bd6 100644
--- a/java-kmsinventory/samples/snippets/generated/com/google/cloud/kms/inventory/v1/keytrackingservice/searchprotectedresources/AsyncSearchProtectedResourcesPaged.java
+++ b/java-kmsinventory/samples/snippets/generated/com/google/cloud/kms/inventory/v1/keytrackingservice/searchprotectedresources/AsyncSearchProtectedResourcesPaged.java
@@ -23,6 +23,7 @@
import com.google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest;
import com.google.cloud.kms.inventory.v1.SearchProtectedResourcesResponse;
import com.google.common.base.Strings;
+import java.util.ArrayList;
public class AsyncSearchProtectedResourcesPaged {
@@ -43,6 +44,7 @@ public static void asyncSearchProtectedResourcesPaged() throws Exception {
.setCryptoKey(OrganizationName.of("[ORGANIZATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
+ .addAllResourceTypes(new ArrayList())
.build();
while (true) {
SearchProtectedResourcesResponse response =
diff --git a/java-kmsinventory/samples/snippets/generated/com/google/cloud/kms/inventory/v1/keytrackingservice/searchprotectedresources/SyncSearchProtectedResources.java b/java-kmsinventory/samples/snippets/generated/com/google/cloud/kms/inventory/v1/keytrackingservice/searchprotectedresources/SyncSearchProtectedResources.java
index fad0f849b475..8594bf0c0c94 100644
--- a/java-kmsinventory/samples/snippets/generated/com/google/cloud/kms/inventory/v1/keytrackingservice/searchprotectedresources/SyncSearchProtectedResources.java
+++ b/java-kmsinventory/samples/snippets/generated/com/google/cloud/kms/inventory/v1/keytrackingservice/searchprotectedresources/SyncSearchProtectedResources.java
@@ -21,6 +21,7 @@
import com.google.cloud.kms.inventory.v1.OrganizationName;
import com.google.cloud.kms.inventory.v1.ProtectedResource;
import com.google.cloud.kms.inventory.v1.SearchProtectedResourcesRequest;
+import java.util.ArrayList;
public class SyncSearchProtectedResources {
@@ -41,6 +42,7 @@ public static void syncSearchProtectedResources() throws Exception {
.setCryptoKey(OrganizationName.of("[ORGANIZATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
+ .addAllResourceTypes(new ArrayList())
.build();
for (ProtectedResource element :
keyTrackingServiceClient.searchProtectedResources(request).iterateAll()) {