diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceClient.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceClient.java index f1bbf06c9..b65992096 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceClient.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceClient.java @@ -28,6 +28,7 @@ import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.PageContext; import com.google.api.gax.rpc.UnaryCallable; +import com.google.api.resourcenames.ResourceName; import com.google.cloud.asset.v1.stub.AssetServiceStub; import com.google.cloud.asset.v1.stub.AssetServiceStubSettings; import com.google.common.util.concurrent.MoreExecutors; @@ -271,6 +272,154 @@ public final UnaryCallable exportAssetsCallable( return stub.exportAssetsCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists assets with time and resource types and returns paged results in response. + * + *

Sample code: + * + *

{@code
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   ResourceName parent = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]");
+   *   for (Asset element : assetServiceClient.listAssets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Name of the organization or project the assets belong to. Format: + * "organizations/[organization-number]" (such as "organizations/123"), + * "projects/[project-id]" (such as "projects/my-project-id"), or "projects/[project-number]" + * (such as "projects/12345"). + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAssetsPagedResponse listAssets(ResourceName parent) { + ListAssetsRequest request = + ListAssetsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listAssets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists assets with time and resource types and returns paged results in response. + * + *

Sample code: + * + *

{@code
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   String parent = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString();
+   *   for (Asset element : assetServiceClient.listAssets(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. Name of the organization or project the assets belong to. Format: + * "organizations/[organization-number]" (such as "organizations/123"), + * "projects/[project-id]" (such as "projects/my-project-id"), or "projects/[project-number]" + * (such as "projects/12345"). + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAssetsPagedResponse listAssets(String parent) { + ListAssetsRequest request = ListAssetsRequest.newBuilder().setParent(parent).build(); + return listAssets(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists assets with time and resource types and returns paged results in response. + * + *

Sample code: + * + *

{@code
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   ListAssetsRequest request =
+   *       ListAssetsRequest.newBuilder()
+   *           .setParent(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString())
+   *           .setReadTime(Timestamp.newBuilder().build())
+   *           .addAllAssetTypes(new ArrayList())
+   *           .setContentType(ContentType.forNumber(0))
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Asset element : assetServiceClient.listAssets(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 ListAssetsPagedResponse listAssets(ListAssetsRequest request) { + return listAssetsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists assets with time and resource types and returns paged results in response. + * + *

Sample code: + * + *

{@code
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   ListAssetsRequest request =
+   *       ListAssetsRequest.newBuilder()
+   *           .setParent(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString())
+   *           .setReadTime(Timestamp.newBuilder().build())
+   *           .addAllAssetTypes(new ArrayList())
+   *           .setContentType(ContentType.forNumber(0))
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = assetServiceClient.listAssetsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Asset element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listAssetsPagedCallable() { + return stub.listAssetsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists assets with time and resource types and returns paged results in response. + * + *

Sample code: + * + *

{@code
+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   ListAssetsRequest request =
+   *       ListAssetsRequest.newBuilder()
+   *           .setParent(FeedName.ofProjectFeedName("[PROJECT]", "[FEED]").toString())
+   *           .setReadTime(Timestamp.newBuilder().build())
+   *           .addAllAssetTypes(new ArrayList())
+   *           .setContentType(ContentType.forNumber(0))
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListAssetsResponse response = assetServiceClient.listAssetsCallable().call(request);
+   *     for (Asset element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listAssetsCallable() { + return stub.listAssetsCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Batch gets the update history of assets that overlap a time window. For IAM_POLICY content, @@ -747,7 +896,7 @@ public final UnaryCallable deleteFeedCallable() { * * @param scope Required. A scope can be a project, a folder, or an organization. The search is * limited to the resources within the `scope`. The caller must be granted the - * [`cloudasset.assets.searchAllResources`](http://cloud.google.com/asset-inventory/docs/access-control#required_permissions) + * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) * permission on the desired scope. *

The allowed values are: *

    @@ -758,32 +907,36 @@ public final UnaryCallable deleteFeedCallable() { *
* * @param query Optional. The query statement. See [how to construct a - * query](http://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query) + * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query) * for more information. If not specified or empty, it will search all the resources within - * the specified `scope`. Note that the query string is compared against each Cloud IAM policy - * binding, including its members, roles, and Cloud IAM conditions. The returned Cloud IAM - * policies will only contain the bindings that match your query. To learn more about the IAM - * policy structure, see [IAM policy - * doc](https://cloud.google.com/iam/docs/policies#structure). + * the specified `scope`. *

Examples: *

    *
  • `name:Important` to find Cloud resources whose name contains "Important" as a word. + *
  • `name=Important` to find the Cloud resource whose name is exactly "Important". *
  • `displayName:Impor*` to find Cloud resources whose display name contains "Impor" - * as a prefix. - *
  • `description:*por*` to find Cloud resources whose description contains "por" - * as a substring. - *
  • `location:us-west*` to find Cloud resources whose location is prefixed with - * "us-west". + * as a prefix of any word in the field. + *
  • `location:us-west*` to find Cloud resources whose location contains both "us" and + * "west" as prefixes. *
  • `labels:prod` to find Cloud resources whose labels contain "prod" as a key or value. *
  • `labels.env:prod` to find Cloud resources that have a label "env" and its value is * "prod". *
  • `labels.env:*` to find Cloud resources that have a label "env". + *
  • `kmsKey:key` to find Cloud resources encrypted with a customer-managed encryption key + * whose name contains the word "key". + *
  • `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a word. + *
  • `NOT state:ACTIVE` to find {{gcp_name}} resources whose state doesn't contain + * "ACTIVE" as a word. + *
  • `createTime<1609459200` to find Cloud resources that were created before + * "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of "2021-01-01 00:00:00 + * UTC" in seconds. + *
  • `updateTime>1609459200` to find Cloud resources that were updated after + * "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of "2021-01-01 00:00:00 + * UTC" in seconds. *
  • `Important` to find Cloud resources that contain "Important" as a word in any of the * searchable fields. - *
  • `Impor*` to find Cloud resources that contain "Impor" as a prefix in any of the - * searchable fields. - *
  • `*por*` to find Cloud resources that contain "por" as a substring in any of - * the searchable fields. + *
  • `Impor*` to find Cloud resources that contain "Impor" as a prefix of any word in + * any of the searchable fields. *
  • `Important location:(us-west1 OR global)` to find Cloud resources that contain * "Important" as a word in any of the searchable fields and are also located in the * "us-west1" region or the "global" location. @@ -792,6 +945,16 @@ public final UnaryCallable deleteFeedCallable() { * @param assetTypes Optional. A list of asset types that this request searches for. If empty, it * will search all the [searchable asset * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). + *

    Regular expressions are also supported. For example: + *

      + *
    • "compute.googleapis.com.*" snapshots resources whose asset type starts with + * "compute.googleapis.com". + *
    • ".*Instance" snapshots resources whose asset type ends with "Instance". + *
    • ".*Instance.*" snapshots resources whose asset type contains "Instance". + *
    + *

    See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported regular + * expression syntax. If the regular expression does not match any supported asset type, an + * INVALID_ARGUMENT error will be returned. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final SearchAllResourcesPagedResponse searchAllResources( @@ -933,7 +1096,7 @@ public final SearchAllResourcesPagedResponse searchAllResources( * * @param scope Required. A scope can be a project, a folder, or an organization. The search is * limited to the IAM policies within the `scope`. The caller must be granted the - * [`cloudasset.assets.searchAllIamPolicies`](http://cloud.google.com/asset-inventory/docs/access-control#required_permissions) + * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) * permission on the desired scope. *

    The allowed values are: *

      @@ -946,23 +1109,33 @@ public final SearchAllResourcesPagedResponse searchAllResources( * @param query Optional. The query statement. See [how to construct a * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query) * for more information. If not specified or empty, it will search all the IAM policies within - * the specified `scope`. + * the specified `scope`. Note that the query string is compared against each Cloud IAM policy + * binding, including its members, roles, and Cloud IAM conditions. The returned Cloud IAM + * policies will only contain the bindings that match your query. To learn more about the IAM + * policy structure, see [IAM policy + * doc](https://cloud.google.com/iam/docs/policies#structure). *

      Examples: *

        *
      • `policy:amy{@literal @}gmail.com` to find IAM policy bindings that specify user * "amy{@literal @}gmail.com". *
      • `policy:roles/compute.admin` to find IAM policy bindings that specify the Compute * Admin role. + *
      • `policy:comp*` to find IAM policy bindings that contain "comp" as a prefix of any + * word in the binding. *
      • `policy.role.permissions:storage.buckets.update` to find IAM policy bindings that * specify a role containing "storage.buckets.update" permission. Note that if callers * don't have `iam.roles.get` access to a role's included permissions, policy bindings * that specify this role will be dropped from the search results. + *
      • `policy.role.permissions:upd*` to find IAM policy bindings that specify a role + * containing "upd" as a prefix of any word in the role permission. Note that if callers + * don't have `iam.roles.get` access to a role's included permissions, policy bindings + * that specify this role will be dropped from the search results. *
      • `resource:organizations/123456` to find IAM policy bindings that are set on * "organizations/123456". + *
      • `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to find IAM + * policy bindings that are set on the project named "myproject". *
      • `Important` to find IAM policy bindings that contain "Important" as a word in any of * the searchable fields (except for the included permissions). - *
      • `*por*` to find IAM policy bindings that contain "por" as a substring in any - * of the searchable fields (except for the included permissions). *
      • `resource:(instance1 OR instance2) policy:amy` to find IAM policy bindings that are * set on resources "instance1" or "instance2" and also specify user "amy". *
      @@ -1257,6 +1430,86 @@ public boolean awaitTermination(long duration, TimeUnit unit) throws Interrupted return stub.awaitTermination(duration, unit); } + public static class ListAssetsPagedResponse + extends AbstractPagedListResponse< + ListAssetsRequest, + ListAssetsResponse, + Asset, + ListAssetsPage, + ListAssetsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAssetsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListAssetsPagedResponse apply(ListAssetsPage input) { + return new ListAssetsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListAssetsPagedResponse(ListAssetsPage page) { + super(page, ListAssetsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAssetsPage + extends AbstractPage { + + private ListAssetsPage( + PageContext context, + ListAssetsResponse response) { + super(context, response); + } + + private static ListAssetsPage createEmptyPage() { + return new ListAssetsPage(null, null); + } + + @Override + protected ListAssetsPage createPage( + PageContext context, + ListAssetsResponse response) { + return new ListAssetsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAssetsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListAssetsRequest, + ListAssetsResponse, + Asset, + ListAssetsPage, + ListAssetsFixedSizeCollection> { + + private ListAssetsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAssetsFixedSizeCollection createEmptyCollection() { + return new ListAssetsFixedSizeCollection(null, 0); + } + + @Override + protected ListAssetsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAssetsFixedSizeCollection(pages, collectionSize); + } + } + public static class SearchAllResourcesPagedResponse extends AbstractPagedListResponse< SearchAllResourcesRequest, diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceSettings.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceSettings.java index 94fb1e091..7311951ab 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceSettings.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceSettings.java @@ -16,6 +16,7 @@ package com.google.cloud.asset.v1; +import static com.google.cloud.asset.v1.AssetServiceClient.ListAssetsPagedResponse; import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllResourcesPagedResponse; @@ -83,6 +84,12 @@ public UnaryCallSettings exportAssetsSettings() return ((AssetServiceStubSettings) getStubSettings()).exportAssetsOperationSettings(); } + /** Returns the object with the settings used for calls to listAssets. */ + public PagedCallSettings + listAssetsSettings() { + return ((AssetServiceStubSettings) getStubSettings()).listAssetsSettings(); + } + /** Returns the object with the settings used for calls to batchGetAssetsHistory. */ public UnaryCallSettings batchGetAssetsHistorySettings() { @@ -262,6 +269,12 @@ public UnaryCallSettings.Builder exportAssetsSet return getStubSettingsBuilder().exportAssetsOperationSettings(); } + /** Returns the builder for the settings used for calls to listAssets. */ + public PagedCallSettings.Builder + listAssetsSettings() { + return getStubSettingsBuilder().listAssetsSettings(); + } + /** Returns the builder for the settings used for calls to batchGetAssetsHistory. */ public UnaryCallSettings.Builder batchGetAssetsHistorySettings() { diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/gapic_metadata.json b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/gapic_metadata.json index d2c1608bb..ea1187e7a 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/gapic_metadata.json +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/gapic_metadata.json @@ -31,6 +31,9 @@ "GetFeed": { "methods": ["getFeed", "getFeed", "getFeed", "getFeedCallable"] }, + "ListAssets": { + "methods": ["listAssets", "listAssets", "listAssets", "listAssetsPagedCallable", "listAssetsCallable"] + }, "ListFeeds": { "methods": ["listFeeds", "listFeeds", "listFeedsCallable"] }, diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStub.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStub.java index b97b1874b..462d7e292 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStub.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStub.java @@ -16,6 +16,7 @@ package com.google.cloud.asset.v1.stub; +import static com.google.cloud.asset.v1.AssetServiceClient.ListAssetsPagedResponse; import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllResourcesPagedResponse; @@ -34,6 +35,8 @@ import com.google.cloud.asset.v1.ExportAssetsResponse; import com.google.cloud.asset.v1.Feed; import com.google.cloud.asset.v1.GetFeedRequest; +import com.google.cloud.asset.v1.ListAssetsRequest; +import com.google.cloud.asset.v1.ListAssetsResponse; import com.google.cloud.asset.v1.ListFeedsRequest; import com.google.cloud.asset.v1.ListFeedsResponse; import com.google.cloud.asset.v1.SearchAllIamPoliciesRequest; @@ -68,6 +71,14 @@ public UnaryCallable exportAssetsCallable() { throw new UnsupportedOperationException("Not implemented: exportAssetsCallable()"); } + public UnaryCallable listAssetsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listAssetsPagedCallable()"); + } + + public UnaryCallable listAssetsCallable() { + throw new UnsupportedOperationException("Not implemented: listAssetsCallable()"); + } + public UnaryCallable batchGetAssetsHistoryCallable() { throw new UnsupportedOperationException("Not implemented: batchGetAssetsHistoryCallable()"); diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java index cceca0029..64e6f28aa 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java @@ -16,6 +16,7 @@ package com.google.cloud.asset.v1.stub; +import static com.google.cloud.asset.v1.AssetServiceClient.ListAssetsPagedResponse; import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllResourcesPagedResponse; @@ -49,6 +50,7 @@ import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse; import com.google.cloud.asset.v1.AnalyzeIamPolicyRequest; import com.google.cloud.asset.v1.AnalyzeIamPolicyResponse; +import com.google.cloud.asset.v1.Asset; import com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest; import com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse; import com.google.cloud.asset.v1.CreateFeedRequest; @@ -58,6 +60,8 @@ import com.google.cloud.asset.v1.Feed; import com.google.cloud.asset.v1.GetFeedRequest; import com.google.cloud.asset.v1.IamPolicySearchResult; +import com.google.cloud.asset.v1.ListAssetsRequest; +import com.google.cloud.asset.v1.ListAssetsResponse; import com.google.cloud.asset.v1.ListFeedsRequest; import com.google.cloud.asset.v1.ListFeedsResponse; import com.google.cloud.asset.v1.ResourceSearchResult; @@ -119,6 +123,8 @@ public class AssetServiceStubSettings extends StubSettings exportAssetsOperationSettings; + private final PagedCallSettings + listAssetsSettings; private final UnaryCallSettings batchGetAssetsHistorySettings; private final UnaryCallSettings createFeedSettings; @@ -144,6 +150,42 @@ public class AssetServiceStubSettings extends StubSettings analyzeIamPolicyLongrunningOperationSettings; + private static final PagedListDescriptor + LIST_ASSETS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListAssetsRequest injectToken(ListAssetsRequest payload, String token) { + return ListAssetsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListAssetsRequest injectPageSize(ListAssetsRequest payload, int pageSize) { + return ListAssetsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListAssetsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListAssetsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListAssetsResponse payload) { + return payload.getAssetsList() == null + ? ImmutableList.of() + : payload.getAssetsList(); + } + }; + private static final PagedListDescriptor< SearchAllResourcesRequest, SearchAllResourcesResponse, ResourceSearchResult> SEARCH_ALL_RESOURCES_PAGE_STR_DESC = @@ -226,6 +268,23 @@ public Iterable extractResources( } }; + private static final PagedListResponseFactory< + ListAssetsRequest, ListAssetsResponse, ListAssetsPagedResponse> + LIST_ASSETS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListAssetsRequest, ListAssetsResponse, ListAssetsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListAssetsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_ASSETS_PAGE_STR_DESC, request, context); + return ListAssetsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + private static final PagedListResponseFactory< SearchAllResourcesRequest, SearchAllResourcesResponse, SearchAllResourcesPagedResponse> SEARCH_ALL_RESOURCES_PAGE_STR_FACT = @@ -285,6 +344,12 @@ public UnaryCallSettings exportAssetsSettings() return exportAssetsOperationSettings; } + /** Returns the object with the settings used for calls to listAssets. */ + public PagedCallSettings + listAssetsSettings() { + return listAssetsSettings; + } + /** Returns the object with the settings used for calls to batchGetAssetsHistory. */ public UnaryCallSettings batchGetAssetsHistorySettings() { @@ -424,6 +489,7 @@ protected AssetServiceStubSettings(Builder settingsBuilder) throws IOException { exportAssetsSettings = settingsBuilder.exportAssetsSettings().build(); exportAssetsOperationSettings = settingsBuilder.exportAssetsOperationSettings().build(); + listAssetsSettings = settingsBuilder.listAssetsSettings().build(); batchGetAssetsHistorySettings = settingsBuilder.batchGetAssetsHistorySettings().build(); createFeedSettings = settingsBuilder.createFeedSettings().build(); getFeedSettings = settingsBuilder.getFeedSettings().build(); @@ -446,6 +512,9 @@ public static class Builder extends StubSettings.Builder exportAssetsOperationSettings; + private final PagedCallSettings.Builder< + ListAssetsRequest, ListAssetsResponse, ListAssetsPagedResponse> + listAssetsSettings; private final UnaryCallSettings.Builder< BatchGetAssetsHistoryRequest, BatchGetAssetsHistoryResponse> batchGetAssetsHistorySettings; @@ -553,6 +622,7 @@ protected Builder(ClientContext clientContext) { exportAssetsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); exportAssetsOperationSettings = OperationCallSettings.newBuilder(); + listAssetsSettings = PagedCallSettings.newBuilder(LIST_ASSETS_PAGE_STR_FACT); batchGetAssetsHistorySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); createFeedSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); getFeedSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); @@ -569,6 +639,7 @@ protected Builder(ClientContext clientContext) { unaryMethodSettingsBuilders = ImmutableList.>of( exportAssetsSettings, + listAssetsSettings, batchGetAssetsHistorySettings, createFeedSettings, getFeedSettings, @@ -587,6 +658,7 @@ protected Builder(AssetServiceStubSettings settings) { exportAssetsSettings = settings.exportAssetsSettings.toBuilder(); exportAssetsOperationSettings = settings.exportAssetsOperationSettings.toBuilder(); + listAssetsSettings = settings.listAssetsSettings.toBuilder(); batchGetAssetsHistorySettings = settings.batchGetAssetsHistorySettings.toBuilder(); createFeedSettings = settings.createFeedSettings.toBuilder(); getFeedSettings = settings.getFeedSettings.toBuilder(); @@ -604,6 +676,7 @@ protected Builder(AssetServiceStubSettings settings) { unaryMethodSettingsBuilders = ImmutableList.>of( exportAssetsSettings, + listAssetsSettings, batchGetAssetsHistorySettings, createFeedSettings, getFeedSettings, @@ -633,6 +706,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + builder + .listAssetsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params")); + builder .batchGetAssetsHistorySettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes")) @@ -767,6 +845,12 @@ public UnaryCallSettings.Builder exportAssetsSet return exportAssetsOperationSettings; } + /** Returns the builder for the settings used for calls to listAssets. */ + public PagedCallSettings.Builder + listAssetsSettings() { + return listAssetsSettings; + } + /** Returns the builder for the settings used for calls to batchGetAssetsHistory. */ public UnaryCallSettings.Builder batchGetAssetsHistorySettings() { diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/GrpcAssetServiceStub.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/GrpcAssetServiceStub.java index 7fb9b4ba5..712d32808 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/GrpcAssetServiceStub.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/GrpcAssetServiceStub.java @@ -16,6 +16,7 @@ package com.google.cloud.asset.v1.stub; +import static com.google.cloud.asset.v1.AssetServiceClient.ListAssetsPagedResponse; import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllResourcesPagedResponse; @@ -39,6 +40,8 @@ import com.google.cloud.asset.v1.ExportAssetsResponse; import com.google.cloud.asset.v1.Feed; import com.google.cloud.asset.v1.GetFeedRequest; +import com.google.cloud.asset.v1.ListAssetsRequest; +import com.google.cloud.asset.v1.ListAssetsResponse; import com.google.cloud.asset.v1.ListFeedsRequest; import com.google.cloud.asset.v1.ListFeedsResponse; import com.google.cloud.asset.v1.SearchAllIamPoliciesRequest; @@ -74,6 +77,15 @@ public class GrpcAssetServiceStub extends AssetServiceStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); + private static final MethodDescriptor + listAssetsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1.AssetService/ListAssets") + .setRequestMarshaller(ProtoUtils.marshaller(ListAssetsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListAssetsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor batchGetAssetsHistoryMethodDescriptor = MethodDescriptor.newBuilder() @@ -172,6 +184,8 @@ public class GrpcAssetServiceStub extends AssetServiceStub { private final UnaryCallable exportAssetsCallable; private final OperationCallable exportAssetsOperationCallable; + private final UnaryCallable listAssetsCallable; + private final UnaryCallable listAssetsPagedCallable; private final UnaryCallable batchGetAssetsHistoryCallable; private final UnaryCallable createFeedCallable; @@ -252,6 +266,19 @@ public Map extract(ExportAssetsRequest request) { } }) .build(); + GrpcCallSettings listAssetsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listAssetsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListAssetsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); GrpcCallSettings batchGetAssetsHistoryTransportSettings = GrpcCallSettings @@ -403,6 +430,12 @@ public Map extract( settings.exportAssetsOperationSettings(), clientContext, operationsStub); + this.listAssetsCallable = + callableFactory.createUnaryCallable( + listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); + this.listAssetsPagedCallable = + callableFactory.createPagedCallable( + listAssetsTransportSettings, settings.listAssetsSettings(), clientContext); this.batchGetAssetsHistoryCallable = callableFactory.createUnaryCallable( batchGetAssetsHistoryTransportSettings, @@ -477,6 +510,16 @@ public UnaryCallable exportAssetsCallable() { return exportAssetsOperationCallable; } + @Override + public UnaryCallable listAssetsCallable() { + return listAssetsCallable; + } + + @Override + public UnaryCallable listAssetsPagedCallable() { + return listAssetsPagedCallable; + } + @Override public UnaryCallable batchGetAssetsHistoryCallable() { diff --git a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientTest.java b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientTest.java index e41969642..331ea92d8 100644 --- a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientTest.java +++ b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientTest.java @@ -16,6 +16,7 @@ package com.google.cloud.asset.v1; +import static com.google.cloud.asset.v1.AssetServiceClient.ListAssetsPagedResponse; import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllIamPoliciesPagedResponse; import static com.google.cloud.asset.v1.AssetServiceClient.SearchAllResourcesPagedResponse; @@ -27,6 +28,7 @@ import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.InvalidArgumentException; import com.google.api.gax.rpc.StatusCode; +import com.google.api.resourcenames.ResourceName; import com.google.common.collect.Lists; import com.google.longrunning.Operation; import com.google.protobuf.AbstractMessage; @@ -154,6 +156,94 @@ public void exportAssetsExceptionTest() throws Exception { } } + @Test + public void listAssetsTest() throws Exception { + Asset responsesElement = Asset.newBuilder().build(); + ListAssetsResponse expectedResponse = + ListAssetsResponse.newBuilder() + .setNextPageToken("") + .addAllAssets(Arrays.asList(responsesElement)) + .build(); + mockAssetService.addResponse(expectedResponse); + + ResourceName parent = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); + + ListAssetsPagedResponse pagedListResponse = client.listAssets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAssetsList().get(0), resources.get(0)); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAssetsRequest actualRequest = ((ListAssetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAssetsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + ResourceName parent = FeedName.ofProjectFeedName("[PROJECT]", "[FEED]"); + client.listAssets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAssetsTest2() throws Exception { + Asset responsesElement = Asset.newBuilder().build(); + ListAssetsResponse expectedResponse = + ListAssetsResponse.newBuilder() + .setNextPageToken("") + .addAllAssets(Arrays.asList(responsesElement)) + .build(); + mockAssetService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAssetsPagedResponse pagedListResponse = client.listAssets(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAssetsList().get(0), resources.get(0)); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListAssetsRequest actualRequest = ((ListAssetsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAssetsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAssets(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void batchGetAssetsHistoryTest() throws Exception { BatchGetAssetsHistoryResponse expectedResponse = diff --git a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/MockAssetServiceImpl.java b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/MockAssetServiceImpl.java index 27b5f4021..643691d8d 100644 --- a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/MockAssetServiceImpl.java +++ b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/MockAssetServiceImpl.java @@ -81,6 +81,27 @@ public void exportAssets( } } + @Override + public void listAssets( + ListAssetsRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListAssetsResponse) { + requests.add(request); + responseObserver.onNext(((ListAssetsResponse) 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 ListAssets, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListAssetsResponse.class.getName(), + Exception.class.getName()))); + } + } + @Override public void batchGetAssetsHistory( BatchGetAssetsHistoryRequest request, diff --git a/grpc-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceGrpc.java b/grpc-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceGrpc.java index 403c3df45..5db41cb80 100644 --- a/grpc-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceGrpc.java +++ b/grpc-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceGrpc.java @@ -75,6 +75,48 @@ private AssetServiceGrpc() {} return getExportAssetsMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.asset.v1.ListAssetsRequest, com.google.cloud.asset.v1.ListAssetsResponse> + getListAssetsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAssets", + requestType = com.google.cloud.asset.v1.ListAssetsRequest.class, + responseType = com.google.cloud.asset.v1.ListAssetsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.asset.v1.ListAssetsRequest, com.google.cloud.asset.v1.ListAssetsResponse> + getListAssetsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.asset.v1.ListAssetsRequest, + com.google.cloud.asset.v1.ListAssetsResponse> + getListAssetsMethod; + if ((getListAssetsMethod = AssetServiceGrpc.getListAssetsMethod) == null) { + synchronized (AssetServiceGrpc.class) { + if ((getListAssetsMethod = AssetServiceGrpc.getListAssetsMethod) == null) { + AssetServiceGrpc.getListAssetsMethod = + getListAssetsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAssets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.ListAssetsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.ListAssetsResponse.getDefaultInstance())) + .setSchemaDescriptor(new AssetServiceMethodDescriptorSupplier("ListAssets")) + .build(); + } + } + } + return getListAssetsMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest, com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse> @@ -592,6 +634,21 @@ public void exportAssets( getExportAssetsMethod(), responseObserver); } + /** + * + * + *
      +     * Lists assets with time and resource types and returns paged results in
      +     * response.
      +     * 
      + */ + public void listAssets( + com.google.cloud.asset.v1.ListAssetsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListAssetsMethod(), responseObserver); + } + /** * * @@ -762,6 +819,12 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.cloud.asset.v1.ExportAssetsRequest, com.google.longrunning.Operation>(this, METHODID_EXPORT_ASSETS))) + .addMethod( + getListAssetsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1.ListAssetsRequest, + com.google.cloud.asset.v1.ListAssetsResponse>(this, METHODID_LIST_ASSETS))) .addMethod( getBatchGetAssetsHistoryMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -874,6 +937,22 @@ public void exportAssets( responseObserver); } + /** + * + * + *
      +     * Lists assets with time and resource types and returns paged results in
      +     * response.
      +     * 
      + */ + public void listAssets( + com.google.cloud.asset.v1.ListAssetsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAssetsMethod(), getCallOptions()), request, responseObserver); + } + /** * * @@ -1092,6 +1171,20 @@ public com.google.longrunning.Operation exportAssets( getChannel(), getExportAssetsMethod(), getCallOptions(), request); } + /** + * + * + *
      +     * Lists assets with time and resource types and returns paged results in
      +     * response.
      +     * 
      + */ + public com.google.cloud.asset.v1.ListAssetsResponse listAssets( + com.google.cloud.asset.v1.ListAssetsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAssetsMethod(), getCallOptions(), request); + } + /** * * @@ -1286,6 +1379,21 @@ protected AssetServiceFutureStub build( getChannel().newCall(getExportAssetsMethod(), getCallOptions()), request); } + /** + * + * + *
      +     * Lists assets with time and resource types and returns paged results in
      +     * response.
      +     * 
      + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.asset.v1.ListAssetsResponse> + listAssets(com.google.cloud.asset.v1.ListAssetsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAssetsMethod(), getCallOptions()), request); + } + /** * * @@ -1446,16 +1554,17 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1479,6 +1588,12 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.asset.v1.ExportAssetsRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_LIST_ASSETS: + serviceImpl.listAssets( + (com.google.cloud.asset.v1.ListAssetsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; case METHODID_BATCH_GET_ASSETS_HISTORY: serviceImpl.batchGetAssetsHistory( (com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest) request, @@ -1599,6 +1714,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new AssetServiceFileDescriptorSupplier()) .addMethod(getExportAssetsMethod()) + .addMethod(getListAssetsMethod()) .addMethod(getBatchGetAssetsHistoryMethod()) .addMethod(getCreateFeedMethod()) .addMethod(getGetFeedMethod()) diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Asset.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Asset.java index 1fed0e91b..01823f3fd 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Asset.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Asset.java @@ -26,7 +26,8 @@ * [resource * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), * a resource outside the Google Cloud resource hierarchy (such as Google - * Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy). + * Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy), + * or a relationship (e.g. an INSTANCE_TO_INSTANCEGROUP relationship). * See [Supported asset * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) * for more information. @@ -1310,7 +1311,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * [resource * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), * a resource outside the Google Cloud resource hierarchy (such as Google - * Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy). + * Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy), + * or a relationship (e.g. an INSTANCE_TO_INSTANCEGROUP relationship). * See [Supported asset * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) * for more information. diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java index 129c072b5..45c1a59ea 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java @@ -71,6 +71,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_ConditionEvaluation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_ConditionEvaluation_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -153,61 +157,74 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "scovery_document_uri\030\002 \001(\t\022\026\n\016discovery_" + "name\030\003 \001(\t\022\024\n\014resource_url\030\004 \001(\t\022\016\n\006pare" + "nt\030\005 \001(\t\022%\n\004data\030\006 \001(\0132\027.google.protobuf" - + ".Struct\022\020\n\010location\030\010 \001(\t\"\314\002\n\024ResourceSe" + + ".Struct\022\020\n\010location\030\010 \001(\t\"\263\004\n\024ResourceSe" + "archResult\022\014\n\004name\030\001 \001(\t\022\022\n\nasset_type\030\002" - + " \001(\t\022\017\n\007project\030\003 \001(\t\022\024\n\014display_name\030\004 " - + "\001(\t\022\023\n\013description\030\005 \001(\t\022\020\n\010location\030\006 \001" - + "(\t\022G\n\006labels\030\007 \003(\01327.google.cloud.asset." - + "v1.ResourceSearchResult.LabelsEntry\022\024\n\014n" - + "etwork_tags\030\010 \003(\t\0226\n\025additional_attribut" - + "es\030\t \001(\0132\027.google.protobuf.Struct\032-\n\013Lab" - + "elsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" - + "\"\324\003\n\025IamPolicySearchResult\022\020\n\010resource\030\001" - + " \001(\t\022\017\n\007project\030\002 \001(\t\022%\n\006policy\030\003 \001(\0132\025." - + "google.iam.v1.Policy\022M\n\013explanation\030\004 \001(" - + "\01328.google.cloud.asset.v1.IamPolicySearc" - + "hResult.Explanation\032\241\002\n\013Explanation\022m\n\023m" - + "atched_permissions\030\001 \003(\0132P.google.cloud." - + "asset.v1.IamPolicySearchResult.Explanati" - + "on.MatchedPermissionsEntry\032\"\n\013Permission" - + "s\022\023\n\013permissions\030\001 \003(\t\032\177\n\027MatchedPermiss" - + "ionsEntry\022\013\n\003key\030\001 \001(\t\022S\n\005value\030\002 \001(\0132D." - + "google.cloud.asset.v1.IamPolicySearchRes" - + "ult.Explanation.Permissions:\0028\001\"G\n\026IamPo" - + "licyAnalysisState\022\036\n\004code\030\001 \001(\0162\020.google" - + ".rpc.Code\022\r\n\005cause\030\002 \001(\t\"\341\010\n\027IamPolicyAn" - + "alysisResult\022#\n\033attached_resource_full_n" - + "ame\030\001 \001(\t\022+\n\013iam_binding\030\002 \001(\0132\026.google." - + "iam.v1.Binding\022^\n\024access_control_lists\030\003" - + " \003(\0132@.google.cloud.asset.v1.IamPolicyAn" - + "alysisResult.AccessControlList\022R\n\ridenti" - + "ty_list\030\004 \001(\0132;.google.cloud.asset.v1.Ia" - + "mPolicyAnalysisResult.IdentityList\022\026\n\016fu" - + "lly_explored\030\005 \001(\010\032m\n\010Resource\022\032\n\022full_r" - + "esource_name\030\001 \001(\t\022E\n\016analysis_state\030\002 \001" - + "(\0132-.google.cloud.asset.v1.IamPolicyAnal" - + "ysisState\032\205\001\n\006Access\022\016\n\004role\030\001 \001(\tH\000\022\024\n\n" - + "permission\030\002 \001(\tH\000\022E\n\016analysis_state\030\003 \001" - + "(\0132-.google.cloud.asset.v1.IamPolicyAnal" - + "ysisStateB\016\n\014oneof_access\032_\n\010Identity\022\014\n" - + "\004name\030\001 \001(\t\022E\n\016analysis_state\030\002 \001(\0132-.go" - + "ogle.cloud.asset.v1.IamPolicyAnalysisSta" - + "te\0320\n\004Edge\022\023\n\013source_node\030\001 \001(\t\022\023\n\013targe" - + "t_node\030\002 \001(\t\032\365\001\n\021AccessControlList\022J\n\tre" - + "sources\030\001 \003(\01327.google.cloud.asset.v1.Ia" - + "mPolicyAnalysisResult.Resource\022G\n\010access" - + "es\030\002 \003(\01325.google.cloud.asset.v1.IamPoli" - + "cyAnalysisResult.Access\022K\n\016resource_edge" - + "s\030\003 \003(\01323.google.cloud.asset.v1.IamPolic" - + "yAnalysisResult.Edge\032\245\001\n\014IdentityList\022K\n" - + "\nidentities\030\001 \003(\01327.google.cloud.asset.v" - + "1.IamPolicyAnalysisResult.Identity\022H\n\013gr" - + "oup_edges\030\002 \003(\01323.google.cloud.asset.v1." - + "IamPolicyAnalysisResult.EdgeB\230\001\n\031com.goo" - + "gle.cloud.asset.v1B\nAssetProtoP\001Z:google" - + ".golang.org/genproto/googleapis/cloud/as" - + "set/v1;asset\370\001\001\252\002\025Google.Cloud.Asset.V1\312" - + "\002\025Google\\Cloud\\Asset\\V1b\006proto3" + + " \001(\t\022\017\n\007project\030\003 \001(\t\022\017\n\007folders\030\021 \003(\t\022\024" + + "\n\014organization\030\022 \001(\t\022\024\n\014display_name\030\004 \001" + + "(\t\022\023\n\013description\030\005 \001(\t\022\020\n\010location\030\006 \001(" + + "\t\022G\n\006labels\030\007 \003(\01327.google.cloud.asset.v" + + "1.ResourceSearchResult.LabelsEntry\022\024\n\014ne" + + "twork_tags\030\010 \003(\t\022\017\n\007kms_key\030\n \001(\t\022/\n\013cre" + + "ate_time\030\013 \001(\0132\032.google.protobuf.Timesta" + + "mp\022/\n\013update_time\030\014 \001(\0132\032.google.protobu" + + "f.Timestamp\022\r\n\005state\030\r \001(\t\0226\n\025additional" + + "_attributes\030\t \001(\0132\027.google.protobuf.Stru" + + "ct\022!\n\031parent_full_resource_name\030\023 \001(\t\022\031\n" + + "\021parent_asset_type\030g \001(\t\032-\n\013LabelsEntry\022" + + "\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\324\003\n\025IamP" + + "olicySearchResult\022\020\n\010resource\030\001 \001(\t\022\017\n\007p" + + "roject\030\002 \001(\t\022%\n\006policy\030\003 \001(\0132\025.google.ia" + + "m.v1.Policy\022M\n\013explanation\030\004 \001(\01328.googl" + + "e.cloud.asset.v1.IamPolicySearchResult.E" + + "xplanation\032\241\002\n\013Explanation\022m\n\023matched_pe" + + "rmissions\030\001 \003(\0132P.google.cloud.asset.v1." + + "IamPolicySearchResult.Explanation.Matche" + + "dPermissionsEntry\032\"\n\013Permissions\022\023\n\013perm" + + "issions\030\001 \003(\t\032\177\n\027MatchedPermissionsEntry" + + "\022\013\n\003key\030\001 \001(\t\022S\n\005value\030\002 \001(\0132D.google.cl" + + "oud.asset.v1.IamPolicySearchResult.Expla" + + "nation.Permissions:\0028\001\"G\n\026IamPolicyAnaly" + + "sisState\022\036\n\004code\030\001 \001(\0162\020.google.rpc.Code" + + "\022\r\n\005cause\030\002 \001(\t\"\306\001\n\023ConditionEvaluation\022" + + "T\n\020evaluation_value\030\001 \001(\0162:.google.cloud" + + ".asset.v1.ConditionEvaluation.Evaluation" + + "Value\"Y\n\017EvaluationValue\022 \n\034EVALUATION_V" + + "ALUE_UNSPECIFIED\020\000\022\010\n\004TRUE\020\001\022\t\n\005FALSE\020\002\022" + + "\017\n\013CONDITIONAL\020\003\"\253\t\n\027IamPolicyAnalysisRe" + + "sult\022#\n\033attached_resource_full_name\030\001 \001(" + + "\t\022+\n\013iam_binding\030\002 \001(\0132\026.google.iam.v1.B" + + "inding\022^\n\024access_control_lists\030\003 \003(\0132@.g" + + "oogle.cloud.asset.v1.IamPolicyAnalysisRe" + + "sult.AccessControlList\022R\n\ridentity_list\030" + + "\004 \001(\0132;.google.cloud.asset.v1.IamPolicyA" + + "nalysisResult.IdentityList\022\026\n\016fully_expl" + + "ored\030\005 \001(\010\032m\n\010Resource\022\032\n\022full_resource_" + + "name\030\001 \001(\t\022E\n\016analysis_state\030\002 \001(\0132-.goo" + + "gle.cloud.asset.v1.IamPolicyAnalysisStat" + + "e\032\205\001\n\006Access\022\016\n\004role\030\001 \001(\tH\000\022\024\n\npermissi" + + "on\030\002 \001(\tH\000\022E\n\016analysis_state\030\003 \001(\0132-.goo" + + "gle.cloud.asset.v1.IamPolicyAnalysisStat" + + "eB\016\n\014oneof_access\032_\n\010Identity\022\014\n\004name\030\001 " + + "\001(\t\022E\n\016analysis_state\030\002 \001(\0132-.google.clo" + + "ud.asset.v1.IamPolicyAnalysisState\0320\n\004Ed" + + "ge\022\023\n\013source_node\030\001 \001(\t\022\023\n\013target_node\030\002" + + " \001(\t\032\277\002\n\021AccessControlList\022J\n\tresources\030" + + "\001 \003(\01327.google.cloud.asset.v1.IamPolicyA" + + "nalysisResult.Resource\022G\n\010accesses\030\002 \003(\013" + + "25.google.cloud.asset.v1.IamPolicyAnalys" + + "isResult.Access\022K\n\016resource_edges\030\003 \003(\0132" + + "3.google.cloud.asset.v1.IamPolicyAnalysi" + + "sResult.Edge\022H\n\024condition_evaluation\030\004 \001" + + "(\0132*.google.cloud.asset.v1.ConditionEval" + + "uation\032\245\001\n\014IdentityList\022K\n\nidentities\030\001 " + + "\003(\01327.google.cloud.asset.v1.IamPolicyAna" + + "lysisResult.Identity\022H\n\013group_edges\030\002 \003(" + + "\01323.google.cloud.asset.v1.IamPolicyAnaly" + + "sisResult.EdgeB\230\001\n\031com.google.cloud.asse" + + "t.v1B\nAssetProtoP\001Z:google.golang.org/ge" + + "nproto/googleapis/cloud/asset/v1;asset\370\001" + + "\001\252\002\025Google.Cloud.Asset.V1\312\002\025Google\\Cloud" + + "\\Asset\\V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -284,12 +301,20 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "AssetType", "Project", + "Folders", + "Organization", "DisplayName", "Description", "Location", "Labels", "NetworkTags", + "KmsKey", + "CreateTime", + "UpdateTime", + "State", "AdditionalAttributes", + "ParentFullResourceName", + "ParentAssetType", }); internal_static_google_cloud_asset_v1_ResourceSearchResult_LabelsEntry_descriptor = internal_static_google_cloud_asset_v1_ResourceSearchResult_descriptor @@ -347,8 +372,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Code", "Cause", }); - internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor = + internal_static_google_cloud_asset_v1_ConditionEvaluation_descriptor = getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_asset_v1_ConditionEvaluation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_ConditionEvaluation_descriptor, + new java.lang.String[] { + "EvaluationValue", + }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor = + getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor, @@ -407,7 +440,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_AccessControlList_descriptor, new java.lang.String[] { - "Resources", "Accesses", "ResourceEdges", + "Resources", "Accesses", "ResourceEdges", "ConditionEvaluation", }); internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_IdentityList_descriptor = internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceProto.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceProto.java index 69ffc3204..38f2537cb 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceProto.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceProto.java @@ -35,6 +35,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_asset_v1_ExportAssetsResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_asset_v1_ExportAssetsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_ListAssetsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_ListAssetsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_ListAssetsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_ListAssetsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -139,6 +147,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -188,200 +200,218 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "t/v1/assets.proto\032#google/longrunning/op" + "erations.proto\032\036google/protobuf/duration" + ".proto\032\033google/protobuf/empty.proto\032 goo" - + "gle/protobuf/field_mask.proto\032\037google/pr" - + "otobuf/timestamp.proto\032\026google/type/expr" - + ".proto\"\215\002\n\023ExportAssetsRequest\0227\n\006parent" - + "\030\001 \001(\tB\'\340A\002\372A!\022\037cloudasset.googleapis.co" - + "m/Asset\022-\n\tread_time\030\002 \001(\0132\032.google.prot" - + "obuf.Timestamp\022\023\n\013asset_types\030\003 \003(\t\0228\n\014c" - + "ontent_type\030\004 \001(\0162\".google.cloud.asset.v" - + "1.ContentType\022?\n\routput_config\030\005 \001(\0132#.g" - + "oogle.cloud.asset.v1.OutputConfigB\003\340A\002\"\275" - + "\001\n\024ExportAssetsResponse\022-\n\tread_time\030\001 \001" - + "(\0132\032.google.protobuf.Timestamp\022:\n\routput" - + "_config\030\002 \001(\0132#.google.cloud.asset.v1.Ou" - + "tputConfig\022:\n\routput_result\030\003 \001(\0132#.goog" - + "le.cloud.asset.v1.OutputResult\"\355\001\n\034Batch" - + "GetAssetsHistoryRequest\0227\n\006parent\030\001 \001(\tB" - + "\'\340A\002\372A!\022\037cloudasset.googleapis.com/Asset" - + "\022\023\n\013asset_names\030\002 \003(\t\022=\n\014content_type\030\003 " - + "\001(\0162\".google.cloud.asset.v1.ContentTypeB" - + "\003\340A\001\022@\n\020read_time_window\030\004 \001(\0132!.google." - + "cloud.asset.v1.TimeWindowB\003\340A\001\"U\n\035BatchG" - + "etAssetsHistoryResponse\0224\n\006assets\030\001 \003(\0132" - + "$.google.cloud.asset.v1.TemporalAsset\"n\n" - + "\021CreateFeedRequest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022" - + "\024\n\007feed_id\030\002 \001(\tB\003\340A\002\022.\n\004feed\030\003 \001(\0132\033.go" - + "ogle.cloud.asset.v1.FeedB\003\340A\002\"F\n\016GetFeed" - + "Request\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036cloudasse" - + "t.googleapis.com/Feed\"\'\n\020ListFeedsReques" - + "t\022\023\n\006parent\030\001 \001(\tB\003\340A\002\"?\n\021ListFeedsRespo" - + "nse\022*\n\005feeds\030\001 \003(\0132\033.google.cloud.asset." - + "v1.Feed\"y\n\021UpdateFeedRequest\022.\n\004feed\030\001 \001" - + "(\0132\033.google.cloud.asset.v1.FeedB\003\340A\002\0224\n\013" - + "update_mask\030\002 \001(\0132\032.google.protobuf.Fiel" - + "dMaskB\003\340A\002\"I\n\021DeleteFeedRequest\0224\n\004name\030" - + "\001 \001(\tB&\340A\002\372A \n\036cloudasset.googleapis.com" - + "/Feed\"\253\001\n\014OutputConfig\022@\n\017gcs_destinatio" - + "n\030\001 \001(\0132%.google.cloud.asset.v1.GcsDesti" - + "nationH\000\022J\n\024bigquery_destination\030\002 \001(\0132*" - + ".google.cloud.asset.v1.BigQueryDestinati" - + "onH\000B\r\n\013destination\"V\n\014OutputResult\022<\n\ng" - + "cs_result\030\001 \001(\0132&.google.cloud.asset.v1." - + "GcsOutputResultH\000B\010\n\006result\"\037\n\017GcsOutput" - + "Result\022\014\n\004uris\030\001 \003(\t\"C\n\016GcsDestination\022\r" - + "\n\003uri\030\001 \001(\tH\000\022\024\n\nuri_prefix\030\002 \001(\tH\000B\014\n\no" - + "bject_uri\"\264\001\n\023BigQueryDestination\022\024\n\007dat" - + "aset\030\001 \001(\tB\003\340A\002\022\022\n\005table\030\002 \001(\tB\003\340A\002\022\r\n\005f" - + "orce\030\003 \001(\010\022<\n\016partition_spec\030\004 \001(\0132$.goo" - + "gle.cloud.asset.v1.PartitionSpec\022&\n\036sepa" - + "rate_tables_per_asset_type\030\005 \001(\010\"\251\001\n\rPar" - + "titionSpec\022H\n\rpartition_key\030\001 \001(\01621.goog" - + "le.cloud.asset.v1.PartitionSpec.Partitio" - + "nKey\"N\n\014PartitionKey\022\035\n\031PARTITION_KEY_UN" - + "SPECIFIED\020\000\022\r\n\tREAD_TIME\020\001\022\020\n\014REQUEST_TI" - + "ME\020\002\"\"\n\021PubsubDestination\022\r\n\005topic\030\001 \001(\t" - + "\"i\n\020FeedOutputConfig\022F\n\022pubsub_destinati" - + "on\030\001 \001(\0132(.google.cloud.asset.v1.PubsubD" - + "estinationH\000B\r\n\013destination\"\201\003\n\004Feed\022\021\n\004" - + "name\030\001 \001(\tB\003\340A\002\022\023\n\013asset_names\030\002 \003(\t\022\023\n\013" - + "asset_types\030\003 \003(\t\0228\n\014content_type\030\004 \001(\0162" - + "\".google.cloud.asset.v1.ContentType\022H\n\022f" - + "eed_output_config\030\005 \001(\0132\'.google.cloud.a" - + "sset.v1.FeedOutputConfigB\003\340A\002\022$\n\tconditi" - + "on\030\006 \001(\0132\021.google.type.Expr:\221\001\352A\215\001\n\036clou" - + "dasset.googleapis.com/Feed\022\037projects/{pr" - + "oject}/feeds/{feed}\022\035folders/{folder}/fe" - + "eds/{feed}\022)organizations/{organization}" - + "/feeds/{feed} \001\"\245\001\n\031SearchAllResourcesRe" - + "quest\022\022\n\005scope\030\001 \001(\tB\003\340A\002\022\022\n\005query\030\002 \001(\t" - + "B\003\340A\001\022\030\n\013asset_types\030\003 \003(\tB\003\340A\001\022\026\n\tpage_" - + "size\030\004 \001(\005B\003\340A\001\022\027\n\npage_token\030\005 \001(\tB\003\340A\001" - + "\022\025\n\010order_by\030\006 \001(\tB\003\340A\001\"s\n\032SearchAllReso" - + "urcesResponse\022<\n\007results\030\001 \003(\0132+.google." - + "cloud.asset.v1.ResourceSearchResult\022\027\n\017n" - + "ext_page_token\030\002 \001(\t\"v\n\033SearchAllIamPoli" - + "ciesRequest\022\022\n\005scope\030\001 \001(\tB\003\340A\002\022\022\n\005query" - + "\030\002 \001(\tB\003\340A\001\022\026\n\tpage_size\030\003 \001(\005B\003\340A\001\022\027\n\np" - + "age_token\030\004 \001(\tB\003\340A\001\"v\n\034SearchAllIamPoli" - + "ciesResponse\022=\n\007results\030\001 \003(\0132,.google.c" - + "loud.asset.v1.IamPolicySearchResult\022\027\n\017n" - + "ext_page_token\030\002 \001(\t\"\220\006\n\026IamPolicyAnalys" - + "isQuery\022\022\n\005scope\030\001 \001(\tB\003\340A\002\022^\n\021resource_" - + "selector\030\002 \001(\0132>.google.cloud.asset.v1.I" - + "amPolicyAnalysisQuery.ResourceSelectorB\003" - + "\340A\001\022^\n\021identity_selector\030\003 \001(\0132>.google." - + "cloud.asset.v1.IamPolicyAnalysisQuery.Id" - + "entitySelectorB\003\340A\001\022Z\n\017access_selector\030\004" - + " \001(\0132<.google.cloud.asset.v1.IamPolicyAn" - + "alysisQuery.AccessSelectorB\003\340A\001\022K\n\007optio" - + "ns\030\005 \001(\01325.google.cloud.asset.v1.IamPoli" - + "cyAnalysisQuery.OptionsB\003\340A\001\0323\n\020Resource" - + "Selector\022\037\n\022full_resource_name\030\001 \001(\tB\003\340A" - + "\002\032)\n\020IdentitySelector\022\025\n\010identity\030\001 \001(\tB" - + "\003\340A\002\032>\n\016AccessSelector\022\022\n\005roles\030\001 \003(\tB\003\340" - + "A\001\022\030\n\013permissions\030\002 \003(\tB\003\340A\001\032\330\001\n\007Options" - + "\022\032\n\rexpand_groups\030\001 \001(\010B\003\340A\001\022\031\n\014expand_r" - + "oles\030\002 \001(\010B\003\340A\001\022\035\n\020expand_resources\030\003 \001(" - + "\010B\003\340A\001\022\"\n\025output_resource_edges\030\004 \001(\010B\003\340" - + "A\001\022\037\n\022output_group_edges\030\005 \001(\010B\003\340A\001\0222\n%a" - + "nalyze_service_account_impersonation\030\006 \001" - + "(\010B\003\340A\001\"\240\001\n\027AnalyzeIamPolicyRequest\022J\n\016a" - + "nalysis_query\030\001 \001(\0132-.google.cloud.asset" - + ".v1.IamPolicyAnalysisQueryB\003\340A\002\0229\n\021execu" - + "tion_timeout\030\002 \001(\0132\031.google.protobuf.Dur" - + "ationB\003\340A\001\"\212\004\n\030AnalyzeIamPolicyResponse\022" - + "X\n\rmain_analysis\030\001 \001(\0132A.google.cloud.as" - + "set.v1.AnalyzeIamPolicyResponse.IamPolic" - + "yAnalysis\022q\n&service_account_impersonati" - + "on_analysis\030\002 \003(\0132A.google.cloud.asset.v" - + "1.AnalyzeIamPolicyResponse.IamPolicyAnal" - + "ysis\022\026\n\016fully_explored\030\003 \001(\010\032\210\002\n\021IamPoli" - + "cyAnalysis\022E\n\016analysis_query\030\001 \001(\0132-.goo" - + "gle.cloud.asset.v1.IamPolicyAnalysisQuer" - + "y\022H\n\020analysis_results\030\002 \003(\0132..google.clo" - + "ud.asset.v1.IamPolicyAnalysisResult\022\026\n\016f" - + "ully_explored\030\003 \001(\010\022J\n\023non_critical_erro" - + "rs\030\005 \003(\0132-.google.cloud.asset.v1.IamPoli" - + "cyAnalysisState\"\264\004\n\035IamPolicyAnalysisOut" - + "putConfig\022^\n\017gcs_destination\030\001 \001(\0132C.goo" - + "gle.cloud.asset.v1.IamPolicyAnalysisOutp" - + "utConfig.GcsDestinationH\000\022h\n\024bigquery_de" - + "stination\030\002 \001(\0132H.google.cloud.asset.v1." - + "IamPolicyAnalysisOutputConfig.BigQueryDe" - + "stinationH\000\032\"\n\016GcsDestination\022\020\n\003uri\030\001 \001" - + "(\tB\003\340A\002\032\225\002\n\023BigQueryDestination\022\024\n\007datas" - + "et\030\001 \001(\tB\003\340A\002\022\031\n\014table_prefix\030\002 \001(\tB\003\340A\002" - + "\022l\n\rpartition_key\030\003 \001(\0162U.google.cloud.a" - + "sset.v1.IamPolicyAnalysisOutputConfig.Bi" - + "gQueryDestination.PartitionKey\022\036\n\021write_" - + "disposition\030\004 \001(\tB\003\340A\001\"?\n\014PartitionKey\022\035" - + "\n\031PARTITION_KEY_UNSPECIFIED\020\000\022\020\n\014REQUEST" - + "_TIME\020\001B\r\n\013destination\"\302\001\n\"AnalyzeIamPol" - + "icyLongrunningRequest\022J\n\016analysis_query\030" - + "\001 \001(\0132-.google.cloud.asset.v1.IamPolicyA" - + "nalysisQueryB\003\340A\002\022P\n\routput_config\030\002 \001(\013" - + "24.google.cloud.asset.v1.IamPolicyAnalys" - + "isOutputConfigB\003\340A\002\"%\n#AnalyzeIamPolicyL" - + "ongrunningResponse*~\n\013ContentType\022\034\n\030CON" - + "TENT_TYPE_UNSPECIFIED\020\000\022\014\n\010RESOURCE\020\001\022\016\n" - + "\nIAM_POLICY\020\002\022\016\n\nORG_POLICY\020\004\022\021\n\rACCESS_" - + "POLICY\020\005\022\020\n\014OS_INVENTORY\020\0062\331\017\n\014AssetServ" - + "ice\022\336\001\n\014ExportAssets\022*.google.cloud.asse" - + "t.v1.ExportAssetsRequest\032\035.google.longru" - + "nning.Operation\"\202\001\202\323\344\223\002\"\"\035/v1/{parent=*/" - + "*}:exportAssets:\001*\312AW\n*google.cloud.asse" - + "t.v1.ExportAssetsResponse\022)google.cloud." - + "asset.v1.ExportAssetsRequest\022\262\001\n\025BatchGe" - + "tAssetsHistory\0223.google.cloud.asset.v1.B" - + "atchGetAssetsHistoryRequest\0324.google.clo" - + "ud.asset.v1.BatchGetAssetsHistoryRespons" - + "e\".\202\323\344\223\002(\022&/v1/{parent=*/*}:batchGetAsse" - + "tsHistory\022\177\n\nCreateFeed\022(.google.cloud.a" - + "sset.v1.CreateFeedRequest\032\033.google.cloud" - + ".asset.v1.Feed\"*\202\323\344\223\002\033\"\026/v1/{parent=*/*}" - + "/feeds:\001*\332A\006parent\022t\n\007GetFeed\022%.google.c" - + "loud.asset.v1.GetFeedRequest\032\033.google.cl" - + "oud.asset.v1.Feed\"%\202\323\344\223\002\030\022\026/v1/{name=*/*" - + "/feeds/*}\332A\004name\022\207\001\n\tListFeeds\022\'.google." - + "cloud.asset.v1.ListFeedsRequest\032(.google" - + ".cloud.asset.v1.ListFeedsResponse\"\'\202\323\344\223\002" - + "\030\022\026/v1/{parent=*/*}/feeds\332A\006parent\022\202\001\n\nU" - + "pdateFeed\022(.google.cloud.asset.v1.Update" - + "FeedRequest\032\033.google.cloud.asset.v1.Feed" - + "\"-\202\323\344\223\002 2\033/v1/{feed.name=*/*/feeds/*}:\001*" - + "\332A\004feed\022u\n\nDeleteFeed\022(.google.cloud.ass" - + "et.v1.DeleteFeedRequest\032\026.google.protobu" - + "f.Empty\"%\202\323\344\223\002\030*\026/v1/{name=*/*/feeds/*}\332" - + "A\004name\022\277\001\n\022SearchAllResources\0220.google.c" - + "loud.asset.v1.SearchAllResourcesRequest\032" - + "1.google.cloud.asset.v1.SearchAllResourc" - + "esResponse\"D\202\323\344\223\002$\022\"/v1/{scope=*/*}:sear" - + "chAllResources\332A\027scope,query,asset_types" - + "\022\273\001\n\024SearchAllIamPolicies\0222.google.cloud" - + ".asset.v1.SearchAllIamPoliciesRequest\0323." - + "google.cloud.asset.v1.SearchAllIamPolici" - + "esResponse\":\202\323\344\223\002&\022$/v1/{scope=*/*}:sear" - + "chAllIamPolicies\332A\013scope,query\022\254\001\n\020Analy" - + "zeIamPolicy\022..google.cloud.asset.v1.Anal" - + "yzeIamPolicyRequest\032/.google.cloud.asset" - + ".v1.AnalyzeIamPolicyResponse\"7\202\323\344\223\0021\022//v" - + "1/{analysis_query.scope=*/*}:analyzeIamP" - + "olicy\022\267\002\n\033AnalyzeIamPolicyLongrunning\0229." - + "google.cloud.asset.v1.AnalyzeIamPolicyLo" - + "ngrunningRequest\032\035.google.longrunning.Op" - + "eration\"\275\001\202\323\344\223\002?\":/v1/{analysis_query.sc" - + "ope=*/*}:analyzeIamPolicyLongrunning:\001*\312" - + "Au\n9google.cloud.asset.v1.AnalyzeIamPoli" - + "cyLongrunningResponse\0228google.cloud.asse" - + "t.v1.AnalyzeIamPolicyLongrunningRequest\032" - + "M\312A\031cloudasset.googleapis.com\322A.https://" - + "www.googleapis.com/auth/cloud-platformB\234" - + "\001\n\031com.google.cloud.asset.v1B\021AssetServi" - + "ceProtoP\001Z:google.golang.org/genproto/go" - + "ogleapis/cloud/asset/v1;asset\252\002\025Google.C" - + "loud.Asset.V1\312\002\025Google\\Cloud\\Asset\\V1b\006p" - + "roto3" + + "gle/protobuf/field_mask.proto\032\034google/pr" + + "otobuf/struct.proto\032\037google/protobuf/tim" + + "estamp.proto\032\026google/type/expr.proto\"\215\002\n" + + "\023ExportAssetsRequest\0227\n\006parent\030\001 \001(\tB\'\340A" + + "\002\372A!\022\037cloudasset.googleapis.com/Asset\022-\n" + + "\tread_time\030\002 \001(\0132\032.google.protobuf.Times" + + "tamp\022\023\n\013asset_types\030\003 \003(\t\0228\n\014content_typ" + + "e\030\004 \001(\0162\".google.cloud.asset.v1.ContentT" + + "ype\022?\n\routput_config\030\005 \001(\0132#.google.clou" + + "d.asset.v1.OutputConfigB\003\340A\002\"\275\001\n\024ExportA" + + "ssetsResponse\022-\n\tread_time\030\001 \001(\0132\032.googl" + + "e.protobuf.Timestamp\022:\n\routput_config\030\002 " + + "\001(\0132#.google.cloud.asset.v1.OutputConfig" + + "\022:\n\routput_result\030\003 \001(\0132#.google.cloud.a" + + "sset.v1.OutputResult\"\361\001\n\021ListAssetsReque" + + "st\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037cloudasset.g" + + "oogleapis.com/Asset\022-\n\tread_time\030\002 \001(\0132\032" + + ".google.protobuf.Timestamp\022\023\n\013asset_type" + + "s\030\003 \003(\t\0228\n\014content_type\030\004 \001(\0162\".google.c" + + "loud.asset.v1.ContentType\022\021\n\tpage_size\030\005" + + " \001(\005\022\022\n\npage_token\030\006 \001(\t\"\212\001\n\022ListAssetsR" + + "esponse\022-\n\tread_time\030\001 \001(\0132\032.google.prot" + + "obuf.Timestamp\022,\n\006assets\030\002 \003(\0132\034.google." + + "cloud.asset.v1.Asset\022\027\n\017next_page_token\030" + + "\003 \001(\t\"\355\001\n\034BatchGetAssetsHistoryRequest\0227" + + "\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037cloudasset.googl" + + "eapis.com/Asset\022\023\n\013asset_names\030\002 \003(\t\022=\n\014" + + "content_type\030\003 \001(\0162\".google.cloud.asset." + + "v1.ContentTypeB\003\340A\001\022@\n\020read_time_window\030" + + "\004 \001(\0132!.google.cloud.asset.v1.TimeWindow" + + "B\003\340A\001\"U\n\035BatchGetAssetsHistoryResponse\0224" + + "\n\006assets\030\001 \003(\0132$.google.cloud.asset.v1.T" + + "emporalAsset\"n\n\021CreateFeedRequest\022\023\n\006par" + + "ent\030\001 \001(\tB\003\340A\002\022\024\n\007feed_id\030\002 \001(\tB\003\340A\002\022.\n\004" + + "feed\030\003 \001(\0132\033.google.cloud.asset.v1.FeedB" + + "\003\340A\002\"F\n\016GetFeedRequest\0224\n\004name\030\001 \001(\tB&\340A" + + "\002\372A \n\036cloudasset.googleapis.com/Feed\"\'\n\020" + + "ListFeedsRequest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\"?\n" + + "\021ListFeedsResponse\022*\n\005feeds\030\001 \003(\0132\033.goog" + + "le.cloud.asset.v1.Feed\"y\n\021UpdateFeedRequ" + + "est\022.\n\004feed\030\001 \001(\0132\033.google.cloud.asset.v" + + "1.FeedB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.googl" + + "e.protobuf.FieldMaskB\003\340A\002\"I\n\021DeleteFeedR" + + "equest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036cloudasset" + + ".googleapis.com/Feed\"\253\001\n\014OutputConfig\022@\n" + + "\017gcs_destination\030\001 \001(\0132%.google.cloud.as" + + "set.v1.GcsDestinationH\000\022J\n\024bigquery_dest" + + "ination\030\002 \001(\0132*.google.cloud.asset.v1.Bi" + + "gQueryDestinationH\000B\r\n\013destination\"V\n\014Ou" + + "tputResult\022<\n\ngcs_result\030\001 \001(\0132&.google." + + "cloud.asset.v1.GcsOutputResultH\000B\010\n\006resu" + + "lt\"\037\n\017GcsOutputResult\022\014\n\004uris\030\001 \003(\t\"C\n\016G" + + "csDestination\022\r\n\003uri\030\001 \001(\tH\000\022\024\n\nuri_pref" + + "ix\030\002 \001(\tH\000B\014\n\nobject_uri\"\264\001\n\023BigQueryDes" + + "tination\022\024\n\007dataset\030\001 \001(\tB\003\340A\002\022\022\n\005table\030" + + "\002 \001(\tB\003\340A\002\022\r\n\005force\030\003 \001(\010\022<\n\016partition_s" + + "pec\030\004 \001(\0132$.google.cloud.asset.v1.Partit" + + "ionSpec\022&\n\036separate_tables_per_asset_typ" + + "e\030\005 \001(\010\"\251\001\n\rPartitionSpec\022H\n\rpartition_k" + + "ey\030\001 \001(\01621.google.cloud.asset.v1.Partiti" + + "onSpec.PartitionKey\"N\n\014PartitionKey\022\035\n\031P" + + "ARTITION_KEY_UNSPECIFIED\020\000\022\r\n\tREAD_TIME\020" + + "\001\022\020\n\014REQUEST_TIME\020\002\"\"\n\021PubsubDestination" + + "\022\r\n\005topic\030\001 \001(\t\"i\n\020FeedOutputConfig\022F\n\022p" + + "ubsub_destination\030\001 \001(\0132(.google.cloud.a" + + "sset.v1.PubsubDestinationH\000B\r\n\013destinati" + + "on\"\201\003\n\004Feed\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\023\n\013asset_" + + "names\030\002 \003(\t\022\023\n\013asset_types\030\003 \003(\t\0228\n\014cont" + + "ent_type\030\004 \001(\0162\".google.cloud.asset.v1.C" + + "ontentType\022H\n\022feed_output_config\030\005 \001(\0132\'" + + ".google.cloud.asset.v1.FeedOutputConfigB" + + "\003\340A\002\022$\n\tcondition\030\006 \001(\0132\021.google.type.Ex" + + "pr:\221\001\352A\215\001\n\036cloudasset.googleapis.com/Fee" + + "d\022\037projects/{project}/feeds/{feed}\022\035fold" + + "ers/{folder}/feeds/{feed}\022)organizations" + + "/{organization}/feeds/{feed} \001\"\245\001\n\031Searc" + + "hAllResourcesRequest\022\022\n\005scope\030\001 \001(\tB\003\340A\002" + + "\022\022\n\005query\030\002 \001(\tB\003\340A\001\022\030\n\013asset_types\030\003 \003(" + + "\tB\003\340A\001\022\026\n\tpage_size\030\004 \001(\005B\003\340A\001\022\027\n\npage_t" + + "oken\030\005 \001(\tB\003\340A\001\022\025\n\010order_by\030\006 \001(\tB\003\340A\001\"s" + + "\n\032SearchAllResourcesResponse\022<\n\007results\030" + + "\001 \003(\0132+.google.cloud.asset.v1.ResourceSe" + + "archResult\022\027\n\017next_page_token\030\002 \001(\t\"v\n\033S" + + "earchAllIamPoliciesRequest\022\022\n\005scope\030\001 \001(" + + "\tB\003\340A\002\022\022\n\005query\030\002 \001(\tB\003\340A\001\022\026\n\tpage_size\030" + + "\003 \001(\005B\003\340A\001\022\027\n\npage_token\030\004 \001(\tB\003\340A\001\"v\n\034S" + + "earchAllIamPoliciesResponse\022=\n\007results\030\001" + + " \003(\0132,.google.cloud.asset.v1.IamPolicySe" + + "archResult\022\027\n\017next_page_token\030\002 \001(\t\"\306\007\n\026" + + "IamPolicyAnalysisQuery\022\022\n\005scope\030\001 \001(\tB\003\340" + + "A\002\022^\n\021resource_selector\030\002 \001(\0132>.google.c" + + "loud.asset.v1.IamPolicyAnalysisQuery.Res" + + "ourceSelectorB\003\340A\001\022^\n\021identity_selector\030" + + "\003 \001(\0132>.google.cloud.asset.v1.IamPolicyA" + + "nalysisQuery.IdentitySelectorB\003\340A\001\022Z\n\017ac" + + "cess_selector\030\004 \001(\0132<.google.cloud.asset" + + ".v1.IamPolicyAnalysisQuery.AccessSelecto" + + "rB\003\340A\001\022K\n\007options\030\005 \001(\01325.google.cloud.a" + + "sset.v1.IamPolicyAnalysisQuery.OptionsB\003" + + "\340A\001\022^\n\021condition_context\030\006 \001(\0132>.google." + + "cloud.asset.v1.IamPolicyAnalysisQuery.Co" + + "nditionContextB\003\340A\001\0323\n\020ResourceSelector\022" + + "\037\n\022full_resource_name\030\001 \001(\tB\003\340A\002\032)\n\020Iden" + + "titySelector\022\025\n\010identity\030\001 \001(\tB\003\340A\002\032>\n\016A" + + "ccessSelector\022\022\n\005roles\030\001 \003(\tB\003\340A\001\022\030\n\013per" + + "missions\030\002 \003(\tB\003\340A\001\032\330\001\n\007Options\022\032\n\rexpan" + + "d_groups\030\001 \001(\010B\003\340A\001\022\031\n\014expand_roles\030\002 \001(" + + "\010B\003\340A\001\022\035\n\020expand_resources\030\003 \001(\010B\003\340A\001\022\"\n" + + "\025output_resource_edges\030\004 \001(\010B\003\340A\001\022\037\n\022out" + + "put_group_edges\030\005 \001(\010B\003\340A\001\0222\n%analyze_se" + + "rvice_account_impersonation\030\006 \001(\010B\003\340A\001\032T" + + "\n\020ConditionContext\0221\n\013access_time\030\001 \001(\0132" + + "\032.google.protobuf.TimestampH\000B\r\n\013TimeCon" + + "text\"\240\001\n\027AnalyzeIamPolicyRequest\022J\n\016anal" + + "ysis_query\030\001 \001(\0132-.google.cloud.asset.v1" + + ".IamPolicyAnalysisQueryB\003\340A\002\0229\n\021executio" + + "n_timeout\030\002 \001(\0132\031.google.protobuf.Durati" + + "onB\003\340A\001\"\212\004\n\030AnalyzeIamPolicyResponse\022X\n\r" + + "main_analysis\030\001 \001(\0132A.google.cloud.asset" + + ".v1.AnalyzeIamPolicyResponse.IamPolicyAn" + + "alysis\022q\n&service_account_impersonation_" + + "analysis\030\002 \003(\0132A.google.cloud.asset.v1.A" + + "nalyzeIamPolicyResponse.IamPolicyAnalysi" + + "s\022\026\n\016fully_explored\030\003 \001(\010\032\210\002\n\021IamPolicyA" + + "nalysis\022E\n\016analysis_query\030\001 \001(\0132-.google" + + ".cloud.asset.v1.IamPolicyAnalysisQuery\022H" + + "\n\020analysis_results\030\002 \003(\0132..google.cloud." + + "asset.v1.IamPolicyAnalysisResult\022\026\n\016full" + + "y_explored\030\003 \001(\010\022J\n\023non_critical_errors\030" + + "\005 \003(\0132-.google.cloud.asset.v1.IamPolicyA" + + "nalysisState\"\264\004\n\035IamPolicyAnalysisOutput" + + "Config\022^\n\017gcs_destination\030\001 \001(\0132C.google" + + ".cloud.asset.v1.IamPolicyAnalysisOutputC" + + "onfig.GcsDestinationH\000\022h\n\024bigquery_desti" + + "nation\030\002 \001(\0132H.google.cloud.asset.v1.Iam" + + "PolicyAnalysisOutputConfig.BigQueryDesti" + + "nationH\000\032\"\n\016GcsDestination\022\020\n\003uri\030\001 \001(\tB" + + "\003\340A\002\032\225\002\n\023BigQueryDestination\022\024\n\007dataset\030" + + "\001 \001(\tB\003\340A\002\022\031\n\014table_prefix\030\002 \001(\tB\003\340A\002\022l\n" + + "\rpartition_key\030\003 \001(\0162U.google.cloud.asse" + + "t.v1.IamPolicyAnalysisOutputConfig.BigQu" + + "eryDestination.PartitionKey\022\036\n\021write_dis" + + "position\030\004 \001(\tB\003\340A\001\"?\n\014PartitionKey\022\035\n\031P" + + "ARTITION_KEY_UNSPECIFIED\020\000\022\020\n\014REQUEST_TI" + + "ME\020\001B\r\n\013destination\"\302\001\n\"AnalyzeIamPolicy" + + "LongrunningRequest\022J\n\016analysis_query\030\001 \001" + + "(\0132-.google.cloud.asset.v1.IamPolicyAnal" + + "ysisQueryB\003\340A\002\022P\n\routput_config\030\002 \001(\01324." + + "google.cloud.asset.v1.IamPolicyAnalysisO" + + "utputConfigB\003\340A\002\"%\n#AnalyzeIamPolicyLong" + + "runningResponse*~\n\013ContentType\022\034\n\030CONTEN" + + "T_TYPE_UNSPECIFIED\020\000\022\014\n\010RESOURCE\020\001\022\016\n\nIA" + + "M_POLICY\020\002\022\016\n\nORG_POLICY\020\004\022\021\n\rACCESS_POL" + + "ICY\020\005\022\020\n\014OS_INVENTORY\020\0062\347\020\n\014AssetService" + + "\022\336\001\n\014ExportAssets\022*.google.cloud.asset.v" + + "1.ExportAssetsRequest\032\035.google.longrunni" + + "ng.Operation\"\202\001\202\323\344\223\002\"\"\035/v1/{parent=*/*}:" + + "exportAssets:\001*\312AW\n*google.cloud.asset.v" + + "1.ExportAssetsResponse\022)google.cloud.ass" + + "et.v1.ExportAssetsRequest\022\213\001\n\nListAssets" + + "\022(.google.cloud.asset.v1.ListAssetsReque" + + "st\032).google.cloud.asset.v1.ListAssetsRes" + + "ponse\"(\202\323\344\223\002\031\022\027/v1/{parent=*/*}/assets\332A" + + "\006parent\022\262\001\n\025BatchGetAssetsHistory\0223.goog" + + "le.cloud.asset.v1.BatchGetAssetsHistoryR" + + "equest\0324.google.cloud.asset.v1.BatchGetA" + + "ssetsHistoryResponse\".\202\323\344\223\002(\022&/v1/{paren" + + "t=*/*}:batchGetAssetsHistory\022\177\n\nCreateFe" + + "ed\022(.google.cloud.asset.v1.CreateFeedReq" + + "uest\032\033.google.cloud.asset.v1.Feed\"*\202\323\344\223\002" + + "\033\"\026/v1/{parent=*/*}/feeds:\001*\332A\006parent\022t\n" + + "\007GetFeed\022%.google.cloud.asset.v1.GetFeed" + + "Request\032\033.google.cloud.asset.v1.Feed\"%\202\323" + + "\344\223\002\030\022\026/v1/{name=*/*/feeds/*}\332A\004name\022\207\001\n\t" + + "ListFeeds\022\'.google.cloud.asset.v1.ListFe" + + "edsRequest\032(.google.cloud.asset.v1.ListF" + + "eedsResponse\"\'\202\323\344\223\002\030\022\026/v1/{parent=*/*}/f" + + "eeds\332A\006parent\022\202\001\n\nUpdateFeed\022(.google.cl" + + "oud.asset.v1.UpdateFeedRequest\032\033.google." + + "cloud.asset.v1.Feed\"-\202\323\344\223\002 2\033/v1/{feed.n" + + "ame=*/*/feeds/*}:\001*\332A\004feed\022u\n\nDeleteFeed" + + "\022(.google.cloud.asset.v1.DeleteFeedReque" + + "st\032\026.google.protobuf.Empty\"%\202\323\344\223\002\030*\026/v1/" + + "{name=*/*/feeds/*}\332A\004name\022\277\001\n\022SearchAllR" + + "esources\0220.google.cloud.asset.v1.SearchA" + + "llResourcesRequest\0321.google.cloud.asset." + + "v1.SearchAllResourcesResponse\"D\202\323\344\223\002$\022\"/" + + "v1/{scope=*/*}:searchAllResources\332A\027scop" + + "e,query,asset_types\022\273\001\n\024SearchAllIamPoli" + + "cies\0222.google.cloud.asset.v1.SearchAllIa" + + "mPoliciesRequest\0323.google.cloud.asset.v1" + + ".SearchAllIamPoliciesResponse\":\202\323\344\223\002&\022$/" + + "v1/{scope=*/*}:searchAllIamPolicies\332A\013sc" + + "ope,query\022\254\001\n\020AnalyzeIamPolicy\022..google." + + "cloud.asset.v1.AnalyzeIamPolicyRequest\032/" + + ".google.cloud.asset.v1.AnalyzeIamPolicyR" + + "esponse\"7\202\323\344\223\0021\022//v1/{analysis_query.sco" + + "pe=*/*}:analyzeIamPolicy\022\267\002\n\033AnalyzeIamP" + + "olicyLongrunning\0229.google.cloud.asset.v1" + + ".AnalyzeIamPolicyLongrunningRequest\032\035.go" + + "ogle.longrunning.Operation\"\275\001\202\323\344\223\002?\":/v1" + + "/{analysis_query.scope=*/*}:analyzeIamPo" + + "licyLongrunning:\001*\312Au\n9google.cloud.asse" + + "t.v1.AnalyzeIamPolicyLongrunningResponse" + + "\0228google.cloud.asset.v1.AnalyzeIamPolicy" + + "LongrunningRequest\032M\312A\031cloudasset.google" + + "apis.com\322A.https://www.googleapis.com/au" + + "th/cloud-platformB\234\001\n\031com.google.cloud.a" + + "sset.v1B\021AssetServiceProtoP\001Z:google.gol" + + "ang.org/genproto/googleapis/cloud/asset/" + + "v1;asset\252\002\025Google.Cloud.Asset.V1\312\002\025Googl" + + "e\\Cloud\\Asset\\V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -396,6 +426,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.EmptyProto.getDescriptor(), com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.StructProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), com.google.type.ExprProto.getDescriptor(), }); @@ -415,8 +446,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "ReadTime", "OutputConfig", "OutputResult", }); - internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryRequest_descriptor = + internal_static_google_cloud_asset_v1_ListAssetsRequest_descriptor = getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_asset_v1_ListAssetsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_ListAssetsRequest_descriptor, + new java.lang.String[] { + "Parent", "ReadTime", "AssetTypes", "ContentType", "PageSize", "PageToken", + }); + internal_static_google_cloud_asset_v1_ListAssetsResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_asset_v1_ListAssetsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_ListAssetsResponse_descriptor, + new java.lang.String[] { + "ReadTime", "Assets", "NextPageToken", + }); + internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryRequest_descriptor = + getDescriptor().getMessageTypes().get(4); internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryRequest_descriptor, @@ -424,7 +471,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "AssetNames", "ContentType", "ReadTimeWindow", }); internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryResponse_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(5); internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryResponse_descriptor, @@ -432,7 +479,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Assets", }); internal_static_google_cloud_asset_v1_CreateFeedRequest_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(6); internal_static_google_cloud_asset_v1_CreateFeedRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_CreateFeedRequest_descriptor, @@ -440,7 +487,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "FeedId", "Feed", }); internal_static_google_cloud_asset_v1_GetFeedRequest_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(7); internal_static_google_cloud_asset_v1_GetFeedRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_GetFeedRequest_descriptor, @@ -448,7 +495,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_asset_v1_ListFeedsRequest_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_asset_v1_ListFeedsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_ListFeedsRequest_descriptor, @@ -456,7 +503,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", }); internal_static_google_cloud_asset_v1_ListFeedsResponse_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(9); internal_static_google_cloud_asset_v1_ListFeedsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_ListFeedsResponse_descriptor, @@ -464,7 +511,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Feeds", }); internal_static_google_cloud_asset_v1_UpdateFeedRequest_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(10); internal_static_google_cloud_asset_v1_UpdateFeedRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_UpdateFeedRequest_descriptor, @@ -472,7 +519,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Feed", "UpdateMask", }); internal_static_google_cloud_asset_v1_DeleteFeedRequest_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(11); internal_static_google_cloud_asset_v1_DeleteFeedRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_DeleteFeedRequest_descriptor, @@ -480,7 +527,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_asset_v1_OutputConfig_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(12); internal_static_google_cloud_asset_v1_OutputConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_OutputConfig_descriptor, @@ -488,7 +535,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "GcsDestination", "BigqueryDestination", "Destination", }); internal_static_google_cloud_asset_v1_OutputResult_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(13); internal_static_google_cloud_asset_v1_OutputResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_OutputResult_descriptor, @@ -496,7 +543,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "GcsResult", "Result", }); internal_static_google_cloud_asset_v1_GcsOutputResult_descriptor = - getDescriptor().getMessageTypes().get(12); + getDescriptor().getMessageTypes().get(14); internal_static_google_cloud_asset_v1_GcsOutputResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_GcsOutputResult_descriptor, @@ -504,7 +551,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Uris", }); internal_static_google_cloud_asset_v1_GcsDestination_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(15); internal_static_google_cloud_asset_v1_GcsDestination_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_GcsDestination_descriptor, @@ -512,7 +559,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Uri", "UriPrefix", "ObjectUri", }); internal_static_google_cloud_asset_v1_BigQueryDestination_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(16); internal_static_google_cloud_asset_v1_BigQueryDestination_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_BigQueryDestination_descriptor, @@ -520,7 +567,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Dataset", "Table", "Force", "PartitionSpec", "SeparateTablesPerAssetType", }); internal_static_google_cloud_asset_v1_PartitionSpec_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(17); internal_static_google_cloud_asset_v1_PartitionSpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_PartitionSpec_descriptor, @@ -528,7 +575,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PartitionKey", }); internal_static_google_cloud_asset_v1_PubsubDestination_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(18); internal_static_google_cloud_asset_v1_PubsubDestination_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_PubsubDestination_descriptor, @@ -536,7 +583,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Topic", }); internal_static_google_cloud_asset_v1_FeedOutputConfig_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(19); internal_static_google_cloud_asset_v1_FeedOutputConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_FeedOutputConfig_descriptor, @@ -544,7 +591,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PubsubDestination", "Destination", }); internal_static_google_cloud_asset_v1_Feed_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(20); internal_static_google_cloud_asset_v1_Feed_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_Feed_descriptor, @@ -552,7 +599,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "AssetNames", "AssetTypes", "ContentType", "FeedOutputConfig", "Condition", }); internal_static_google_cloud_asset_v1_SearchAllResourcesRequest_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(21); internal_static_google_cloud_asset_v1_SearchAllResourcesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_SearchAllResourcesRequest_descriptor, @@ -560,7 +607,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Scope", "Query", "AssetTypes", "PageSize", "PageToken", "OrderBy", }); internal_static_google_cloud_asset_v1_SearchAllResourcesResponse_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(22); internal_static_google_cloud_asset_v1_SearchAllResourcesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_SearchAllResourcesResponse_descriptor, @@ -568,7 +615,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Results", "NextPageToken", }); internal_static_google_cloud_asset_v1_SearchAllIamPoliciesRequest_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(23); internal_static_google_cloud_asset_v1_SearchAllIamPoliciesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_SearchAllIamPoliciesRequest_descriptor, @@ -576,7 +623,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Scope", "Query", "PageSize", "PageToken", }); internal_static_google_cloud_asset_v1_SearchAllIamPoliciesResponse_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(24); internal_static_google_cloud_asset_v1_SearchAllIamPoliciesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_SearchAllIamPoliciesResponse_descriptor, @@ -584,12 +631,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Results", "NextPageToken", }); internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(25); internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor, new java.lang.String[] { - "Scope", "ResourceSelector", "IdentitySelector", "AccessSelector", "Options", + "Scope", + "ResourceSelector", + "IdentitySelector", + "AccessSelector", + "Options", + "ConditionContext", }); internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_descriptor = internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor @@ -636,8 +688,18 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "OutputGroupEdges", "AnalyzeServiceAccountImpersonation", }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_descriptor = + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor + .getNestedTypes() + .get(4); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_descriptor, + new java.lang.String[] { + "AccessTime", "TimeContext", + }); internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(26); internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_descriptor, @@ -645,7 +707,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AnalysisQuery", "ExecutionTimeout", }); internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(27); internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_descriptor, @@ -663,7 +725,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AnalysisQuery", "AnalysisResults", "FullyExplored", "NonCriticalErrors", }); internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(28); internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_descriptor, @@ -691,7 +753,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Dataset", "TablePrefix", "PartitionKey", "WriteDisposition", }); internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(29); internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_descriptor, @@ -699,7 +761,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AnalysisQuery", "OutputConfig", }); internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(30); internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_descriptor, @@ -725,6 +787,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.EmptyProto.getDescriptor(); com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.StructProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); com.google.type.ExprProto.getDescriptor(); } diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ConditionEvaluation.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ConditionEvaluation.java new file mode 100644 index 000000000..598459cfa --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ConditionEvaluation.java @@ -0,0 +1,801 @@ +/* + * Copyright 2020 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/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +/** + * + * + *
      + * The Condition evaluation.
      + * 
      + * + * Protobuf type {@code google.cloud.asset.v1.ConditionEvaluation} + */ +public final class ConditionEvaluation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.ConditionEvaluation) + ConditionEvaluationOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConditionEvaluation.newBuilder() to construct. + private ConditionEvaluation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConditionEvaluation() { + evaluationValue_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConditionEvaluation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ConditionEvaluation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + evaluationValue_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_ConditionEvaluation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_ConditionEvaluation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.ConditionEvaluation.class, + com.google.cloud.asset.v1.ConditionEvaluation.Builder.class); + } + + /** + * + * + *
      +   * Value of this expression.
      +   * 
      + * + * Protobuf enum {@code google.cloud.asset.v1.ConditionEvaluation.EvaluationValue} + */ + public enum EvaluationValue implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
      +     * Reserved for future use.
      +     * 
      + * + * EVALUATION_VALUE_UNSPECIFIED = 0; + */ + EVALUATION_VALUE_UNSPECIFIED(0), + /** + * + * + *
      +     * The evaluation result is `true`.
      +     * 
      + * + * TRUE = 1; + */ + TRUE(1), + /** + * + * + *
      +     * The evaluation result is `false`.
      +     * 
      + * + * FALSE = 2; + */ + FALSE(2), + /** + * + * + *
      +     * The evaluation result is `conditional` when the condition expression
      +     * contains variables that are either missing input values or have not been
      +     * supported by Analyzer yet.
      +     * 
      + * + * CONDITIONAL = 3; + */ + CONDITIONAL(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
      +     * Reserved for future use.
      +     * 
      + * + * EVALUATION_VALUE_UNSPECIFIED = 0; + */ + public static final int EVALUATION_VALUE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
      +     * The evaluation result is `true`.
      +     * 
      + * + * TRUE = 1; + */ + public static final int TRUE_VALUE = 1; + /** + * + * + *
      +     * The evaluation result is `false`.
      +     * 
      + * + * FALSE = 2; + */ + public static final int FALSE_VALUE = 2; + /** + * + * + *
      +     * The evaluation result is `conditional` when the condition expression
      +     * contains variables that are either missing input values or have not been
      +     * supported by Analyzer yet.
      +     * 
      + * + * CONDITIONAL = 3; + */ + public static final int CONDITIONAL_VALUE = 3; + + 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 EvaluationValue 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 EvaluationValue forNumber(int value) { + switch (value) { + case 0: + return EVALUATION_VALUE_UNSPECIFIED; + case 1: + return TRUE; + case 2: + return FALSE; + case 3: + return CONDITIONAL; + 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 EvaluationValue findValueByNumber(int number) { + return EvaluationValue.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.cloud.asset.v1.ConditionEvaluation.getDescriptor().getEnumTypes().get(0); + } + + private static final EvaluationValue[] VALUES = values(); + + public static EvaluationValue 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 EvaluationValue(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.asset.v1.ConditionEvaluation.EvaluationValue) + } + + public static final int EVALUATION_VALUE_FIELD_NUMBER = 1; + private int evaluationValue_; + /** + * + * + *
      +   * The evaluation result.
      +   * 
      + * + * .google.cloud.asset.v1.ConditionEvaluation.EvaluationValue evaluation_value = 1; + * + * @return The enum numeric value on the wire for evaluationValue. + */ + @java.lang.Override + public int getEvaluationValueValue() { + return evaluationValue_; + } + /** + * + * + *
      +   * The evaluation result.
      +   * 
      + * + * .google.cloud.asset.v1.ConditionEvaluation.EvaluationValue evaluation_value = 1; + * + * @return The evaluationValue. + */ + @java.lang.Override + public com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue getEvaluationValue() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue result = + com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue.valueOf(evaluationValue_); + return result == null + ? com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue.UNRECOGNIZED + : result; + } + + 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 (evaluationValue_ + != com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue + .EVALUATION_VALUE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, evaluationValue_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (evaluationValue_ + != com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue + .EVALUATION_VALUE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, evaluationValue_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.ConditionEvaluation)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.ConditionEvaluation other = + (com.google.cloud.asset.v1.ConditionEvaluation) obj; + + if (evaluationValue_ != other.evaluationValue_) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + EVALUATION_VALUE_FIELD_NUMBER; + hash = (53 * hash) + evaluationValue_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.ConditionEvaluation parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.ConditionEvaluation parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1.ConditionEvaluation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.ConditionEvaluation parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1.ConditionEvaluation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.ConditionEvaluation parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1.ConditionEvaluation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.ConditionEvaluation parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.asset.v1.ConditionEvaluation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.ConditionEvaluation parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.asset.v1.ConditionEvaluation parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.ConditionEvaluation parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.asset.v1.ConditionEvaluation 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 Condition evaluation.
      +   * 
      + * + * Protobuf type {@code google.cloud.asset.v1.ConditionEvaluation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.ConditionEvaluation) + com.google.cloud.asset.v1.ConditionEvaluationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_ConditionEvaluation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_ConditionEvaluation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.ConditionEvaluation.class, + com.google.cloud.asset.v1.ConditionEvaluation.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.ConditionEvaluation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + evaluationValue_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_ConditionEvaluation_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ConditionEvaluation getDefaultInstanceForType() { + return com.google.cloud.asset.v1.ConditionEvaluation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.ConditionEvaluation build() { + com.google.cloud.asset.v1.ConditionEvaluation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ConditionEvaluation buildPartial() { + com.google.cloud.asset.v1.ConditionEvaluation result = + new com.google.cloud.asset.v1.ConditionEvaluation(this); + result.evaluationValue_ = evaluationValue_; + onBuilt(); + return result; + } + + @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.cloud.asset.v1.ConditionEvaluation) { + return mergeFrom((com.google.cloud.asset.v1.ConditionEvaluation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.ConditionEvaluation other) { + if (other == com.google.cloud.asset.v1.ConditionEvaluation.getDefaultInstance()) return this; + if (other.evaluationValue_ != 0) { + setEvaluationValueValue(other.getEvaluationValueValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.ConditionEvaluation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.ConditionEvaluation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int evaluationValue_ = 0; + /** + * + * + *
      +     * The evaluation result.
      +     * 
      + * + * .google.cloud.asset.v1.ConditionEvaluation.EvaluationValue evaluation_value = 1; + * + * @return The enum numeric value on the wire for evaluationValue. + */ + @java.lang.Override + public int getEvaluationValueValue() { + return evaluationValue_; + } + /** + * + * + *
      +     * The evaluation result.
      +     * 
      + * + * .google.cloud.asset.v1.ConditionEvaluation.EvaluationValue evaluation_value = 1; + * + * @param value The enum numeric value on the wire for evaluationValue to set. + * @return This builder for chaining. + */ + public Builder setEvaluationValueValue(int value) { + + evaluationValue_ = value; + onChanged(); + return this; + } + /** + * + * + *
      +     * The evaluation result.
      +     * 
      + * + * .google.cloud.asset.v1.ConditionEvaluation.EvaluationValue evaluation_value = 1; + * + * @return The evaluationValue. + */ + @java.lang.Override + public com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue getEvaluationValue() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue result = + com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue.valueOf(evaluationValue_); + return result == null + ? com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue.UNRECOGNIZED + : result; + } + /** + * + * + *
      +     * The evaluation result.
      +     * 
      + * + * .google.cloud.asset.v1.ConditionEvaluation.EvaluationValue evaluation_value = 1; + * + * @param value The evaluationValue to set. + * @return This builder for chaining. + */ + public Builder setEvaluationValue( + com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue value) { + if (value == null) { + throw new NullPointerException(); + } + + evaluationValue_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
      +     * The evaluation result.
      +     * 
      + * + * .google.cloud.asset.v1.ConditionEvaluation.EvaluationValue evaluation_value = 1; + * + * @return This builder for chaining. + */ + public Builder clearEvaluationValue() { + + evaluationValue_ = 0; + 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.cloud.asset.v1.ConditionEvaluation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.ConditionEvaluation) + private static final com.google.cloud.asset.v1.ConditionEvaluation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.ConditionEvaluation(); + } + + public static com.google.cloud.asset.v1.ConditionEvaluation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConditionEvaluation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ConditionEvaluation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ConditionEvaluation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ConditionEvaluationOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ConditionEvaluationOrBuilder.java new file mode 100644 index 000000000..316a06ba4 --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ConditionEvaluationOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 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/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +public interface ConditionEvaluationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.ConditionEvaluation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * The evaluation result.
      +   * 
      + * + * .google.cloud.asset.v1.ConditionEvaluation.EvaluationValue evaluation_value = 1; + * + * @return The enum numeric value on the wire for evaluationValue. + */ + int getEvaluationValueValue(); + /** + * + * + *
      +   * The evaluation result.
      +   * 
      + * + * .google.cloud.asset.v1.ConditionEvaluation.EvaluationValue evaluation_value = 1; + * + * @return The evaluationValue. + */ + com.google.cloud.asset.v1.ConditionEvaluation.EvaluationValue getEvaluationValue(); +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestination.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestination.java index 9d3163157..9e9bc72bd 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestination.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestination.java @@ -173,6 +173,9 @@ public ObjectUriCase getObjectUriCase() { * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. + * If the specified Cloud Storage object already exists and there is no + * [hold](https://cloud.google.com/storage/docs/object-holds), it will be + * overwritten with the exported result. * * * string uri = 1; @@ -191,6 +194,9 @@ public boolean hasUri() { * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. + * If the specified Cloud Storage object already exists and there is no + * [hold](https://cloud.google.com/storage/docs/object-holds), it will be + * overwritten with the exported result. * * * string uri = 1; @@ -222,6 +228,9 @@ public java.lang.String getUri() { * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. + * If the specified Cloud Storage object already exists and there is no + * [hold](https://cloud.google.com/storage/docs/object-holds), it will be + * overwritten with the exported result. * * * string uri = 1; @@ -725,6 +734,9 @@ public Builder clearObjectUri() { * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. + * If the specified Cloud Storage object already exists and there is no + * [hold](https://cloud.google.com/storage/docs/object-holds), it will be + * overwritten with the exported result. * * * string uri = 1; @@ -744,6 +756,9 @@ public boolean hasUri() { * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. + * If the specified Cloud Storage object already exists and there is no + * [hold](https://cloud.google.com/storage/docs/object-holds), it will be + * overwritten with the exported result. * * * string uri = 1; @@ -776,6 +791,9 @@ public java.lang.String getUri() { * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. + * If the specified Cloud Storage object already exists and there is no + * [hold](https://cloud.google.com/storage/docs/object-holds), it will be + * overwritten with the exported result. * * * string uri = 1; @@ -808,6 +826,9 @@ public com.google.protobuf.ByteString getUriBytes() { * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. + * If the specified Cloud Storage object already exists and there is no + * [hold](https://cloud.google.com/storage/docs/object-holds), it will be + * overwritten with the exported result. * * * string uri = 1; @@ -833,6 +854,9 @@ public Builder setUri(java.lang.String value) { * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. + * If the specified Cloud Storage object already exists and there is no + * [hold](https://cloud.google.com/storage/docs/object-holds), it will be + * overwritten with the exported result. * * * string uri = 1; @@ -856,6 +880,9 @@ public Builder clearUri() { * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. + * If the specified Cloud Storage object already exists and there is no + * [hold](https://cloud.google.com/storage/docs/object-holds), it will be + * overwritten with the exported result. * * * string uri = 1; diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestinationOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestinationOrBuilder.java index 3d2361bd7..99805d341 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestinationOrBuilder.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestinationOrBuilder.java @@ -32,6 +32,9 @@ public interface GcsDestinationOrBuilder * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. + * If the specified Cloud Storage object already exists and there is no + * [hold](https://cloud.google.com/storage/docs/object-holds), it will be + * overwritten with the exported result. * * * string uri = 1; @@ -48,6 +51,9 @@ public interface GcsDestinationOrBuilder * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. + * If the specified Cloud Storage object already exists and there is no + * [hold](https://cloud.google.com/storage/docs/object-holds), it will be + * overwritten with the exported result. * * * string uri = 1; @@ -64,6 +70,9 @@ public interface GcsDestinationOrBuilder * Editing Object * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) * for more information. + * If the specified Cloud Storage object already exists and there is no + * [hold](https://cloud.google.com/storage/docs/object-holds), it will be + * overwritten with the exported result. * * * string uri = 1; diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfig.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfig.java index e2933c625..efc2ac3c6 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfig.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfig.java @@ -160,9 +160,13 @@ public interface GcsDestinationOrBuilder * *
            * Required. The uri of the Cloud Storage object. It's the same uri that is used by
      -     * gsutil. For example: "gs://bucket_name/object_name". See
      -     * [Quickstart: Using the gsutil tool]
      -     * (https://cloud.google.com/storage/docs/quickstart-gsutil) for examples.
      +     * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
      +     * Editing Object
      +     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
      +     * for more information.
      +     * If the specified Cloud Storage object already exists and there is no
      +     * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
      +     * overwritten with the analysis result.
            * 
      * * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -175,9 +179,13 @@ public interface GcsDestinationOrBuilder * *
            * Required. The uri of the Cloud Storage object. It's the same uri that is used by
      -     * gsutil. For example: "gs://bucket_name/object_name". See
      -     * [Quickstart: Using the gsutil tool]
      -     * (https://cloud.google.com/storage/docs/quickstart-gsutil) for examples.
      +     * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
      +     * Editing Object
      +     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
      +     * for more information.
      +     * If the specified Cloud Storage object already exists and there is no
      +     * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
      +     * overwritten with the analysis result.
            * 
      * * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -286,9 +294,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
            * Required. The uri of the Cloud Storage object. It's the same uri that is used by
      -     * gsutil. For example: "gs://bucket_name/object_name". See
      -     * [Quickstart: Using the gsutil tool]
      -     * (https://cloud.google.com/storage/docs/quickstart-gsutil) for examples.
      +     * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
      +     * Editing Object
      +     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
      +     * for more information.
      +     * If the specified Cloud Storage object already exists and there is no
      +     * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
      +     * overwritten with the analysis result.
            * 
      * * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -312,9 +324,13 @@ public java.lang.String getUri() { * *
            * Required. The uri of the Cloud Storage object. It's the same uri that is used by
      -     * gsutil. For example: "gs://bucket_name/object_name". See
      -     * [Quickstart: Using the gsutil tool]
      -     * (https://cloud.google.com/storage/docs/quickstart-gsutil) for examples.
      +     * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
      +     * Editing Object
      +     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
      +     * for more information.
      +     * If the specified Cloud Storage object already exists and there is no
      +     * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
      +     * overwritten with the analysis result.
            * 
      * * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -675,9 +691,13 @@ public Builder mergeFrom( * *
              * Required. The uri of the Cloud Storage object. It's the same uri that is used by
      -       * gsutil. For example: "gs://bucket_name/object_name". See
      -       * [Quickstart: Using the gsutil tool]
      -       * (https://cloud.google.com/storage/docs/quickstart-gsutil) for examples.
      +       * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
      +       * Editing Object
      +       * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
      +       * for more information.
      +       * If the specified Cloud Storage object already exists and there is no
      +       * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
      +       * overwritten with the analysis result.
              * 
      * * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -700,9 +720,13 @@ public java.lang.String getUri() { * *
              * Required. The uri of the Cloud Storage object. It's the same uri that is used by
      -       * gsutil. For example: "gs://bucket_name/object_name". See
      -       * [Quickstart: Using the gsutil tool]
      -       * (https://cloud.google.com/storage/docs/quickstart-gsutil) for examples.
      +       * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
      +       * Editing Object
      +       * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
      +       * for more information.
      +       * If the specified Cloud Storage object already exists and there is no
      +       * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
      +       * overwritten with the analysis result.
              * 
      * * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -725,9 +749,13 @@ public com.google.protobuf.ByteString getUriBytes() { * *
              * Required. The uri of the Cloud Storage object. It's the same uri that is used by
      -       * gsutil. For example: "gs://bucket_name/object_name". See
      -       * [Quickstart: Using the gsutil tool]
      -       * (https://cloud.google.com/storage/docs/quickstart-gsutil) for examples.
      +       * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
      +       * Editing Object
      +       * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
      +       * for more information.
      +       * If the specified Cloud Storage object already exists and there is no
      +       * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
      +       * overwritten with the analysis result.
              * 
      * * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -749,9 +777,13 @@ public Builder setUri(java.lang.String value) { * *
              * Required. The uri of the Cloud Storage object. It's the same uri that is used by
      -       * gsutil. For example: "gs://bucket_name/object_name". See
      -       * [Quickstart: Using the gsutil tool]
      -       * (https://cloud.google.com/storage/docs/quickstart-gsutil) for examples.
      +       * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
      +       * Editing Object
      +       * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
      +       * for more information.
      +       * If the specified Cloud Storage object already exists and there is no
      +       * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
      +       * overwritten with the analysis result.
              * 
      * * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; @@ -769,9 +801,13 @@ public Builder clearUri() { * *
              * Required. The uri of the Cloud Storage object. It's the same uri that is used by
      -       * gsutil. For example: "gs://bucket_name/object_name". See
      -       * [Quickstart: Using the gsutil tool]
      -       * (https://cloud.google.com/storage/docs/quickstart-gsutil) for examples.
      +       * gsutil. Example: "gs://bucket_name/object_name". See [Viewing and
      +       * Editing Object
      +       * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
      +       * for more information.
      +       * If the specified Cloud Storage object already exists and there is no
      +       * [hold](https://cloud.google.com/storage/docs/object-holds), it will be
      +       * overwritten with the analysis result.
              * 
      * * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQuery.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQuery.java index 4f0c4843b..507b1ca68 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQuery.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQuery.java @@ -22,7 +22,7 @@ * * *
      - * IAM policy analysis query message.
      + * ## IAM policy analysis query message.
        * 
      * * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery} @@ -146,6 +146,24 @@ private IamPolicyAnalysisQuery( options_ = subBuilder.buildPartial(); } + break; + } + case 50: + { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder subBuilder = + null; + if (conditionContext_ != null) { + subBuilder = conditionContext_.toBuilder(); + } + conditionContext_ = + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(conditionContext_); + conditionContext_ = subBuilder.buildPartial(); + } + break; } default: @@ -4076,230 +4094,1132 @@ public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options getDefaultInstan } } - public static final int SCOPE_FIELD_NUMBER = 1; - private volatile java.lang.Object scope_; - /** - * - * - *
      -   * Required. The relative name of the root asset. Only resources and IAM policies within
      -   * the scope will be analyzed.
      -   * This can only be an organization number (such as "organizations/123"), a
      -   * folder number (such as "folders/123"), a project ID (such as
      -   * "projects/my-project-id"), or a project number (such as "projects/12345").
      -   * To know how to get organization id, visit [here
      -   * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
      -   * To know how to get folder or project id, visit [here
      -   * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
      -   * 
      - * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The scope. - */ - @java.lang.Override - public java.lang.String getScope() { - java.lang.Object ref = scope_; - 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(); - scope_ = s; - return s; - } + public interface ConditionContextOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +     * The hypothetical access timestamp to evaluate IAM conditions. Note that
      +     * this value must not be earlier than the current time; otherwise, an
      +     * INVALID_ARGUMENT error will be returned.
      +     * 
      + * + * .google.protobuf.Timestamp access_time = 1; + * + * @return Whether the accessTime field is set. + */ + boolean hasAccessTime(); + /** + * + * + *
      +     * The hypothetical access timestamp to evaluate IAM conditions. Note that
      +     * this value must not be earlier than the current time; otherwise, an
      +     * INVALID_ARGUMENT error will be returned.
      +     * 
      + * + * .google.protobuf.Timestamp access_time = 1; + * + * @return The accessTime. + */ + com.google.protobuf.Timestamp getAccessTime(); + /** + * + * + *
      +     * The hypothetical access timestamp to evaluate IAM conditions. Note that
      +     * this value must not be earlier than the current time; otherwise, an
      +     * INVALID_ARGUMENT error will be returned.
      +     * 
      + * + * .google.protobuf.Timestamp access_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getAccessTimeOrBuilder(); + + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.TimeContextCase + getTimeContextCase(); } /** * * *
      -   * Required. The relative name of the root asset. Only resources and IAM policies within
      -   * the scope will be analyzed.
      -   * This can only be an organization number (such as "organizations/123"), a
      -   * folder number (such as "folders/123"), a project ID (such as
      -   * "projects/my-project-id"), or a project number (such as "projects/12345").
      -   * To know how to get organization id, visit [here
      -   * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
      -   * To know how to get folder or project id, visit [here
      -   * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
      +   * The IAM conditions context.
          * 
      * - * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for scope. + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext} */ - @java.lang.Override - public com.google.protobuf.ByteString getScopeBytes() { - java.lang.Object ref = scope_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - scope_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public static final class ConditionContext extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) + ConditionContextOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConditionContext.newBuilder() to construct. + private ConditionContext(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - } - public static final int RESOURCE_SELECTOR_FIELD_NUMBER = 2; - private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resourceSelector_; - /** - * - * - *
      -   * Optional. Specifies a resource for analysis.
      -   * 
      - * - * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the resourceSelector field is set. - */ - @java.lang.Override - public boolean hasResourceSelector() { - return resourceSelector_ != null; - } - /** - * - * - *
      -   * Optional. Specifies a resource for analysis.
      -   * 
      - * - * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The resourceSelector. - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector getResourceSelector() { - return resourceSelector_ == null - ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.getDefaultInstance() - : resourceSelector_; - } - /** - * - * - *
      -   * Optional. Specifies a resource for analysis.
      -   * 
      - * - * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder - getResourceSelectorOrBuilder() { - return getResourceSelector(); - } + private ConditionContext() {} - public static final int IDENTITY_SELECTOR_FIELD_NUMBER = 3; - private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identitySelector_; - /** - * - * - *
      -   * Optional. Specifies an identity for analysis.
      -   * 
      - * - * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the identitySelector field is set. - */ - @java.lang.Override - public boolean hasIdentitySelector() { - return identitySelector_ != null; - } - /** - * - * - *
      -   * Optional. Specifies an identity for analysis.
      -   * 
      - * - * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The identitySelector. - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector getIdentitySelector() { - return identitySelector_ == null - ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.getDefaultInstance() - : identitySelector_; - } - /** - * - * - *
      -   * Optional. Specifies an identity for analysis.
      -   * 
      - * - * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder - getIdentitySelectorOrBuilder() { - return getIdentitySelector(); - } + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConditionContext(); + } - public static final int ACCESS_SELECTOR_FIELD_NUMBER = 4; - private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector accessSelector_; - /** - * - * - *
      -   * Optional. Specifies roles or permissions for analysis. This is optional.
      -   * 
      - * - * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return Whether the accessSelector field is set. - */ - @java.lang.Override - public boolean hasAccessSelector() { - return accessSelector_ != null; - } - /** - * - * - *
      -   * Optional. Specifies roles or permissions for analysis. This is optional.
      -   * 
      - * - * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The accessSelector. - */ - @java.lang.Override - public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector getAccessSelector() { - return accessSelector_ == null - ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.getDefaultInstance() - : accessSelector_; - } - /** - * - * - *
      -   * Optional. Specifies roles or permissions for analysis. This is optional.
      -   * 
      - * - * - * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; - * - */ + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ConditionContext( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (timeContextCase_ == 1) { + subBuilder = ((com.google.protobuf.Timestamp) timeContext_).toBuilder(); + } + timeContext_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.protobuf.Timestamp) timeContext_); + timeContext_ = subBuilder.buildPartial(); + } + timeContextCase_ = 1; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.class, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder.class); + } + + private int timeContextCase_ = 0; + private java.lang.Object timeContext_; + + public enum TimeContextCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ACCESS_TIME(1), + TIMECONTEXT_NOT_SET(0); + private final int value; + + private TimeContextCase(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 TimeContextCase valueOf(int value) { + return forNumber(value); + } + + public static TimeContextCase forNumber(int value) { + switch (value) { + case 1: + return ACCESS_TIME; + case 0: + return TIMECONTEXT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TimeContextCase getTimeContextCase() { + return TimeContextCase.forNumber(timeContextCase_); + } + + public static final int ACCESS_TIME_FIELD_NUMBER = 1; + /** + * + * + *
      +     * The hypothetical access timestamp to evaluate IAM conditions. Note that
      +     * this value must not be earlier than the current time; otherwise, an
      +     * INVALID_ARGUMENT error will be returned.
      +     * 
      + * + * .google.protobuf.Timestamp access_time = 1; + * + * @return Whether the accessTime field is set. + */ + @java.lang.Override + public boolean hasAccessTime() { + return timeContextCase_ == 1; + } + /** + * + * + *
      +     * The hypothetical access timestamp to evaluate IAM conditions. Note that
      +     * this value must not be earlier than the current time; otherwise, an
      +     * INVALID_ARGUMENT error will be returned.
      +     * 
      + * + * .google.protobuf.Timestamp access_time = 1; + * + * @return The accessTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getAccessTime() { + if (timeContextCase_ == 1) { + return (com.google.protobuf.Timestamp) timeContext_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + /** + * + * + *
      +     * The hypothetical access timestamp to evaluate IAM conditions. Note that
      +     * this value must not be earlier than the current time; otherwise, an
      +     * INVALID_ARGUMENT error will be returned.
      +     * 
      + * + * .google.protobuf.Timestamp access_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getAccessTimeOrBuilder() { + if (timeContextCase_ == 1) { + return (com.google.protobuf.Timestamp) timeContext_; + } + return com.google.protobuf.Timestamp.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 (timeContextCase_ == 1) { + output.writeMessage(1, (com.google.protobuf.Timestamp) timeContext_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (timeContextCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.protobuf.Timestamp) timeContext_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext other = + (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) obj; + + if (!getTimeContextCase().equals(other.getTimeContextCase())) return false; + switch (timeContextCase_) { + case 1: + if (!getAccessTime().equals(other.getAccessTime())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (timeContextCase_) { + case 1: + hash = (37 * hash) + ACCESS_TIME_FIELD_NUMBER; + hash = (53 * hash) + getAccessTime().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext 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 IAM conditions context.
      +     * 
      + * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.class, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder.class); + } + + // Construct using + // com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + timeContextCase_ = 0; + timeContext_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ConditionContext_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext + getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext build() { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext result = + new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext(this); + if (timeContextCase_ == 1) { + if (accessTimeBuilder_ == null) { + result.timeContext_ = timeContext_; + } else { + result.timeContext_ = accessTimeBuilder_.build(); + } + } + result.timeContextCase_ = timeContextCase_; + onBuilt(); + return result; + } + + @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.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) { + return mergeFrom( + (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext other) { + if (other + == com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext + .getDefaultInstance()) return this; + switch (other.getTimeContextCase()) { + case ACCESS_TIME: + { + mergeAccessTime(other.getAccessTime()); + break; + } + case TIMECONTEXT_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int timeContextCase_ = 0; + private java.lang.Object timeContext_; + + public TimeContextCase getTimeContextCase() { + return TimeContextCase.forNumber(timeContextCase_); + } + + public Builder clearTimeContext() { + timeContextCase_ = 0; + timeContext_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + accessTimeBuilder_; + /** + * + * + *
      +       * The hypothetical access timestamp to evaluate IAM conditions. Note that
      +       * this value must not be earlier than the current time; otherwise, an
      +       * INVALID_ARGUMENT error will be returned.
      +       * 
      + * + * .google.protobuf.Timestamp access_time = 1; + * + * @return Whether the accessTime field is set. + */ + @java.lang.Override + public boolean hasAccessTime() { + return timeContextCase_ == 1; + } + /** + * + * + *
      +       * The hypothetical access timestamp to evaluate IAM conditions. Note that
      +       * this value must not be earlier than the current time; otherwise, an
      +       * INVALID_ARGUMENT error will be returned.
      +       * 
      + * + * .google.protobuf.Timestamp access_time = 1; + * + * @return The accessTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getAccessTime() { + if (accessTimeBuilder_ == null) { + if (timeContextCase_ == 1) { + return (com.google.protobuf.Timestamp) timeContext_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } else { + if (timeContextCase_ == 1) { + return accessTimeBuilder_.getMessage(); + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + /** + * + * + *
      +       * The hypothetical access timestamp to evaluate IAM conditions. Note that
      +       * this value must not be earlier than the current time; otherwise, an
      +       * INVALID_ARGUMENT error will be returned.
      +       * 
      + * + * .google.protobuf.Timestamp access_time = 1; + */ + public Builder setAccessTime(com.google.protobuf.Timestamp value) { + if (accessTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeContext_ = value; + onChanged(); + } else { + accessTimeBuilder_.setMessage(value); + } + timeContextCase_ = 1; + return this; + } + /** + * + * + *
      +       * The hypothetical access timestamp to evaluate IAM conditions. Note that
      +       * this value must not be earlier than the current time; otherwise, an
      +       * INVALID_ARGUMENT error will be returned.
      +       * 
      + * + * .google.protobuf.Timestamp access_time = 1; + */ + public Builder setAccessTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (accessTimeBuilder_ == null) { + timeContext_ = builderForValue.build(); + onChanged(); + } else { + accessTimeBuilder_.setMessage(builderForValue.build()); + } + timeContextCase_ = 1; + return this; + } + /** + * + * + *
      +       * The hypothetical access timestamp to evaluate IAM conditions. Note that
      +       * this value must not be earlier than the current time; otherwise, an
      +       * INVALID_ARGUMENT error will be returned.
      +       * 
      + * + * .google.protobuf.Timestamp access_time = 1; + */ + public Builder mergeAccessTime(com.google.protobuf.Timestamp value) { + if (accessTimeBuilder_ == null) { + if (timeContextCase_ == 1 + && timeContext_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + timeContext_ = + com.google.protobuf.Timestamp.newBuilder( + (com.google.protobuf.Timestamp) timeContext_) + .mergeFrom(value) + .buildPartial(); + } else { + timeContext_ = value; + } + onChanged(); + } else { + if (timeContextCase_ == 1) { + accessTimeBuilder_.mergeFrom(value); + } + accessTimeBuilder_.setMessage(value); + } + timeContextCase_ = 1; + return this; + } + /** + * + * + *
      +       * The hypothetical access timestamp to evaluate IAM conditions. Note that
      +       * this value must not be earlier than the current time; otherwise, an
      +       * INVALID_ARGUMENT error will be returned.
      +       * 
      + * + * .google.protobuf.Timestamp access_time = 1; + */ + public Builder clearAccessTime() { + if (accessTimeBuilder_ == null) { + if (timeContextCase_ == 1) { + timeContextCase_ = 0; + timeContext_ = null; + onChanged(); + } + } else { + if (timeContextCase_ == 1) { + timeContextCase_ = 0; + timeContext_ = null; + } + accessTimeBuilder_.clear(); + } + return this; + } + /** + * + * + *
      +       * The hypothetical access timestamp to evaluate IAM conditions. Note that
      +       * this value must not be earlier than the current time; otherwise, an
      +       * INVALID_ARGUMENT error will be returned.
      +       * 
      + * + * .google.protobuf.Timestamp access_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getAccessTimeBuilder() { + return getAccessTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
      +       * The hypothetical access timestamp to evaluate IAM conditions. Note that
      +       * this value must not be earlier than the current time; otherwise, an
      +       * INVALID_ARGUMENT error will be returned.
      +       * 
      + * + * .google.protobuf.Timestamp access_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getAccessTimeOrBuilder() { + if ((timeContextCase_ == 1) && (accessTimeBuilder_ != null)) { + return accessTimeBuilder_.getMessageOrBuilder(); + } else { + if (timeContextCase_ == 1) { + return (com.google.protobuf.Timestamp) timeContext_; + } + return com.google.protobuf.Timestamp.getDefaultInstance(); + } + } + /** + * + * + *
      +       * The hypothetical access timestamp to evaluate IAM conditions. Note that
      +       * this value must not be earlier than the current time; otherwise, an
      +       * INVALID_ARGUMENT error will be returned.
      +       * 
      + * + * .google.protobuf.Timestamp access_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getAccessTimeFieldBuilder() { + if (accessTimeBuilder_ == null) { + if (!(timeContextCase_ == 1)) { + timeContext_ = com.google.protobuf.Timestamp.getDefaultInstance(); + } + accessTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + (com.google.protobuf.Timestamp) timeContext_, getParentForChildren(), isClean()); + timeContext_ = null; + } + timeContextCase_ = 1; + onChanged(); + ; + return accessTimeBuilder_; + } + + @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.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConditionContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ConditionContext(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int SCOPE_FIELD_NUMBER = 1; + private volatile java.lang.Object scope_; + /** + * + * + *
      +   * Required. The relative name of the root asset. Only resources and IAM policies within
      +   * the scope will be analyzed.
      +   * This can only be an organization number (such as "organizations/123"), a
      +   * folder number (such as "folders/123"), a project ID (such as
      +   * "projects/my-project-id"), or a project number (such as "projects/12345").
      +   * To know how to get organization id, visit [here
      +   * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
      +   * To know how to get folder or project id, visit [here
      +   * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
      +   * 
      + * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The scope. + */ + @java.lang.Override + public java.lang.String getScope() { + java.lang.Object ref = scope_; + 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(); + scope_ = s; + return s; + } + } + /** + * + * + *
      +   * Required. The relative name of the root asset. Only resources and IAM policies within
      +   * the scope will be analyzed.
      +   * This can only be an organization number (such as "organizations/123"), a
      +   * folder number (such as "folders/123"), a project ID (such as
      +   * "projects/my-project-id"), or a project number (such as "projects/12345").
      +   * To know how to get organization id, visit [here
      +   * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
      +   * To know how to get folder or project id, visit [here
      +   * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
      +   * 
      + * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for scope. + */ + @java.lang.Override + public com.google.protobuf.ByteString getScopeBytes() { + java.lang.Object ref = scope_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + scope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_SELECTOR_FIELD_NUMBER = 2; + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resourceSelector_; + /** + * + * + *
      +   * Optional. Specifies a resource for analysis.
      +   * 
      + * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the resourceSelector field is set. + */ + @java.lang.Override + public boolean hasResourceSelector() { + return resourceSelector_ != null; + } + /** + * + * + *
      +   * Optional. Specifies a resource for analysis.
      +   * 
      + * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The resourceSelector. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector getResourceSelector() { + return resourceSelector_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.getDefaultInstance() + : resourceSelector_; + } + /** + * + * + *
      +   * Optional. Specifies a resource for analysis.
      +   * 
      + * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder + getResourceSelectorOrBuilder() { + return getResourceSelector(); + } + + public static final int IDENTITY_SELECTOR_FIELD_NUMBER = 3; + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identitySelector_; + /** + * + * + *
      +   * Optional. Specifies an identity for analysis.
      +   * 
      + * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the identitySelector field is set. + */ + @java.lang.Override + public boolean hasIdentitySelector() { + return identitySelector_ != null; + } + /** + * + * + *
      +   * Optional. Specifies an identity for analysis.
      +   * 
      + * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The identitySelector. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector getIdentitySelector() { + return identitySelector_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.getDefaultInstance() + : identitySelector_; + } + /** + * + * + *
      +   * Optional. Specifies an identity for analysis.
      +   * 
      + * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder + getIdentitySelectorOrBuilder() { + return getIdentitySelector(); + } + + public static final int ACCESS_SELECTOR_FIELD_NUMBER = 4; + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector accessSelector_; + /** + * + * + *
      +   * Optional. Specifies roles or permissions for analysis. This is optional.
      +   * 
      + * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the accessSelector field is set. + */ + @java.lang.Override + public boolean hasAccessSelector() { + return accessSelector_ != null; + } + /** + * + * + *
      +   * Optional. Specifies roles or permissions for analysis. This is optional.
      +   * 
      + * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The accessSelector. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector getAccessSelector() { + return accessSelector_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.getDefaultInstance() + : accessSelector_; + } + /** + * + * + *
      +   * Optional. Specifies roles or permissions for analysis. This is optional.
      +   * 
      + * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ @java.lang.Override public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder getAccessSelectorOrBuilder() { @@ -4360,6 +5280,61 @@ public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder getOpti return getOptions(); } + public static final int CONDITION_CONTEXT_FIELD_NUMBER = 6; + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext conditionContext_; + /** + * + * + *
      +   * Optional. The hypothetical context for IAM conditions evaluation.
      +   * 
      + * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the conditionContext field is set. + */ + @java.lang.Override + public boolean hasConditionContext() { + return conditionContext_ != null; + } + /** + * + * + *
      +   * Optional. The hypothetical context for IAM conditions evaluation.
      +   * 
      + * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The conditionContext. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext getConditionContext() { + return conditionContext_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.getDefaultInstance() + : conditionContext_; + } + /** + * + * + *
      +   * Optional. The hypothetical context for IAM conditions evaluation.
      +   * 
      + * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder + getConditionContextOrBuilder() { + return getConditionContext(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -4389,6 +5364,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (options_ != null) { output.writeMessage(5, getOptions()); } + if (conditionContext_ != null) { + output.writeMessage(6, getConditionContext()); + } unknownFields.writeTo(output); } @@ -4413,6 +5391,9 @@ public int getSerializedSize() { if (options_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getOptions()); } + if (conditionContext_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getConditionContext()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -4446,6 +5427,10 @@ public boolean equals(final java.lang.Object obj) { if (hasOptions()) { if (!getOptions().equals(other.getOptions())) return false; } + if (hasConditionContext() != other.hasConditionContext()) return false; + if (hasConditionContext()) { + if (!getConditionContext().equals(other.getConditionContext())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -4475,6 +5460,10 @@ public int hashCode() { hash = (37 * hash) + OPTIONS_FIELD_NUMBER; hash = (53 * hash) + getOptions().hashCode(); } + if (hasConditionContext()) { + hash = (37 * hash) + CONDITION_CONTEXT_FIELD_NUMBER; + hash = (53 * hash) + getConditionContext().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -4579,7 +5568,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
      -   * IAM policy analysis query message.
      +   * ## IAM policy analysis query message.
          * 
      * * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery} @@ -4646,6 +5635,12 @@ public Builder clear() { options_ = null; optionsBuilder_ = null; } + if (conditionContextBuilder_ == null) { + conditionContext_ = null; + } else { + conditionContext_ = null; + conditionContextBuilder_ = null; + } return this; } @@ -4694,6 +5689,11 @@ public com.google.cloud.asset.v1.IamPolicyAnalysisQuery buildPartial() { } else { result.options_ = optionsBuilder_.build(); } + if (conditionContextBuilder_ == null) { + result.conditionContext_ = conditionContext_; + } else { + result.conditionContext_ = conditionContextBuilder_.build(); + } onBuilt(); return result; } @@ -4760,6 +5760,9 @@ public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisQuery other) if (other.hasOptions()) { mergeOptions(other.getOptions()); } + if (other.hasConditionContext()) { + mergeConditionContext(other.getConditionContext()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -5766,6 +6769,215 @@ public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder getOpti return optionsBuilder_; } + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext conditionContext_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder> + conditionContextBuilder_; + /** + * + * + *
      +     * Optional. The hypothetical context for IAM conditions evaluation.
      +     * 
      + * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the conditionContext field is set. + */ + public boolean hasConditionContext() { + return conditionContextBuilder_ != null || conditionContext_ != null; + } + /** + * + * + *
      +     * Optional. The hypothetical context for IAM conditions evaluation.
      +     * 
      + * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The conditionContext. + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext getConditionContext() { + if (conditionContextBuilder_ == null) { + return conditionContext_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.getDefaultInstance() + : conditionContext_; + } else { + return conditionContextBuilder_.getMessage(); + } + } + /** + * + * + *
      +     * Optional. The hypothetical context for IAM conditions evaluation.
      +     * 
      + * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setConditionContext( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext value) { + if (conditionContextBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + conditionContext_ = value; + onChanged(); + } else { + conditionContextBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
      +     * Optional. The hypothetical context for IAM conditions evaluation.
      +     * 
      + * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setConditionContext( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder builderForValue) { + if (conditionContextBuilder_ == null) { + conditionContext_ = builderForValue.build(); + onChanged(); + } else { + conditionContextBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
      +     * Optional. The hypothetical context for IAM conditions evaluation.
      +     * 
      + * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeConditionContext( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext value) { + if (conditionContextBuilder_ == null) { + if (conditionContext_ != null) { + conditionContext_ = + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.newBuilder( + conditionContext_) + .mergeFrom(value) + .buildPartial(); + } else { + conditionContext_ = value; + } + onChanged(); + } else { + conditionContextBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
      +     * Optional. The hypothetical context for IAM conditions evaluation.
      +     * 
      + * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearConditionContext() { + if (conditionContextBuilder_ == null) { + conditionContext_ = null; + onChanged(); + } else { + conditionContext_ = null; + conditionContextBuilder_ = null; + } + + return this; + } + /** + * + * + *
      +     * Optional. The hypothetical context for IAM conditions evaluation.
      +     * 
      + * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder + getConditionContextBuilder() { + + onChanged(); + return getConditionContextFieldBuilder().getBuilder(); + } + /** + * + * + *
      +     * Optional. The hypothetical context for IAM conditions evaluation.
      +     * 
      + * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder + getConditionContextOrBuilder() { + if (conditionContextBuilder_ != null) { + return conditionContextBuilder_.getMessageOrBuilder(); + } else { + return conditionContext_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.getDefaultInstance() + : conditionContext_; + } + } + /** + * + * + *
      +     * Optional. The hypothetical context for IAM conditions evaluation.
      +     * 
      + * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder> + getConditionContextFieldBuilder() { + if (conditionContextBuilder_ == null) { + conditionContextBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder>( + getConditionContext(), getParentForChildren(), isClean()); + conditionContext_ = null; + } + return conditionContextBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQueryOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQueryOrBuilder.java index 0ef52c4e2..265ffc013 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQueryOrBuilder.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQueryOrBuilder.java @@ -230,4 +230,46 @@ public interface IamPolicyAnalysisQueryOrBuilder * */ com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder getOptionsOrBuilder(); + + /** + * + * + *
      +   * Optional. The hypothetical context for IAM conditions evaluation.
      +   * 
      + * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the conditionContext field is set. + */ + boolean hasConditionContext(); + /** + * + * + *
      +   * Optional. The hypothetical context for IAM conditions evaluation.
      +   * 
      + * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The conditionContext. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext getConditionContext(); + /** + * + * + *
      +   * Optional. The hypothetical context for IAM conditions evaluation.
      +   * 
      + * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContext condition_context = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ConditionContextOrBuilder + getConditionContextOrBuilder(); } diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResult.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResult.java index d30986019..a1c1ae075 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResult.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResult.java @@ -4672,6 +4672,44 @@ com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessOrBuilder getAccessesOrB */ com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder getResourceEdgesOrBuilder( int index); + + /** + * + * + *
      +     * Condition evaluation for this AccessControlList, if there is a condition
      +     * defined in the above IAM policy binding.
      +     * 
      + * + * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; + * + * @return Whether the conditionEvaluation field is set. + */ + boolean hasConditionEvaluation(); + /** + * + * + *
      +     * Condition evaluation for this AccessControlList, if there is a condition
      +     * defined in the above IAM policy binding.
      +     * 
      + * + * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; + * + * @return The conditionEvaluation. + */ + com.google.cloud.asset.v1.ConditionEvaluation getConditionEvaluation(); + /** + * + * + *
      +     * Condition evaluation for this AccessControlList, if there is a condition
      +     * defined in the above IAM policy binding.
      +     * 
      + * + * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; + */ + com.google.cloud.asset.v1.ConditionEvaluationOrBuilder getConditionEvaluationOrBuilder(); } /** * @@ -4781,6 +4819,22 @@ private AccessControlList( extensionRegistry)); break; } + case 34: + { + com.google.cloud.asset.v1.ConditionEvaluation.Builder subBuilder = null; + if (conditionEvaluation_ != null) { + subBuilder = conditionEvaluation_.toBuilder(); + } + conditionEvaluation_ = + input.readMessage( + com.google.cloud.asset.v1.ConditionEvaluation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(conditionEvaluation_); + conditionEvaluation_ = subBuilder.buildPartial(); + } + + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -5079,6 +5133,58 @@ public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge getResourceEdges(i return resourceEdges_.get(index); } + public static final int CONDITION_EVALUATION_FIELD_NUMBER = 4; + private com.google.cloud.asset.v1.ConditionEvaluation conditionEvaluation_; + /** + * + * + *
      +     * Condition evaluation for this AccessControlList, if there is a condition
      +     * defined in the above IAM policy binding.
      +     * 
      + * + * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; + * + * @return Whether the conditionEvaluation field is set. + */ + @java.lang.Override + public boolean hasConditionEvaluation() { + return conditionEvaluation_ != null; + } + /** + * + * + *
      +     * Condition evaluation for this AccessControlList, if there is a condition
      +     * defined in the above IAM policy binding.
      +     * 
      + * + * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; + * + * @return The conditionEvaluation. + */ + @java.lang.Override + public com.google.cloud.asset.v1.ConditionEvaluation getConditionEvaluation() { + return conditionEvaluation_ == null + ? com.google.cloud.asset.v1.ConditionEvaluation.getDefaultInstance() + : conditionEvaluation_; + } + /** + * + * + *
      +     * Condition evaluation for this AccessControlList, if there is a condition
      +     * defined in the above IAM policy binding.
      +     * 
      + * + * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; + */ + @java.lang.Override + public com.google.cloud.asset.v1.ConditionEvaluationOrBuilder + getConditionEvaluationOrBuilder() { + return getConditionEvaluation(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -5102,6 +5208,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < resourceEdges_.size(); i++) { output.writeMessage(3, resourceEdges_.get(i)); } + if (conditionEvaluation_ != null) { + output.writeMessage(4, getConditionEvaluation()); + } unknownFields.writeTo(output); } @@ -5120,6 +5229,10 @@ public int getSerializedSize() { for (int i = 0; i < resourceEdges_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, resourceEdges_.get(i)); } + if (conditionEvaluation_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, getConditionEvaluation()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -5139,6 +5252,10 @@ public boolean equals(final java.lang.Object obj) { if (!getResourcesList().equals(other.getResourcesList())) return false; if (!getAccessesList().equals(other.getAccessesList())) return false; if (!getResourceEdgesList().equals(other.getResourceEdgesList())) return false; + if (hasConditionEvaluation() != other.hasConditionEvaluation()) return false; + if (hasConditionEvaluation()) { + if (!getConditionEvaluation().equals(other.getConditionEvaluation())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -5162,6 +5279,10 @@ public int hashCode() { hash = (37 * hash) + RESOURCE_EDGES_FIELD_NUMBER; hash = (53 * hash) + getResourceEdgesList().hashCode(); } + if (hasConditionEvaluation()) { + hash = (37 * hash) + CONDITION_EVALUATION_FIELD_NUMBER; + hash = (53 * hash) + getConditionEvaluation().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -5345,6 +5466,12 @@ public Builder clear() { } else { resourceEdgesBuilder_.clear(); } + if (conditionEvaluationBuilder_ == null) { + conditionEvaluation_ = null; + } else { + conditionEvaluation_ = null; + conditionEvaluationBuilder_ = null; + } return this; } @@ -5402,6 +5529,11 @@ public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList build } else { result.resourceEdges_ = resourceEdgesBuilder_.build(); } + if (conditionEvaluationBuilder_ == null) { + result.conditionEvaluation_ = conditionEvaluation_; + } else { + result.conditionEvaluation_ = conditionEvaluationBuilder_.build(); + } onBuilt(); return result; } @@ -5538,6 +5670,9 @@ public Builder mergeFrom( } } } + if (other.hasConditionEvaluation()) { + mergeConditionEvaluation(other.getConditionEvaluation()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -6852,6 +6987,202 @@ public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder addResourc return resourceEdgesBuilder_; } + private com.google.cloud.asset.v1.ConditionEvaluation conditionEvaluation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.ConditionEvaluation, + com.google.cloud.asset.v1.ConditionEvaluation.Builder, + com.google.cloud.asset.v1.ConditionEvaluationOrBuilder> + conditionEvaluationBuilder_; + /** + * + * + *
      +       * Condition evaluation for this AccessControlList, if there is a condition
      +       * defined in the above IAM policy binding.
      +       * 
      + * + * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; + * + * @return Whether the conditionEvaluation field is set. + */ + public boolean hasConditionEvaluation() { + return conditionEvaluationBuilder_ != null || conditionEvaluation_ != null; + } + /** + * + * + *
      +       * Condition evaluation for this AccessControlList, if there is a condition
      +       * defined in the above IAM policy binding.
      +       * 
      + * + * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; + * + * @return The conditionEvaluation. + */ + public com.google.cloud.asset.v1.ConditionEvaluation getConditionEvaluation() { + if (conditionEvaluationBuilder_ == null) { + return conditionEvaluation_ == null + ? com.google.cloud.asset.v1.ConditionEvaluation.getDefaultInstance() + : conditionEvaluation_; + } else { + return conditionEvaluationBuilder_.getMessage(); + } + } + /** + * + * + *
      +       * Condition evaluation for this AccessControlList, if there is a condition
      +       * defined in the above IAM policy binding.
      +       * 
      + * + * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; + */ + public Builder setConditionEvaluation(com.google.cloud.asset.v1.ConditionEvaluation value) { + if (conditionEvaluationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + conditionEvaluation_ = value; + onChanged(); + } else { + conditionEvaluationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
      +       * Condition evaluation for this AccessControlList, if there is a condition
      +       * defined in the above IAM policy binding.
      +       * 
      + * + * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; + */ + public Builder setConditionEvaluation( + com.google.cloud.asset.v1.ConditionEvaluation.Builder builderForValue) { + if (conditionEvaluationBuilder_ == null) { + conditionEvaluation_ = builderForValue.build(); + onChanged(); + } else { + conditionEvaluationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
      +       * Condition evaluation for this AccessControlList, if there is a condition
      +       * defined in the above IAM policy binding.
      +       * 
      + * + * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; + */ + public Builder mergeConditionEvaluation(com.google.cloud.asset.v1.ConditionEvaluation value) { + if (conditionEvaluationBuilder_ == null) { + if (conditionEvaluation_ != null) { + conditionEvaluation_ = + com.google.cloud.asset.v1.ConditionEvaluation.newBuilder(conditionEvaluation_) + .mergeFrom(value) + .buildPartial(); + } else { + conditionEvaluation_ = value; + } + onChanged(); + } else { + conditionEvaluationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
      +       * Condition evaluation for this AccessControlList, if there is a condition
      +       * defined in the above IAM policy binding.
      +       * 
      + * + * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; + */ + public Builder clearConditionEvaluation() { + if (conditionEvaluationBuilder_ == null) { + conditionEvaluation_ = null; + onChanged(); + } else { + conditionEvaluation_ = null; + conditionEvaluationBuilder_ = null; + } + + return this; + } + /** + * + * + *
      +       * Condition evaluation for this AccessControlList, if there is a condition
      +       * defined in the above IAM policy binding.
      +       * 
      + * + * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; + */ + public com.google.cloud.asset.v1.ConditionEvaluation.Builder getConditionEvaluationBuilder() { + + onChanged(); + return getConditionEvaluationFieldBuilder().getBuilder(); + } + /** + * + * + *
      +       * Condition evaluation for this AccessControlList, if there is a condition
      +       * defined in the above IAM policy binding.
      +       * 
      + * + * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; + */ + public com.google.cloud.asset.v1.ConditionEvaluationOrBuilder + getConditionEvaluationOrBuilder() { + if (conditionEvaluationBuilder_ != null) { + return conditionEvaluationBuilder_.getMessageOrBuilder(); + } else { + return conditionEvaluation_ == null + ? com.google.cloud.asset.v1.ConditionEvaluation.getDefaultInstance() + : conditionEvaluation_; + } + } + /** + * + * + *
      +       * Condition evaluation for this AccessControlList, if there is a condition
      +       * defined in the above IAM policy binding.
      +       * 
      + * + * .google.cloud.asset.v1.ConditionEvaluation condition_evaluation = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.ConditionEvaluation, + com.google.cloud.asset.v1.ConditionEvaluation.Builder, + com.google.cloud.asset.v1.ConditionEvaluationOrBuilder> + getConditionEvaluationFieldBuilder() { + if (conditionEvaluationBuilder_ == null) { + conditionEvaluationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.ConditionEvaluation, + com.google.cloud.asset.v1.ConditionEvaluation.Builder, + com.google.cloud.asset.v1.ConditionEvaluationOrBuilder>( + getConditionEvaluation(), getParentForChildren(), isClean()); + conditionEvaluation_ = null; + } + return conditionEvaluationBuilder_; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResult.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResult.java index 6e484cf78..7d717b2ac 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResult.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResult.java @@ -2080,7 +2080,7 @@ public com.google.protobuf.ByteString getResourceBytes() { * projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM * instance, Cloud Storage bucket), the project field will indicate the * project that contains the resource. If an IAM policy is set on a folder or - * orgnization, the project field will be empty. + * orgnization, this field will be empty. * To search against the `project`: * * specify the `scope` field as this project in your search request. * @@ -2109,7 +2109,7 @@ public java.lang.String getProject() { * projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM * instance, Cloud Storage bucket), the project field will indicate the * project that contains the resource. If an IAM policy is set on a folder or - * orgnization, the project field will be empty. + * orgnization, this field will be empty. * To search against the `project`: * * specify the `scope` field as this project in your search request. * @@ -2801,7 +2801,7 @@ public Builder setResourceBytes(com.google.protobuf.ByteString value) { * projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM * instance, Cloud Storage bucket), the project field will indicate the * project that contains the resource. If an IAM policy is set on a folder or - * orgnization, the project field will be empty. + * orgnization, this field will be empty. * To search against the `project`: * * specify the `scope` field as this project in your search request. * @@ -2829,7 +2829,7 @@ public java.lang.String getProject() { * projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM * instance, Cloud Storage bucket), the project field will indicate the * project that contains the resource. If an IAM policy is set on a folder or - * orgnization, the project field will be empty. + * orgnization, this field will be empty. * To search against the `project`: * * specify the `scope` field as this project in your search request. * @@ -2857,7 +2857,7 @@ public com.google.protobuf.ByteString getProjectBytes() { * projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM * instance, Cloud Storage bucket), the project field will indicate the * project that contains the resource. If an IAM policy is set on a folder or - * orgnization, the project field will be empty. + * orgnization, this field will be empty. * To search against the `project`: * * specify the `scope` field as this project in your search request. * @@ -2884,7 +2884,7 @@ public Builder setProject(java.lang.String value) { * projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM * instance, Cloud Storage bucket), the project field will indicate the * project that contains the resource. If an IAM policy is set on a folder or - * orgnization, the project field will be empty. + * orgnization, this field will be empty. * To search against the `project`: * * specify the `scope` field as this project in your search request. * @@ -2907,7 +2907,7 @@ public Builder clearProject() { * projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM * instance, Cloud Storage bucket), the project field will indicate the * project that contains the resource. If an IAM policy is set on a folder or - * orgnization, the project field will be empty. + * orgnization, this field will be empty. * To search against the `project`: * * specify the `scope` field as this project in your search request. * diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResultOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResultOrBuilder.java index c6c95cad5..8c5e8cefb 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResultOrBuilder.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResultOrBuilder.java @@ -70,7 +70,7 @@ public interface IamPolicySearchResultOrBuilder * projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM * instance, Cloud Storage bucket), the project field will indicate the * project that contains the resource. If an IAM policy is set on a folder or - * orgnization, the project field will be empty. + * orgnization, this field will be empty. * To search against the `project`: * * specify the `scope` field as this project in your search request. * @@ -88,7 +88,7 @@ public interface IamPolicySearchResultOrBuilder * projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM * instance, Cloud Storage bucket), the project field will indicate the * project that contains the resource. If an IAM policy is set on a folder or - * orgnization, the project field will be empty. + * orgnization, this field will be empty. * To search against the `project`: * * specify the `scope` field as this project in your search request. * diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequest.java new file mode 100644 index 000000000..bc275f5d8 --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequest.java @@ -0,0 +1,1880 @@ +/* + * Copyright 2020 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/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + * + * + *
      + * ListAssets request.
      + * 
      + * + * Protobuf type {@code google.cloud.asset.v1.ListAssetsRequest} + */ +public final class ListAssetsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.ListAssetsRequest) + ListAssetsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAssetsRequest.newBuilder() to construct. + private ListAssetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAssetsRequest() { + parent_ = ""; + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + contentType_ = 0; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAssetsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAssetsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (readTime_ != null) { + subBuilder = readTime_.toBuilder(); + } + readTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readTime_); + readTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + assetTypes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + assetTypes_.add(s); + break; + } + case 32: + { + int rawValue = input.readEnum(); + + contentType_ = rawValue; + break; + } + case 40: + { + pageSize_ = input.readInt32(); + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + assetTypes_ = assetTypes_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_ListAssetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_ListAssetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.ListAssetsRequest.class, + com.google.cloud.asset.v1.ListAssetsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
      +   * Required. Name of the organization or project the assets belong to. Format:
      +   * "organizations/[organization-number]" (such as "organizations/123"),
      +   * "projects/[project-id]" (such as "projects/my-project-id"), or
      +   * "projects/[project-number]" (such as "projects/12345").
      +   * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
      +   * Required. Name of the organization or project the assets belong to. Format:
      +   * "organizations/[organization-number]" (such as "organizations/123"),
      +   * "projects/[project-id]" (such as "projects/my-project-id"), or
      +   * "projects/[project-number]" (such as "projects/12345").
      +   * 
      + * + * + * 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 READ_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp readTime_; + /** + * + * + *
      +   * Timestamp to take an asset snapshot. This can only be set to a timestamp
      +   * between the current time and the current time minus 35 days (inclusive).
      +   * If not specified, the current time will be used. Due to delays in resource
      +   * data collection and indexing, there is a volatile window during which
      +   * running the same query may get different results.
      +   * 
      + * + * .google.protobuf.Timestamp read_time = 2; + * + * @return Whether the readTime field is set. + */ + @java.lang.Override + public boolean hasReadTime() { + return readTime_ != null; + } + /** + * + * + *
      +   * Timestamp to take an asset snapshot. This can only be set to a timestamp
      +   * between the current time and the current time minus 35 days (inclusive).
      +   * If not specified, the current time will be used. Due to delays in resource
      +   * data collection and indexing, there is a volatile window during which
      +   * running the same query may get different results.
      +   * 
      + * + * .google.protobuf.Timestamp read_time = 2; + * + * @return The readTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getReadTime() { + return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } + /** + * + * + *
      +   * Timestamp to take an asset snapshot. This can only be set to a timestamp
      +   * between the current time and the current time minus 35 days (inclusive).
      +   * If not specified, the current time will be used. Due to delays in resource
      +   * data collection and indexing, there is a volatile window during which
      +   * running the same query may get different results.
      +   * 
      + * + * .google.protobuf.Timestamp read_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { + return getReadTime(); + } + + public static final int ASSET_TYPES_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList assetTypes_; + /** + * + * + *
      +   * A list of asset types to take a snapshot for. For example:
      +   * "compute.googleapis.com/Disk".
      +   * Regular expression is also supported. For example:
      +   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
      +   * with "compute.googleapis.com".
      +   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
      +   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
      +   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
      +   * regular expression syntax. If the regular expression does not match any
      +   * supported asset type, an INVALID_ARGUMENT error will be returned.
      +   * If specified, only matching assets will be returned, otherwise, it will
      +   * snapshot all asset types. See [Introduction to Cloud Asset
      +   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
      +   * for all supported asset types.
      +   * 
      + * + * repeated string asset_types = 3; + * + * @return A list containing the assetTypes. + */ + public com.google.protobuf.ProtocolStringList getAssetTypesList() { + return assetTypes_; + } + /** + * + * + *
      +   * A list of asset types to take a snapshot for. For example:
      +   * "compute.googleapis.com/Disk".
      +   * Regular expression is also supported. For example:
      +   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
      +   * with "compute.googleapis.com".
      +   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
      +   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
      +   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
      +   * regular expression syntax. If the regular expression does not match any
      +   * supported asset type, an INVALID_ARGUMENT error will be returned.
      +   * If specified, only matching assets will be returned, otherwise, it will
      +   * snapshot all asset types. See [Introduction to Cloud Asset
      +   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
      +   * for all supported asset types.
      +   * 
      + * + * repeated string asset_types = 3; + * + * @return The count of assetTypes. + */ + public int getAssetTypesCount() { + return assetTypes_.size(); + } + /** + * + * + *
      +   * A list of asset types to take a snapshot for. For example:
      +   * "compute.googleapis.com/Disk".
      +   * Regular expression is also supported. For example:
      +   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
      +   * with "compute.googleapis.com".
      +   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
      +   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
      +   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
      +   * regular expression syntax. If the regular expression does not match any
      +   * supported asset type, an INVALID_ARGUMENT error will be returned.
      +   * If specified, only matching assets will be returned, otherwise, it will
      +   * snapshot all asset types. See [Introduction to Cloud Asset
      +   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
      +   * for all supported asset types.
      +   * 
      + * + * repeated string asset_types = 3; + * + * @param index The index of the element to return. + * @return The assetTypes at the given index. + */ + public java.lang.String getAssetTypes(int index) { + return assetTypes_.get(index); + } + /** + * + * + *
      +   * A list of asset types to take a snapshot for. For example:
      +   * "compute.googleapis.com/Disk".
      +   * Regular expression is also supported. For example:
      +   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
      +   * with "compute.googleapis.com".
      +   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
      +   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
      +   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
      +   * regular expression syntax. If the regular expression does not match any
      +   * supported asset type, an INVALID_ARGUMENT error will be returned.
      +   * If specified, only matching assets will be returned, otherwise, it will
      +   * snapshot all asset types. See [Introduction to Cloud Asset
      +   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
      +   * for all supported asset types.
      +   * 
      + * + * repeated string asset_types = 3; + * + * @param index The index of the value to return. + * @return The bytes of the assetTypes at the given index. + */ + public com.google.protobuf.ByteString getAssetTypesBytes(int index) { + return assetTypes_.getByteString(index); + } + + public static final int CONTENT_TYPE_FIELD_NUMBER = 4; + private int contentType_; + /** + * + * + *
      +   * Asset content type. If not specified, no content but the asset name will
      +   * be returned.
      +   * 
      + * + * .google.cloud.asset.v1.ContentType content_type = 4; + * + * @return The enum numeric value on the wire for contentType. + */ + @java.lang.Override + public int getContentTypeValue() { + return contentType_; + } + /** + * + * + *
      +   * Asset content type. If not specified, no content but the asset name will
      +   * be returned.
      +   * 
      + * + * .google.cloud.asset.v1.ContentType content_type = 4; + * + * @return The contentType. + */ + @java.lang.Override + public com.google.cloud.asset.v1.ContentType getContentType() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1.ContentType result = + com.google.cloud.asset.v1.ContentType.valueOf(contentType_); + return result == null ? com.google.cloud.asset.v1.ContentType.UNRECOGNIZED : result; + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 5; + private int pageSize_; + /** + * + * + *
      +   * The maximum number of assets to be returned in a single response. Default
      +   * is 100, minimum is 1, and maximum is 1000.
      +   * 
      + * + * int32 page_size = 5; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 6; + private volatile java.lang.Object pageToken_; + /** + * + * + *
      +   * The `next_page_token` returned from the previous `ListAssetsResponse`, or
      +   * unspecified for the first `ListAssetsRequest`. It is a continuation of a
      +   * prior `ListAssets` call, and the API should return the next page of assets.
      +   * 
      + * + * string page_token = 6; + * + * @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; + } + } + /** + * + * + *
      +   * The `next_page_token` returned from the previous `ListAssetsResponse`, or
      +   * unspecified for the first `ListAssetsRequest`. It is a continuation of a
      +   * prior `ListAssets` call, and the API should return the next page of assets.
      +   * 
      + * + * string page_token = 6; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (readTime_ != null) { + output.writeMessage(2, getReadTime()); + } + for (int i = 0; i < assetTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, assetTypes_.getRaw(i)); + } + if (contentType_ + != com.google.cloud.asset.v1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(4, contentType_); + } + if (pageSize_ != 0) { + output.writeInt32(5, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (readTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getReadTime()); + } + { + int dataSize = 0; + for (int i = 0; i < assetTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(assetTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getAssetTypesList().size(); + } + if (contentType_ + != com.google.cloud.asset.v1.ContentType.CONTENT_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, contentType_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.ListAssetsRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.ListAssetsRequest other = + (com.google.cloud.asset.v1.ListAssetsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasReadTime() != other.hasReadTime()) return false; + if (hasReadTime()) { + if (!getReadTime().equals(other.getReadTime())) return false; + } + if (!getAssetTypesList().equals(other.getAssetTypesList())) return false; + if (contentType_ != other.contentType_) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) 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 (hasReadTime()) { + hash = (37 * hash) + READ_TIME_FIELD_NUMBER; + hash = (53 * hash) + getReadTime().hashCode(); + } + if (getAssetTypesCount() > 0) { + hash = (37 * hash) + ASSET_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getAssetTypesList().hashCode(); + } + hash = (37 * hash) + CONTENT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + contentType_; + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.ListAssetsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.ListAssetsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1.ListAssetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.ListAssetsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1.ListAssetsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.ListAssetsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1.ListAssetsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.ListAssetsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.asset.v1.ListAssetsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.ListAssetsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.asset.v1.ListAssetsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.ListAssetsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.asset.v1.ListAssetsRequest 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; + } + /** + * + * + *
      +   * ListAssets request.
      +   * 
      + * + * Protobuf type {@code google.cloud.asset.v1.ListAssetsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.ListAssetsRequest) + com.google.cloud.asset.v1.ListAssetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_ListAssetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_ListAssetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.ListAssetsRequest.class, + com.google.cloud.asset.v1.ListAssetsRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.ListAssetsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (readTimeBuilder_ == null) { + readTime_ = null; + } else { + readTime_ = null; + readTimeBuilder_ = null; + } + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + contentType_ = 0; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_ListAssetsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListAssetsRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1.ListAssetsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListAssetsRequest build() { + com.google.cloud.asset.v1.ListAssetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListAssetsRequest buildPartial() { + com.google.cloud.asset.v1.ListAssetsRequest result = + new com.google.cloud.asset.v1.ListAssetsRequest(this); + int from_bitField0_ = bitField0_; + result.parent_ = parent_; + if (readTimeBuilder_ == null) { + result.readTime_ = readTime_; + } else { + result.readTime_ = readTimeBuilder_.build(); + } + if (((bitField0_ & 0x00000001) != 0)) { + assetTypes_ = assetTypes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.assetTypes_ = assetTypes_; + result.contentType_ = contentType_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @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.cloud.asset.v1.ListAssetsRequest) { + return mergeFrom((com.google.cloud.asset.v1.ListAssetsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.ListAssetsRequest other) { + if (other == com.google.cloud.asset.v1.ListAssetsRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasReadTime()) { + mergeReadTime(other.getReadTime()); + } + if (!other.assetTypes_.isEmpty()) { + if (assetTypes_.isEmpty()) { + assetTypes_ = other.assetTypes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAssetTypesIsMutable(); + assetTypes_.addAll(other.assetTypes_); + } + onChanged(); + } + if (other.contentType_ != 0) { + setContentTypeValue(other.getContentTypeValue()); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.ListAssetsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.ListAssetsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
      +     * Required. Name of the organization or project the assets belong to. Format:
      +     * "organizations/[organization-number]" (such as "organizations/123"),
      +     * "projects/[project-id]" (such as "projects/my-project-id"), or
      +     * "projects/[project-number]" (such as "projects/12345").
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
      +     * Required. Name of the organization or project the assets belong to. Format:
      +     * "organizations/[organization-number]" (such as "organizations/123"),
      +     * "projects/[project-id]" (such as "projects/my-project-id"), or
      +     * "projects/[project-number]" (such as "projects/12345").
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
      +     * Required. Name of the organization or project the assets belong to. Format:
      +     * "organizations/[organization-number]" (such as "organizations/123"),
      +     * "projects/[project-id]" (such as "projects/my-project-id"), or
      +     * "projects/[project-number]" (such as "projects/12345").
      +     * 
      + * + * + * 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; + onChanged(); + return this; + } + /** + * + * + *
      +     * Required. Name of the organization or project the assets belong to. Format:
      +     * "organizations/[organization-number]" (such as "organizations/123"),
      +     * "projects/[project-id]" (such as "projects/my-project-id"), or
      +     * "projects/[project-number]" (such as "projects/12345").
      +     * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
      +     * Required. Name of the organization or project the assets belong to. Format:
      +     * "organizations/[organization-number]" (such as "organizations/123"),
      +     * "projects/[project-id]" (such as "projects/my-project-id"), or
      +     * "projects/[project-number]" (such as "projects/12345").
      +     * 
      + * + * + * 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; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp readTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + readTimeBuilder_; + /** + * + * + *
      +     * Timestamp to take an asset snapshot. This can only be set to a timestamp
      +     * between the current time and the current time minus 35 days (inclusive).
      +     * If not specified, the current time will be used. Due to delays in resource
      +     * data collection and indexing, there is a volatile window during which
      +     * running the same query may get different results.
      +     * 
      + * + * .google.protobuf.Timestamp read_time = 2; + * + * @return Whether the readTime field is set. + */ + public boolean hasReadTime() { + return readTimeBuilder_ != null || readTime_ != null; + } + /** + * + * + *
      +     * Timestamp to take an asset snapshot. This can only be set to a timestamp
      +     * between the current time and the current time minus 35 days (inclusive).
      +     * If not specified, the current time will be used. Due to delays in resource
      +     * data collection and indexing, there is a volatile window during which
      +     * running the same query may get different results.
      +     * 
      + * + * .google.protobuf.Timestamp read_time = 2; + * + * @return The readTime. + */ + public com.google.protobuf.Timestamp getReadTime() { + if (readTimeBuilder_ == null) { + return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } else { + return readTimeBuilder_.getMessage(); + } + } + /** + * + * + *
      +     * Timestamp to take an asset snapshot. This can only be set to a timestamp
      +     * between the current time and the current time minus 35 days (inclusive).
      +     * If not specified, the current time will be used. Due to delays in resource
      +     * data collection and indexing, there is a volatile window during which
      +     * running the same query may get different results.
      +     * 
      + * + * .google.protobuf.Timestamp read_time = 2; + */ + public Builder setReadTime(com.google.protobuf.Timestamp value) { + if (readTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readTime_ = value; + onChanged(); + } else { + readTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
      +     * Timestamp to take an asset snapshot. This can only be set to a timestamp
      +     * between the current time and the current time minus 35 days (inclusive).
      +     * If not specified, the current time will be used. Due to delays in resource
      +     * data collection and indexing, there is a volatile window during which
      +     * running the same query may get different results.
      +     * 
      + * + * .google.protobuf.Timestamp read_time = 2; + */ + public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (readTimeBuilder_ == null) { + readTime_ = builderForValue.build(); + onChanged(); + } else { + readTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
      +     * Timestamp to take an asset snapshot. This can only be set to a timestamp
      +     * between the current time and the current time minus 35 days (inclusive).
      +     * If not specified, the current time will be used. Due to delays in resource
      +     * data collection and indexing, there is a volatile window during which
      +     * running the same query may get different results.
      +     * 
      + * + * .google.protobuf.Timestamp read_time = 2; + */ + public Builder mergeReadTime(com.google.protobuf.Timestamp value) { + if (readTimeBuilder_ == null) { + if (readTime_ != null) { + readTime_ = + com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial(); + } else { + readTime_ = value; + } + onChanged(); + } else { + readTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
      +     * Timestamp to take an asset snapshot. This can only be set to a timestamp
      +     * between the current time and the current time minus 35 days (inclusive).
      +     * If not specified, the current time will be used. Due to delays in resource
      +     * data collection and indexing, there is a volatile window during which
      +     * running the same query may get different results.
      +     * 
      + * + * .google.protobuf.Timestamp read_time = 2; + */ + public Builder clearReadTime() { + if (readTimeBuilder_ == null) { + readTime_ = null; + onChanged(); + } else { + readTime_ = null; + readTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
      +     * Timestamp to take an asset snapshot. This can only be set to a timestamp
      +     * between the current time and the current time minus 35 days (inclusive).
      +     * If not specified, the current time will be used. Due to delays in resource
      +     * data collection and indexing, there is a volatile window during which
      +     * running the same query may get different results.
      +     * 
      + * + * .google.protobuf.Timestamp read_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { + + onChanged(); + return getReadTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
      +     * Timestamp to take an asset snapshot. This can only be set to a timestamp
      +     * between the current time and the current time minus 35 days (inclusive).
      +     * If not specified, the current time will be used. Due to delays in resource
      +     * data collection and indexing, there is a volatile window during which
      +     * running the same query may get different results.
      +     * 
      + * + * .google.protobuf.Timestamp read_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { + if (readTimeBuilder_ != null) { + return readTimeBuilder_.getMessageOrBuilder(); + } else { + return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } + } + /** + * + * + *
      +     * Timestamp to take an asset snapshot. This can only be set to a timestamp
      +     * between the current time and the current time minus 35 days (inclusive).
      +     * If not specified, the current time will be used. Due to delays in resource
      +     * data collection and indexing, there is a volatile window during which
      +     * running the same query may get different results.
      +     * 
      + * + * .google.protobuf.Timestamp read_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getReadTimeFieldBuilder() { + if (readTimeBuilder_ == null) { + readTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getReadTime(), getParentForChildren(), isClean()); + readTime_ = null; + } + return readTimeBuilder_; + } + + private com.google.protobuf.LazyStringList assetTypes_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureAssetTypesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + assetTypes_ = new com.google.protobuf.LazyStringArrayList(assetTypes_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
      +     * A list of asset types to take a snapshot for. For example:
      +     * "compute.googleapis.com/Disk".
      +     * Regular expression is also supported. For example:
      +     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
      +     * with "compute.googleapis.com".
      +     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
      +     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
      +     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
      +     * regular expression syntax. If the regular expression does not match any
      +     * supported asset type, an INVALID_ARGUMENT error will be returned.
      +     * If specified, only matching assets will be returned, otherwise, it will
      +     * snapshot all asset types. See [Introduction to Cloud Asset
      +     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
      +     * for all supported asset types.
      +     * 
      + * + * repeated string asset_types = 3; + * + * @return A list containing the assetTypes. + */ + public com.google.protobuf.ProtocolStringList getAssetTypesList() { + return assetTypes_.getUnmodifiableView(); + } + /** + * + * + *
      +     * A list of asset types to take a snapshot for. For example:
      +     * "compute.googleapis.com/Disk".
      +     * Regular expression is also supported. For example:
      +     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
      +     * with "compute.googleapis.com".
      +     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
      +     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
      +     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
      +     * regular expression syntax. If the regular expression does not match any
      +     * supported asset type, an INVALID_ARGUMENT error will be returned.
      +     * If specified, only matching assets will be returned, otherwise, it will
      +     * snapshot all asset types. See [Introduction to Cloud Asset
      +     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
      +     * for all supported asset types.
      +     * 
      + * + * repeated string asset_types = 3; + * + * @return The count of assetTypes. + */ + public int getAssetTypesCount() { + return assetTypes_.size(); + } + /** + * + * + *
      +     * A list of asset types to take a snapshot for. For example:
      +     * "compute.googleapis.com/Disk".
      +     * Regular expression is also supported. For example:
      +     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
      +     * with "compute.googleapis.com".
      +     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
      +     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
      +     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
      +     * regular expression syntax. If the regular expression does not match any
      +     * supported asset type, an INVALID_ARGUMENT error will be returned.
      +     * If specified, only matching assets will be returned, otherwise, it will
      +     * snapshot all asset types. See [Introduction to Cloud Asset
      +     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
      +     * for all supported asset types.
      +     * 
      + * + * repeated string asset_types = 3; + * + * @param index The index of the element to return. + * @return The assetTypes at the given index. + */ + public java.lang.String getAssetTypes(int index) { + return assetTypes_.get(index); + } + /** + * + * + *
      +     * A list of asset types to take a snapshot for. For example:
      +     * "compute.googleapis.com/Disk".
      +     * Regular expression is also supported. For example:
      +     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
      +     * with "compute.googleapis.com".
      +     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
      +     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
      +     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
      +     * regular expression syntax. If the regular expression does not match any
      +     * supported asset type, an INVALID_ARGUMENT error will be returned.
      +     * If specified, only matching assets will be returned, otherwise, it will
      +     * snapshot all asset types. See [Introduction to Cloud Asset
      +     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
      +     * for all supported asset types.
      +     * 
      + * + * repeated string asset_types = 3; + * + * @param index The index of the value to return. + * @return The bytes of the assetTypes at the given index. + */ + public com.google.protobuf.ByteString getAssetTypesBytes(int index) { + return assetTypes_.getByteString(index); + } + /** + * + * + *
      +     * A list of asset types to take a snapshot for. For example:
      +     * "compute.googleapis.com/Disk".
      +     * Regular expression is also supported. For example:
      +     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
      +     * with "compute.googleapis.com".
      +     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
      +     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
      +     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
      +     * regular expression syntax. If the regular expression does not match any
      +     * supported asset type, an INVALID_ARGUMENT error will be returned.
      +     * If specified, only matching assets will be returned, otherwise, it will
      +     * snapshot all asset types. See [Introduction to Cloud Asset
      +     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
      +     * for all supported asset types.
      +     * 
      + * + * repeated string asset_types = 3; + * + * @param index The index to set the value at. + * @param value The assetTypes to set. + * @return This builder for chaining. + */ + public Builder setAssetTypes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetTypesIsMutable(); + assetTypes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
      +     * A list of asset types to take a snapshot for. For example:
      +     * "compute.googleapis.com/Disk".
      +     * Regular expression is also supported. For example:
      +     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
      +     * with "compute.googleapis.com".
      +     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
      +     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
      +     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
      +     * regular expression syntax. If the regular expression does not match any
      +     * supported asset type, an INVALID_ARGUMENT error will be returned.
      +     * If specified, only matching assets will be returned, otherwise, it will
      +     * snapshot all asset types. See [Introduction to Cloud Asset
      +     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
      +     * for all supported asset types.
      +     * 
      + * + * repeated string asset_types = 3; + * + * @param value The assetTypes to add. + * @return This builder for chaining. + */ + public Builder addAssetTypes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetTypesIsMutable(); + assetTypes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
      +     * A list of asset types to take a snapshot for. For example:
      +     * "compute.googleapis.com/Disk".
      +     * Regular expression is also supported. For example:
      +     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
      +     * with "compute.googleapis.com".
      +     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
      +     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
      +     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
      +     * regular expression syntax. If the regular expression does not match any
      +     * supported asset type, an INVALID_ARGUMENT error will be returned.
      +     * If specified, only matching assets will be returned, otherwise, it will
      +     * snapshot all asset types. See [Introduction to Cloud Asset
      +     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
      +     * for all supported asset types.
      +     * 
      + * + * repeated string asset_types = 3; + * + * @param values The assetTypes to add. + * @return This builder for chaining. + */ + public Builder addAllAssetTypes(java.lang.Iterable values) { + ensureAssetTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, assetTypes_); + onChanged(); + return this; + } + /** + * + * + *
      +     * A list of asset types to take a snapshot for. For example:
      +     * "compute.googleapis.com/Disk".
      +     * Regular expression is also supported. For example:
      +     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
      +     * with "compute.googleapis.com".
      +     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
      +     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
      +     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
      +     * regular expression syntax. If the regular expression does not match any
      +     * supported asset type, an INVALID_ARGUMENT error will be returned.
      +     * If specified, only matching assets will be returned, otherwise, it will
      +     * snapshot all asset types. See [Introduction to Cloud Asset
      +     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
      +     * for all supported asset types.
      +     * 
      + * + * repeated string asset_types = 3; + * + * @return This builder for chaining. + */ + public Builder clearAssetTypes() { + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
      +     * A list of asset types to take a snapshot for. For example:
      +     * "compute.googleapis.com/Disk".
      +     * Regular expression is also supported. For example:
      +     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
      +     * with "compute.googleapis.com".
      +     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
      +     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
      +     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
      +     * regular expression syntax. If the regular expression does not match any
      +     * supported asset type, an INVALID_ARGUMENT error will be returned.
      +     * If specified, only matching assets will be returned, otherwise, it will
      +     * snapshot all asset types. See [Introduction to Cloud Asset
      +     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
      +     * for all supported asset types.
      +     * 
      + * + * repeated string asset_types = 3; + * + * @param value The bytes of the assetTypes to add. + * @return This builder for chaining. + */ + public Builder addAssetTypesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAssetTypesIsMutable(); + assetTypes_.add(value); + onChanged(); + return this; + } + + private int contentType_ = 0; + /** + * + * + *
      +     * Asset content type. If not specified, no content but the asset name will
      +     * be returned.
      +     * 
      + * + * .google.cloud.asset.v1.ContentType content_type = 4; + * + * @return The enum numeric value on the wire for contentType. + */ + @java.lang.Override + public int getContentTypeValue() { + return contentType_; + } + /** + * + * + *
      +     * Asset content type. If not specified, no content but the asset name will
      +     * be returned.
      +     * 
      + * + * .google.cloud.asset.v1.ContentType content_type = 4; + * + * @param value The enum numeric value on the wire for contentType to set. + * @return This builder for chaining. + */ + public Builder setContentTypeValue(int value) { + + contentType_ = value; + onChanged(); + return this; + } + /** + * + * + *
      +     * Asset content type. If not specified, no content but the asset name will
      +     * be returned.
      +     * 
      + * + * .google.cloud.asset.v1.ContentType content_type = 4; + * + * @return The contentType. + */ + @java.lang.Override + public com.google.cloud.asset.v1.ContentType getContentType() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1.ContentType result = + com.google.cloud.asset.v1.ContentType.valueOf(contentType_); + return result == null ? com.google.cloud.asset.v1.ContentType.UNRECOGNIZED : result; + } + /** + * + * + *
      +     * Asset content type. If not specified, no content but the asset name will
      +     * be returned.
      +     * 
      + * + * .google.cloud.asset.v1.ContentType content_type = 4; + * + * @param value The contentType to set. + * @return This builder for chaining. + */ + public Builder setContentType(com.google.cloud.asset.v1.ContentType value) { + if (value == null) { + throw new NullPointerException(); + } + + contentType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
      +     * Asset content type. If not specified, no content but the asset name will
      +     * be returned.
      +     * 
      + * + * .google.cloud.asset.v1.ContentType content_type = 4; + * + * @return This builder for chaining. + */ + public Builder clearContentType() { + + contentType_ = 0; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
      +     * The maximum number of assets to be returned in a single response. Default
      +     * is 100, minimum is 1, and maximum is 1000.
      +     * 
      + * + * int32 page_size = 5; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
      +     * The maximum number of assets to be returned in a single response. Default
      +     * is 100, minimum is 1, and maximum is 1000.
      +     * 
      + * + * int32 page_size = 5; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
      +     * The maximum number of assets to be returned in a single response. Default
      +     * is 100, minimum is 1, and maximum is 1000.
      +     * 
      + * + * int32 page_size = 5; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
      +     * The `next_page_token` returned from the previous `ListAssetsResponse`, or
      +     * unspecified for the first `ListAssetsRequest`. It is a continuation of a
      +     * prior `ListAssets` call, and the API should return the next page of assets.
      +     * 
      + * + * string page_token = 6; + * + * @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; + } + } + /** + * + * + *
      +     * The `next_page_token` returned from the previous `ListAssetsResponse`, or
      +     * unspecified for the first `ListAssetsRequest`. It is a continuation of a
      +     * prior `ListAssets` call, and the API should return the next page of assets.
      +     * 
      + * + * string page_token = 6; + * + * @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; + } + } + /** + * + * + *
      +     * The `next_page_token` returned from the previous `ListAssetsResponse`, or
      +     * unspecified for the first `ListAssetsRequest`. It is a continuation of a
      +     * prior `ListAssets` call, and the API should return the next page of assets.
      +     * 
      + * + * string page_token = 6; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
      +     * The `next_page_token` returned from the previous `ListAssetsResponse`, or
      +     * unspecified for the first `ListAssetsRequest`. It is a continuation of a
      +     * prior `ListAssets` call, and the API should return the next page of assets.
      +     * 
      + * + * string page_token = 6; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
      +     * The `next_page_token` returned from the previous `ListAssetsResponse`, or
      +     * unspecified for the first `ListAssetsRequest`. It is a continuation of a
      +     * prior `ListAssets` call, and the API should return the next page of assets.
      +     * 
      + * + * string page_token = 6; + * + * @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; + 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.cloud.asset.v1.ListAssetsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.ListAssetsRequest) + private static final com.google.cloud.asset.v1.ListAssetsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.ListAssetsRequest(); + } + + public static com.google.cloud.asset.v1.ListAssetsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAssetsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAssetsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListAssetsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequestOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequestOrBuilder.java new file mode 100644 index 000000000..f446c5877 --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequestOrBuilder.java @@ -0,0 +1,280 @@ +/* + * Copyright 2020 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/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface ListAssetsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.ListAssetsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * Required. Name of the organization or project the assets belong to. Format:
      +   * "organizations/[organization-number]" (such as "organizations/123"),
      +   * "projects/[project-id]" (such as "projects/my-project-id"), or
      +   * "projects/[project-number]" (such as "projects/12345").
      +   * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
      +   * Required. Name of the organization or project the assets belong to. Format:
      +   * "organizations/[organization-number]" (such as "organizations/123"),
      +   * "projects/[project-id]" (such as "projects/my-project-id"), or
      +   * "projects/[project-number]" (such as "projects/12345").
      +   * 
      + * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
      +   * Timestamp to take an asset snapshot. This can only be set to a timestamp
      +   * between the current time and the current time minus 35 days (inclusive).
      +   * If not specified, the current time will be used. Due to delays in resource
      +   * data collection and indexing, there is a volatile window during which
      +   * running the same query may get different results.
      +   * 
      + * + * .google.protobuf.Timestamp read_time = 2; + * + * @return Whether the readTime field is set. + */ + boolean hasReadTime(); + /** + * + * + *
      +   * Timestamp to take an asset snapshot. This can only be set to a timestamp
      +   * between the current time and the current time minus 35 days (inclusive).
      +   * If not specified, the current time will be used. Due to delays in resource
      +   * data collection and indexing, there is a volatile window during which
      +   * running the same query may get different results.
      +   * 
      + * + * .google.protobuf.Timestamp read_time = 2; + * + * @return The readTime. + */ + com.google.protobuf.Timestamp getReadTime(); + /** + * + * + *
      +   * Timestamp to take an asset snapshot. This can only be set to a timestamp
      +   * between the current time and the current time minus 35 days (inclusive).
      +   * If not specified, the current time will be used. Due to delays in resource
      +   * data collection and indexing, there is a volatile window during which
      +   * running the same query may get different results.
      +   * 
      + * + * .google.protobuf.Timestamp read_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder(); + + /** + * + * + *
      +   * A list of asset types to take a snapshot for. For example:
      +   * "compute.googleapis.com/Disk".
      +   * Regular expression is also supported. For example:
      +   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
      +   * with "compute.googleapis.com".
      +   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
      +   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
      +   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
      +   * regular expression syntax. If the regular expression does not match any
      +   * supported asset type, an INVALID_ARGUMENT error will be returned.
      +   * If specified, only matching assets will be returned, otherwise, it will
      +   * snapshot all asset types. See [Introduction to Cloud Asset
      +   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
      +   * for all supported asset types.
      +   * 
      + * + * repeated string asset_types = 3; + * + * @return A list containing the assetTypes. + */ + java.util.List getAssetTypesList(); + /** + * + * + *
      +   * A list of asset types to take a snapshot for. For example:
      +   * "compute.googleapis.com/Disk".
      +   * Regular expression is also supported. For example:
      +   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
      +   * with "compute.googleapis.com".
      +   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
      +   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
      +   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
      +   * regular expression syntax. If the regular expression does not match any
      +   * supported asset type, an INVALID_ARGUMENT error will be returned.
      +   * If specified, only matching assets will be returned, otherwise, it will
      +   * snapshot all asset types. See [Introduction to Cloud Asset
      +   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
      +   * for all supported asset types.
      +   * 
      + * + * repeated string asset_types = 3; + * + * @return The count of assetTypes. + */ + int getAssetTypesCount(); + /** + * + * + *
      +   * A list of asset types to take a snapshot for. For example:
      +   * "compute.googleapis.com/Disk".
      +   * Regular expression is also supported. For example:
      +   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
      +   * with "compute.googleapis.com".
      +   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
      +   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
      +   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
      +   * regular expression syntax. If the regular expression does not match any
      +   * supported asset type, an INVALID_ARGUMENT error will be returned.
      +   * If specified, only matching assets will be returned, otherwise, it will
      +   * snapshot all asset types. See [Introduction to Cloud Asset
      +   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
      +   * for all supported asset types.
      +   * 
      + * + * repeated string asset_types = 3; + * + * @param index The index of the element to return. + * @return The assetTypes at the given index. + */ + java.lang.String getAssetTypes(int index); + /** + * + * + *
      +   * A list of asset types to take a snapshot for. For example:
      +   * "compute.googleapis.com/Disk".
      +   * Regular expression is also supported. For example:
      +   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
      +   * with "compute.googleapis.com".
      +   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
      +   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
      +   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
      +   * regular expression syntax. If the regular expression does not match any
      +   * supported asset type, an INVALID_ARGUMENT error will be returned.
      +   * If specified, only matching assets will be returned, otherwise, it will
      +   * snapshot all asset types. See [Introduction to Cloud Asset
      +   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
      +   * for all supported asset types.
      +   * 
      + * + * repeated string asset_types = 3; + * + * @param index The index of the value to return. + * @return The bytes of the assetTypes at the given index. + */ + com.google.protobuf.ByteString getAssetTypesBytes(int index); + + /** + * + * + *
      +   * Asset content type. If not specified, no content but the asset name will
      +   * be returned.
      +   * 
      + * + * .google.cloud.asset.v1.ContentType content_type = 4; + * + * @return The enum numeric value on the wire for contentType. + */ + int getContentTypeValue(); + /** + * + * + *
      +   * Asset content type. If not specified, no content but the asset name will
      +   * be returned.
      +   * 
      + * + * .google.cloud.asset.v1.ContentType content_type = 4; + * + * @return The contentType. + */ + com.google.cloud.asset.v1.ContentType getContentType(); + + /** + * + * + *
      +   * The maximum number of assets to be returned in a single response. Default
      +   * is 100, minimum is 1, and maximum is 1000.
      +   * 
      + * + * int32 page_size = 5; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
      +   * The `next_page_token` returned from the previous `ListAssetsResponse`, or
      +   * unspecified for the first `ListAssetsRequest`. It is a continuation of a
      +   * prior `ListAssets` call, and the API should return the next page of assets.
      +   * 
      + * + * string page_token = 6; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
      +   * The `next_page_token` returned from the previous `ListAssetsResponse`, or
      +   * unspecified for the first `ListAssetsRequest`. It is a continuation of a
      +   * prior `ListAssets` call, and the API should return the next page of assets.
      +   * 
      + * + * string page_token = 6; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsResponse.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsResponse.java new file mode 100644 index 000000000..0e7510b94 --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsResponse.java @@ -0,0 +1,1404 @@ +/* + * Copyright 2020 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/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + * + * + *
      + * ListAssets response.
      + * 
      + * + * Protobuf type {@code google.cloud.asset.v1.ListAssetsResponse} + */ +public final class ListAssetsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.ListAssetsResponse) + ListAssetsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAssetsResponse.newBuilder() to construct. + private ListAssetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAssetsResponse() { + assets_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAssetsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAssetsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (readTime_ != null) { + subBuilder = readTime_.toBuilder(); + } + readTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readTime_); + readTime_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + assets_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + assets_.add( + input.readMessage(com.google.cloud.asset.v1.Asset.parser(), extensionRegistry)); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + assets_ = java.util.Collections.unmodifiableList(assets_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_ListAssetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_ListAssetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.ListAssetsResponse.class, + com.google.cloud.asset.v1.ListAssetsResponse.Builder.class); + } + + public static final int READ_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp readTime_; + /** + * + * + *
      +   * Time the snapshot was taken.
      +   * 
      + * + * .google.protobuf.Timestamp read_time = 1; + * + * @return Whether the readTime field is set. + */ + @java.lang.Override + public boolean hasReadTime() { + return readTime_ != null; + } + /** + * + * + *
      +   * Time the snapshot was taken.
      +   * 
      + * + * .google.protobuf.Timestamp read_time = 1; + * + * @return The readTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getReadTime() { + return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } + /** + * + * + *
      +   * Time the snapshot was taken.
      +   * 
      + * + * .google.protobuf.Timestamp read_time = 1; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { + return getReadTime(); + } + + public static final int ASSETS_FIELD_NUMBER = 2; + private java.util.List assets_; + /** + * + * + *
      +   * Assets.
      +   * 
      + * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + @java.lang.Override + public java.util.List getAssetsList() { + return assets_; + } + /** + * + * + *
      +   * Assets.
      +   * 
      + * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + @java.lang.Override + public java.util.List + getAssetsOrBuilderList() { + return assets_; + } + /** + * + * + *
      +   * Assets.
      +   * 
      + * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + @java.lang.Override + public int getAssetsCount() { + return assets_.size(); + } + /** + * + * + *
      +   * Assets.
      +   * 
      + * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.Asset getAssets(int index) { + return assets_.get(index); + } + /** + * + * + *
      +   * Assets.
      +   * 
      + * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.AssetOrBuilder getAssetsOrBuilder(int index) { + return assets_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
      +   * Token to retrieve the next page of results. It expires 72 hours after the
      +   * page token for the first page is generated. Set to empty if there are no
      +   * remaining results.
      +   * 
      + * + * string next_page_token = 3; + * + * @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; + } + } + /** + * + * + *
      +   * Token to retrieve the next page of results. It expires 72 hours after the
      +   * page token for the first page is generated. Set to empty if there are no
      +   * remaining results.
      +   * 
      + * + * string next_page_token = 3; + * + * @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 { + if (readTime_ != null) { + output.writeMessage(1, getReadTime()); + } + for (int i = 0; i < assets_.size(); i++) { + output.writeMessage(2, assets_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (readTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getReadTime()); + } + for (int i = 0; i < assets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, assets_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.ListAssetsResponse)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.ListAssetsResponse other = + (com.google.cloud.asset.v1.ListAssetsResponse) obj; + + if (hasReadTime() != other.hasReadTime()) return false; + if (hasReadTime()) { + if (!getReadTime().equals(other.getReadTime())) return false; + } + if (!getAssetsList().equals(other.getAssetsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasReadTime()) { + hash = (37 * hash) + READ_TIME_FIELD_NUMBER; + hash = (53 * hash) + getReadTime().hashCode(); + } + if (getAssetsCount() > 0) { + hash = (37 * hash) + ASSETS_FIELD_NUMBER; + hash = (53 * hash) + getAssetsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.ListAssetsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.ListAssetsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1.ListAssetsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.ListAssetsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1.ListAssetsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.ListAssetsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1.ListAssetsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.ListAssetsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.asset.v1.ListAssetsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.ListAssetsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.asset.v1.ListAssetsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.ListAssetsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.asset.v1.ListAssetsResponse 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; + } + /** + * + * + *
      +   * ListAssets response.
      +   * 
      + * + * Protobuf type {@code google.cloud.asset.v1.ListAssetsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.ListAssetsResponse) + com.google.cloud.asset.v1.ListAssetsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_ListAssetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_ListAssetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.ListAssetsResponse.class, + com.google.cloud.asset.v1.ListAssetsResponse.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.ListAssetsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAssetsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (readTimeBuilder_ == null) { + readTime_ = null; + } else { + readTime_ = null; + readTimeBuilder_ = null; + } + if (assetsBuilder_ == null) { + assets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + assetsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_ListAssetsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListAssetsResponse getDefaultInstanceForType() { + return com.google.cloud.asset.v1.ListAssetsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListAssetsResponse build() { + com.google.cloud.asset.v1.ListAssetsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListAssetsResponse buildPartial() { + com.google.cloud.asset.v1.ListAssetsResponse result = + new com.google.cloud.asset.v1.ListAssetsResponse(this); + int from_bitField0_ = bitField0_; + if (readTimeBuilder_ == null) { + result.readTime_ = readTime_; + } else { + result.readTime_ = readTimeBuilder_.build(); + } + if (assetsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + assets_ = java.util.Collections.unmodifiableList(assets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.assets_ = assets_; + } else { + result.assets_ = assetsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @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.cloud.asset.v1.ListAssetsResponse) { + return mergeFrom((com.google.cloud.asset.v1.ListAssetsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.ListAssetsResponse other) { + if (other == com.google.cloud.asset.v1.ListAssetsResponse.getDefaultInstance()) return this; + if (other.hasReadTime()) { + mergeReadTime(other.getReadTime()); + } + if (assetsBuilder_ == null) { + if (!other.assets_.isEmpty()) { + if (assets_.isEmpty()) { + assets_ = other.assets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAssetsIsMutable(); + assets_.addAll(other.assets_); + } + onChanged(); + } + } else { + if (!other.assets_.isEmpty()) { + if (assetsBuilder_.isEmpty()) { + assetsBuilder_.dispose(); + assetsBuilder_ = null; + assets_ = other.assets_; + bitField0_ = (bitField0_ & ~0x00000001); + assetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAssetsFieldBuilder() + : null; + } else { + assetsBuilder_.addAllMessages(other.assets_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.ListAssetsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.ListAssetsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.Timestamp readTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + readTimeBuilder_; + /** + * + * + *
      +     * Time the snapshot was taken.
      +     * 
      + * + * .google.protobuf.Timestamp read_time = 1; + * + * @return Whether the readTime field is set. + */ + public boolean hasReadTime() { + return readTimeBuilder_ != null || readTime_ != null; + } + /** + * + * + *
      +     * Time the snapshot was taken.
      +     * 
      + * + * .google.protobuf.Timestamp read_time = 1; + * + * @return The readTime. + */ + public com.google.protobuf.Timestamp getReadTime() { + if (readTimeBuilder_ == null) { + return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } else { + return readTimeBuilder_.getMessage(); + } + } + /** + * + * + *
      +     * Time the snapshot was taken.
      +     * 
      + * + * .google.protobuf.Timestamp read_time = 1; + */ + public Builder setReadTime(com.google.protobuf.Timestamp value) { + if (readTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readTime_ = value; + onChanged(); + } else { + readTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
      +     * Time the snapshot was taken.
      +     * 
      + * + * .google.protobuf.Timestamp read_time = 1; + */ + public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (readTimeBuilder_ == null) { + readTime_ = builderForValue.build(); + onChanged(); + } else { + readTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
      +     * Time the snapshot was taken.
      +     * 
      + * + * .google.protobuf.Timestamp read_time = 1; + */ + public Builder mergeReadTime(com.google.protobuf.Timestamp value) { + if (readTimeBuilder_ == null) { + if (readTime_ != null) { + readTime_ = + com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial(); + } else { + readTime_ = value; + } + onChanged(); + } else { + readTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
      +     * Time the snapshot was taken.
      +     * 
      + * + * .google.protobuf.Timestamp read_time = 1; + */ + public Builder clearReadTime() { + if (readTimeBuilder_ == null) { + readTime_ = null; + onChanged(); + } else { + readTime_ = null; + readTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
      +     * Time the snapshot was taken.
      +     * 
      + * + * .google.protobuf.Timestamp read_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { + + onChanged(); + return getReadTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
      +     * Time the snapshot was taken.
      +     * 
      + * + * .google.protobuf.Timestamp read_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { + if (readTimeBuilder_ != null) { + return readTimeBuilder_.getMessageOrBuilder(); + } else { + return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } + } + /** + * + * + *
      +     * Time the snapshot was taken.
      +     * 
      + * + * .google.protobuf.Timestamp read_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getReadTimeFieldBuilder() { + if (readTimeBuilder_ == null) { + readTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getReadTime(), getParentForChildren(), isClean()); + readTime_ = null; + } + return readTimeBuilder_; + } + + private java.util.List assets_ = + java.util.Collections.emptyList(); + + private void ensureAssetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + assets_ = new java.util.ArrayList(assets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.Asset, + com.google.cloud.asset.v1.Asset.Builder, + com.google.cloud.asset.v1.AssetOrBuilder> + assetsBuilder_; + + /** + * + * + *
      +     * Assets.
      +     * 
      + * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public java.util.List getAssetsList() { + if (assetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(assets_); + } else { + return assetsBuilder_.getMessageList(); + } + } + /** + * + * + *
      +     * Assets.
      +     * 
      + * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public int getAssetsCount() { + if (assetsBuilder_ == null) { + return assets_.size(); + } else { + return assetsBuilder_.getCount(); + } + } + /** + * + * + *
      +     * Assets.
      +     * 
      + * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public com.google.cloud.asset.v1.Asset getAssets(int index) { + if (assetsBuilder_ == null) { + return assets_.get(index); + } else { + return assetsBuilder_.getMessage(index); + } + } + /** + * + * + *
      +     * Assets.
      +     * 
      + * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public Builder setAssets(int index, com.google.cloud.asset.v1.Asset value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetsIsMutable(); + assets_.set(index, value); + onChanged(); + } else { + assetsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
      +     * Assets.
      +     * 
      + * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public Builder setAssets(int index, com.google.cloud.asset.v1.Asset.Builder builderForValue) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.set(index, builderForValue.build()); + onChanged(); + } else { + assetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
      +     * Assets.
      +     * 
      + * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public Builder addAssets(com.google.cloud.asset.v1.Asset value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetsIsMutable(); + assets_.add(value); + onChanged(); + } else { + assetsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
      +     * Assets.
      +     * 
      + * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public Builder addAssets(int index, com.google.cloud.asset.v1.Asset value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetsIsMutable(); + assets_.add(index, value); + onChanged(); + } else { + assetsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
      +     * Assets.
      +     * 
      + * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public Builder addAssets(com.google.cloud.asset.v1.Asset.Builder builderForValue) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.add(builderForValue.build()); + onChanged(); + } else { + assetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
      +     * Assets.
      +     * 
      + * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public Builder addAssets(int index, com.google.cloud.asset.v1.Asset.Builder builderForValue) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.add(index, builderForValue.build()); + onChanged(); + } else { + assetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
      +     * Assets.
      +     * 
      + * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public Builder addAllAssets( + java.lang.Iterable values) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, assets_); + onChanged(); + } else { + assetsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
      +     * Assets.
      +     * 
      + * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public Builder clearAssets() { + if (assetsBuilder_ == null) { + assets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + assetsBuilder_.clear(); + } + return this; + } + /** + * + * + *
      +     * Assets.
      +     * 
      + * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public Builder removeAssets(int index) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.remove(index); + onChanged(); + } else { + assetsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
      +     * Assets.
      +     * 
      + * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public com.google.cloud.asset.v1.Asset.Builder getAssetsBuilder(int index) { + return getAssetsFieldBuilder().getBuilder(index); + } + /** + * + * + *
      +     * Assets.
      +     * 
      + * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public com.google.cloud.asset.v1.AssetOrBuilder getAssetsOrBuilder(int index) { + if (assetsBuilder_ == null) { + return assets_.get(index); + } else { + return assetsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
      +     * Assets.
      +     * 
      + * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public java.util.List + getAssetsOrBuilderList() { + if (assetsBuilder_ != null) { + return assetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(assets_); + } + } + /** + * + * + *
      +     * Assets.
      +     * 
      + * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public com.google.cloud.asset.v1.Asset.Builder addAssetsBuilder() { + return getAssetsFieldBuilder() + .addBuilder(com.google.cloud.asset.v1.Asset.getDefaultInstance()); + } + /** + * + * + *
      +     * Assets.
      +     * 
      + * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public com.google.cloud.asset.v1.Asset.Builder addAssetsBuilder(int index) { + return getAssetsFieldBuilder() + .addBuilder(index, com.google.cloud.asset.v1.Asset.getDefaultInstance()); + } + /** + * + * + *
      +     * Assets.
      +     * 
      + * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + public java.util.List getAssetsBuilderList() { + return getAssetsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.Asset, + com.google.cloud.asset.v1.Asset.Builder, + com.google.cloud.asset.v1.AssetOrBuilder> + getAssetsFieldBuilder() { + if (assetsBuilder_ == null) { + assetsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.Asset, + com.google.cloud.asset.v1.Asset.Builder, + com.google.cloud.asset.v1.AssetOrBuilder>( + assets_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + assets_ = null; + } + return assetsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
      +     * Token to retrieve the next page of results. It expires 72 hours after the
      +     * page token for the first page is generated. Set to empty if there are no
      +     * remaining results.
      +     * 
      + * + * string next_page_token = 3; + * + * @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; + } + } + /** + * + * + *
      +     * Token to retrieve the next page of results. It expires 72 hours after the
      +     * page token for the first page is generated. Set to empty if there are no
      +     * remaining results.
      +     * 
      + * + * string next_page_token = 3; + * + * @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; + } + } + /** + * + * + *
      +     * Token to retrieve the next page of results. It expires 72 hours after the
      +     * page token for the first page is generated. Set to empty if there are no
      +     * remaining results.
      +     * 
      + * + * string next_page_token = 3; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
      +     * Token to retrieve the next page of results. It expires 72 hours after the
      +     * page token for the first page is generated. Set to empty if there are no
      +     * remaining results.
      +     * 
      + * + * string next_page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
      +     * Token to retrieve the next page of results. It expires 72 hours after the
      +     * page token for the first page is generated. Set to empty if there are no
      +     * remaining results.
      +     * 
      + * + * string next_page_token = 3; + * + * @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; + 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.cloud.asset.v1.ListAssetsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.ListAssetsResponse) + private static final com.google.cloud.asset.v1.ListAssetsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.ListAssetsResponse(); + } + + public static com.google.cloud.asset.v1.ListAssetsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAssetsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAssetsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ListAssetsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsResponseOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsResponseOrBuilder.java new file mode 100644 index 000000000..f44c37cee --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsResponseOrBuilder.java @@ -0,0 +1,140 @@ +/* + * Copyright 2020 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/cloud/asset/v1/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface ListAssetsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.ListAssetsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
      +   * Time the snapshot was taken.
      +   * 
      + * + * .google.protobuf.Timestamp read_time = 1; + * + * @return Whether the readTime field is set. + */ + boolean hasReadTime(); + /** + * + * + *
      +   * Time the snapshot was taken.
      +   * 
      + * + * .google.protobuf.Timestamp read_time = 1; + * + * @return The readTime. + */ + com.google.protobuf.Timestamp getReadTime(); + /** + * + * + *
      +   * Time the snapshot was taken.
      +   * 
      + * + * .google.protobuf.Timestamp read_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder(); + + /** + * + * + *
      +   * Assets.
      +   * 
      + * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + java.util.List getAssetsList(); + /** + * + * + *
      +   * Assets.
      +   * 
      + * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + com.google.cloud.asset.v1.Asset getAssets(int index); + /** + * + * + *
      +   * Assets.
      +   * 
      + * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + int getAssetsCount(); + /** + * + * + *
      +   * Assets.
      +   * 
      + * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + java.util.List getAssetsOrBuilderList(); + /** + * + * + *
      +   * Assets.
      +   * 
      + * + * repeated .google.cloud.asset.v1.Asset assets = 2; + */ + com.google.cloud.asset.v1.AssetOrBuilder getAssetsOrBuilder(int index); + + /** + * + * + *
      +   * Token to retrieve the next page of results. It expires 72 hours after the
      +   * page token for the first page is generated. Set to empty if there are no
      +   * remaining results.
      +   * 
      + * + * string next_page_token = 3; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
      +   * Token to retrieve the next page of results. It expires 72 hours after the
      +   * page token for the first page is generated. Set to empty if there are no
      +   * remaining results.
      +   * 
      + * + * string next_page_token = 3; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResult.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResult.java index f3f7ebb88..97ce49a45 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResult.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResult.java @@ -41,10 +41,16 @@ private ResourceSearchResult() { name_ = ""; assetType_ = ""; project_ = ""; + folders_ = com.google.protobuf.LazyStringArrayList.EMPTY; + organization_ = ""; displayName_ = ""; description_ = ""; location_ = ""; networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + kmsKey_ = ""; + state_ = ""; + parentFullResourceName_ = ""; + parentAssetType_ = ""; } @java.lang.Override @@ -121,10 +127,10 @@ private ResourceSearchResult( } case 58: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; + mutable_bitField0_ |= 0x00000002; } com.google.protobuf.MapEntry labels__ = input.readMessage( @@ -135,9 +141,9 @@ private ResourceSearchResult( case 66: { java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { networkTags_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; + mutable_bitField0_ |= 0x00000004; } networkTags_.add(s); break; @@ -155,6 +161,81 @@ private ResourceSearchResult( additionalAttributes_ = subBuilder.buildPartial(); } + break; + } + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + + kmsKey_ = s; + break; + } + case 90: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 98: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + + state_ = s; + break; + } + case 138: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + folders_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + folders_.add(s); + break; + } + case 146: + { + java.lang.String s = input.readStringRequireUtf8(); + + organization_ = s; + break; + } + case 154: + { + java.lang.String s = input.readStringRequireUtf8(); + + parentFullResourceName_ = s; + break; + } + case 826: + { + java.lang.String s = input.readStringRequireUtf8(); + + parentAssetType_ = s; break; } default: @@ -171,9 +252,12 @@ private ResourceSearchResult( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) != 0)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { networkTags_ = networkTags_.getUnmodifiableView(); } + if (((mutable_bitField0_ & 0x00000001) != 0)) { + folders_ = folders_.getUnmodifiableView(); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -328,8 +412,11 @@ public com.google.protobuf.ByteString getAssetTypeBytes() { * *
          * The project that this resource belongs to, in the form of
      -   * projects/{PROJECT_NUMBER}.
      -   * To search against the `project`:
      +   * projects/{PROJECT_NUMBER}. This field is available when the resource
      +   * belongs to a project.
      +   * To search against `project`:
      +   * * use a field query. Example: `project:12345`
      +   * * use a free text query. Example: `12345`
          * * specify the `scope` field as this project in your search request.
          * 
      * @@ -354,8 +441,11 @@ public java.lang.String getProject() { * *
          * The project that this resource belongs to, in the form of
      -   * projects/{PROJECT_NUMBER}.
      -   * To search against the `project`:
      +   * projects/{PROJECT_NUMBER}. This field is available when the resource
      +   * belongs to a project.
      +   * To search against `project`:
      +   * * use a field query. Example: `project:12345`
      +   * * use a free text query. Example: `12345`
          * * specify the `scope` field as this project in your search request.
          * 
      * @@ -376,13 +466,160 @@ public com.google.protobuf.ByteString getProjectBytes() { } } + public static final int FOLDERS_FIELD_NUMBER = 17; + private com.google.protobuf.LazyStringList folders_; + /** + * + * + *
      +   * The folder(s) that this resource belongs to, in the form of
      +   * folders/{FOLDER_NUMBER}. This field is available when the resource
      +   * belongs to one or more folders.
      +   * To search against `folders`:
      +   * * use a field query. Example: `folders:(123 OR 456)`
      +   * * use a free text query. Example: `123`
      +   * * specify the `scope` field as this folder in your search request.
      +   * 
      + * + * repeated string folders = 17; + * + * @return A list containing the folders. + */ + public com.google.protobuf.ProtocolStringList getFoldersList() { + return folders_; + } + /** + * + * + *
      +   * The folder(s) that this resource belongs to, in the form of
      +   * folders/{FOLDER_NUMBER}. This field is available when the resource
      +   * belongs to one or more folders.
      +   * To search against `folders`:
      +   * * use a field query. Example: `folders:(123 OR 456)`
      +   * * use a free text query. Example: `123`
      +   * * specify the `scope` field as this folder in your search request.
      +   * 
      + * + * repeated string folders = 17; + * + * @return The count of folders. + */ + public int getFoldersCount() { + return folders_.size(); + } + /** + * + * + *
      +   * The folder(s) that this resource belongs to, in the form of
      +   * folders/{FOLDER_NUMBER}. This field is available when the resource
      +   * belongs to one or more folders.
      +   * To search against `folders`:
      +   * * use a field query. Example: `folders:(123 OR 456)`
      +   * * use a free text query. Example: `123`
      +   * * specify the `scope` field as this folder in your search request.
      +   * 
      + * + * repeated string folders = 17; + * + * @param index The index of the element to return. + * @return The folders at the given index. + */ + public java.lang.String getFolders(int index) { + return folders_.get(index); + } + /** + * + * + *
      +   * The folder(s) that this resource belongs to, in the form of
      +   * folders/{FOLDER_NUMBER}. This field is available when the resource
      +   * belongs to one or more folders.
      +   * To search against `folders`:
      +   * * use a field query. Example: `folders:(123 OR 456)`
      +   * * use a free text query. Example: `123`
      +   * * specify the `scope` field as this folder in your search request.
      +   * 
      + * + * repeated string folders = 17; + * + * @param index The index of the value to return. + * @return The bytes of the folders at the given index. + */ + public com.google.protobuf.ByteString getFoldersBytes(int index) { + return folders_.getByteString(index); + } + + public static final int ORGANIZATION_FIELD_NUMBER = 18; + private volatile java.lang.Object organization_; + /** + * + * + *
      +   * The organization that this resource belongs to, in the form of
      +   * organizations/{ORGANIZATION_NUMBER}. This field is available when the
      +   * resource belongs to an organization.
      +   * To search against `organization`:
      +   * * use a field query. Example: `organization:123`
      +   * * use a free text query. Example: `123`
      +   * * specify the `scope` field as this organization in your search request.
      +   * 
      + * + * string organization = 18; + * + * @return The organization. + */ + @java.lang.Override + public java.lang.String getOrganization() { + java.lang.Object ref = organization_; + 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(); + organization_ = s; + return s; + } + } + /** + * + * + *
      +   * The organization that this resource belongs to, in the form of
      +   * organizations/{ORGANIZATION_NUMBER}. This field is available when the
      +   * resource belongs to an organization.
      +   * To search against `organization`:
      +   * * use a field query. Example: `organization:123`
      +   * * use a free text query. Example: `123`
      +   * * specify the `scope` field as this organization in your search request.
      +   * 
      + * + * string organization = 18; + * + * @return The bytes for organization. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrganizationBytes() { + java.lang.Object ref = organization_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + organization_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int DISPLAY_NAME_FIELD_NUMBER = 4; private volatile java.lang.Object displayName_; /** * * *
      -   * The display name of this resource.
      +   * The display name of this resource. This field is available only when the
      +   * resource's proto contains it.
          * To search against the `display_name`:
          * * use a field query. Example: `displayName:"My Instance"`
          * * use a free text query. Example: `"My Instance"`
      @@ -408,7 +645,8 @@ public java.lang.String getDisplayName() {
          *
          *
          * 
      -   * The display name of this resource.
      +   * The display name of this resource. This field is available only when the
      +   * resource's proto contains it.
          * To search against the `display_name`:
          * * use a field query. Example: `displayName:"My Instance"`
          * * use a free text query. Example: `"My Instance"`
      @@ -438,10 +676,11 @@ public com.google.protobuf.ByteString getDisplayNameBytes() {
          *
          * 
          * One or more paragraphs of text description of this resource. Maximum length
      -   * could be up to 1M bytes.
      +   * could be up to 1M bytes. This field is available only when the resource's
      +   * proto contains it.
          * To search against the `description`:
      -   * * use a field query. Example: `description:"*important instance*"`
      -   * * use a free text query. Example: `"*important instance*"`
      +   * * use a field query. Example: `description:"important instance"`
      +   * * use a free text query. Example: `"important instance"`
          * 
      * * string description = 5; @@ -465,10 +704,11 @@ public java.lang.String getDescription() { * *
          * One or more paragraphs of text description of this resource. Maximum length
      -   * could be up to 1M bytes.
      +   * could be up to 1M bytes. This field is available only when the resource's
      +   * proto contains it.
          * To search against the `description`:
      -   * * use a field query. Example: `description:"*important instance*"`
      -   * * use a free text query. Example: `"*important instance*"`
      +   * * use a field query. Example: `description:"important instance"`
      +   * * use a free text query. Example: `"important instance"`
          * 
      * * string description = 5; @@ -495,7 +735,8 @@ public com.google.protobuf.ByteString getDescriptionBytes() { * *
          * Location can be `global`, regional like `us-east1`, or zonal like
      -   * `us-west1-b`.
      +   * `us-west1-b`. This field is available only when the resource's proto
      +   * contains it.
          * To search against the `location`:
          * * use a field query. Example: `location:us-west*`
          * * use a free text query. Example: `us-west*`
      @@ -522,7 +763,8 @@ public java.lang.String getLocation() {
          *
          * 
          * Location can be `global`, regional like `us-east1`, or zonal like
      -   * `us-west1-b`.
      +   * `us-west1-b`. This field is available only when the resource's proto
      +   * contains it.
          * To search against the `location`:
          * * use a field query. Example: `location:us-west*`
          * * use a free text query. Example: `us-west*`
      @@ -576,7 +818,8 @@ public int getLabelsCount() {
          * 
          * Labels associated with this resource. See [Labelling and grouping GCP
          * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -   * for more information.
      +   * for more information. This field is available only when the resource's
      +   * proto contains it.
          * To search against the `labels`:
          * * use a field query:
          *     - query on any label's key or value. Example: `labels:prod`
      @@ -606,7 +849,8 @@ public java.util.Map getLabels() {
          * 
          * Labels associated with this resource. See [Labelling and grouping GCP
          * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -   * for more information.
      +   * for more information. This field is available only when the resource's
      +   * proto contains it.
          * To search against the `labels`:
          * * use a field query:
          *     - query on any label's key or value. Example: `labels:prod`
      @@ -627,7 +871,8 @@ public java.util.Map getLabelsMap() {
          * 
          * Labels associated with this resource. See [Labelling and grouping GCP
          * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -   * for more information.
      +   * for more information. This field is available only when the resource's
      +   * proto contains it.
          * To search against the `labels`:
          * * use a field query:
          *     - query on any label's key or value. Example: `labels:prod`
      @@ -652,7 +897,8 @@ public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.Strin
          * 
          * Labels associated with this resource. See [Labelling and grouping GCP
          * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -   * for more information.
      +   * for more information. This field is available only when the resource's
      +   * proto contains it.
          * To search against the `labels`:
          * * use a field query:
          *     - query on any label's key or value. Example: `labels:prod`
      @@ -684,7 +930,8 @@ public java.lang.String getLabelsOrThrow(java.lang.String key) {
          * Network tags associated with this resource. Like labels, network tags are a
          * type of annotations used to group GCP resources. See [Labelling GCP
          * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -   * for more information.
      +   * for more information. This field is available only when the resource's
      +   * proto contains it.
          * To search against the `network_tags`:
          * * use a field query. Example: `networkTags:internal`
          * * use a free text query. Example: `internal`
      @@ -704,7 +951,8 @@ public com.google.protobuf.ProtocolStringList getNetworkTagsList() {
          * Network tags associated with this resource. Like labels, network tags are a
          * type of annotations used to group GCP resources. See [Labelling GCP
          * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -   * for more information.
      +   * for more information. This field is available only when the resource's
      +   * proto contains it.
          * To search against the `network_tags`:
          * * use a field query. Example: `networkTags:internal`
          * * use a free text query. Example: `internal`
      @@ -724,7 +972,8 @@ public int getNetworkTagsCount() {
          * Network tags associated with this resource. Like labels, network tags are a
          * type of annotations used to group GCP resources. See [Labelling GCP
          * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -   * for more information.
      +   * for more information. This field is available only when the resource's
      +   * proto contains it.
          * To search against the `network_tags`:
          * * use a field query. Example: `networkTags:internal`
          * * use a free text query. Example: `internal`
      @@ -745,7 +994,8 @@ public java.lang.String getNetworkTags(int index) {
          * Network tags associated with this resource. Like labels, network tags are a
          * type of annotations used to group GCP resources. See [Labelling GCP
          * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -   * for more information.
      +   * for more information. This field is available only when the resource's
      +   * proto contains it.
          * To search against the `network_tags`:
          * * use a field query. Example: `networkTags:internal`
          * * use a free text query. Example: `internal`
      @@ -760,119 +1010,522 @@ public com.google.protobuf.ByteString getNetworkTagsBytes(int index) {
           return networkTags_.getByteString(index);
         }
       
      -  public static final int ADDITIONAL_ATTRIBUTES_FIELD_NUMBER = 9;
      -  private com.google.protobuf.Struct additionalAttributes_;
      +  public static final int KMS_KEY_FIELD_NUMBER = 10;
      +  private volatile java.lang.Object kmsKey_;
         /**
          *
          *
          * 
      -   * The additional searchable attributes of this resource. The attributes may
      -   * vary from one resource type to another. Examples: `projectId` for Project,
      -   * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
      -   * metadata fields that are returned by the List or Get APIs provided by the
      -   * corresponding GCP service (e.g., Compute Engine). see [API references and
      -   * supported searchable
      -   * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
      -   * for more information.
      -   * You can search values of these fields through free text search. However,
      -   * you should not consume the field programically as the field names and
      -   * values may change as the GCP service updates to a new incompatible API
      -   * version.
      -   * To search against the `additional_attributes`:
      -   * * use a free text query to match the attributes values. Example: to search
      -   *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
      -   *   `foobar`.
      +   * The Cloud KMS
      +   * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys?hl=en)
      +   * name or
      +   * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en)
      +   * name. This field is available only when the resource's proto contains it.
      +   * To search against the `kms_key`:
      +   * * use a field query. Example: `kmsKey:key`
      +   * * use a free text query. Example: `key`
          * 
      * - * .google.protobuf.Struct additional_attributes = 9; + * string kms_key = 10; * - * @return Whether the additionalAttributes field is set. + * @return The kmsKey. */ @java.lang.Override - public boolean hasAdditionalAttributes() { - return additionalAttributes_ != null; + public java.lang.String getKmsKey() { + java.lang.Object ref = kmsKey_; + 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(); + kmsKey_ = s; + return s; + } } /** * * *
      -   * The additional searchable attributes of this resource. The attributes may
      -   * vary from one resource type to another. Examples: `projectId` for Project,
      -   * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
      -   * metadata fields that are returned by the List or Get APIs provided by the
      -   * corresponding GCP service (e.g., Compute Engine). see [API references and
      -   * supported searchable
      -   * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
      -   * for more information.
      -   * You can search values of these fields through free text search. However,
      -   * you should not consume the field programically as the field names and
      -   * values may change as the GCP service updates to a new incompatible API
      -   * version.
      -   * To search against the `additional_attributes`:
      -   * * use a free text query to match the attributes values. Example: to search
      -   *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
      -   *   `foobar`.
      +   * The Cloud KMS
      +   * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys?hl=en)
      +   * name or
      +   * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en)
      +   * name. This field is available only when the resource's proto contains it.
      +   * To search against the `kms_key`:
      +   * * use a field query. Example: `kmsKey:key`
      +   * * use a free text query. Example: `key`
          * 
      * - * .google.protobuf.Struct additional_attributes = 9; + * string kms_key = 10; * - * @return The additionalAttributes. + * @return The bytes for kmsKey. */ @java.lang.Override - public com.google.protobuf.Struct getAdditionalAttributes() { - return additionalAttributes_ == null - ? com.google.protobuf.Struct.getDefaultInstance() - : additionalAttributes_; + public com.google.protobuf.ByteString getKmsKeyBytes() { + java.lang.Object ref = kmsKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + kmsKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } + + public static final int CREATE_TIME_FIELD_NUMBER = 11; + private com.google.protobuf.Timestamp createTime_; /** * * *
      -   * The additional searchable attributes of this resource. The attributes may
      -   * vary from one resource type to another. Examples: `projectId` for Project,
      -   * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
      -   * metadata fields that are returned by the List or Get APIs provided by the
      -   * corresponding GCP service (e.g., Compute Engine). see [API references and
      -   * supported searchable
      -   * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
      -   * for more information.
      -   * You can search values of these fields through free text search. However,
      -   * you should not consume the field programically as the field names and
      -   * values may change as the GCP service updates to a new incompatible API
      -   * version.
      -   * To search against the `additional_attributes`:
      -   * * use a free text query to match the attributes values. Example: to search
      -   *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
      -   *   `foobar`.
      +   * The create timestamp of this resource, at which the resource was created.
      +   * The granularity is in seconds. Timestamp.nanos will always be 0. This field
      +   * is available only when the resource's proto contains it.
      +   * To search against `create_time`:
      +   * * use a field query.
      +   *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
      +   *     - value in date string. Example: `createTime > 2021-01-01`
      +   *     - value in date-time string (must be quoted). Example: `createTime >
      +   *     "2021-01-01T00:00:00"`
          * 
      * - * .google.protobuf.Struct additional_attributes = 9; + * .google.protobuf.Timestamp create_time = 11; + * + * @return Whether the createTime field is set. */ @java.lang.Override - public com.google.protobuf.StructOrBuilder getAdditionalAttributesOrBuilder() { - return getAdditionalAttributes(); + public boolean hasCreateTime() { + return createTime_ != null; } - - private byte memoizedIsInitialized = -1; - + /** + * + * + *
      +   * The create timestamp of this resource, at which the resource was created.
      +   * The granularity is in seconds. Timestamp.nanos will always be 0. This field
      +   * is available only when the resource's proto contains it.
      +   * To search against `create_time`:
      +   * * use a field query.
      +   *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
      +   *     - value in date string. Example: `createTime > 2021-01-01`
      +   *     - value in date-time string (must be quoted). Example: `createTime >
      +   *     "2021-01-01T00:00:00"`
      +   * 
      + * + * .google.protobuf.Timestamp create_time = 11; + * + * @return The createTime. + */ @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
      +   * The create timestamp of this resource, at which the resource was created.
      +   * The granularity is in seconds. Timestamp.nanos will always be 0. This field
      +   * is available only when the resource's proto contains it.
      +   * To search against `create_time`:
      +   * * use a field query.
      +   *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
      +   *     - value in date string. Example: `createTime > 2021-01-01`
      +   *     - value in date-time string (must be quoted). Example: `createTime >
      +   *     "2021-01-01T00:00:00"`
      +   * 
      + * + * .google.protobuf.Timestamp create_time = 11; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); } + public static final int UPDATE_TIME_FIELD_NUMBER = 12; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
      +   * The last update timestamp of this resource, at which the resource was last
      +   * modified or deleted. The granularity is in seconds. Timestamp.nanos will
      +   * always be 0. This field is available only when the resource's proto
      +   * contains it.
      +   * To search against `update_time`:
      +   * * use a field query.
      +   *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
      +   *     - value in date string. Example: `updateTime < 2021-01-01`
      +   *     - value in date-time string (must be quoted). Example: `updateTime <
      +   *     "2021-01-01T00:00:00"`
      +   * 
      + * + * .google.protobuf.Timestamp update_time = 12; + * + * @return Whether the updateTime field is set. + */ @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!getAssetTypeBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetType_); - } + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
      +   * The last update timestamp of this resource, at which the resource was last
      +   * modified or deleted. The granularity is in seconds. Timestamp.nanos will
      +   * always be 0. This field is available only when the resource's proto
      +   * contains it.
      +   * To search against `update_time`:
      +   * * use a field query.
      +   *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
      +   *     - value in date string. Example: `updateTime < 2021-01-01`
      +   *     - value in date-time string (must be quoted). Example: `updateTime <
      +   *     "2021-01-01T00:00:00"`
      +   * 
      + * + * .google.protobuf.Timestamp update_time = 12; + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
      +   * The last update timestamp of this resource, at which the resource was last
      +   * modified or deleted. The granularity is in seconds. Timestamp.nanos will
      +   * always be 0. This field is available only when the resource's proto
      +   * contains it.
      +   * To search against `update_time`:
      +   * * use a field query.
      +   *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
      +   *     - value in date string. Example: `updateTime < 2021-01-01`
      +   *     - value in date-time string (must be quoted). Example: `updateTime <
      +   *     "2021-01-01T00:00:00"`
      +   * 
      + * + * .google.protobuf.Timestamp update_time = 12; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int STATE_FIELD_NUMBER = 13; + private volatile java.lang.Object state_; + /** + * + * + *
      +   * The state of this resource. Different resources types have different state
      +   * definitions that are mapped from various fields of different resource
      +   * types. This field is available only when the resource's proto contains it.
      +   * Example:
      +   * If the resource is an instance provided by Compute Engine,
      +   * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
      +   * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
      +   * in [API
      +   * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
      +   * If the resource is a project provided by Cloud Resource Manager, its state
      +   * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
      +   * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
      +   * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
      +   * To search against the `state`:
      +   * * use a field query. Example: `state:RUNNING`
      +   * * use a free text query. Example: `RUNNING`
      +   * 
      + * + * string state = 13; + * + * @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; + } + } + /** + * + * + *
      +   * The state of this resource. Different resources types have different state
      +   * definitions that are mapped from various fields of different resource
      +   * types. This field is available only when the resource's proto contains it.
      +   * Example:
      +   * If the resource is an instance provided by Compute Engine,
      +   * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
      +   * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
      +   * in [API
      +   * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
      +   * If the resource is a project provided by Cloud Resource Manager, its state
      +   * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
      +   * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
      +   * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
      +   * To search against the `state`:
      +   * * use a field query. Example: `state:RUNNING`
      +   * * use a free text query. Example: `RUNNING`
      +   * 
      + * + * string state = 13; + * + * @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 ADDITIONAL_ATTRIBUTES_FIELD_NUMBER = 9; + private com.google.protobuf.Struct additionalAttributes_; + /** + * + * + *
      +   * The additional searchable attributes of this resource. The attributes may
      +   * vary from one resource type to another. Examples: `projectId` for Project,
      +   * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
      +   * metadata fields that are returned by the List or Get APIs provided by the
      +   * corresponding GCP service (e.g., Compute Engine). see [API references and
      +   * supported searchable
      +   * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
      +   * to see which fields are included.
      +   * You can search values of these fields through free text search. However,
      +   * you should not consume the field programically as the field names and
      +   * values may change as the GCP service updates to a new incompatible API
      +   * version.
      +   * To search against the `additional_attributes`:
      +   * * use a free text query to match the attributes values. Example: to search
      +   *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
      +   *   `foobar`.
      +   * 
      + * + * .google.protobuf.Struct additional_attributes = 9; + * + * @return Whether the additionalAttributes field is set. + */ + @java.lang.Override + public boolean hasAdditionalAttributes() { + return additionalAttributes_ != null; + } + /** + * + * + *
      +   * The additional searchable attributes of this resource. The attributes may
      +   * vary from one resource type to another. Examples: `projectId` for Project,
      +   * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
      +   * metadata fields that are returned by the List or Get APIs provided by the
      +   * corresponding GCP service (e.g., Compute Engine). see [API references and
      +   * supported searchable
      +   * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
      +   * to see which fields are included.
      +   * You can search values of these fields through free text search. However,
      +   * you should not consume the field programically as the field names and
      +   * values may change as the GCP service updates to a new incompatible API
      +   * version.
      +   * To search against the `additional_attributes`:
      +   * * use a free text query to match the attributes values. Example: to search
      +   *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
      +   *   `foobar`.
      +   * 
      + * + * .google.protobuf.Struct additional_attributes = 9; + * + * @return The additionalAttributes. + */ + @java.lang.Override + public com.google.protobuf.Struct getAdditionalAttributes() { + return additionalAttributes_ == null + ? com.google.protobuf.Struct.getDefaultInstance() + : additionalAttributes_; + } + /** + * + * + *
      +   * The additional searchable attributes of this resource. The attributes may
      +   * vary from one resource type to another. Examples: `projectId` for Project,
      +   * `dnsName` for DNS ManagedZone. This field contains a subset of the resource
      +   * metadata fields that are returned by the List or Get APIs provided by the
      +   * corresponding GCP service (e.g., Compute Engine). see [API references and
      +   * supported searchable
      +   * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types)
      +   * to see which fields are included.
      +   * You can search values of these fields through free text search. However,
      +   * you should not consume the field programically as the field names and
      +   * values may change as the GCP service updates to a new incompatible API
      +   * version.
      +   * To search against the `additional_attributes`:
      +   * * use a free text query to match the attributes values. Example: to search
      +   *   `additional_attributes = { dnsName: "foobar" }`, you can issue a query
      +   *   `foobar`.
      +   * 
      + * + * .google.protobuf.Struct additional_attributes = 9; + */ + @java.lang.Override + public com.google.protobuf.StructOrBuilder getAdditionalAttributesOrBuilder() { + return getAdditionalAttributes(); + } + + public static final int PARENT_FULL_RESOURCE_NAME_FIELD_NUMBER = 19; + private volatile java.lang.Object parentFullResourceName_; + /** + * + * + *
      +   * The full resource name of this resource's parent, if it has one.
      +   * To search against the `parent_full_resource_name`:
      +   * * use a field query. Example:
      +   * `parentFullResourceName:"project-name"`
      +   * * use a free text query. Example:
      +   * `project-name`
      +   * 
      + * + * string parent_full_resource_name = 19; + * + * @return The parentFullResourceName. + */ + @java.lang.Override + public java.lang.String getParentFullResourceName() { + java.lang.Object ref = parentFullResourceName_; + 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(); + parentFullResourceName_ = s; + return s; + } + } + /** + * + * + *
      +   * The full resource name of this resource's parent, if it has one.
      +   * To search against the `parent_full_resource_name`:
      +   * * use a field query. Example:
      +   * `parentFullResourceName:"project-name"`
      +   * * use a free text query. Example:
      +   * `project-name`
      +   * 
      + * + * string parent_full_resource_name = 19; + * + * @return The bytes for parentFullResourceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentFullResourceNameBytes() { + java.lang.Object ref = parentFullResourceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parentFullResourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARENT_ASSET_TYPE_FIELD_NUMBER = 103; + private volatile java.lang.Object parentAssetType_; + /** + * + * + *
      +   * The type of this resource's immediate parent, if there is one.
      +   * To search against the `parent_asset_type`:
      +   * * use a field query. Example:
      +   * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
      +   * * use a free text query. Example:
      +   * `cloudresourcemanager.googleapis.com/Project`
      +   * 
      + * + * string parent_asset_type = 103; + * + * @return The parentAssetType. + */ + @java.lang.Override + public java.lang.String getParentAssetType() { + java.lang.Object ref = parentAssetType_; + 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(); + parentAssetType_ = s; + return s; + } + } + /** + * + * + *
      +   * The type of this resource's immediate parent, if there is one.
      +   * To search against the `parent_asset_type`:
      +   * * use a field query. Example:
      +   * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
      +   * * use a free text query. Example:
      +   * `cloudresourcemanager.googleapis.com/Project`
      +   * 
      + * + * string parent_asset_type = 103; + * + * @return The bytes for parentAssetType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentAssetTypeBytes() { + java.lang.Object ref = parentAssetType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parentAssetType_ = 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getAssetTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetType_); + } if (!getProjectBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, project_); } @@ -893,6 +1546,30 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (additionalAttributes_ != null) { output.writeMessage(9, getAdditionalAttributes()); } + if (!getKmsKeyBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, kmsKey_); + } + if (createTime_ != null) { + output.writeMessage(11, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(12, getUpdateTime()); + } + if (!getStateBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, state_); + } + for (int i = 0; i < folders_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 17, folders_.getRaw(i)); + } + if (!getOrganizationBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 18, organization_); + } + if (!getParentFullResourceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 19, parentFullResourceName_); + } + if (!getParentAssetTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 103, parentAssetType_); + } unknownFields.writeTo(output); } @@ -942,6 +1619,35 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getAdditionalAttributes()); } + if (!getKmsKeyBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, kmsKey_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getUpdateTime()); + } + if (!getStateBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, state_); + } + { + int dataSize = 0; + for (int i = 0; i < folders_.size(); i++) { + dataSize += computeStringSizeNoTag(folders_.getRaw(i)); + } + size += dataSize; + size += 2 * getFoldersList().size(); + } + if (!getOrganizationBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, organization_); + } + if (!getParentFullResourceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, parentFullResourceName_); + } + if (!getParentAssetTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(103, parentAssetType_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -961,15 +1667,29 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getAssetType().equals(other.getAssetType())) return false; if (!getProject().equals(other.getProject())) return false; + if (!getFoldersList().equals(other.getFoldersList())) return false; + if (!getOrganization().equals(other.getOrganization())) return false; if (!getDisplayName().equals(other.getDisplayName())) return false; if (!getDescription().equals(other.getDescription())) return false; if (!getLocation().equals(other.getLocation())) return false; if (!internalGetLabels().equals(other.internalGetLabels())) return false; if (!getNetworkTagsList().equals(other.getNetworkTagsList())) return false; + if (!getKmsKey().equals(other.getKmsKey())) 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 (!getState().equals(other.getState())) return false; if (hasAdditionalAttributes() != other.hasAdditionalAttributes()) return false; if (hasAdditionalAttributes()) { if (!getAdditionalAttributes().equals(other.getAdditionalAttributes())) return false; } + if (!getParentFullResourceName().equals(other.getParentFullResourceName())) return false; + if (!getParentAssetType().equals(other.getParentAssetType())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -987,6 +1707,12 @@ public int hashCode() { hash = (53 * hash) + getAssetType().hashCode(); hash = (37 * hash) + PROJECT_FIELD_NUMBER; hash = (53 * hash) + getProject().hashCode(); + if (getFoldersCount() > 0) { + hash = (37 * hash) + FOLDERS_FIELD_NUMBER; + hash = (53 * hash) + getFoldersList().hashCode(); + } + hash = (37 * hash) + ORGANIZATION_FIELD_NUMBER; + hash = (53 * hash) + getOrganization().hashCode(); hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; hash = (53 * hash) + getDisplayName().hashCode(); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; @@ -1001,10 +1727,26 @@ public int hashCode() { hash = (37 * hash) + NETWORK_TAGS_FIELD_NUMBER; hash = (53 * hash) + getNetworkTagsList().hashCode(); } + hash = (37 * hash) + KMS_KEY_FIELD_NUMBER; + hash = (53 * hash) + getKmsKey().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) + STATE_FIELD_NUMBER; + hash = (53 * hash) + getState().hashCode(); if (hasAdditionalAttributes()) { hash = (37 * hash) + ADDITIONAL_ATTRIBUTES_FIELD_NUMBER; hash = (53 * hash) + getAdditionalAttributes().hashCode(); } + hash = (37 * hash) + PARENT_FULL_RESOURCE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getParentFullResourceName().hashCode(); + hash = (37 * hash) + PARENT_ASSET_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getParentAssetType().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -1176,6 +1918,10 @@ public Builder clear() { project_ = ""; + folders_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + organization_ = ""; + displayName_ = ""; description_ = ""; @@ -1184,13 +1930,33 @@ public Builder clear() { internalGetMutableLabels().clear(); networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); + kmsKey_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + state_ = ""; + if (additionalAttributesBuilder_ == null) { additionalAttributes_ = null; } else { additionalAttributes_ = null; additionalAttributesBuilder_ = null; } + parentFullResourceName_ = ""; + + parentAssetType_ = ""; + return this; } @@ -1222,21 +1988,41 @@ public com.google.cloud.asset.v1.ResourceSearchResult buildPartial() { result.name_ = name_; result.assetType_ = assetType_; result.project_ = project_; + if (((bitField0_ & 0x00000001) != 0)) { + folders_ = folders_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.folders_ = folders_; + result.organization_ = organization_; result.displayName_ = displayName_; result.description_ = description_; result.location_ = location_; result.labels_ = internalGetLabels(); result.labels_.makeImmutable(); - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { networkTags_ = networkTags_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); } result.networkTags_ = networkTags_; + result.kmsKey_ = kmsKey_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.state_ = state_; if (additionalAttributesBuilder_ == null) { result.additionalAttributes_ = additionalAttributes_; } else { result.additionalAttributes_ = additionalAttributesBuilder_.build(); } + result.parentFullResourceName_ = parentFullResourceName_; + result.parentAssetType_ = parentAssetType_; onBuilt(); return result; } @@ -1298,6 +2084,20 @@ public Builder mergeFrom(com.google.cloud.asset.v1.ResourceSearchResult other) { project_ = other.project_; onChanged(); } + if (!other.folders_.isEmpty()) { + if (folders_.isEmpty()) { + folders_ = other.folders_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFoldersIsMutable(); + folders_.addAll(other.folders_); + } + onChanged(); + } + if (!other.getOrganization().isEmpty()) { + organization_ = other.organization_; + onChanged(); + } if (!other.getDisplayName().isEmpty()) { displayName_ = other.displayName_; onChanged(); @@ -1314,16 +2114,38 @@ public Builder mergeFrom(com.google.cloud.asset.v1.ResourceSearchResult other) { if (!other.networkTags_.isEmpty()) { if (networkTags_.isEmpty()) { networkTags_ = other.networkTags_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); } else { ensureNetworkTagsIsMutable(); networkTags_.addAll(other.networkTags_); } onChanged(); } + if (!other.getKmsKey().isEmpty()) { + kmsKey_ = other.kmsKey_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getState().isEmpty()) { + state_ = other.state_; + onChanged(); + } if (other.hasAdditionalAttributes()) { mergeAdditionalAttributes(other.getAdditionalAttributes()); } + if (!other.getParentFullResourceName().isEmpty()) { + parentFullResourceName_ = other.parentFullResourceName_; + onChanged(); + } + if (!other.getParentAssetType().isEmpty()) { + parentAssetType_ = other.parentAssetType_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1618,8 +2440,11 @@ public Builder setAssetTypeBytes(com.google.protobuf.ByteString value) { * *
            * The project that this resource belongs to, in the form of
      -     * projects/{PROJECT_NUMBER}.
      -     * To search against the `project`:
      +     * projects/{PROJECT_NUMBER}. This field is available when the resource
      +     * belongs to a project.
      +     * To search against `project`:
      +     * * use a field query. Example: `project:12345`
      +     * * use a free text query. Example: `12345`
            * * specify the `scope` field as this project in your search request.
            * 
      * @@ -1643,8 +2468,11 @@ public java.lang.String getProject() { * *
            * The project that this resource belongs to, in the form of
      -     * projects/{PROJECT_NUMBER}.
      -     * To search against the `project`:
      +     * projects/{PROJECT_NUMBER}. This field is available when the resource
      +     * belongs to a project.
      +     * To search against `project`:
      +     * * use a field query. Example: `project:12345`
      +     * * use a free text query. Example: `12345`
            * * specify the `scope` field as this project in your search request.
            * 
      * @@ -1668,8 +2496,11 @@ public com.google.protobuf.ByteString getProjectBytes() { * *
            * The project that this resource belongs to, in the form of
      -     * projects/{PROJECT_NUMBER}.
      -     * To search against the `project`:
      +     * projects/{PROJECT_NUMBER}. This field is available when the resource
      +     * belongs to a project.
      +     * To search against `project`:
      +     * * use a field query. Example: `project:12345`
      +     * * use a free text query. Example: `12345`
            * * specify the `scope` field as this project in your search request.
            * 
      * @@ -1692,8 +2523,11 @@ public Builder setProject(java.lang.String value) { * *
            * The project that this resource belongs to, in the form of
      -     * projects/{PROJECT_NUMBER}.
      -     * To search against the `project`:
      +     * projects/{PROJECT_NUMBER}. This field is available when the resource
      +     * belongs to a project.
      +     * To search against `project`:
      +     * * use a field query. Example: `project:12345`
      +     * * use a free text query. Example: `12345`
            * * specify the `scope` field as this project in your search request.
            * 
      * @@ -1712,8 +2546,11 @@ public Builder clearProject() { * *
            * The project that this resource belongs to, in the form of
      -     * projects/{PROJECT_NUMBER}.
      -     * To search against the `project`:
      +     * projects/{PROJECT_NUMBER}. This field is available when the resource
      +     * belongs to a project.
      +     * To search against `project`:
      +     * * use a field query. Example: `project:12345`
      +     * * use a free text query. Example: `12345`
            * * specify the `scope` field as this project in your search request.
            * 
      * @@ -1733,78 +2570,1146 @@ public Builder setProjectBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.LazyStringList folders_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureFoldersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + folders_ = new com.google.protobuf.LazyStringArrayList(folders_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
      +     * The folder(s) that this resource belongs to, in the form of
      +     * folders/{FOLDER_NUMBER}. This field is available when the resource
      +     * belongs to one or more folders.
      +     * To search against `folders`:
      +     * * use a field query. Example: `folders:(123 OR 456)`
      +     * * use a free text query. Example: `123`
      +     * * specify the `scope` field as this folder in your search request.
      +     * 
      + * + * repeated string folders = 17; + * + * @return A list containing the folders. + */ + public com.google.protobuf.ProtocolStringList getFoldersList() { + return folders_.getUnmodifiableView(); + } + /** + * + * + *
      +     * The folder(s) that this resource belongs to, in the form of
      +     * folders/{FOLDER_NUMBER}. This field is available when the resource
      +     * belongs to one or more folders.
      +     * To search against `folders`:
      +     * * use a field query. Example: `folders:(123 OR 456)`
      +     * * use a free text query. Example: `123`
      +     * * specify the `scope` field as this folder in your search request.
      +     * 
      + * + * repeated string folders = 17; + * + * @return The count of folders. + */ + public int getFoldersCount() { + return folders_.size(); + } + /** + * + * + *
      +     * The folder(s) that this resource belongs to, in the form of
      +     * folders/{FOLDER_NUMBER}. This field is available when the resource
      +     * belongs to one or more folders.
      +     * To search against `folders`:
      +     * * use a field query. Example: `folders:(123 OR 456)`
      +     * * use a free text query. Example: `123`
      +     * * specify the `scope` field as this folder in your search request.
      +     * 
      + * + * repeated string folders = 17; + * + * @param index The index of the element to return. + * @return The folders at the given index. + */ + public java.lang.String getFolders(int index) { + return folders_.get(index); + } + /** + * + * + *
      +     * The folder(s) that this resource belongs to, in the form of
      +     * folders/{FOLDER_NUMBER}. This field is available when the resource
      +     * belongs to one or more folders.
      +     * To search against `folders`:
      +     * * use a field query. Example: `folders:(123 OR 456)`
      +     * * use a free text query. Example: `123`
      +     * * specify the `scope` field as this folder in your search request.
      +     * 
      + * + * repeated string folders = 17; + * + * @param index The index of the value to return. + * @return The bytes of the folders at the given index. + */ + public com.google.protobuf.ByteString getFoldersBytes(int index) { + return folders_.getByteString(index); + } + /** + * + * + *
      +     * The folder(s) that this resource belongs to, in the form of
      +     * folders/{FOLDER_NUMBER}. This field is available when the resource
      +     * belongs to one or more folders.
      +     * To search against `folders`:
      +     * * use a field query. Example: `folders:(123 OR 456)`
      +     * * use a free text query. Example: `123`
      +     * * specify the `scope` field as this folder in your search request.
      +     * 
      + * + * repeated string folders = 17; + * + * @param index The index to set the value at. + * @param value The folders to set. + * @return This builder for chaining. + */ + public Builder setFolders(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFoldersIsMutable(); + folders_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
      +     * The folder(s) that this resource belongs to, in the form of
      +     * folders/{FOLDER_NUMBER}. This field is available when the resource
      +     * belongs to one or more folders.
      +     * To search against `folders`:
      +     * * use a field query. Example: `folders:(123 OR 456)`
      +     * * use a free text query. Example: `123`
      +     * * specify the `scope` field as this folder in your search request.
      +     * 
      + * + * repeated string folders = 17; + * + * @param value The folders to add. + * @return This builder for chaining. + */ + public Builder addFolders(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFoldersIsMutable(); + folders_.add(value); + onChanged(); + return this; + } + /** + * + * + *
      +     * The folder(s) that this resource belongs to, in the form of
      +     * folders/{FOLDER_NUMBER}. This field is available when the resource
      +     * belongs to one or more folders.
      +     * To search against `folders`:
      +     * * use a field query. Example: `folders:(123 OR 456)`
      +     * * use a free text query. Example: `123`
      +     * * specify the `scope` field as this folder in your search request.
      +     * 
      + * + * repeated string folders = 17; + * + * @param values The folders to add. + * @return This builder for chaining. + */ + public Builder addAllFolders(java.lang.Iterable values) { + ensureFoldersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, folders_); + onChanged(); + return this; + } + /** + * + * + *
      +     * The folder(s) that this resource belongs to, in the form of
      +     * folders/{FOLDER_NUMBER}. This field is available when the resource
      +     * belongs to one or more folders.
      +     * To search against `folders`:
      +     * * use a field query. Example: `folders:(123 OR 456)`
      +     * * use a free text query. Example: `123`
      +     * * specify the `scope` field as this folder in your search request.
      +     * 
      + * + * repeated string folders = 17; + * + * @return This builder for chaining. + */ + public Builder clearFolders() { + folders_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
      +     * The folder(s) that this resource belongs to, in the form of
      +     * folders/{FOLDER_NUMBER}. This field is available when the resource
      +     * belongs to one or more folders.
      +     * To search against `folders`:
      +     * * use a field query. Example: `folders:(123 OR 456)`
      +     * * use a free text query. Example: `123`
      +     * * specify the `scope` field as this folder in your search request.
      +     * 
      + * + * repeated string folders = 17; + * + * @param value The bytes of the folders to add. + * @return This builder for chaining. + */ + public Builder addFoldersBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureFoldersIsMutable(); + folders_.add(value); + onChanged(); + return this; + } + + private java.lang.Object organization_ = ""; + /** + * + * + *
      +     * The organization that this resource belongs to, in the form of
      +     * organizations/{ORGANIZATION_NUMBER}. This field is available when the
      +     * resource belongs to an organization.
      +     * To search against `organization`:
      +     * * use a field query. Example: `organization:123`
      +     * * use a free text query. Example: `123`
      +     * * specify the `scope` field as this organization in your search request.
      +     * 
      + * + * string organization = 18; + * + * @return The organization. + */ + public java.lang.String getOrganization() { + java.lang.Object ref = organization_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + organization_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
      +     * The organization that this resource belongs to, in the form of
      +     * organizations/{ORGANIZATION_NUMBER}. This field is available when the
      +     * resource belongs to an organization.
      +     * To search against `organization`:
      +     * * use a field query. Example: `organization:123`
      +     * * use a free text query. Example: `123`
      +     * * specify the `scope` field as this organization in your search request.
      +     * 
      + * + * string organization = 18; + * + * @return The bytes for organization. + */ + public com.google.protobuf.ByteString getOrganizationBytes() { + java.lang.Object ref = organization_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + organization_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
      +     * The organization that this resource belongs to, in the form of
      +     * organizations/{ORGANIZATION_NUMBER}. This field is available when the
      +     * resource belongs to an organization.
      +     * To search against `organization`:
      +     * * use a field query. Example: `organization:123`
      +     * * use a free text query. Example: `123`
      +     * * specify the `scope` field as this organization in your search request.
      +     * 
      + * + * string organization = 18; + * + * @param value The organization to set. + * @return This builder for chaining. + */ + public Builder setOrganization(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + organization_ = value; + onChanged(); + return this; + } + /** + * + * + *
      +     * The organization that this resource belongs to, in the form of
      +     * organizations/{ORGANIZATION_NUMBER}. This field is available when the
      +     * resource belongs to an organization.
      +     * To search against `organization`:
      +     * * use a field query. Example: `organization:123`
      +     * * use a free text query. Example: `123`
      +     * * specify the `scope` field as this organization in your search request.
      +     * 
      + * + * string organization = 18; + * + * @return This builder for chaining. + */ + public Builder clearOrganization() { + + organization_ = getDefaultInstance().getOrganization(); + onChanged(); + return this; + } + /** + * + * + *
      +     * The organization that this resource belongs to, in the form of
      +     * organizations/{ORGANIZATION_NUMBER}. This field is available when the
      +     * resource belongs to an organization.
      +     * To search against `organization`:
      +     * * use a field query. Example: `organization:123`
      +     * * use a free text query. Example: `123`
      +     * * specify the `scope` field as this organization in your search request.
      +     * 
      + * + * string organization = 18; + * + * @param value The bytes for organization to set. + * @return This builder for chaining. + */ + public Builder setOrganizationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + organization_ = value; + onChanged(); + return this; + } + private java.lang.Object displayName_ = ""; /** * * *
      -     * The display name of this resource.
      +     * The display name of this resource. This field is available only when the
      +     * resource's proto contains it.
      +     * To search against the `display_name`:
      +     * * use a field query. Example: `displayName:"My Instance"`
      +     * * use a free text query. Example: `"My Instance"`
      +     * 
      + * + * string display_name = 4; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
      +     * The display name of this resource. This field is available only when the
      +     * resource's proto contains it.
            * To search against the `display_name`:
            * * use a field query. Example: `displayName:"My Instance"`
            * * use a free text query. Example: `"My Instance"`
            * 
      * - * string display_name = 4; + * string display_name = 4; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
      +     * The display name of this resource. This field is available only when the
      +     * resource's proto contains it.
      +     * To search against the `display_name`:
      +     * * use a field query. Example: `displayName:"My Instance"`
      +     * * use a free text query. Example: `"My Instance"`
      +     * 
      + * + * string display_name = 4; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
      +     * The display name of this resource. This field is available only when the
      +     * resource's proto contains it.
      +     * To search against the `display_name`:
      +     * * use a field query. Example: `displayName:"My Instance"`
      +     * * use a free text query. Example: `"My Instance"`
      +     * 
      + * + * string display_name = 4; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
      +     * The display name of this resource. This field is available only when the
      +     * resource's proto contains it.
      +     * To search against the `display_name`:
      +     * * use a field query. Example: `displayName:"My Instance"`
      +     * * use a free text query. Example: `"My Instance"`
      +     * 
      + * + * string display_name = 4; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
      +     * One or more paragraphs of text description of this resource. Maximum length
      +     * could be up to 1M bytes. This field is available only when the resource's
      +     * proto contains it.
      +     * To search against the `description`:
      +     * * use a field query. Example: `description:"important instance"`
      +     * * use a free text query. Example: `"important instance"`
      +     * 
      + * + * string description = 5; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
      +     * One or more paragraphs of text description of this resource. Maximum length
      +     * could be up to 1M bytes. This field is available only when the resource's
      +     * proto contains it.
      +     * To search against the `description`:
      +     * * use a field query. Example: `description:"important instance"`
      +     * * use a free text query. Example: `"important instance"`
      +     * 
      + * + * string description = 5; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
      +     * One or more paragraphs of text description of this resource. Maximum length
      +     * could be up to 1M bytes. This field is available only when the resource's
      +     * proto contains it.
      +     * To search against the `description`:
      +     * * use a field query. Example: `description:"important instance"`
      +     * * use a free text query. Example: `"important instance"`
      +     * 
      + * + * string description = 5; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
      +     * One or more paragraphs of text description of this resource. Maximum length
      +     * could be up to 1M bytes. This field is available only when the resource's
      +     * proto contains it.
      +     * To search against the `description`:
      +     * * use a field query. Example: `description:"important instance"`
      +     * * use a free text query. Example: `"important instance"`
      +     * 
      + * + * string description = 5; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
      +     * One or more paragraphs of text description of this resource. Maximum length
      +     * could be up to 1M bytes. This field is available only when the resource's
      +     * proto contains it.
      +     * To search against the `description`:
      +     * * use a field query. Example: `description:"important instance"`
      +     * * use a free text query. Example: `"important instance"`
      +     * 
      + * + * string description = 5; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private java.lang.Object location_ = ""; + /** + * + * + *
      +     * Location can be `global`, regional like `us-east1`, or zonal like
      +     * `us-west1-b`. This field is available only when the resource's proto
      +     * contains it.
      +     * To search against the `location`:
      +     * * use a field query. Example: `location:us-west*`
      +     * * use a free text query. Example: `us-west*`
      +     * 
      + * + * string location = 6; + * + * @return The location. + */ + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
      +     * Location can be `global`, regional like `us-east1`, or zonal like
      +     * `us-west1-b`. This field is available only when the resource's proto
      +     * contains it.
      +     * To search against the `location`:
      +     * * use a field query. Example: `location:us-west*`
      +     * * use a free text query. Example: `us-west*`
      +     * 
      + * + * string location = 6; + * + * @return The bytes for location. + */ + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
      +     * Location can be `global`, regional like `us-east1`, or zonal like
      +     * `us-west1-b`. This field is available only when the resource's proto
      +     * contains it.
      +     * To search against the `location`:
      +     * * use a field query. Example: `location:us-west*`
      +     * * use a free text query. Example: `us-west*`
      +     * 
      + * + * string location = 6; + * + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + location_ = value; + onChanged(); + return this; + } + /** + * + * + *
      +     * Location can be `global`, regional like `us-east1`, or zonal like
      +     * `us-west1-b`. This field is available only when the resource's proto
      +     * contains it.
      +     * To search against the `location`:
      +     * * use a field query. Example: `location:us-west*`
      +     * * use a free text query. Example: `us-west*`
      +     * 
      + * + * string location = 6; + * + * @return This builder for chaining. + */ + public Builder clearLocation() { + + location_ = getDefaultInstance().getLocation(); + onChanged(); + return this; + } + /** + * + * + *
      +     * Location can be `global`, regional like `us-east1`, or zonal like
      +     * `us-west1-b`. This field is available only when the resource's proto
      +     * contains it.
      +     * To search against the `location`:
      +     * * use a field query. Example: `location:us-west*`
      +     * * use a free text query. Example: `us-west*`
      +     * 
      + * + * string location = 6; + * + * @param value The bytes for location to set. + * @return This builder for chaining. + */ + public Builder setLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + location_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + onChanged(); + ; + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
      +     * Labels associated with this resource. See [Labelling and grouping GCP
      +     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      +     * for more information. This field is available only when the resource's
      +     * proto contains it.
      +     * To search against the `labels`:
      +     * * use a field query:
      +     *     - query on any label's key or value. Example: `labels:prod`
      +     *     - query by a given label. Example: `labels.env:prod`
      +     *     - query by a given label's existence. Example: `labels.env:*`
      +     * * use a free text query. Example: `prod`
      +     * 
      + * + * map<string, string> labels = 7; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
      +     * Labels associated with this resource. See [Labelling and grouping GCP
      +     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      +     * for more information. This field is available only when the resource's
      +     * proto contains it.
      +     * To search against the `labels`:
      +     * * use a field query:
      +     *     - query on any label's key or value. Example: `labels:prod`
      +     *     - query by a given label. Example: `labels.env:prod`
      +     *     - query by a given label's existence. Example: `labels.env:*`
      +     * * use a free text query. Example: `prod`
      +     * 
      + * + * map<string, string> labels = 7; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
      +     * Labels associated with this resource. See [Labelling and grouping GCP
      +     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      +     * for more information. This field is available only when the resource's
      +     * proto contains it.
      +     * To search against the `labels`:
      +     * * use a field query:
      +     *     - query on any label's key or value. Example: `labels:prod`
      +     *     - query by a given label. Example: `labels.env:prod`
      +     *     - query by a given label's existence. Example: `labels.env:*`
      +     * * use a free text query. Example: `prod`
      +     * 
      + * + * map<string, string> labels = 7; + */ + @java.lang.Override + public java.lang.String getLabelsOrDefault( + java.lang.String key, java.lang.String defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
      +     * Labels associated with this resource. See [Labelling and grouping GCP
      +     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      +     * for more information. This field is available only when the resource's
      +     * proto contains it.
      +     * To search against the `labels`:
      +     * * use a field query:
      +     *     - query on any label's key or value. Example: `labels:prod`
      +     *     - query by a given label. Example: `labels.env:prod`
      +     *     - query by a given label's existence. Example: `labels.env:*`
      +     * * use a free text query. Example: `prod`
      +     * 
      + * + * map<string, string> labels = 7; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
      +     * Labels associated with this resource. See [Labelling and grouping GCP
      +     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      +     * for more information. This field is available only when the resource's
      +     * proto contains it.
      +     * To search against the `labels`:
      +     * * use a field query:
      +     *     - query on any label's key or value. Example: `labels:prod`
      +     *     - query by a given label. Example: `labels.env:prod`
      +     *     - query by a given label's existence. Example: `labels.env:*`
      +     * * use a free text query. Example: `prod`
      +     * 
      + * + * map<string, string> labels = 7; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
      +     * Labels associated with this resource. See [Labelling and grouping GCP
      +     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      +     * for more information. This field is available only when the resource's
      +     * proto contains it.
      +     * To search against the `labels`:
      +     * * use a field query:
      +     *     - query on any label's key or value. Example: `labels:prod`
      +     *     - query by a given label. Example: `labels.env:prod`
      +     *     - query by a given label's existence. Example: `labels.env:*`
      +     * * use a free text query. Example: `prod`
      +     * 
      + * + * map<string, string> labels = 7; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableLabels().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
      +     * Labels associated with this resource. See [Labelling and grouping GCP
      +     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      +     * for more information. This field is available only when the resource's
      +     * proto contains it.
      +     * To search against the `labels`:
      +     * * use a field query:
      +     *     - query on any label's key or value. Example: `labels:prod`
      +     *     - query by a given label. Example: `labels.env:prod`
      +     *     - query by a given label's existence. Example: `labels.env:*`
      +     * * use a free text query. Example: `prod`
      +     * 
      + * + * map<string, string> labels = 7; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.LazyStringList networkTags_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureNetworkTagsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + networkTags_ = new com.google.protobuf.LazyStringArrayList(networkTags_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
      +     * Network tags associated with this resource. Like labels, network tags are a
      +     * type of annotations used to group GCP resources. See [Labelling GCP
      +     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      +     * for more information. This field is available only when the resource's
      +     * proto contains it.
      +     * To search against the `network_tags`:
      +     * * use a field query. Example: `networkTags:internal`
      +     * * use a free text query. Example: `internal`
      +     * 
      + * + * repeated string network_tags = 8; + * + * @return A list containing the networkTags. + */ + public com.google.protobuf.ProtocolStringList getNetworkTagsList() { + return networkTags_.getUnmodifiableView(); + } + /** + * + * + *
      +     * Network tags associated with this resource. Like labels, network tags are a
      +     * type of annotations used to group GCP resources. See [Labelling GCP
      +     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      +     * for more information. This field is available only when the resource's
      +     * proto contains it.
      +     * To search against the `network_tags`:
      +     * * use a field query. Example: `networkTags:internal`
      +     * * use a free text query. Example: `internal`
      +     * 
      + * + * repeated string network_tags = 8; + * + * @return The count of networkTags. + */ + public int getNetworkTagsCount() { + return networkTags_.size(); + } + /** + * + * + *
      +     * Network tags associated with this resource. Like labels, network tags are a
      +     * type of annotations used to group GCP resources. See [Labelling GCP
      +     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      +     * for more information. This field is available only when the resource's
      +     * proto contains it.
      +     * To search against the `network_tags`:
      +     * * use a field query. Example: `networkTags:internal`
      +     * * use a free text query. Example: `internal`
      +     * 
      + * + * repeated string network_tags = 8; + * + * @param index The index of the element to return. + * @return The networkTags at the given index. + */ + public java.lang.String getNetworkTags(int index) { + return networkTags_.get(index); + } + /** + * + * + *
      +     * Network tags associated with this resource. Like labels, network tags are a
      +     * type of annotations used to group GCP resources. See [Labelling GCP
      +     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      +     * for more information. This field is available only when the resource's
      +     * proto contains it.
      +     * To search against the `network_tags`:
      +     * * use a field query. Example: `networkTags:internal`
      +     * * use a free text query. Example: `internal`
      +     * 
      + * + * repeated string network_tags = 8; + * + * @param index The index of the value to return. + * @return The bytes of the networkTags at the given index. + */ + public com.google.protobuf.ByteString getNetworkTagsBytes(int index) { + return networkTags_.getByteString(index); + } + /** + * + * + *
      +     * Network tags associated with this resource. Like labels, network tags are a
      +     * type of annotations used to group GCP resources. See [Labelling GCP
      +     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      +     * for more information. This field is available only when the resource's
      +     * proto contains it.
      +     * To search against the `network_tags`:
      +     * * use a field query. Example: `networkTags:internal`
      +     * * use a free text query. Example: `internal`
      +     * 
      + * + * repeated string network_tags = 8; * - * @return The displayName. + * @param index The index to set the value at. + * @param value The networkTags to set. + * @return This builder for chaining. */ - public java.lang.String getDisplayName() { - java.lang.Object ref = displayName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - displayName_ = s; - return s; - } else { - return (java.lang.String) ref; + public Builder setNetworkTags(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + ensureNetworkTagsIsMutable(); + networkTags_.set(index, value); + onChanged(); + return this; } /** * * *
      -     * The display name of this resource.
      -     * To search against the `display_name`:
      -     * * use a field query. Example: `displayName:"My Instance"`
      -     * * use a free text query. Example: `"My Instance"`
      +     * Network tags associated with this resource. Like labels, network tags are a
      +     * type of annotations used to group GCP resources. See [Labelling GCP
      +     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      +     * for more information. This field is available only when the resource's
      +     * proto contains it.
      +     * To search against the `network_tags`:
      +     * * use a field query. Example: `networkTags:internal`
      +     * * use a free text query. Example: `internal`
            * 
      * - * string display_name = 4; + * repeated string network_tags = 8; * - * @return The bytes for displayName. + * @param value The networkTags to add. + * @return This builder for chaining. */ - public com.google.protobuf.ByteString getDisplayNameBytes() { - java.lang.Object ref = displayName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - displayName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public Builder addNetworkTags(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + ensureNetworkTagsIsMutable(); + networkTags_.add(value); + onChanged(); + return this; } /** * * *
      -     * The display name of this resource.
      -     * To search against the `display_name`:
      -     * * use a field query. Example: `displayName:"My Instance"`
      -     * * use a free text query. Example: `"My Instance"`
      +     * Network tags associated with this resource. Like labels, network tags are a
      +     * type of annotations used to group GCP resources. See [Labelling GCP
      +     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      +     * for more information. This field is available only when the resource's
      +     * proto contains it.
      +     * To search against the `network_tags`:
      +     * * use a field query. Example: `networkTags:internal`
      +     * * use a free text query. Example: `internal`
            * 
      * - * string display_name = 4; + * repeated string network_tags = 8; * - * @param value The displayName to set. + * @param values The networkTags to add. * @return This builder for chaining. */ - public Builder setDisplayName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - displayName_ = value; + public Builder addAllNetworkTags(java.lang.Iterable values) { + ensureNetworkTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, networkTags_); onChanged(); return this; } @@ -1812,19 +3717,23 @@ public Builder setDisplayName(java.lang.String value) { * * *
      -     * The display name of this resource.
      -     * To search against the `display_name`:
      -     * * use a field query. Example: `displayName:"My Instance"`
      -     * * use a free text query. Example: `"My Instance"`
      +     * Network tags associated with this resource. Like labels, network tags are a
      +     * type of annotations used to group GCP resources. See [Labelling GCP
      +     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      +     * for more information. This field is available only when the resource's
      +     * proto contains it.
      +     * To search against the `network_tags`:
      +     * * use a field query. Example: `networkTags:internal`
      +     * * use a free text query. Example: `internal`
            * 
      * - * string display_name = 4; + * repeated string network_tags = 8; * * @return This builder for chaining. */ - public Builder clearDisplayName() { - - displayName_ = getDefaultInstance().getDisplayName(); + public Builder clearNetworkTags() { + networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } @@ -1832,50 +3741,57 @@ public Builder clearDisplayName() { * * *
      -     * The display name of this resource.
      -     * To search against the `display_name`:
      -     * * use a field query. Example: `displayName:"My Instance"`
      -     * * use a free text query. Example: `"My Instance"`
      +     * Network tags associated with this resource. Like labels, network tags are a
      +     * type of annotations used to group GCP resources. See [Labelling GCP
      +     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      +     * for more information. This field is available only when the resource's
      +     * proto contains it.
      +     * To search against the `network_tags`:
      +     * * use a field query. Example: `networkTags:internal`
      +     * * use a free text query. Example: `internal`
            * 
      * - * string display_name = 4; + * repeated string network_tags = 8; * - * @param value The bytes for displayName to set. + * @param value The bytes of the networkTags to add. * @return This builder for chaining. */ - public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + public Builder addNetworkTagsBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - - displayName_ = value; + ensureNetworkTagsIsMutable(); + networkTags_.add(value); onChanged(); return this; } - private java.lang.Object description_ = ""; + private java.lang.Object kmsKey_ = ""; /** * * *
      -     * One or more paragraphs of text description of this resource. Maximum length
      -     * could be up to 1M bytes.
      -     * To search against the `description`:
      -     * * use a field query. Example: `description:"*important instance*"`
      -     * * use a free text query. Example: `"*important instance*"`
      +     * The Cloud KMS
      +     * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys?hl=en)
      +     * name or
      +     * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en)
      +     * name. This field is available only when the resource's proto contains it.
      +     * To search against the `kms_key`:
      +     * * use a field query. Example: `kmsKey:key`
      +     * * use a free text query. Example: `key`
            * 
      * - * string description = 5; + * string kms_key = 10; * - * @return The description. + * @return The kmsKey. */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; + public java.lang.String getKmsKey() { + java.lang.Object ref = kmsKey_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - description_ = s; + kmsKey_ = s; return s; } else { return (java.lang.String) ref; @@ -1885,23 +3801,26 @@ public java.lang.String getDescription() { * * *
      -     * One or more paragraphs of text description of this resource. Maximum length
      -     * could be up to 1M bytes.
      -     * To search against the `description`:
      -     * * use a field query. Example: `description:"*important instance*"`
      -     * * use a free text query. Example: `"*important instance*"`
      +     * The Cloud KMS
      +     * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys?hl=en)
      +     * name or
      +     * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en)
      +     * name. This field is available only when the resource's proto contains it.
      +     * To search against the `kms_key`:
      +     * * use a field query. Example: `kmsKey:key`
      +     * * use a free text query. Example: `key`
            * 
      * - * string description = 5; + * string kms_key = 10; * - * @return The bytes for description. + * @return The bytes for kmsKey. */ - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; + public com.google.protobuf.ByteString getKmsKeyBytes() { + java.lang.Object ref = kmsKey_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; + kmsKey_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -1911,24 +3830,27 @@ public com.google.protobuf.ByteString getDescriptionBytes() { * * *
      -     * One or more paragraphs of text description of this resource. Maximum length
      -     * could be up to 1M bytes.
      -     * To search against the `description`:
      -     * * use a field query. Example: `description:"*important instance*"`
      -     * * use a free text query. Example: `"*important instance*"`
      +     * The Cloud KMS
      +     * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys?hl=en)
      +     * name or
      +     * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en)
      +     * name. This field is available only when the resource's proto contains it.
      +     * To search against the `kms_key`:
      +     * * use a field query. Example: `kmsKey:key`
      +     * * use a free text query. Example: `key`
            * 
      * - * string description = 5; + * string kms_key = 10; * - * @param value The description to set. + * @param value The kmsKey to set. * @return This builder for chaining. */ - public Builder setDescription(java.lang.String value) { + public Builder setKmsKey(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - description_ = value; + kmsKey_ = value; onChanged(); return this; } @@ -1936,20 +3858,23 @@ public Builder setDescription(java.lang.String value) { * * *
      -     * One or more paragraphs of text description of this resource. Maximum length
      -     * could be up to 1M bytes.
      -     * To search against the `description`:
      -     * * use a field query. Example: `description:"*important instance*"`
      -     * * use a free text query. Example: `"*important instance*"`
      +     * The Cloud KMS
      +     * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys?hl=en)
      +     * name or
      +     * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en)
      +     * name. This field is available only when the resource's proto contains it.
      +     * To search against the `kms_key`:
      +     * * use a field query. Example: `kmsKey:key`
      +     * * use a free text query. Example: `key`
            * 
      * - * string description = 5; + * string kms_key = 10; * * @return This builder for chaining. */ - public Builder clearDescription() { + public Builder clearKmsKey() { - description_ = getDefaultInstance().getDescription(); + kmsKey_ = getDefaultInstance().getKmsKey(); onChanged(); return this; } @@ -1957,535 +3882,659 @@ public Builder clearDescription() { * * *
      -     * One or more paragraphs of text description of this resource. Maximum length
      -     * could be up to 1M bytes.
      -     * To search against the `description`:
      -     * * use a field query. Example: `description:"*important instance*"`
      -     * * use a free text query. Example: `"*important instance*"`
      +     * The Cloud KMS
      +     * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys?hl=en)
      +     * name or
      +     * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en)
      +     * name. This field is available only when the resource's proto contains it.
      +     * To search against the `kms_key`:
      +     * * use a field query. Example: `kmsKey:key`
      +     * * use a free text query. Example: `key`
            * 
      * - * string description = 5; + * string kms_key = 10; * - * @param value The bytes for description to set. + * @param value The bytes for kmsKey to set. * @return This builder for chaining. */ - public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + public Builder setKmsKeyBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - description_ = value; + kmsKey_ = value; onChanged(); return this; } - private java.lang.Object location_ = ""; + 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_; /** * * *
      -     * Location can be `global`, regional like `us-east1`, or zonal like
      -     * `us-west1-b`.
      -     * To search against the `location`:
      -     * * use a field query. Example: `location:us-west*`
      -     * * use a free text query. Example: `us-west*`
      +     * The create timestamp of this resource, at which the resource was created.
      +     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
      +     * is available only when the resource's proto contains it.
      +     * To search against `create_time`:
      +     * * use a field query.
      +     *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
      +     *     - value in date string. Example: `createTime > 2021-01-01`
      +     *     - value in date-time string (must be quoted). Example: `createTime >
      +     *     "2021-01-01T00:00:00"`
            * 
      * - * string location = 6; + * .google.protobuf.Timestamp create_time = 11; * - * @return The location. + * @return Whether the createTime field is set. */ - public java.lang.String getLocation() { - java.lang.Object ref = location_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - location_ = s; - return s; - } else { - return (java.lang.String) ref; - } + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; } /** * * *
      -     * Location can be `global`, regional like `us-east1`, or zonal like
      -     * `us-west1-b`.
      -     * To search against the `location`:
      -     * * use a field query. Example: `location:us-west*`
      -     * * use a free text query. Example: `us-west*`
      +     * The create timestamp of this resource, at which the resource was created.
      +     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
      +     * is available only when the resource's proto contains it.
      +     * To search against `create_time`:
      +     * * use a field query.
      +     *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
      +     *     - value in date string. Example: `createTime > 2021-01-01`
      +     *     - value in date-time string (must be quoted). Example: `createTime >
      +     *     "2021-01-01T00:00:00"`
            * 
      * - * string location = 6; + * .google.protobuf.Timestamp create_time = 11; * - * @return The bytes for location. + * @return The createTime. */ - public com.google.protobuf.ByteString getLocationBytes() { - java.lang.Object ref = location_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - location_ = b; - return b; + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; } else { - return (com.google.protobuf.ByteString) ref; + return createTimeBuilder_.getMessage(); } } /** * * *
      -     * Location can be `global`, regional like `us-east1`, or zonal like
      -     * `us-west1-b`.
      -     * To search against the `location`:
      -     * * use a field query. Example: `location:us-west*`
      -     * * use a free text query. Example: `us-west*`
      +     * The create timestamp of this resource, at which the resource was created.
      +     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
      +     * is available only when the resource's proto contains it.
      +     * To search against `create_time`:
      +     * * use a field query.
      +     *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
      +     *     - value in date string. Example: `createTime > 2021-01-01`
      +     *     - value in date-time string (must be quoted). Example: `createTime >
      +     *     "2021-01-01T00:00:00"`
            * 
      * - * string location = 6; - * - * @param value The location to set. - * @return This builder for chaining. + * .google.protobuf.Timestamp create_time = 11; */ - public Builder setLocation(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); } - location_ = value; - onChanged(); - return this; - } - /** - * - * - *
      -     * Location can be `global`, regional like `us-east1`, or zonal like
      -     * `us-west1-b`.
      -     * To search against the `location`:
      -     * * use a field query. Example: `location:us-west*`
      -     * * use a free text query. Example: `us-west*`
      -     * 
      - * - * string location = 6; - * - * @return This builder for chaining. - */ - public Builder clearLocation() { - - location_ = getDefaultInstance().getLocation(); - onChanged(); return this; } /** * * - *
      -     * Location can be `global`, regional like `us-east1`, or zonal like
      -     * `us-west1-b`.
      -     * To search against the `location`:
      -     * * use a field query. Example: `location:us-west*`
      -     * * use a free text query. Example: `us-west*`
      -     * 
      - * - * string location = 6; - * - * @param value The bytes for location to set. - * @return This builder for chaining. - */ - public Builder setLocationBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - location_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.MapField labels_; - - private com.google.protobuf.MapField internalGetLabels() { - if (labels_ == null) { - return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); - } - return labels_; - } - - private com.google.protobuf.MapField - internalGetMutableLabels() { - onChanged(); - ; - if (labels_ == null) { - labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - } - if (!labels_.isMutable()) { - labels_ = labels_.copy(); + *
      +     * The create timestamp of this resource, at which the resource was created.
      +     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
      +     * is available only when the resource's proto contains it.
      +     * To search against `create_time`:
      +     * * use a field query.
      +     *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
      +     *     - value in date string. Example: `createTime > 2021-01-01`
      +     *     - value in date-time string (must be quoted). Example: `createTime >
      +     *     "2021-01-01T00:00:00"`
      +     * 
      + * + * .google.protobuf.Timestamp create_time = 11; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); } - return labels_; - } - public int getLabelsCount() { - return internalGetLabels().getMap().size(); + return this; } /** * * *
      -     * Labels associated with this resource. See [Labelling and grouping GCP
      -     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -     * for more information.
      -     * To search against the `labels`:
      -     * * use a field query:
      -     *     - query on any label's key or value. Example: `labels:prod`
      -     *     - query by a given label. Example: `labels.env:prod`
      -     *     - query by a given label's existence. Example: `labels.env:*`
      -     * * use a free text query. Example: `prod`
      +     * The create timestamp of this resource, at which the resource was created.
      +     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
      +     * is available only when the resource's proto contains it.
      +     * To search against `create_time`:
      +     * * use a field query.
      +     *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
      +     *     - value in date string. Example: `createTime > 2021-01-01`
      +     *     - value in date-time string (must be quoted). Example: `createTime >
      +     *     "2021-01-01T00:00:00"`
            * 
      * - * map<string, string> labels = 7; + * .google.protobuf.Timestamp create_time = 11; */ - @java.lang.Override - public boolean containsLabels(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); } - return internalGetLabels().getMap().containsKey(key); + + return this; } - /** Use {@link #getLabelsMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map getLabels() { - return getLabelsMap(); + /** + * + * + *
      +     * The create timestamp of this resource, at which the resource was created.
      +     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
      +     * is available only when the resource's proto contains it.
      +     * To search against `create_time`:
      +     * * use a field query.
      +     *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
      +     *     - value in date string. Example: `createTime > 2021-01-01`
      +     *     - value in date-time string (must be quoted). Example: `createTime >
      +     *     "2021-01-01T00:00:00"`
      +     * 
      + * + * .google.protobuf.Timestamp create_time = 11; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; } /** * * *
      -     * Labels associated with this resource. See [Labelling and grouping GCP
      -     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -     * for more information.
      -     * To search against the `labels`:
      -     * * use a field query:
      -     *     - query on any label's key or value. Example: `labels:prod`
      -     *     - query by a given label. Example: `labels.env:prod`
      -     *     - query by a given label's existence. Example: `labels.env:*`
      -     * * use a free text query. Example: `prod`
      +     * The create timestamp of this resource, at which the resource was created.
      +     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
      +     * is available only when the resource's proto contains it.
      +     * To search against `create_time`:
      +     * * use a field query.
      +     *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
      +     *     - value in date string. Example: `createTime > 2021-01-01`
      +     *     - value in date-time string (must be quoted). Example: `createTime >
      +     *     "2021-01-01T00:00:00"`
            * 
      * - * map<string, string> labels = 7; + * .google.protobuf.Timestamp create_time = 11; */ - @java.lang.Override - public java.util.Map getLabelsMap() { - return internalGetLabels().getMap(); + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); } /** * * *
      -     * Labels associated with this resource. See [Labelling and grouping GCP
      -     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -     * for more information.
      -     * To search against the `labels`:
      -     * * use a field query:
      -     *     - query on any label's key or value. Example: `labels:prod`
      -     *     - query by a given label. Example: `labels.env:prod`
      -     *     - query by a given label's existence. Example: `labels.env:*`
      -     * * use a free text query. Example: `prod`
      +     * The create timestamp of this resource, at which the resource was created.
      +     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
      +     * is available only when the resource's proto contains it.
      +     * To search against `create_time`:
      +     * * use a field query.
      +     *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
      +     *     - value in date string. Example: `createTime > 2021-01-01`
      +     *     - value in date-time string (must be quoted). Example: `createTime >
      +     *     "2021-01-01T00:00:00"`
            * 
      * - * map<string, string> labels = 7; + * .google.protobuf.Timestamp create_time = 11; */ - @java.lang.Override - public java.lang.String getLabelsOrDefault( - java.lang.String key, java.lang.String defaultValue) { - if (key == null) { - throw new java.lang.NullPointerException(); + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; } - java.util.Map map = internalGetLabels().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
      -     * Labels associated with this resource. See [Labelling and grouping GCP
      -     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -     * for more information.
      -     * To search against the `labels`:
      -     * * use a field query:
      -     *     - query on any label's key or value. Example: `labels:prod`
      -     *     - query by a given label. Example: `labels.env:prod`
      -     *     - query by a given label's existence. Example: `labels.env:*`
      -     * * use a free text query. Example: `prod`
      +     * The create timestamp of this resource, at which the resource was created.
      +     * The granularity is in seconds. Timestamp.nanos will always be 0. This field
      +     * is available only when the resource's proto contains it.
      +     * To search against `create_time`:
      +     * * use a field query.
      +     *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
      +     *     - value in date string. Example: `createTime > 2021-01-01`
      +     *     - value in date-time string (must be quoted). Example: `createTime >
      +     *     "2021-01-01T00:00:00"`
            * 
      * - * map<string, string> labels = 7; + * .google.protobuf.Timestamp create_time = 11; */ - @java.lang.Override - public java.lang.String getLabelsOrThrow(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - java.util.Map map = internalGetLabels().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); + 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 map.get(key); + return createTimeBuilder_; } - public Builder clearLabels() { - internalGetMutableLabels().getMutableMap().clear(); - 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_; + /** + * + * + *
      +     * The last update timestamp of this resource, at which the resource was last
      +     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
      +     * always be 0. This field is available only when the resource's proto
      +     * contains it.
      +     * To search against `update_time`:
      +     * * use a field query.
      +     *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
      +     *     - value in date string. Example: `updateTime < 2021-01-01`
      +     *     - value in date-time string (must be quoted). Example: `updateTime <
      +     *     "2021-01-01T00:00:00"`
      +     * 
      + * + * .google.protobuf.Timestamp update_time = 12; + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; } /** * * *
      -     * Labels associated with this resource. See [Labelling and grouping GCP
      -     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -     * for more information.
      -     * To search against the `labels`:
      -     * * use a field query:
      -     *     - query on any label's key or value. Example: `labels:prod`
      -     *     - query by a given label. Example: `labels.env:prod`
      -     *     - query by a given label's existence. Example: `labels.env:*`
      -     * * use a free text query. Example: `prod`
      +     * The last update timestamp of this resource, at which the resource was last
      +     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
      +     * always be 0. This field is available only when the resource's proto
      +     * contains it.
      +     * To search against `update_time`:
      +     * * use a field query.
      +     *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
      +     *     - value in date string. Example: `updateTime < 2021-01-01`
      +     *     - value in date-time string (must be quoted). Example: `updateTime <
      +     *     "2021-01-01T00:00:00"`
            * 
      * - * map<string, string> labels = 7; + * .google.protobuf.Timestamp update_time = 12; + * + * @return The updateTime. */ - public Builder removeLabels(java.lang.String key) { - if (key == null) { - throw new java.lang.NullPointerException(); + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); } - internalGetMutableLabels().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map getMutableLabels() { - return internalGetMutableLabels().getMutableMap(); } /** * * *
      -     * Labels associated with this resource. See [Labelling and grouping GCP
      -     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -     * for more information.
      -     * To search against the `labels`:
      -     * * use a field query:
      -     *     - query on any label's key or value. Example: `labels:prod`
      -     *     - query by a given label. Example: `labels.env:prod`
      -     *     - query by a given label's existence. Example: `labels.env:*`
      -     * * use a free text query. Example: `prod`
      +     * The last update timestamp of this resource, at which the resource was last
      +     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
      +     * always be 0. This field is available only when the resource's proto
      +     * contains it.
      +     * To search against `update_time`:
      +     * * use a field query.
      +     *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
      +     *     - value in date string. Example: `updateTime < 2021-01-01`
      +     *     - value in date-time string (must be quoted). Example: `updateTime <
      +     *     "2021-01-01T00:00:00"`
            * 
      * - * map<string, string> labels = 7; + * .google.protobuf.Timestamp update_time = 12; */ - public Builder putLabels(java.lang.String key, java.lang.String value) { - if (key == null) { - throw new java.lang.NullPointerException(); - } - if (value == null) { - throw new java.lang.NullPointerException(); + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); } - internalGetMutableLabels().getMutableMap().put(key, value); + return this; } /** * * *
      -     * Labels associated with this resource. See [Labelling and grouping GCP
      -     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -     * for more information.
      -     * To search against the `labels`:
      -     * * use a field query:
      -     *     - query on any label's key or value. Example: `labels:prod`
      -     *     - query by a given label. Example: `labels.env:prod`
      -     *     - query by a given label's existence. Example: `labels.env:*`
      -     * * use a free text query. Example: `prod`
      +     * The last update timestamp of this resource, at which the resource was last
      +     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
      +     * always be 0. This field is available only when the resource's proto
      +     * contains it.
      +     * To search against `update_time`:
      +     * * use a field query.
      +     *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
      +     *     - value in date string. Example: `updateTime < 2021-01-01`
      +     *     - value in date-time string (must be quoted). Example: `updateTime <
      +     *     "2021-01-01T00:00:00"`
            * 
      * - * map<string, string> labels = 7; + * .google.protobuf.Timestamp update_time = 12; */ - public Builder putAllLabels(java.util.Map values) { - internalGetMutableLabels().getMutableMap().putAll(values); + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + return this; } - - private com.google.protobuf.LazyStringList networkTags_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureNetworkTagsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - networkTags_ = new com.google.protobuf.LazyStringArrayList(networkTags_); - bitField0_ |= 0x00000002; + /** + * + * + *
      +     * The last update timestamp of this resource, at which the resource was last
      +     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
      +     * always be 0. This field is available only when the resource's proto
      +     * contains it.
      +     * To search against `update_time`:
      +     * * use a field query.
      +     *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
      +     *     - value in date string. Example: `updateTime < 2021-01-01`
      +     *     - value in date-time string (must be quoted). Example: `updateTime <
      +     *     "2021-01-01T00:00:00"`
      +     * 
      + * + * .google.protobuf.Timestamp update_time = 12; + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); } + + return this; } /** * * *
      -     * Network tags associated with this resource. Like labels, network tags are a
      -     * type of annotations used to group GCP resources. See [Labelling GCP
      -     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -     * for more information.
      -     * To search against the `network_tags`:
      -     * * use a field query. Example: `networkTags:internal`
      -     * * use a free text query. Example: `internal`
      +     * The last update timestamp of this resource, at which the resource was last
      +     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
      +     * always be 0. This field is available only when the resource's proto
      +     * contains it.
      +     * To search against `update_time`:
      +     * * use a field query.
      +     *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
      +     *     - value in date string. Example: `updateTime < 2021-01-01`
      +     *     - value in date-time string (must be quoted). Example: `updateTime <
      +     *     "2021-01-01T00:00:00"`
            * 
      * - * repeated string network_tags = 8; - * - * @return A list containing the networkTags. + * .google.protobuf.Timestamp update_time = 12; */ - public com.google.protobuf.ProtocolStringList getNetworkTagsList() { - return networkTags_.getUnmodifiableView(); + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; } /** * * *
      -     * Network tags associated with this resource. Like labels, network tags are a
      -     * type of annotations used to group GCP resources. See [Labelling GCP
      -     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -     * for more information.
      -     * To search against the `network_tags`:
      -     * * use a field query. Example: `networkTags:internal`
      -     * * use a free text query. Example: `internal`
      +     * The last update timestamp of this resource, at which the resource was last
      +     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
      +     * always be 0. This field is available only when the resource's proto
      +     * contains it.
      +     * To search against `update_time`:
      +     * * use a field query.
      +     *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
      +     *     - value in date string. Example: `updateTime < 2021-01-01`
      +     *     - value in date-time string (must be quoted). Example: `updateTime <
      +     *     "2021-01-01T00:00:00"`
            * 
      * - * repeated string network_tags = 8; - * - * @return The count of networkTags. + * .google.protobuf.Timestamp update_time = 12; */ - public int getNetworkTagsCount() { - return networkTags_.size(); + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); } /** * * *
      -     * Network tags associated with this resource. Like labels, network tags are a
      -     * type of annotations used to group GCP resources. See [Labelling GCP
      -     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -     * for more information.
      -     * To search against the `network_tags`:
      -     * * use a field query. Example: `networkTags:internal`
      -     * * use a free text query. Example: `internal`
      +     * The last update timestamp of this resource, at which the resource was last
      +     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
      +     * always be 0. This field is available only when the resource's proto
      +     * contains it.
      +     * To search against `update_time`:
      +     * * use a field query.
      +     *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
      +     *     - value in date string. Example: `updateTime < 2021-01-01`
      +     *     - value in date-time string (must be quoted). Example: `updateTime <
      +     *     "2021-01-01T00:00:00"`
            * 
      * - * repeated string network_tags = 8; - * - * @param index The index of the element to return. - * @return The networkTags at the given index. + * .google.protobuf.Timestamp update_time = 12; */ - public java.lang.String getNetworkTags(int index) { - return networkTags_.get(index); + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } } /** * * *
      -     * Network tags associated with this resource. Like labels, network tags are a
      -     * type of annotations used to group GCP resources. See [Labelling GCP
      -     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -     * for more information.
      -     * To search against the `network_tags`:
      -     * * use a field query. Example: `networkTags:internal`
      -     * * use a free text query. Example: `internal`
      +     * The last update timestamp of this resource, at which the resource was last
      +     * modified or deleted. The granularity is in seconds. Timestamp.nanos will
      +     * always be 0. This field is available only when the resource's proto
      +     * contains it.
      +     * To search against `update_time`:
      +     * * use a field query.
      +     *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
      +     *     - value in date string. Example: `updateTime < 2021-01-01`
      +     *     - value in date-time string (must be quoted). Example: `updateTime <
      +     *     "2021-01-01T00:00:00"`
            * 
      * - * repeated string network_tags = 8; - * - * @param index The index of the value to return. - * @return The bytes of the networkTags at the given index. + * .google.protobuf.Timestamp update_time = 12; */ - public com.google.protobuf.ByteString getNetworkTagsBytes(int index) { - return networkTags_.getByteString(index); + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; } + + private java.lang.Object state_ = ""; /** * * *
      -     * Network tags associated with this resource. Like labels, network tags are a
      -     * type of annotations used to group GCP resources. See [Labelling GCP
      -     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -     * for more information.
      -     * To search against the `network_tags`:
      -     * * use a field query. Example: `networkTags:internal`
      -     * * use a free text query. Example: `internal`
      +     * The state of this resource. Different resources types have different state
      +     * definitions that are mapped from various fields of different resource
      +     * types. This field is available only when the resource's proto contains it.
      +     * Example:
      +     * If the resource is an instance provided by Compute Engine,
      +     * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
      +     * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
      +     * in [API
      +     * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
      +     * If the resource is a project provided by Cloud Resource Manager, its state
      +     * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
      +     * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
      +     * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
      +     * To search against the `state`:
      +     * * use a field query. Example: `state:RUNNING`
      +     * * use a free text query. Example: `RUNNING`
            * 
      * - * repeated string network_tags = 8; + * string state = 13; * - * @param index The index to set the value at. - * @param value The networkTags to set. - * @return This builder for chaining. + * @return The state. */ - public Builder setNetworkTags(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + 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; } - ensureNetworkTagsIsMutable(); - networkTags_.set(index, value); - onChanged(); - return this; } /** * * *
      -     * Network tags associated with this resource. Like labels, network tags are a
      -     * type of annotations used to group GCP resources. See [Labelling GCP
      -     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -     * for more information.
      -     * To search against the `network_tags`:
      -     * * use a field query. Example: `networkTags:internal`
      -     * * use a free text query. Example: `internal`
      +     * The state of this resource. Different resources types have different state
      +     * definitions that are mapped from various fields of different resource
      +     * types. This field is available only when the resource's proto contains it.
      +     * Example:
      +     * If the resource is an instance provided by Compute Engine,
      +     * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
      +     * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
      +     * in [API
      +     * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
      +     * If the resource is a project provided by Cloud Resource Manager, its state
      +     * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
      +     * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
      +     * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
      +     * To search against the `state`:
      +     * * use a field query. Example: `state:RUNNING`
      +     * * use a free text query. Example: `RUNNING`
            * 
      * - * repeated string network_tags = 8; + * string state = 13; * - * @param value The networkTags to add. - * @return This builder for chaining. + * @return The bytes for state. */ - public Builder addNetworkTags(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + 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; } - ensureNetworkTagsIsMutable(); - networkTags_.add(value); - onChanged(); - return this; } /** * * *
      -     * Network tags associated with this resource. Like labels, network tags are a
      -     * type of annotations used to group GCP resources. See [Labelling GCP
      -     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -     * for more information.
      -     * To search against the `network_tags`:
      -     * * use a field query. Example: `networkTags:internal`
      -     * * use a free text query. Example: `internal`
      +     * The state of this resource. Different resources types have different state
      +     * definitions that are mapped from various fields of different resource
      +     * types. This field is available only when the resource's proto contains it.
      +     * Example:
      +     * If the resource is an instance provided by Compute Engine,
      +     * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
      +     * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
      +     * in [API
      +     * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
      +     * If the resource is a project provided by Cloud Resource Manager, its state
      +     * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
      +     * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
      +     * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
      +     * To search against the `state`:
      +     * * use a field query. Example: `state:RUNNING`
      +     * * use a free text query. Example: `RUNNING`
            * 
      * - * repeated string network_tags = 8; + * string state = 13; * - * @param values The networkTags to add. + * @param value The state to set. * @return This builder for chaining. */ - public Builder addAllNetworkTags(java.lang.Iterable values) { - ensureNetworkTagsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, networkTags_); + public Builder setState(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value; onChanged(); return this; } @@ -2493,22 +4542,31 @@ public Builder addAllNetworkTags(java.lang.Iterable values) { * * *
      -     * Network tags associated with this resource. Like labels, network tags are a
      -     * type of annotations used to group GCP resources. See [Labelling GCP
      -     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -     * for more information.
      -     * To search against the `network_tags`:
      -     * * use a field query. Example: `networkTags:internal`
      -     * * use a free text query. Example: `internal`
      +     * The state of this resource. Different resources types have different state
      +     * definitions that are mapped from various fields of different resource
      +     * types. This field is available only when the resource's proto contains it.
      +     * Example:
      +     * If the resource is an instance provided by Compute Engine,
      +     * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
      +     * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
      +     * in [API
      +     * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
      +     * If the resource is a project provided by Cloud Resource Manager, its state
      +     * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
      +     * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
      +     * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
      +     * To search against the `state`:
      +     * * use a field query. Example: `state:RUNNING`
      +     * * use a free text query. Example: `RUNNING`
            * 
      * - * repeated string network_tags = 8; + * string state = 13; * * @return This builder for chaining. */ - public Builder clearNetworkTags() { - networkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); + public Builder clearState() { + + state_ = getDefaultInstance().getState(); onChanged(); return this; } @@ -2516,27 +4574,36 @@ public Builder clearNetworkTags() { * * *
      -     * Network tags associated with this resource. Like labels, network tags are a
      -     * type of annotations used to group GCP resources. See [Labelling GCP
      -     * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -     * for more information.
      -     * To search against the `network_tags`:
      -     * * use a field query. Example: `networkTags:internal`
      -     * * use a free text query. Example: `internal`
      +     * The state of this resource. Different resources types have different state
      +     * definitions that are mapped from various fields of different resource
      +     * types. This field is available only when the resource's proto contains it.
      +     * Example:
      +     * If the resource is an instance provided by Compute Engine,
      +     * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
      +     * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
      +     * in [API
      +     * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
      +     * If the resource is a project provided by Cloud Resource Manager, its state
      +     * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
      +     * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
      +     * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
      +     * To search against the `state`:
      +     * * use a field query. Example: `state:RUNNING`
      +     * * use a free text query. Example: `RUNNING`
            * 
      * - * repeated string network_tags = 8; + * string state = 13; * - * @param value The bytes of the networkTags to add. + * @param value The bytes for state to set. * @return This builder for chaining. */ - public Builder addNetworkTagsBytes(com.google.protobuf.ByteString value) { + public Builder setStateBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - ensureNetworkTagsIsMutable(); - networkTags_.add(value); + + state_ = value; onChanged(); return this; } @@ -2558,7 +4625,7 @@ public Builder addNetworkTagsBytes(com.google.protobuf.ByteString value) { * corresponding GCP service (e.g., Compute Engine). see [API references and * supported searchable * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types) - * for more information. + * to see which fields are included. * You can search values of these fields through free text search. However, * you should not consume the field programically as the field names and * values may change as the GCP service updates to a new incompatible API @@ -2587,7 +4654,7 @@ public boolean hasAdditionalAttributes() { * corresponding GCP service (e.g., Compute Engine). see [API references and * supported searchable * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types) - * for more information. + * to see which fields are included. * You can search values of these fields through free text search. However, * you should not consume the field programically as the field names and * values may change as the GCP service updates to a new incompatible API @@ -2622,7 +4689,7 @@ public com.google.protobuf.Struct getAdditionalAttributes() { * corresponding GCP service (e.g., Compute Engine). see [API references and * supported searchable * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types) - * for more information. + * to see which fields are included. * You can search values of these fields through free text search. However, * you should not consume the field programically as the field names and * values may change as the GCP service updates to a new incompatible API @@ -2659,7 +4726,7 @@ public Builder setAdditionalAttributes(com.google.protobuf.Struct value) { * corresponding GCP service (e.g., Compute Engine). see [API references and * supported searchable * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types) - * for more information. + * to see which fields are included. * You can search values of these fields through free text search. However, * you should not consume the field programically as the field names and * values may change as the GCP service updates to a new incompatible API @@ -2693,7 +4760,7 @@ public Builder setAdditionalAttributes(com.google.protobuf.Struct.Builder builde * corresponding GCP service (e.g., Compute Engine). see [API references and * supported searchable * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types) - * for more information. + * to see which fields are included. * You can search values of these fields through free text search. However, * you should not consume the field programically as the field names and * values may change as the GCP service updates to a new incompatible API @@ -2734,7 +4801,7 @@ public Builder mergeAdditionalAttributes(com.google.protobuf.Struct value) { * corresponding GCP service (e.g., Compute Engine). see [API references and * supported searchable * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types) - * for more information. + * to see which fields are included. * You can search values of these fields through free text search. However, * you should not consume the field programically as the field names and * values may change as the GCP service updates to a new incompatible API @@ -2769,7 +4836,7 @@ public Builder clearAdditionalAttributes() { * corresponding GCP service (e.g., Compute Engine). see [API references and * supported searchable * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types) - * for more information. + * to see which fields are included. * You can search values of these fields through free text search. However, * you should not consume the field programically as the field names and * values may change as the GCP service updates to a new incompatible API @@ -2798,7 +4865,7 @@ public com.google.protobuf.Struct.Builder getAdditionalAttributesBuilder() { * corresponding GCP service (e.g., Compute Engine). see [API references and * supported searchable * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types) - * for more information. + * to see which fields are included. * You can search values of these fields through free text search. However, * you should not consume the field programically as the field names and * values may change as the GCP service updates to a new incompatible API @@ -2831,7 +4898,7 @@ public com.google.protobuf.StructOrBuilder getAdditionalAttributesOrBuilder() { * corresponding GCP service (e.g., Compute Engine). see [API references and * supported searchable * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types) - * for more information. + * to see which fields are included. * You can search values of these fields through free text search. However, * you should not consume the field programically as the field names and * values may change as the GCP service updates to a new incompatible API @@ -2861,6 +4928,268 @@ public com.google.protobuf.StructOrBuilder getAdditionalAttributesOrBuilder() { return additionalAttributesBuilder_; } + private java.lang.Object parentFullResourceName_ = ""; + /** + * + * + *
      +     * The full resource name of this resource's parent, if it has one.
      +     * To search against the `parent_full_resource_name`:
      +     * * use a field query. Example:
      +     * `parentFullResourceName:"project-name"`
      +     * * use a free text query. Example:
      +     * `project-name`
      +     * 
      + * + * string parent_full_resource_name = 19; + * + * @return The parentFullResourceName. + */ + public java.lang.String getParentFullResourceName() { + java.lang.Object ref = parentFullResourceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parentFullResourceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
      +     * The full resource name of this resource's parent, if it has one.
      +     * To search against the `parent_full_resource_name`:
      +     * * use a field query. Example:
      +     * `parentFullResourceName:"project-name"`
      +     * * use a free text query. Example:
      +     * `project-name`
      +     * 
      + * + * string parent_full_resource_name = 19; + * + * @return The bytes for parentFullResourceName. + */ + public com.google.protobuf.ByteString getParentFullResourceNameBytes() { + java.lang.Object ref = parentFullResourceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parentFullResourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
      +     * The full resource name of this resource's parent, if it has one.
      +     * To search against the `parent_full_resource_name`:
      +     * * use a field query. Example:
      +     * `parentFullResourceName:"project-name"`
      +     * * use a free text query. Example:
      +     * `project-name`
      +     * 
      + * + * string parent_full_resource_name = 19; + * + * @param value The parentFullResourceName to set. + * @return This builder for chaining. + */ + public Builder setParentFullResourceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parentFullResourceName_ = value; + onChanged(); + return this; + } + /** + * + * + *
      +     * The full resource name of this resource's parent, if it has one.
      +     * To search against the `parent_full_resource_name`:
      +     * * use a field query. Example:
      +     * `parentFullResourceName:"project-name"`
      +     * * use a free text query. Example:
      +     * `project-name`
      +     * 
      + * + * string parent_full_resource_name = 19; + * + * @return This builder for chaining. + */ + public Builder clearParentFullResourceName() { + + parentFullResourceName_ = getDefaultInstance().getParentFullResourceName(); + onChanged(); + return this; + } + /** + * + * + *
      +     * The full resource name of this resource's parent, if it has one.
      +     * To search against the `parent_full_resource_name`:
      +     * * use a field query. Example:
      +     * `parentFullResourceName:"project-name"`
      +     * * use a free text query. Example:
      +     * `project-name`
      +     * 
      + * + * string parent_full_resource_name = 19; + * + * @param value The bytes for parentFullResourceName to set. + * @return This builder for chaining. + */ + public Builder setParentFullResourceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parentFullResourceName_ = value; + onChanged(); + return this; + } + + private java.lang.Object parentAssetType_ = ""; + /** + * + * + *
      +     * The type of this resource's immediate parent, if there is one.
      +     * To search against the `parent_asset_type`:
      +     * * use a field query. Example:
      +     * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
      +     * * use a free text query. Example:
      +     * `cloudresourcemanager.googleapis.com/Project`
      +     * 
      + * + * string parent_asset_type = 103; + * + * @return The parentAssetType. + */ + public java.lang.String getParentAssetType() { + java.lang.Object ref = parentAssetType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parentAssetType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
      +     * The type of this resource's immediate parent, if there is one.
      +     * To search against the `parent_asset_type`:
      +     * * use a field query. Example:
      +     * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
      +     * * use a free text query. Example:
      +     * `cloudresourcemanager.googleapis.com/Project`
      +     * 
      + * + * string parent_asset_type = 103; + * + * @return The bytes for parentAssetType. + */ + public com.google.protobuf.ByteString getParentAssetTypeBytes() { + java.lang.Object ref = parentAssetType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parentAssetType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
      +     * The type of this resource's immediate parent, if there is one.
      +     * To search against the `parent_asset_type`:
      +     * * use a field query. Example:
      +     * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
      +     * * use a free text query. Example:
      +     * `cloudresourcemanager.googleapis.com/Project`
      +     * 
      + * + * string parent_asset_type = 103; + * + * @param value The parentAssetType to set. + * @return This builder for chaining. + */ + public Builder setParentAssetType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parentAssetType_ = value; + onChanged(); + return this; + } + /** + * + * + *
      +     * The type of this resource's immediate parent, if there is one.
      +     * To search against the `parent_asset_type`:
      +     * * use a field query. Example:
      +     * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
      +     * * use a free text query. Example:
      +     * `cloudresourcemanager.googleapis.com/Project`
      +     * 
      + * + * string parent_asset_type = 103; + * + * @return This builder for chaining. + */ + public Builder clearParentAssetType() { + + parentAssetType_ = getDefaultInstance().getParentAssetType(); + onChanged(); + return this; + } + /** + * + * + *
      +     * The type of this resource's immediate parent, if there is one.
      +     * To search against the `parent_asset_type`:
      +     * * use a field query. Example:
      +     * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
      +     * * use a free text query. Example:
      +     * `cloudresourcemanager.googleapis.com/Project`
      +     * 
      + * + * string parent_asset_type = 103; + * + * @param value The bytes for parentAssetType to set. + * @return This builder for chaining. + */ + public Builder setParentAssetTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parentAssetType_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResultOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResultOrBuilder.java index 530d416f6..511b5368f 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResultOrBuilder.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ResourceSearchResultOrBuilder.java @@ -96,8 +96,11 @@ public interface ResourceSearchResultOrBuilder * *
          * The project that this resource belongs to, in the form of
      -   * projects/{PROJECT_NUMBER}.
      -   * To search against the `project`:
      +   * projects/{PROJECT_NUMBER}. This field is available when the resource
      +   * belongs to a project.
      +   * To search against `project`:
      +   * * use a field query. Example: `project:12345`
      +   * * use a free text query. Example: `12345`
          * * specify the `scope` field as this project in your search request.
          * 
      * @@ -111,8 +114,11 @@ public interface ResourceSearchResultOrBuilder * *
          * The project that this resource belongs to, in the form of
      -   * projects/{PROJECT_NUMBER}.
      -   * To search against the `project`:
      +   * projects/{PROJECT_NUMBER}. This field is available when the resource
      +   * belongs to a project.
      +   * To search against `project`:
      +   * * use a field query. Example: `project:12345`
      +   * * use a free text query. Example: `12345`
          * * specify the `scope` field as this project in your search request.
          * 
      * @@ -126,7 +132,120 @@ public interface ResourceSearchResultOrBuilder * * *
      -   * The display name of this resource.
      +   * The folder(s) that this resource belongs to, in the form of
      +   * folders/{FOLDER_NUMBER}. This field is available when the resource
      +   * belongs to one or more folders.
      +   * To search against `folders`:
      +   * * use a field query. Example: `folders:(123 OR 456)`
      +   * * use a free text query. Example: `123`
      +   * * specify the `scope` field as this folder in your search request.
      +   * 
      + * + * repeated string folders = 17; + * + * @return A list containing the folders. + */ + java.util.List getFoldersList(); + /** + * + * + *
      +   * The folder(s) that this resource belongs to, in the form of
      +   * folders/{FOLDER_NUMBER}. This field is available when the resource
      +   * belongs to one or more folders.
      +   * To search against `folders`:
      +   * * use a field query. Example: `folders:(123 OR 456)`
      +   * * use a free text query. Example: `123`
      +   * * specify the `scope` field as this folder in your search request.
      +   * 
      + * + * repeated string folders = 17; + * + * @return The count of folders. + */ + int getFoldersCount(); + /** + * + * + *
      +   * The folder(s) that this resource belongs to, in the form of
      +   * folders/{FOLDER_NUMBER}. This field is available when the resource
      +   * belongs to one or more folders.
      +   * To search against `folders`:
      +   * * use a field query. Example: `folders:(123 OR 456)`
      +   * * use a free text query. Example: `123`
      +   * * specify the `scope` field as this folder in your search request.
      +   * 
      + * + * repeated string folders = 17; + * + * @param index The index of the element to return. + * @return The folders at the given index. + */ + java.lang.String getFolders(int index); + /** + * + * + *
      +   * The folder(s) that this resource belongs to, in the form of
      +   * folders/{FOLDER_NUMBER}. This field is available when the resource
      +   * belongs to one or more folders.
      +   * To search against `folders`:
      +   * * use a field query. Example: `folders:(123 OR 456)`
      +   * * use a free text query. Example: `123`
      +   * * specify the `scope` field as this folder in your search request.
      +   * 
      + * + * repeated string folders = 17; + * + * @param index The index of the value to return. + * @return The bytes of the folders at the given index. + */ + com.google.protobuf.ByteString getFoldersBytes(int index); + + /** + * + * + *
      +   * The organization that this resource belongs to, in the form of
      +   * organizations/{ORGANIZATION_NUMBER}. This field is available when the
      +   * resource belongs to an organization.
      +   * To search against `organization`:
      +   * * use a field query. Example: `organization:123`
      +   * * use a free text query. Example: `123`
      +   * * specify the `scope` field as this organization in your search request.
      +   * 
      + * + * string organization = 18; + * + * @return The organization. + */ + java.lang.String getOrganization(); + /** + * + * + *
      +   * The organization that this resource belongs to, in the form of
      +   * organizations/{ORGANIZATION_NUMBER}. This field is available when the
      +   * resource belongs to an organization.
      +   * To search against `organization`:
      +   * * use a field query. Example: `organization:123`
      +   * * use a free text query. Example: `123`
      +   * * specify the `scope` field as this organization in your search request.
      +   * 
      + * + * string organization = 18; + * + * @return The bytes for organization. + */ + com.google.protobuf.ByteString getOrganizationBytes(); + + /** + * + * + *
      +   * The display name of this resource. This field is available only when the
      +   * resource's proto contains it.
          * To search against the `display_name`:
          * * use a field query. Example: `displayName:"My Instance"`
          * * use a free text query. Example: `"My Instance"`
      @@ -141,7 +260,8 @@ public interface ResourceSearchResultOrBuilder
          *
          *
          * 
      -   * The display name of this resource.
      +   * The display name of this resource. This field is available only when the
      +   * resource's proto contains it.
          * To search against the `display_name`:
          * * use a field query. Example: `displayName:"My Instance"`
          * * use a free text query. Example: `"My Instance"`
      @@ -158,10 +278,11 @@ public interface ResourceSearchResultOrBuilder
          *
          * 
          * One or more paragraphs of text description of this resource. Maximum length
      -   * could be up to 1M bytes.
      +   * could be up to 1M bytes. This field is available only when the resource's
      +   * proto contains it.
          * To search against the `description`:
      -   * * use a field query. Example: `description:"*important instance*"`
      -   * * use a free text query. Example: `"*important instance*"`
      +   * * use a field query. Example: `description:"important instance"`
      +   * * use a free text query. Example: `"important instance"`
          * 
      * * string description = 5; @@ -174,10 +295,11 @@ public interface ResourceSearchResultOrBuilder * *
          * One or more paragraphs of text description of this resource. Maximum length
      -   * could be up to 1M bytes.
      +   * could be up to 1M bytes. This field is available only when the resource's
      +   * proto contains it.
          * To search against the `description`:
      -   * * use a field query. Example: `description:"*important instance*"`
      -   * * use a free text query. Example: `"*important instance*"`
      +   * * use a field query. Example: `description:"important instance"`
      +   * * use a free text query. Example: `"important instance"`
          * 
      * * string description = 5; @@ -191,7 +313,8 @@ public interface ResourceSearchResultOrBuilder * *
          * Location can be `global`, regional like `us-east1`, or zonal like
      -   * `us-west1-b`.
      +   * `us-west1-b`. This field is available only when the resource's proto
      +   * contains it.
          * To search against the `location`:
          * * use a field query. Example: `location:us-west*`
          * * use a free text query. Example: `us-west*`
      @@ -207,7 +330,8 @@ public interface ResourceSearchResultOrBuilder
          *
          * 
          * Location can be `global`, regional like `us-east1`, or zonal like
      -   * `us-west1-b`.
      +   * `us-west1-b`. This field is available only when the resource's proto
      +   * contains it.
          * To search against the `location`:
          * * use a field query. Example: `location:us-west*`
          * * use a free text query. Example: `us-west*`
      @@ -225,7 +349,8 @@ public interface ResourceSearchResultOrBuilder
          * 
          * Labels associated with this resource. See [Labelling and grouping GCP
          * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -   * for more information.
      +   * for more information. This field is available only when the resource's
      +   * proto contains it.
          * To search against the `labels`:
          * * use a field query:
          *     - query on any label's key or value. Example: `labels:prod`
      @@ -243,7 +368,8 @@ public interface ResourceSearchResultOrBuilder
          * 
          * Labels associated with this resource. See [Labelling and grouping GCP
          * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -   * for more information.
      +   * for more information. This field is available only when the resource's
      +   * proto contains it.
          * To search against the `labels`:
          * * use a field query:
          *     - query on any label's key or value. Example: `labels:prod`
      @@ -264,7 +390,8 @@ public interface ResourceSearchResultOrBuilder
          * 
          * Labels associated with this resource. See [Labelling and grouping GCP
          * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -   * for more information.
      +   * for more information. This field is available only when the resource's
      +   * proto contains it.
          * To search against the `labels`:
          * * use a field query:
          *     - query on any label's key or value. Example: `labels:prod`
      @@ -282,7 +409,8 @@ public interface ResourceSearchResultOrBuilder
          * 
          * Labels associated with this resource. See [Labelling and grouping GCP
          * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -   * for more information.
      +   * for more information. This field is available only when the resource's
      +   * proto contains it.
          * To search against the `labels`:
          * * use a field query:
          *     - query on any label's key or value. Example: `labels:prod`
      @@ -300,7 +428,8 @@ public interface ResourceSearchResultOrBuilder
          * 
          * Labels associated with this resource. See [Labelling and grouping GCP
          * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -   * for more information.
      +   * for more information. This field is available only when the resource's
      +   * proto contains it.
          * To search against the `labels`:
          * * use a field query:
          *     - query on any label's key or value. Example: `labels:prod`
      @@ -320,7 +449,8 @@ public interface ResourceSearchResultOrBuilder
          * Network tags associated with this resource. Like labels, network tags are a
          * type of annotations used to group GCP resources. See [Labelling GCP
          * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -   * for more information.
      +   * for more information. This field is available only when the resource's
      +   * proto contains it.
          * To search against the `network_tags`:
          * * use a field query. Example: `networkTags:internal`
          * * use a free text query. Example: `internal`
      @@ -338,7 +468,8 @@ public interface ResourceSearchResultOrBuilder
          * Network tags associated with this resource. Like labels, network tags are a
          * type of annotations used to group GCP resources. See [Labelling GCP
          * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -   * for more information.
      +   * for more information. This field is available only when the resource's
      +   * proto contains it.
          * To search against the `network_tags`:
          * * use a field query. Example: `networkTags:internal`
          * * use a free text query. Example: `internal`
      @@ -356,7 +487,8 @@ public interface ResourceSearchResultOrBuilder
          * Network tags associated with this resource. Like labels, network tags are a
          * type of annotations used to group GCP resources. See [Labelling GCP
          * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -   * for more information.
      +   * for more information. This field is available only when the resource's
      +   * proto contains it.
          * To search against the `network_tags`:
          * * use a field query. Example: `networkTags:internal`
          * * use a free text query. Example: `internal`
      @@ -375,7 +507,8 @@ public interface ResourceSearchResultOrBuilder
          * Network tags associated with this resource. Like labels, network tags are a
          * type of annotations used to group GCP resources. See [Labelling GCP
          * resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources)
      -   * for more information.
      +   * for more information. This field is available only when the resource's
      +   * proto contains it.
          * To search against the `network_tags`:
          * * use a field query. Example: `networkTags:internal`
          * * use a free text query. Example: `internal`
      @@ -388,6 +521,221 @@ public interface ResourceSearchResultOrBuilder
          */
         com.google.protobuf.ByteString getNetworkTagsBytes(int index);
       
      +  /**
      +   *
      +   *
      +   * 
      +   * The Cloud KMS
      +   * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys?hl=en)
      +   * name or
      +   * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en)
      +   * name. This field is available only when the resource's proto contains it.
      +   * To search against the `kms_key`:
      +   * * use a field query. Example: `kmsKey:key`
      +   * * use a free text query. Example: `key`
      +   * 
      + * + * string kms_key = 10; + * + * @return The kmsKey. + */ + java.lang.String getKmsKey(); + /** + * + * + *
      +   * The Cloud KMS
      +   * [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys?hl=en)
      +   * name or
      +   * [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en)
      +   * name. This field is available only when the resource's proto contains it.
      +   * To search against the `kms_key`:
      +   * * use a field query. Example: `kmsKey:key`
      +   * * use a free text query. Example: `key`
      +   * 
      + * + * string kms_key = 10; + * + * @return The bytes for kmsKey. + */ + com.google.protobuf.ByteString getKmsKeyBytes(); + + /** + * + * + *
      +   * The create timestamp of this resource, at which the resource was created.
      +   * The granularity is in seconds. Timestamp.nanos will always be 0. This field
      +   * is available only when the resource's proto contains it.
      +   * To search against `create_time`:
      +   * * use a field query.
      +   *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
      +   *     - value in date string. Example: `createTime > 2021-01-01`
      +   *     - value in date-time string (must be quoted). Example: `createTime >
      +   *     "2021-01-01T00:00:00"`
      +   * 
      + * + * .google.protobuf.Timestamp create_time = 11; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
      +   * The create timestamp of this resource, at which the resource was created.
      +   * The granularity is in seconds. Timestamp.nanos will always be 0. This field
      +   * is available only when the resource's proto contains it.
      +   * To search against `create_time`:
      +   * * use a field query.
      +   *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
      +   *     - value in date string. Example: `createTime > 2021-01-01`
      +   *     - value in date-time string (must be quoted). Example: `createTime >
      +   *     "2021-01-01T00:00:00"`
      +   * 
      + * + * .google.protobuf.Timestamp create_time = 11; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
      +   * The create timestamp of this resource, at which the resource was created.
      +   * The granularity is in seconds. Timestamp.nanos will always be 0. This field
      +   * is available only when the resource's proto contains it.
      +   * To search against `create_time`:
      +   * * use a field query.
      +   *     - value in seconds since unix epoch. Example: `createTime > 1609459200`
      +   *     - value in date string. Example: `createTime > 2021-01-01`
      +   *     - value in date-time string (must be quoted). Example: `createTime >
      +   *     "2021-01-01T00:00:00"`
      +   * 
      + * + * .google.protobuf.Timestamp create_time = 11; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
      +   * The last update timestamp of this resource, at which the resource was last
      +   * modified or deleted. The granularity is in seconds. Timestamp.nanos will
      +   * always be 0. This field is available only when the resource's proto
      +   * contains it.
      +   * To search against `update_time`:
      +   * * use a field query.
      +   *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
      +   *     - value in date string. Example: `updateTime < 2021-01-01`
      +   *     - value in date-time string (must be quoted). Example: `updateTime <
      +   *     "2021-01-01T00:00:00"`
      +   * 
      + * + * .google.protobuf.Timestamp update_time = 12; + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
      +   * The last update timestamp of this resource, at which the resource was last
      +   * modified or deleted. The granularity is in seconds. Timestamp.nanos will
      +   * always be 0. This field is available only when the resource's proto
      +   * contains it.
      +   * To search against `update_time`:
      +   * * use a field query.
      +   *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
      +   *     - value in date string. Example: `updateTime < 2021-01-01`
      +   *     - value in date-time string (must be quoted). Example: `updateTime <
      +   *     "2021-01-01T00:00:00"`
      +   * 
      + * + * .google.protobuf.Timestamp update_time = 12; + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
      +   * The last update timestamp of this resource, at which the resource was last
      +   * modified or deleted. The granularity is in seconds. Timestamp.nanos will
      +   * always be 0. This field is available only when the resource's proto
      +   * contains it.
      +   * To search against `update_time`:
      +   * * use a field query.
      +   *     - value in seconds since unix epoch. Example: `updateTime < 1609459200`
      +   *     - value in date string. Example: `updateTime < 2021-01-01`
      +   *     - value in date-time string (must be quoted). Example: `updateTime <
      +   *     "2021-01-01T00:00:00"`
      +   * 
      + * + * .google.protobuf.Timestamp update_time = 12; + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
      +   * The state of this resource. Different resources types have different state
      +   * definitions that are mapped from various fields of different resource
      +   * types. This field is available only when the resource's proto contains it.
      +   * Example:
      +   * If the resource is an instance provided by Compute Engine,
      +   * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
      +   * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
      +   * in [API
      +   * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
      +   * If the resource is a project provided by Cloud Resource Manager, its state
      +   * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
      +   * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
      +   * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
      +   * To search against the `state`:
      +   * * use a field query. Example: `state:RUNNING`
      +   * * use a free text query. Example: `RUNNING`
      +   * 
      + * + * string state = 13; + * + * @return The state. + */ + java.lang.String getState(); + /** + * + * + *
      +   * The state of this resource. Different resources types have different state
      +   * definitions that are mapped from various fields of different resource
      +   * types. This field is available only when the resource's proto contains it.
      +   * Example:
      +   * If the resource is an instance provided by Compute Engine,
      +   * its state will include PROVISIONING, STAGING, RUNNING, STOPPING,
      +   * SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition
      +   * in [API
      +   * Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances).
      +   * If the resource is a project provided by Cloud Resource Manager, its state
      +   * will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and
      +   * DELETE_IN_PROGRESS. See `lifecycleState` definition in [API
      +   * Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects).
      +   * To search against the `state`:
      +   * * use a field query. Example: `state:RUNNING`
      +   * * use a free text query. Example: `RUNNING`
      +   * 
      + * + * string state = 13; + * + * @return The bytes for state. + */ + com.google.protobuf.ByteString getStateBytes(); + /** * * @@ -399,7 +747,7 @@ public interface ResourceSearchResultOrBuilder * corresponding GCP service (e.g., Compute Engine). see [API references and * supported searchable * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types) - * for more information. + * to see which fields are included. * You can search values of these fields through free text search. However, * you should not consume the field programically as the field names and * values may change as the GCP service updates to a new incompatible API @@ -426,7 +774,7 @@ public interface ResourceSearchResultOrBuilder * corresponding GCP service (e.g., Compute Engine). see [API references and * supported searchable * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types) - * for more information. + * to see which fields are included. * You can search values of these fields through free text search. However, * you should not consume the field programically as the field names and * values may change as the GCP service updates to a new incompatible API @@ -453,7 +801,7 @@ public interface ResourceSearchResultOrBuilder * corresponding GCP service (e.g., Compute Engine). see [API references and * supported searchable * attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types) - * for more information. + * to see which fields are included. * You can search values of these fields through free text search. However, * you should not consume the field programically as the field names and * values may change as the GCP service updates to a new incompatible API @@ -467,4 +815,74 @@ public interface ResourceSearchResultOrBuilder * .google.protobuf.Struct additional_attributes = 9; */ com.google.protobuf.StructOrBuilder getAdditionalAttributesOrBuilder(); + + /** + * + * + *
      +   * The full resource name of this resource's parent, if it has one.
      +   * To search against the `parent_full_resource_name`:
      +   * * use a field query. Example:
      +   * `parentFullResourceName:"project-name"`
      +   * * use a free text query. Example:
      +   * `project-name`
      +   * 
      + * + * string parent_full_resource_name = 19; + * + * @return The parentFullResourceName. + */ + java.lang.String getParentFullResourceName(); + /** + * + * + *
      +   * The full resource name of this resource's parent, if it has one.
      +   * To search against the `parent_full_resource_name`:
      +   * * use a field query. Example:
      +   * `parentFullResourceName:"project-name"`
      +   * * use a free text query. Example:
      +   * `project-name`
      +   * 
      + * + * string parent_full_resource_name = 19; + * + * @return The bytes for parentFullResourceName. + */ + com.google.protobuf.ByteString getParentFullResourceNameBytes(); + + /** + * + * + *
      +   * The type of this resource's immediate parent, if there is one.
      +   * To search against the `parent_asset_type`:
      +   * * use a field query. Example:
      +   * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
      +   * * use a free text query. Example:
      +   * `cloudresourcemanager.googleapis.com/Project`
      +   * 
      + * + * string parent_asset_type = 103; + * + * @return The parentAssetType. + */ + java.lang.String getParentAssetType(); + /** + * + * + *
      +   * The type of this resource's immediate parent, if there is one.
      +   * To search against the `parent_asset_type`:
      +   * * use a field query. Example:
      +   * `parentAssetType:"cloudresourcemanager.googleapis.com/Project"`
      +   * * use a free text query. Example:
      +   * `cloudresourcemanager.googleapis.com/Project`
      +   * 
      + * + * string parent_asset_type = 103; + * + * @return The bytes for parentAssetType. + */ + com.google.protobuf.ByteString getParentAssetTypeBytes(); } diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequest.java index 4bda1f60c..9ab7c271b 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequest.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequest.java @@ -141,7 +141,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * Required. A scope can be a project, a folder, or an organization. The search is * limited to the IAM policies within the `scope`. The caller must be granted * the - * [`cloudasset.assets.searchAllIamPolicies`](http://cloud.google.com/asset-inventory/docs/access-control#required_permissions) + * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) * permission on the desired scope. * The allowed values are: * * projects/{PROJECT_ID} (e.g., "projects/foo-bar") @@ -173,7 +173,7 @@ public java.lang.String getScope() { * Required. A scope can be a project, a folder, or an organization. The search is * limited to the IAM policies within the `scope`. The caller must be granted * the - * [`cloudasset.assets.searchAllIamPolicies`](http://cloud.google.com/asset-inventory/docs/access-control#required_permissions) + * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) * permission on the desired scope. * The allowed values are: * * projects/{PROJECT_ID} (e.g., "projects/foo-bar") @@ -208,24 +208,36 @@ public com.google.protobuf.ByteString getScopeBytes() { * Optional. The query statement. See [how to construct a * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query) * for more information. If not specified or empty, it will search all the - * IAM policies within the specified `scope`. + * IAM policies within the specified `scope`. Note that the query string is + * compared against each Cloud IAM policy binding, including its members, + * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only + * contain the bindings that match your query. To learn more about the IAM + * policy structure, see [IAM policy + * doc](https://cloud.google.com/iam/docs/policies#structure). * Examples: * * `policy:amy@gmail.com` to find IAM policy bindings that specify user * "amy@gmail.com". * * `policy:roles/compute.admin` to find IAM policy bindings that specify * the Compute Admin role. + * * `policy:comp*` to find IAM policy bindings that contain "comp" as a + * prefix of any word in the binding. * * `policy.role.permissions:storage.buckets.update` to find IAM policy * bindings that specify a role containing "storage.buckets.update" * permission. Note that if callers don't have `iam.roles.get` access to a * role's included permissions, policy bindings that specify this role will * be dropped from the search results. + * * `policy.role.permissions:upd*` to find IAM policy bindings that specify a + * role containing "upd" as a prefix of any word in the role permission. + * Note that if callers don't have `iam.roles.get` access to a role's + * included permissions, policy bindings that specify this role will be + * dropped from the search results. * * `resource:organizations/123456` to find IAM policy bindings * that are set on "organizations/123456". + * * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to + * find IAM policy bindings that are set on the project named "myproject". * * `Important` to find IAM policy bindings that contain "Important" as a * word in any of the searchable fields (except for the included * permissions). - * * `*por*` to find IAM policy bindings that contain "por" as a substring - * in any of the searchable fields (except for the included permissions). * * `resource:(instance1 OR instance2) policy:amy` to find * IAM policy bindings that are set on resources "instance1" or * "instance2" and also specify user "amy". @@ -254,24 +266,36 @@ public java.lang.String getQuery() { * Optional. The query statement. See [how to construct a * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query) * for more information. If not specified or empty, it will search all the - * IAM policies within the specified `scope`. + * IAM policies within the specified `scope`. Note that the query string is + * compared against each Cloud IAM policy binding, including its members, + * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only + * contain the bindings that match your query. To learn more about the IAM + * policy structure, see [IAM policy + * doc](https://cloud.google.com/iam/docs/policies#structure). * Examples: * * `policy:amy@gmail.com` to find IAM policy bindings that specify user * "amy@gmail.com". * * `policy:roles/compute.admin` to find IAM policy bindings that specify * the Compute Admin role. + * * `policy:comp*` to find IAM policy bindings that contain "comp" as a + * prefix of any word in the binding. * * `policy.role.permissions:storage.buckets.update` to find IAM policy * bindings that specify a role containing "storage.buckets.update" * permission. Note that if callers don't have `iam.roles.get` access to a * role's included permissions, policy bindings that specify this role will * be dropped from the search results. + * * `policy.role.permissions:upd*` to find IAM policy bindings that specify a + * role containing "upd" as a prefix of any word in the role permission. + * Note that if callers don't have `iam.roles.get` access to a role's + * included permissions, policy bindings that specify this role will be + * dropped from the search results. * * `resource:organizations/123456` to find IAM policy bindings * that are set on "organizations/123456". + * * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to + * find IAM policy bindings that are set on the project named "myproject". * * `Important` to find IAM policy bindings that contain "Important" as a * word in any of the searchable fields (except for the included * permissions). - * * `*por*` to find IAM policy bindings that contain "por" as a substring - * in any of the searchable fields (except for the included permissions). * * `resource:(instance1 OR instance2) policy:amy` to find * IAM policy bindings that are set on resources "instance1" or * "instance2" and also specify user "amy". @@ -744,7 +768,7 @@ public Builder mergeFrom( * Required. A scope can be a project, a folder, or an organization. The search is * limited to the IAM policies within the `scope`. The caller must be granted * the - * [`cloudasset.assets.searchAllIamPolicies`](http://cloud.google.com/asset-inventory/docs/access-control#required_permissions) + * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) * permission on the desired scope. * The allowed values are: * * projects/{PROJECT_ID} (e.g., "projects/foo-bar") @@ -775,7 +799,7 @@ public java.lang.String getScope() { * Required. A scope can be a project, a folder, or an organization. The search is * limited to the IAM policies within the `scope`. The caller must be granted * the - * [`cloudasset.assets.searchAllIamPolicies`](http://cloud.google.com/asset-inventory/docs/access-control#required_permissions) + * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) * permission on the desired scope. * The allowed values are: * * projects/{PROJECT_ID} (e.g., "projects/foo-bar") @@ -806,7 +830,7 @@ public com.google.protobuf.ByteString getScopeBytes() { * Required. A scope can be a project, a folder, or an organization. The search is * limited to the IAM policies within the `scope`. The caller must be granted * the - * [`cloudasset.assets.searchAllIamPolicies`](http://cloud.google.com/asset-inventory/docs/access-control#required_permissions) + * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) * permission on the desired scope. * The allowed values are: * * projects/{PROJECT_ID} (e.g., "projects/foo-bar") @@ -836,7 +860,7 @@ public Builder setScope(java.lang.String value) { * Required. A scope can be a project, a folder, or an organization. The search is * limited to the IAM policies within the `scope`. The caller must be granted * the - * [`cloudasset.assets.searchAllIamPolicies`](http://cloud.google.com/asset-inventory/docs/access-control#required_permissions) + * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) * permission on the desired scope. * The allowed values are: * * projects/{PROJECT_ID} (e.g., "projects/foo-bar") @@ -862,7 +886,7 @@ public Builder clearScope() { * Required. A scope can be a project, a folder, or an organization. The search is * limited to the IAM policies within the `scope`. The caller must be granted * the - * [`cloudasset.assets.searchAllIamPolicies`](http://cloud.google.com/asset-inventory/docs/access-control#required_permissions) + * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) * permission on the desired scope. * The allowed values are: * * projects/{PROJECT_ID} (e.g., "projects/foo-bar") @@ -895,24 +919,36 @@ public Builder setScopeBytes(com.google.protobuf.ByteString value) { * Optional. The query statement. See [how to construct a * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query) * for more information. If not specified or empty, it will search all the - * IAM policies within the specified `scope`. + * IAM policies within the specified `scope`. Note that the query string is + * compared against each Cloud IAM policy binding, including its members, + * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only + * contain the bindings that match your query. To learn more about the IAM + * policy structure, see [IAM policy + * doc](https://cloud.google.com/iam/docs/policies#structure). * Examples: * * `policy:amy@gmail.com` to find IAM policy bindings that specify user * "amy@gmail.com". * * `policy:roles/compute.admin` to find IAM policy bindings that specify * the Compute Admin role. + * * `policy:comp*` to find IAM policy bindings that contain "comp" as a + * prefix of any word in the binding. * * `policy.role.permissions:storage.buckets.update` to find IAM policy * bindings that specify a role containing "storage.buckets.update" * permission. Note that if callers don't have `iam.roles.get` access to a * role's included permissions, policy bindings that specify this role will * be dropped from the search results. + * * `policy.role.permissions:upd*` to find IAM policy bindings that specify a + * role containing "upd" as a prefix of any word in the role permission. + * Note that if callers don't have `iam.roles.get` access to a role's + * included permissions, policy bindings that specify this role will be + * dropped from the search results. * * `resource:organizations/123456` to find IAM policy bindings * that are set on "organizations/123456". + * * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to + * find IAM policy bindings that are set on the project named "myproject". * * `Important` to find IAM policy bindings that contain "Important" as a * word in any of the searchable fields (except for the included * permissions). - * * `*por*` to find IAM policy bindings that contain "por" as a substring - * in any of the searchable fields (except for the included permissions). * * `resource:(instance1 OR instance2) policy:amy` to find * IAM policy bindings that are set on resources "instance1" or * "instance2" and also specify user "amy". @@ -940,24 +976,36 @@ public java.lang.String getQuery() { * Optional. The query statement. See [how to construct a * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query) * for more information. If not specified or empty, it will search all the - * IAM policies within the specified `scope`. + * IAM policies within the specified `scope`. Note that the query string is + * compared against each Cloud IAM policy binding, including its members, + * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only + * contain the bindings that match your query. To learn more about the IAM + * policy structure, see [IAM policy + * doc](https://cloud.google.com/iam/docs/policies#structure). * Examples: * * `policy:amy@gmail.com` to find IAM policy bindings that specify user * "amy@gmail.com". * * `policy:roles/compute.admin` to find IAM policy bindings that specify * the Compute Admin role. + * * `policy:comp*` to find IAM policy bindings that contain "comp" as a + * prefix of any word in the binding. * * `policy.role.permissions:storage.buckets.update` to find IAM policy * bindings that specify a role containing "storage.buckets.update" * permission. Note that if callers don't have `iam.roles.get` access to a * role's included permissions, policy bindings that specify this role will * be dropped from the search results. + * * `policy.role.permissions:upd*` to find IAM policy bindings that specify a + * role containing "upd" as a prefix of any word in the role permission. + * Note that if callers don't have `iam.roles.get` access to a role's + * included permissions, policy bindings that specify this role will be + * dropped from the search results. * * `resource:organizations/123456` to find IAM policy bindings * that are set on "organizations/123456". + * * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to + * find IAM policy bindings that are set on the project named "myproject". * * `Important` to find IAM policy bindings that contain "Important" as a * word in any of the searchable fields (except for the included * permissions). - * * `*por*` to find IAM policy bindings that contain "por" as a substring - * in any of the searchable fields (except for the included permissions). * * `resource:(instance1 OR instance2) policy:amy` to find * IAM policy bindings that are set on resources "instance1" or * "instance2" and also specify user "amy". @@ -985,24 +1033,36 @@ public com.google.protobuf.ByteString getQueryBytes() { * Optional. The query statement. See [how to construct a * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query) * for more information. If not specified or empty, it will search all the - * IAM policies within the specified `scope`. + * IAM policies within the specified `scope`. Note that the query string is + * compared against each Cloud IAM policy binding, including its members, + * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only + * contain the bindings that match your query. To learn more about the IAM + * policy structure, see [IAM policy + * doc](https://cloud.google.com/iam/docs/policies#structure). * Examples: * * `policy:amy@gmail.com` to find IAM policy bindings that specify user * "amy@gmail.com". * * `policy:roles/compute.admin` to find IAM policy bindings that specify * the Compute Admin role. + * * `policy:comp*` to find IAM policy bindings that contain "comp" as a + * prefix of any word in the binding. * * `policy.role.permissions:storage.buckets.update` to find IAM policy * bindings that specify a role containing "storage.buckets.update" * permission. Note that if callers don't have `iam.roles.get` access to a * role's included permissions, policy bindings that specify this role will * be dropped from the search results. + * * `policy.role.permissions:upd*` to find IAM policy bindings that specify a + * role containing "upd" as a prefix of any word in the role permission. + * Note that if callers don't have `iam.roles.get` access to a role's + * included permissions, policy bindings that specify this role will be + * dropped from the search results. * * `resource:organizations/123456` to find IAM policy bindings * that are set on "organizations/123456". + * * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to + * find IAM policy bindings that are set on the project named "myproject". * * `Important` to find IAM policy bindings that contain "Important" as a * word in any of the searchable fields (except for the included * permissions). - * * `*por*` to find IAM policy bindings that contain "por" as a substring - * in any of the searchable fields (except for the included permissions). * * `resource:(instance1 OR instance2) policy:amy` to find * IAM policy bindings that are set on resources "instance1" or * "instance2" and also specify user "amy". @@ -1029,24 +1089,36 @@ public Builder setQuery(java.lang.String value) { * Optional. The query statement. See [how to construct a * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query) * for more information. If not specified or empty, it will search all the - * IAM policies within the specified `scope`. + * IAM policies within the specified `scope`. Note that the query string is + * compared against each Cloud IAM policy binding, including its members, + * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only + * contain the bindings that match your query. To learn more about the IAM + * policy structure, see [IAM policy + * doc](https://cloud.google.com/iam/docs/policies#structure). * Examples: * * `policy:amy@gmail.com` to find IAM policy bindings that specify user * "amy@gmail.com". * * `policy:roles/compute.admin` to find IAM policy bindings that specify * the Compute Admin role. + * * `policy:comp*` to find IAM policy bindings that contain "comp" as a + * prefix of any word in the binding. * * `policy.role.permissions:storage.buckets.update` to find IAM policy * bindings that specify a role containing "storage.buckets.update" * permission. Note that if callers don't have `iam.roles.get` access to a * role's included permissions, policy bindings that specify this role will * be dropped from the search results. + * * `policy.role.permissions:upd*` to find IAM policy bindings that specify a + * role containing "upd" as a prefix of any word in the role permission. + * Note that if callers don't have `iam.roles.get` access to a role's + * included permissions, policy bindings that specify this role will be + * dropped from the search results. * * `resource:organizations/123456` to find IAM policy bindings * that are set on "organizations/123456". + * * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to + * find IAM policy bindings that are set on the project named "myproject". * * `Important` to find IAM policy bindings that contain "Important" as a * word in any of the searchable fields (except for the included * permissions). - * * `*por*` to find IAM policy bindings that contain "por" as a substring - * in any of the searchable fields (except for the included permissions). * * `resource:(instance1 OR instance2) policy:amy` to find * IAM policy bindings that are set on resources "instance1" or * "instance2" and also specify user "amy". @@ -1069,24 +1141,36 @@ public Builder clearQuery() { * Optional. The query statement. See [how to construct a * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query) * for more information. If not specified or empty, it will search all the - * IAM policies within the specified `scope`. + * IAM policies within the specified `scope`. Note that the query string is + * compared against each Cloud IAM policy binding, including its members, + * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only + * contain the bindings that match your query. To learn more about the IAM + * policy structure, see [IAM policy + * doc](https://cloud.google.com/iam/docs/policies#structure). * Examples: * * `policy:amy@gmail.com` to find IAM policy bindings that specify user * "amy@gmail.com". * * `policy:roles/compute.admin` to find IAM policy bindings that specify * the Compute Admin role. + * * `policy:comp*` to find IAM policy bindings that contain "comp" as a + * prefix of any word in the binding. * * `policy.role.permissions:storage.buckets.update` to find IAM policy * bindings that specify a role containing "storage.buckets.update" * permission. Note that if callers don't have `iam.roles.get` access to a * role's included permissions, policy bindings that specify this role will * be dropped from the search results. + * * `policy.role.permissions:upd*` to find IAM policy bindings that specify a + * role containing "upd" as a prefix of any word in the role permission. + * Note that if callers don't have `iam.roles.get` access to a role's + * included permissions, policy bindings that specify this role will be + * dropped from the search results. * * `resource:organizations/123456` to find IAM policy bindings * that are set on "organizations/123456". + * * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to + * find IAM policy bindings that are set on the project named "myproject". * * `Important` to find IAM policy bindings that contain "Important" as a * word in any of the searchable fields (except for the included * permissions). - * * `*por*` to find IAM policy bindings that contain "por" as a substring - * in any of the searchable fields (except for the included permissions). * * `resource:(instance1 OR instance2) policy:amy` to find * IAM policy bindings that are set on resources "instance1" or * "instance2" and also specify user "amy". diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequestOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequestOrBuilder.java index 0e11e1e4a..dfb8af0ad 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequestOrBuilder.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllIamPoliciesRequestOrBuilder.java @@ -30,7 +30,7 @@ public interface SearchAllIamPoliciesRequestOrBuilder * Required. A scope can be a project, a folder, or an organization. The search is * limited to the IAM policies within the `scope`. The caller must be granted * the - * [`cloudasset.assets.searchAllIamPolicies`](http://cloud.google.com/asset-inventory/docs/access-control#required_permissions) + * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) * permission on the desired scope. * The allowed values are: * * projects/{PROJECT_ID} (e.g., "projects/foo-bar") @@ -51,7 +51,7 @@ public interface SearchAllIamPoliciesRequestOrBuilder * Required. A scope can be a project, a folder, or an organization. The search is * limited to the IAM policies within the `scope`. The caller must be granted * the - * [`cloudasset.assets.searchAllIamPolicies`](http://cloud.google.com/asset-inventory/docs/access-control#required_permissions) + * [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) * permission on the desired scope. * The allowed values are: * * projects/{PROJECT_ID} (e.g., "projects/foo-bar") @@ -73,24 +73,36 @@ public interface SearchAllIamPoliciesRequestOrBuilder * Optional. The query statement. See [how to construct a * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query) * for more information. If not specified or empty, it will search all the - * IAM policies within the specified `scope`. + * IAM policies within the specified `scope`. Note that the query string is + * compared against each Cloud IAM policy binding, including its members, + * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only + * contain the bindings that match your query. To learn more about the IAM + * policy structure, see [IAM policy + * doc](https://cloud.google.com/iam/docs/policies#structure). * Examples: * * `policy:amy@gmail.com` to find IAM policy bindings that specify user * "amy@gmail.com". * * `policy:roles/compute.admin` to find IAM policy bindings that specify * the Compute Admin role. + * * `policy:comp*` to find IAM policy bindings that contain "comp" as a + * prefix of any word in the binding. * * `policy.role.permissions:storage.buckets.update` to find IAM policy * bindings that specify a role containing "storage.buckets.update" * permission. Note that if callers don't have `iam.roles.get` access to a * role's included permissions, policy bindings that specify this role will * be dropped from the search results. + * * `policy.role.permissions:upd*` to find IAM policy bindings that specify a + * role containing "upd" as a prefix of any word in the role permission. + * Note that if callers don't have `iam.roles.get` access to a role's + * included permissions, policy bindings that specify this role will be + * dropped from the search results. * * `resource:organizations/123456` to find IAM policy bindings * that are set on "organizations/123456". + * * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to + * find IAM policy bindings that are set on the project named "myproject". * * `Important` to find IAM policy bindings that contain "Important" as a * word in any of the searchable fields (except for the included * permissions). - * * `*por*` to find IAM policy bindings that contain "por" as a substring - * in any of the searchable fields (except for the included permissions). * * `resource:(instance1 OR instance2) policy:amy` to find * IAM policy bindings that are set on resources "instance1" or * "instance2" and also specify user "amy". @@ -108,24 +120,36 @@ public interface SearchAllIamPoliciesRequestOrBuilder * Optional. The query statement. See [how to construct a * query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query) * for more information. If not specified or empty, it will search all the - * IAM policies within the specified `scope`. + * IAM policies within the specified `scope`. Note that the query string is + * compared against each Cloud IAM policy binding, including its members, + * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only + * contain the bindings that match your query. To learn more about the IAM + * policy structure, see [IAM policy + * doc](https://cloud.google.com/iam/docs/policies#structure). * Examples: * * `policy:amy@gmail.com` to find IAM policy bindings that specify user * "amy@gmail.com". * * `policy:roles/compute.admin` to find IAM policy bindings that specify * the Compute Admin role. + * * `policy:comp*` to find IAM policy bindings that contain "comp" as a + * prefix of any word in the binding. * * `policy.role.permissions:storage.buckets.update` to find IAM policy * bindings that specify a role containing "storage.buckets.update" * permission. Note that if callers don't have `iam.roles.get` access to a * role's included permissions, policy bindings that specify this role will * be dropped from the search results. + * * `policy.role.permissions:upd*` to find IAM policy bindings that specify a + * role containing "upd" as a prefix of any word in the role permission. + * Note that if callers don't have `iam.roles.get` access to a role's + * included permissions, policy bindings that specify this role will be + * dropped from the search results. * * `resource:organizations/123456` to find IAM policy bindings * that are set on "organizations/123456". + * * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to + * find IAM policy bindings that are set on the project named "myproject". * * `Important` to find IAM policy bindings that contain "Important" as a * word in any of the searchable fields (except for the included * permissions). - * * `*por*` to find IAM policy bindings that contain "por" as a substring - * in any of the searchable fields (except for the included permissions). * * `resource:(instance1 OR instance2) policy:amy` to find * IAM policy bindings that are set on resources "instance1" or * "instance2" and also specify user "amy". diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesRequest.java index 334e53af5..c227e2155 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesRequest.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesRequest.java @@ -163,7 +163,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
          * Required. A scope can be a project, a folder, or an organization. The search is
          * limited to the resources within the `scope`. The caller must be granted the
      -   * [`cloudasset.assets.searchAllResources`](http://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
      +   * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
          * permission on the desired scope.
          * The allowed values are:
          * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
      @@ -194,7 +194,7 @@ public java.lang.String getScope() {
          * 
          * Required. A scope can be a project, a folder, or an organization. The search is
          * limited to the resources within the `scope`. The caller must be granted the
      -   * [`cloudasset.assets.searchAllResources`](http://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
      +   * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
          * permission on the desired scope.
          * The allowed values are:
          * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
      @@ -227,34 +227,39 @@ public com.google.protobuf.ByteString getScopeBytes() {
          *
          * 
          * Optional. The query statement. See [how to construct a
      -   * query](http://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
      +   * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
          * for more information. If not specified or empty, it will search all the
      -   * resources within the specified `scope`. Note that the query string is
      -   * compared against each Cloud IAM policy binding, including its members,
      -   * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
      -   * contain the bindings that match your query. To learn more about the IAM
      -   * policy structure, see [IAM policy
      -   * doc](https://cloud.google.com/iam/docs/policies#structure).
      +   * resources within the specified `scope`.
          * Examples:
          * * `name:Important` to find Cloud resources whose name contains
          *   "Important" as a word.
      +   * * `name=Important` to find the Cloud resource whose name is exactly
      +   *   "Important".
          * * `displayName:Impor*` to find Cloud resources whose display name
      -   *   contains "Impor" as a prefix.
      -   * * `description:*por*` to find Cloud resources whose description
      -   *   contains "por" as a substring.
      -   * * `location:us-west*` to find Cloud resources whose location is
      -   *   prefixed with "us-west".
      +   *   contains "Impor" as a prefix of any word in the field.
      +   * * `location:us-west*` to find Cloud resources whose location contains both
      +   *   "us" and "west" as prefixes.
          * * `labels:prod` to find Cloud resources whose labels contain "prod" as
          *   a key or value.
          * * `labels.env:prod` to find Cloud resources that have a label "env"
          *   and its value is "prod".
          * * `labels.env:*` to find Cloud resources that have a label "env".
      +   * * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
      +   *   encryption key whose name contains the word "key".
      +   * * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
      +   *   word.
      +   * * `NOT state:ACTIVE` to find {{gcp_name}} resources whose state
      +   *   doesn't contain "ACTIVE" as a word.
      +   * * `createTime<1609459200` to find Cloud resources that were created before
      +   *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
      +   *   "2021-01-01 00:00:00 UTC" in seconds.
      +   * * `updateTime>1609459200` to find Cloud resources that were updated after
      +   *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
      +   *   "2021-01-01 00:00:00 UTC" in seconds.
          * * `Important` to find Cloud resources that contain "Important" as a word
          *   in any of the searchable fields.
      -   * * `Impor*` to find Cloud resources that contain "Impor" as a prefix
      -   *   in any of the searchable fields.
      -   * * `*por*` to find Cloud resources that contain "por" as a substring in
      -   *   any of the searchable fields.
      +   * * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any
      +   *   word in any of the searchable fields.
          * * `Important location:(us-west1 OR global)` to find Cloud
          *   resources that contain "Important" as a word in any of the searchable
          *   fields and are also located in the "us-west1" region or the "global"
      @@ -282,34 +287,39 @@ public java.lang.String getQuery() {
          *
          * 
          * Optional. The query statement. See [how to construct a
      -   * query](http://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
      +   * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
          * for more information. If not specified or empty, it will search all the
      -   * resources within the specified `scope`. Note that the query string is
      -   * compared against each Cloud IAM policy binding, including its members,
      -   * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
      -   * contain the bindings that match your query. To learn more about the IAM
      -   * policy structure, see [IAM policy
      -   * doc](https://cloud.google.com/iam/docs/policies#structure).
      +   * resources within the specified `scope`.
          * Examples:
          * * `name:Important` to find Cloud resources whose name contains
          *   "Important" as a word.
      +   * * `name=Important` to find the Cloud resource whose name is exactly
      +   *   "Important".
          * * `displayName:Impor*` to find Cloud resources whose display name
      -   *   contains "Impor" as a prefix.
      -   * * `description:*por*` to find Cloud resources whose description
      -   *   contains "por" as a substring.
      -   * * `location:us-west*` to find Cloud resources whose location is
      -   *   prefixed with "us-west".
      +   *   contains "Impor" as a prefix of any word in the field.
      +   * * `location:us-west*` to find Cloud resources whose location contains both
      +   *   "us" and "west" as prefixes.
          * * `labels:prod` to find Cloud resources whose labels contain "prod" as
          *   a key or value.
          * * `labels.env:prod` to find Cloud resources that have a label "env"
          *   and its value is "prod".
          * * `labels.env:*` to find Cloud resources that have a label "env".
      +   * * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
      +   *   encryption key whose name contains the word "key".
      +   * * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
      +   *   word.
      +   * * `NOT state:ACTIVE` to find {{gcp_name}} resources whose state
      +   *   doesn't contain "ACTIVE" as a word.
      +   * * `createTime<1609459200` to find Cloud resources that were created before
      +   *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
      +   *   "2021-01-01 00:00:00 UTC" in seconds.
      +   * * `updateTime>1609459200` to find Cloud resources that were updated after
      +   *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
      +   *   "2021-01-01 00:00:00 UTC" in seconds.
          * * `Important` to find Cloud resources that contain "Important" as a word
          *   in any of the searchable fields.
      -   * * `Impor*` to find Cloud resources that contain "Impor" as a prefix
      -   *   in any of the searchable fields.
      -   * * `*por*` to find Cloud resources that contain "por" as a substring in
      -   *   any of the searchable fields.
      +   * * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any
      +   *   word in any of the searchable fields.
          * * `Important location:(us-west1 OR global)` to find Cloud
          *   resources that contain "Important" as a word in any of the searchable
          *   fields and are also located in the "us-west1" region or the "global"
      @@ -342,6 +352,14 @@ public com.google.protobuf.ByteString getQueryBytes() {
          * Optional. A list of asset types that this request searches for. If empty, it will
          * search all the [searchable asset
          * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
      +   * Regular expressions are also supported. For example:
      +   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
      +   * with "compute.googleapis.com".
      +   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
      +   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
      +   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
      +   * regular expression syntax. If the regular expression does not match any
      +   * supported asset type, an INVALID_ARGUMENT error will be returned.
          * 
      * * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -358,6 +376,14 @@ public com.google.protobuf.ProtocolStringList getAssetTypesList() { * Optional. A list of asset types that this request searches for. If empty, it will * search all the [searchable asset * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). + * Regular expressions are also supported. For example: + * * "compute.googleapis.com.*" snapshots resources whose asset type starts + * with "compute.googleapis.com". + * * ".*Instance" snapshots resources whose asset type ends with "Instance". + * * ".*Instance.*" snapshots resources whose asset type contains "Instance". + * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + * regular expression syntax. If the regular expression does not match any + * supported asset type, an INVALID_ARGUMENT error will be returned. *
      * * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -374,6 +400,14 @@ public int getAssetTypesCount() { * Optional. A list of asset types that this request searches for. If empty, it will * search all the [searchable asset * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). + * Regular expressions are also supported. For example: + * * "compute.googleapis.com.*" snapshots resources whose asset type starts + * with "compute.googleapis.com". + * * ".*Instance" snapshots resources whose asset type ends with "Instance". + * * ".*Instance.*" snapshots resources whose asset type contains "Instance". + * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + * regular expression syntax. If the regular expression does not match any + * supported asset type, an INVALID_ARGUMENT error will be returned. *
      * * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -391,6 +425,14 @@ public java.lang.String getAssetTypes(int index) { * Optional. A list of asset types that this request searches for. If empty, it will * search all the [searchable asset * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). + * Regular expressions are also supported. For example: + * * "compute.googleapis.com.*" snapshots resources whose asset type starts + * with "compute.googleapis.com". + * * ".*Instance" snapshots resources whose asset type ends with "Instance". + * * ".*Instance.*" snapshots resources whose asset type contains "Instance". + * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + * regular expression syntax. If the regular expression does not match any + * supported asset type, an INVALID_ARGUMENT error will be returned. *
      * * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -484,12 +526,24 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
      -   * Optional. A comma separated list of fields specifying the sorting order of the
      +   * Optional. A comma-separated list of fields specifying the sorting order of the
          * results. The default order is ascending. Add " DESC" after the field name
          * to indicate descending order. Redundant space characters are ignored.
      -   * Example: "location DESC, name". Only string fields in the response are
      -   * sortable, including `name`, `displayName`, `description`, `location`. All
      -   * the other fields such as repeated fields (e.g., `networkTags`), map
      +   * Example: "location DESC, name".
      +   * Only singular primitive fields in the response are sortable:
      +   *   * name
      +   *   * assetType
      +   *   * project
      +   *   * displayName
      +   *   * description
      +   *   * location
      +   *   * kmsKey
      +   *   * createTime
      +   *   * updateTime
      +   *   * state
      +   *   * parentFullResourceName
      +   *   * parentAssetType
      +   * All the other fields such as repeated fields (e.g., `networkTags`), map
          * fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`)
          * are not supported.
          * 
      @@ -514,12 +568,24 @@ public java.lang.String getOrderBy() { * * *
      -   * Optional. A comma separated list of fields specifying the sorting order of the
      +   * Optional. A comma-separated list of fields specifying the sorting order of the
          * results. The default order is ascending. Add " DESC" after the field name
          * to indicate descending order. Redundant space characters are ignored.
      -   * Example: "location DESC, name". Only string fields in the response are
      -   * sortable, including `name`, `displayName`, `description`, `location`. All
      -   * the other fields such as repeated fields (e.g., `networkTags`), map
      +   * Example: "location DESC, name".
      +   * Only singular primitive fields in the response are sortable:
      +   *   * name
      +   *   * assetType
      +   *   * project
      +   *   * displayName
      +   *   * description
      +   *   * location
      +   *   * kmsKey
      +   *   * createTime
      +   *   * updateTime
      +   *   * state
      +   *   * parentFullResourceName
      +   *   * parentAssetType
      +   * All the other fields such as repeated fields (e.g., `networkTags`), map
          * fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`)
          * are not supported.
          * 
      @@ -965,7 +1031,7 @@ public Builder mergeFrom( *
            * Required. A scope can be a project, a folder, or an organization. The search is
            * limited to the resources within the `scope`. The caller must be granted the
      -     * [`cloudasset.assets.searchAllResources`](http://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
      +     * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
            * permission on the desired scope.
            * The allowed values are:
            * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
      @@ -995,7 +1061,7 @@ public java.lang.String getScope() {
            * 
            * Required. A scope can be a project, a folder, or an organization. The search is
            * limited to the resources within the `scope`. The caller must be granted the
      -     * [`cloudasset.assets.searchAllResources`](http://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
      +     * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
            * permission on the desired scope.
            * The allowed values are:
            * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
      @@ -1025,7 +1091,7 @@ public com.google.protobuf.ByteString getScopeBytes() {
            * 
            * Required. A scope can be a project, a folder, or an organization. The search is
            * limited to the resources within the `scope`. The caller must be granted the
      -     * [`cloudasset.assets.searchAllResources`](http://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
      +     * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
            * permission on the desired scope.
            * The allowed values are:
            * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
      @@ -1054,7 +1120,7 @@ public Builder setScope(java.lang.String value) {
            * 
            * Required. A scope can be a project, a folder, or an organization. The search is
            * limited to the resources within the `scope`. The caller must be granted the
      -     * [`cloudasset.assets.searchAllResources`](http://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
      +     * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
            * permission on the desired scope.
            * The allowed values are:
            * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
      @@ -1079,7 +1145,7 @@ public Builder clearScope() {
            * 
            * Required. A scope can be a project, a folder, or an organization. The search is
            * limited to the resources within the `scope`. The caller must be granted the
      -     * [`cloudasset.assets.searchAllResources`](http://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
      +     * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
            * permission on the desired scope.
            * The allowed values are:
            * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
      @@ -1110,34 +1176,39 @@ public Builder setScopeBytes(com.google.protobuf.ByteString value) {
            *
            * 
            * Optional. The query statement. See [how to construct a
      -     * query](http://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
      +     * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
            * for more information. If not specified or empty, it will search all the
      -     * resources within the specified `scope`. Note that the query string is
      -     * compared against each Cloud IAM policy binding, including its members,
      -     * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
      -     * contain the bindings that match your query. To learn more about the IAM
      -     * policy structure, see [IAM policy
      -     * doc](https://cloud.google.com/iam/docs/policies#structure).
      +     * resources within the specified `scope`.
            * Examples:
            * * `name:Important` to find Cloud resources whose name contains
            *   "Important" as a word.
      +     * * `name=Important` to find the Cloud resource whose name is exactly
      +     *   "Important".
            * * `displayName:Impor*` to find Cloud resources whose display name
      -     *   contains "Impor" as a prefix.
      -     * * `description:*por*` to find Cloud resources whose description
      -     *   contains "por" as a substring.
      -     * * `location:us-west*` to find Cloud resources whose location is
      -     *   prefixed with "us-west".
      +     *   contains "Impor" as a prefix of any word in the field.
      +     * * `location:us-west*` to find Cloud resources whose location contains both
      +     *   "us" and "west" as prefixes.
            * * `labels:prod` to find Cloud resources whose labels contain "prod" as
            *   a key or value.
            * * `labels.env:prod` to find Cloud resources that have a label "env"
            *   and its value is "prod".
            * * `labels.env:*` to find Cloud resources that have a label "env".
      +     * * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
      +     *   encryption key whose name contains the word "key".
      +     * * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
      +     *   word.
      +     * * `NOT state:ACTIVE` to find {{gcp_name}} resources whose state
      +     *   doesn't contain "ACTIVE" as a word.
      +     * * `createTime<1609459200` to find Cloud resources that were created before
      +     *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
      +     *   "2021-01-01 00:00:00 UTC" in seconds.
      +     * * `updateTime>1609459200` to find Cloud resources that were updated after
      +     *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
      +     *   "2021-01-01 00:00:00 UTC" in seconds.
            * * `Important` to find Cloud resources that contain "Important" as a word
            *   in any of the searchable fields.
      -     * * `Impor*` to find Cloud resources that contain "Impor" as a prefix
      -     *   in any of the searchable fields.
      -     * * `*por*` to find Cloud resources that contain "por" as a substring in
      -     *   any of the searchable fields.
      +     * * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any
      +     *   word in any of the searchable fields.
            * * `Important location:(us-west1 OR global)` to find Cloud
            *   resources that contain "Important" as a word in any of the searchable
            *   fields and are also located in the "us-west1" region or the "global"
      @@ -1164,34 +1235,39 @@ public java.lang.String getQuery() {
            *
            * 
            * Optional. The query statement. See [how to construct a
      -     * query](http://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
      +     * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
            * for more information. If not specified or empty, it will search all the
      -     * resources within the specified `scope`. Note that the query string is
      -     * compared against each Cloud IAM policy binding, including its members,
      -     * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
      -     * contain the bindings that match your query. To learn more about the IAM
      -     * policy structure, see [IAM policy
      -     * doc](https://cloud.google.com/iam/docs/policies#structure).
      +     * resources within the specified `scope`.
            * Examples:
            * * `name:Important` to find Cloud resources whose name contains
            *   "Important" as a word.
      +     * * `name=Important` to find the Cloud resource whose name is exactly
      +     *   "Important".
            * * `displayName:Impor*` to find Cloud resources whose display name
      -     *   contains "Impor" as a prefix.
      -     * * `description:*por*` to find Cloud resources whose description
      -     *   contains "por" as a substring.
      -     * * `location:us-west*` to find Cloud resources whose location is
      -     *   prefixed with "us-west".
      +     *   contains "Impor" as a prefix of any word in the field.
      +     * * `location:us-west*` to find Cloud resources whose location contains both
      +     *   "us" and "west" as prefixes.
            * * `labels:prod` to find Cloud resources whose labels contain "prod" as
            *   a key or value.
            * * `labels.env:prod` to find Cloud resources that have a label "env"
            *   and its value is "prod".
            * * `labels.env:*` to find Cloud resources that have a label "env".
      +     * * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
      +     *   encryption key whose name contains the word "key".
      +     * * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
      +     *   word.
      +     * * `NOT state:ACTIVE` to find {{gcp_name}} resources whose state
      +     *   doesn't contain "ACTIVE" as a word.
      +     * * `createTime<1609459200` to find Cloud resources that were created before
      +     *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
      +     *   "2021-01-01 00:00:00 UTC" in seconds.
      +     * * `updateTime>1609459200` to find Cloud resources that were updated after
      +     *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
      +     *   "2021-01-01 00:00:00 UTC" in seconds.
            * * `Important` to find Cloud resources that contain "Important" as a word
            *   in any of the searchable fields.
      -     * * `Impor*` to find Cloud resources that contain "Impor" as a prefix
      -     *   in any of the searchable fields.
      -     * * `*por*` to find Cloud resources that contain "por" as a substring in
      -     *   any of the searchable fields.
      +     * * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any
      +     *   word in any of the searchable fields.
            * * `Important location:(us-west1 OR global)` to find Cloud
            *   resources that contain "Important" as a word in any of the searchable
            *   fields and are also located in the "us-west1" region or the "global"
      @@ -1218,34 +1294,39 @@ public com.google.protobuf.ByteString getQueryBytes() {
            *
            * 
            * Optional. The query statement. See [how to construct a
      -     * query](http://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
      +     * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
            * for more information. If not specified or empty, it will search all the
      -     * resources within the specified `scope`. Note that the query string is
      -     * compared against each Cloud IAM policy binding, including its members,
      -     * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
      -     * contain the bindings that match your query. To learn more about the IAM
      -     * policy structure, see [IAM policy
      -     * doc](https://cloud.google.com/iam/docs/policies#structure).
      +     * resources within the specified `scope`.
            * Examples:
            * * `name:Important` to find Cloud resources whose name contains
            *   "Important" as a word.
      +     * * `name=Important` to find the Cloud resource whose name is exactly
      +     *   "Important".
            * * `displayName:Impor*` to find Cloud resources whose display name
      -     *   contains "Impor" as a prefix.
      -     * * `description:*por*` to find Cloud resources whose description
      -     *   contains "por" as a substring.
      -     * * `location:us-west*` to find Cloud resources whose location is
      -     *   prefixed with "us-west".
      +     *   contains "Impor" as a prefix of any word in the field.
      +     * * `location:us-west*` to find Cloud resources whose location contains both
      +     *   "us" and "west" as prefixes.
            * * `labels:prod` to find Cloud resources whose labels contain "prod" as
            *   a key or value.
            * * `labels.env:prod` to find Cloud resources that have a label "env"
            *   and its value is "prod".
            * * `labels.env:*` to find Cloud resources that have a label "env".
      +     * * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
      +     *   encryption key whose name contains the word "key".
      +     * * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
      +     *   word.
      +     * * `NOT state:ACTIVE` to find {{gcp_name}} resources whose state
      +     *   doesn't contain "ACTIVE" as a word.
      +     * * `createTime<1609459200` to find Cloud resources that were created before
      +     *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
      +     *   "2021-01-01 00:00:00 UTC" in seconds.
      +     * * `updateTime>1609459200` to find Cloud resources that were updated after
      +     *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
      +     *   "2021-01-01 00:00:00 UTC" in seconds.
            * * `Important` to find Cloud resources that contain "Important" as a word
            *   in any of the searchable fields.
      -     * * `Impor*` to find Cloud resources that contain "Impor" as a prefix
      -     *   in any of the searchable fields.
      -     * * `*por*` to find Cloud resources that contain "por" as a substring in
      -     *   any of the searchable fields.
      +     * * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any
      +     *   word in any of the searchable fields.
            * * `Important location:(us-west1 OR global)` to find Cloud
            *   resources that contain "Important" as a word in any of the searchable
            *   fields and are also located in the "us-west1" region or the "global"
      @@ -1271,34 +1352,39 @@ public Builder setQuery(java.lang.String value) {
            *
            * 
            * Optional. The query statement. See [how to construct a
      -     * query](http://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
      +     * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
            * for more information. If not specified or empty, it will search all the
      -     * resources within the specified `scope`. Note that the query string is
      -     * compared against each Cloud IAM policy binding, including its members,
      -     * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
      -     * contain the bindings that match your query. To learn more about the IAM
      -     * policy structure, see [IAM policy
      -     * doc](https://cloud.google.com/iam/docs/policies#structure).
      +     * resources within the specified `scope`.
            * Examples:
            * * `name:Important` to find Cloud resources whose name contains
            *   "Important" as a word.
      +     * * `name=Important` to find the Cloud resource whose name is exactly
      +     *   "Important".
            * * `displayName:Impor*` to find Cloud resources whose display name
      -     *   contains "Impor" as a prefix.
      -     * * `description:*por*` to find Cloud resources whose description
      -     *   contains "por" as a substring.
      -     * * `location:us-west*` to find Cloud resources whose location is
      -     *   prefixed with "us-west".
      +     *   contains "Impor" as a prefix of any word in the field.
      +     * * `location:us-west*` to find Cloud resources whose location contains both
      +     *   "us" and "west" as prefixes.
            * * `labels:prod` to find Cloud resources whose labels contain "prod" as
            *   a key or value.
            * * `labels.env:prod` to find Cloud resources that have a label "env"
            *   and its value is "prod".
            * * `labels.env:*` to find Cloud resources that have a label "env".
      +     * * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
      +     *   encryption key whose name contains the word "key".
      +     * * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
      +     *   word.
      +     * * `NOT state:ACTIVE` to find {{gcp_name}} resources whose state
      +     *   doesn't contain "ACTIVE" as a word.
      +     * * `createTime<1609459200` to find Cloud resources that were created before
      +     *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
      +     *   "2021-01-01 00:00:00 UTC" in seconds.
      +     * * `updateTime>1609459200` to find Cloud resources that were updated after
      +     *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
      +     *   "2021-01-01 00:00:00 UTC" in seconds.
            * * `Important` to find Cloud resources that contain "Important" as a word
            *   in any of the searchable fields.
      -     * * `Impor*` to find Cloud resources that contain "Impor" as a prefix
      -     *   in any of the searchable fields.
      -     * * `*por*` to find Cloud resources that contain "por" as a substring in
      -     *   any of the searchable fields.
      +     * * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any
      +     *   word in any of the searchable fields.
            * * `Important location:(us-west1 OR global)` to find Cloud
            *   resources that contain "Important" as a word in any of the searchable
            *   fields and are also located in the "us-west1" region or the "global"
      @@ -1320,34 +1406,39 @@ public Builder clearQuery() {
            *
            * 
            * Optional. The query statement. See [how to construct a
      -     * query](http://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
      +     * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
            * for more information. If not specified or empty, it will search all the
      -     * resources within the specified `scope`. Note that the query string is
      -     * compared against each Cloud IAM policy binding, including its members,
      -     * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
      -     * contain the bindings that match your query. To learn more about the IAM
      -     * policy structure, see [IAM policy
      -     * doc](https://cloud.google.com/iam/docs/policies#structure).
      +     * resources within the specified `scope`.
            * Examples:
            * * `name:Important` to find Cloud resources whose name contains
            *   "Important" as a word.
      +     * * `name=Important` to find the Cloud resource whose name is exactly
      +     *   "Important".
            * * `displayName:Impor*` to find Cloud resources whose display name
      -     *   contains "Impor" as a prefix.
      -     * * `description:*por*` to find Cloud resources whose description
      -     *   contains "por" as a substring.
      -     * * `location:us-west*` to find Cloud resources whose location is
      -     *   prefixed with "us-west".
      +     *   contains "Impor" as a prefix of any word in the field.
      +     * * `location:us-west*` to find Cloud resources whose location contains both
      +     *   "us" and "west" as prefixes.
            * * `labels:prod` to find Cloud resources whose labels contain "prod" as
            *   a key or value.
            * * `labels.env:prod` to find Cloud resources that have a label "env"
            *   and its value is "prod".
            * * `labels.env:*` to find Cloud resources that have a label "env".
      +     * * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
      +     *   encryption key whose name contains the word "key".
      +     * * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
      +     *   word.
      +     * * `NOT state:ACTIVE` to find {{gcp_name}} resources whose state
      +     *   doesn't contain "ACTIVE" as a word.
      +     * * `createTime<1609459200` to find Cloud resources that were created before
      +     *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
      +     *   "2021-01-01 00:00:00 UTC" in seconds.
      +     * * `updateTime>1609459200` to find Cloud resources that were updated after
      +     *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
      +     *   "2021-01-01 00:00:00 UTC" in seconds.
            * * `Important` to find Cloud resources that contain "Important" as a word
            *   in any of the searchable fields.
      -     * * `Impor*` to find Cloud resources that contain "Impor" as a prefix
      -     *   in any of the searchable fields.
      -     * * `*por*` to find Cloud resources that contain "por" as a substring in
      -     *   any of the searchable fields.
      +     * * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any
      +     *   word in any of the searchable fields.
            * * `Important location:(us-west1 OR global)` to find Cloud
            *   resources that contain "Important" as a word in any of the searchable
            *   fields and are also located in the "us-west1" region or the "global"
      @@ -1386,6 +1477,14 @@ private void ensureAssetTypesIsMutable() {
            * Optional. A list of asset types that this request searches for. If empty, it will
            * search all the [searchable asset
            * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
      +     * Regular expressions are also supported. For example:
      +     * * "compute.googleapis.com.*" snapshots resources whose asset type starts
      +     * with "compute.googleapis.com".
      +     * * ".*Instance" snapshots resources whose asset type ends with "Instance".
      +     * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
      +     * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
      +     * regular expression syntax. If the regular expression does not match any
      +     * supported asset type, an INVALID_ARGUMENT error will be returned.
            * 
      * * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1402,6 +1501,14 @@ public com.google.protobuf.ProtocolStringList getAssetTypesList() { * Optional. A list of asset types that this request searches for. If empty, it will * search all the [searchable asset * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). + * Regular expressions are also supported. For example: + * * "compute.googleapis.com.*" snapshots resources whose asset type starts + * with "compute.googleapis.com". + * * ".*Instance" snapshots resources whose asset type ends with "Instance". + * * ".*Instance.*" snapshots resources whose asset type contains "Instance". + * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + * regular expression syntax. If the regular expression does not match any + * supported asset type, an INVALID_ARGUMENT error will be returned. *
      * * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1418,6 +1525,14 @@ public int getAssetTypesCount() { * Optional. A list of asset types that this request searches for. If empty, it will * search all the [searchable asset * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). + * Regular expressions are also supported. For example: + * * "compute.googleapis.com.*" snapshots resources whose asset type starts + * with "compute.googleapis.com". + * * ".*Instance" snapshots resources whose asset type ends with "Instance". + * * ".*Instance.*" snapshots resources whose asset type contains "Instance". + * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + * regular expression syntax. If the regular expression does not match any + * supported asset type, an INVALID_ARGUMENT error will be returned. *
      * * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1435,6 +1550,14 @@ public java.lang.String getAssetTypes(int index) { * Optional. A list of asset types that this request searches for. If empty, it will * search all the [searchable asset * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). + * Regular expressions are also supported. For example: + * * "compute.googleapis.com.*" snapshots resources whose asset type starts + * with "compute.googleapis.com". + * * ".*Instance" snapshots resources whose asset type ends with "Instance". + * * ".*Instance.*" snapshots resources whose asset type contains "Instance". + * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + * regular expression syntax. If the regular expression does not match any + * supported asset type, an INVALID_ARGUMENT error will be returned. *
      * * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1452,6 +1575,14 @@ public com.google.protobuf.ByteString getAssetTypesBytes(int index) { * Optional. A list of asset types that this request searches for. If empty, it will * search all the [searchable asset * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). + * Regular expressions are also supported. For example: + * * "compute.googleapis.com.*" snapshots resources whose asset type starts + * with "compute.googleapis.com". + * * ".*Instance" snapshots resources whose asset type ends with "Instance". + * * ".*Instance.*" snapshots resources whose asset type contains "Instance". + * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + * regular expression syntax. If the regular expression does not match any + * supported asset type, an INVALID_ARGUMENT error will be returned. *
      * * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1476,6 +1607,14 @@ public Builder setAssetTypes(int index, java.lang.String value) { * Optional. A list of asset types that this request searches for. If empty, it will * search all the [searchable asset * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). + * Regular expressions are also supported. For example: + * * "compute.googleapis.com.*" snapshots resources whose asset type starts + * with "compute.googleapis.com". + * * ".*Instance" snapshots resources whose asset type ends with "Instance". + * * ".*Instance.*" snapshots resources whose asset type contains "Instance". + * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + * regular expression syntax. If the regular expression does not match any + * supported asset type, an INVALID_ARGUMENT error will be returned. *
      * * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1499,6 +1638,14 @@ public Builder addAssetTypes(java.lang.String value) { * Optional. A list of asset types that this request searches for. If empty, it will * search all the [searchable asset * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). + * Regular expressions are also supported. For example: + * * "compute.googleapis.com.*" snapshots resources whose asset type starts + * with "compute.googleapis.com". + * * ".*Instance" snapshots resources whose asset type ends with "Instance". + * * ".*Instance.*" snapshots resources whose asset type contains "Instance". + * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + * regular expression syntax. If the regular expression does not match any + * supported asset type, an INVALID_ARGUMENT error will be returned. *
      * * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1519,6 +1666,14 @@ public Builder addAllAssetTypes(java.lang.Iterable values) { * Optional. A list of asset types that this request searches for. If empty, it will * search all the [searchable asset * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). + * Regular expressions are also supported. For example: + * * "compute.googleapis.com.*" snapshots resources whose asset type starts + * with "compute.googleapis.com". + * * ".*Instance" snapshots resources whose asset type ends with "Instance". + * * ".*Instance.*" snapshots resources whose asset type contains "Instance". + * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + * regular expression syntax. If the regular expression does not match any + * supported asset type, an INVALID_ARGUMENT error will be returned. *
      * * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1538,6 +1693,14 @@ public Builder clearAssetTypes() { * Optional. A list of asset types that this request searches for. If empty, it will * search all the [searchable asset * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). + * Regular expressions are also supported. For example: + * * "compute.googleapis.com.*" snapshots resources whose asset type starts + * with "compute.googleapis.com". + * * ".*Instance" snapshots resources whose asset type ends with "Instance". + * * ".*Instance.*" snapshots resources whose asset type contains "Instance". + * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + * regular expression syntax. If the regular expression does not match any + * supported asset type, an INVALID_ARGUMENT error will be returned. *
      * * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -1743,12 +1906,24 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { * * *
      -     * Optional. A comma separated list of fields specifying the sorting order of the
      +     * Optional. A comma-separated list of fields specifying the sorting order of the
            * results. The default order is ascending. Add " DESC" after the field name
            * to indicate descending order. Redundant space characters are ignored.
      -     * Example: "location DESC, name". Only string fields in the response are
      -     * sortable, including `name`, `displayName`, `description`, `location`. All
      -     * the other fields such as repeated fields (e.g., `networkTags`), map
      +     * Example: "location DESC, name".
      +     * Only singular primitive fields in the response are sortable:
      +     *   * name
      +     *   * assetType
      +     *   * project
      +     *   * displayName
      +     *   * description
      +     *   * location
      +     *   * kmsKey
      +     *   * createTime
      +     *   * updateTime
      +     *   * state
      +     *   * parentFullResourceName
      +     *   * parentAssetType
      +     * All the other fields such as repeated fields (e.g., `networkTags`), map
            * fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`)
            * are not supported.
            * 
      @@ -1772,12 +1947,24 @@ public java.lang.String getOrderBy() { * * *
      -     * Optional. A comma separated list of fields specifying the sorting order of the
      +     * Optional. A comma-separated list of fields specifying the sorting order of the
            * results. The default order is ascending. Add " DESC" after the field name
            * to indicate descending order. Redundant space characters are ignored.
      -     * Example: "location DESC, name". Only string fields in the response are
      -     * sortable, including `name`, `displayName`, `description`, `location`. All
      -     * the other fields such as repeated fields (e.g., `networkTags`), map
      +     * Example: "location DESC, name".
      +     * Only singular primitive fields in the response are sortable:
      +     *   * name
      +     *   * assetType
      +     *   * project
      +     *   * displayName
      +     *   * description
      +     *   * location
      +     *   * kmsKey
      +     *   * createTime
      +     *   * updateTime
      +     *   * state
      +     *   * parentFullResourceName
      +     *   * parentAssetType
      +     * All the other fields such as repeated fields (e.g., `networkTags`), map
            * fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`)
            * are not supported.
            * 
      @@ -1801,12 +1988,24 @@ public com.google.protobuf.ByteString getOrderByBytes() { * * *
      -     * Optional. A comma separated list of fields specifying the sorting order of the
      +     * Optional. A comma-separated list of fields specifying the sorting order of the
            * results. The default order is ascending. Add " DESC" after the field name
            * to indicate descending order. Redundant space characters are ignored.
      -     * Example: "location DESC, name". Only string fields in the response are
      -     * sortable, including `name`, `displayName`, `description`, `location`. All
      -     * the other fields such as repeated fields (e.g., `networkTags`), map
      +     * Example: "location DESC, name".
      +     * Only singular primitive fields in the response are sortable:
      +     *   * name
      +     *   * assetType
      +     *   * project
      +     *   * displayName
      +     *   * description
      +     *   * location
      +     *   * kmsKey
      +     *   * createTime
      +     *   * updateTime
      +     *   * state
      +     *   * parentFullResourceName
      +     *   * parentAssetType
      +     * All the other fields such as repeated fields (e.g., `networkTags`), map
            * fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`)
            * are not supported.
            * 
      @@ -1829,12 +2028,24 @@ public Builder setOrderBy(java.lang.String value) { * * *
      -     * Optional. A comma separated list of fields specifying the sorting order of the
      +     * Optional. A comma-separated list of fields specifying the sorting order of the
            * results. The default order is ascending. Add " DESC" after the field name
            * to indicate descending order. Redundant space characters are ignored.
      -     * Example: "location DESC, name". Only string fields in the response are
      -     * sortable, including `name`, `displayName`, `description`, `location`. All
      -     * the other fields such as repeated fields (e.g., `networkTags`), map
      +     * Example: "location DESC, name".
      +     * Only singular primitive fields in the response are sortable:
      +     *   * name
      +     *   * assetType
      +     *   * project
      +     *   * displayName
      +     *   * description
      +     *   * location
      +     *   * kmsKey
      +     *   * createTime
      +     *   * updateTime
      +     *   * state
      +     *   * parentFullResourceName
      +     *   * parentAssetType
      +     * All the other fields such as repeated fields (e.g., `networkTags`), map
            * fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`)
            * are not supported.
            * 
      @@ -1853,12 +2064,24 @@ public Builder clearOrderBy() { * * *
      -     * Optional. A comma separated list of fields specifying the sorting order of the
      +     * Optional. A comma-separated list of fields specifying the sorting order of the
            * results. The default order is ascending. Add " DESC" after the field name
            * to indicate descending order. Redundant space characters are ignored.
      -     * Example: "location DESC, name". Only string fields in the response are
      -     * sortable, including `name`, `displayName`, `description`, `location`. All
      -     * the other fields such as repeated fields (e.g., `networkTags`), map
      +     * Example: "location DESC, name".
      +     * Only singular primitive fields in the response are sortable:
      +     *   * name
      +     *   * assetType
      +     *   * project
      +     *   * displayName
      +     *   * description
      +     *   * location
      +     *   * kmsKey
      +     *   * createTime
      +     *   * updateTime
      +     *   * state
      +     *   * parentFullResourceName
      +     *   * parentAssetType
      +     * All the other fields such as repeated fields (e.g., `networkTags`), map
            * fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`)
            * are not supported.
            * 
      diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesRequestOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesRequestOrBuilder.java index 9a1e3068e..19af33339 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesRequestOrBuilder.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/SearchAllResourcesRequestOrBuilder.java @@ -29,7 +29,7 @@ public interface SearchAllResourcesRequestOrBuilder *
          * Required. A scope can be a project, a folder, or an organization. The search is
          * limited to the resources within the `scope`. The caller must be granted the
      -   * [`cloudasset.assets.searchAllResources`](http://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
      +   * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
          * permission on the desired scope.
          * The allowed values are:
          * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
      @@ -49,7 +49,7 @@ public interface SearchAllResourcesRequestOrBuilder
          * 
          * Required. A scope can be a project, a folder, or an organization. The search is
          * limited to the resources within the `scope`. The caller must be granted the
      -   * [`cloudasset.assets.searchAllResources`](http://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
      +   * [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions)
          * permission on the desired scope.
          * The allowed values are:
          * * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
      @@ -69,34 +69,39 @@ public interface SearchAllResourcesRequestOrBuilder
          *
          * 
          * Optional. The query statement. See [how to construct a
      -   * query](http://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
      +   * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
          * for more information. If not specified or empty, it will search all the
      -   * resources within the specified `scope`. Note that the query string is
      -   * compared against each Cloud IAM policy binding, including its members,
      -   * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
      -   * contain the bindings that match your query. To learn more about the IAM
      -   * policy structure, see [IAM policy
      -   * doc](https://cloud.google.com/iam/docs/policies#structure).
      +   * resources within the specified `scope`.
          * Examples:
          * * `name:Important` to find Cloud resources whose name contains
          *   "Important" as a word.
      +   * * `name=Important` to find the Cloud resource whose name is exactly
      +   *   "Important".
          * * `displayName:Impor*` to find Cloud resources whose display name
      -   *   contains "Impor" as a prefix.
      -   * * `description:*por*` to find Cloud resources whose description
      -   *   contains "por" as a substring.
      -   * * `location:us-west*` to find Cloud resources whose location is
      -   *   prefixed with "us-west".
      +   *   contains "Impor" as a prefix of any word in the field.
      +   * * `location:us-west*` to find Cloud resources whose location contains both
      +   *   "us" and "west" as prefixes.
          * * `labels:prod` to find Cloud resources whose labels contain "prod" as
          *   a key or value.
          * * `labels.env:prod` to find Cloud resources that have a label "env"
          *   and its value is "prod".
          * * `labels.env:*` to find Cloud resources that have a label "env".
      +   * * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
      +   *   encryption key whose name contains the word "key".
      +   * * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
      +   *   word.
      +   * * `NOT state:ACTIVE` to find {{gcp_name}} resources whose state
      +   *   doesn't contain "ACTIVE" as a word.
      +   * * `createTime<1609459200` to find Cloud resources that were created before
      +   *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
      +   *   "2021-01-01 00:00:00 UTC" in seconds.
      +   * * `updateTime>1609459200` to find Cloud resources that were updated after
      +   *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
      +   *   "2021-01-01 00:00:00 UTC" in seconds.
          * * `Important` to find Cloud resources that contain "Important" as a word
          *   in any of the searchable fields.
      -   * * `Impor*` to find Cloud resources that contain "Impor" as a prefix
      -   *   in any of the searchable fields.
      -   * * `*por*` to find Cloud resources that contain "por" as a substring in
      -   *   any of the searchable fields.
      +   * * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any
      +   *   word in any of the searchable fields.
          * * `Important location:(us-west1 OR global)` to find Cloud
          *   resources that contain "Important" as a word in any of the searchable
          *   fields and are also located in the "us-west1" region or the "global"
      @@ -113,34 +118,39 @@ public interface SearchAllResourcesRequestOrBuilder
          *
          * 
          * Optional. The query statement. See [how to construct a
      -   * query](http://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
      +   * query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query)
          * for more information. If not specified or empty, it will search all the
      -   * resources within the specified `scope`. Note that the query string is
      -   * compared against each Cloud IAM policy binding, including its members,
      -   * roles, and Cloud IAM conditions. The returned Cloud IAM policies will only
      -   * contain the bindings that match your query. To learn more about the IAM
      -   * policy structure, see [IAM policy
      -   * doc](https://cloud.google.com/iam/docs/policies#structure).
      +   * resources within the specified `scope`.
          * Examples:
          * * `name:Important` to find Cloud resources whose name contains
          *   "Important" as a word.
      +   * * `name=Important` to find the Cloud resource whose name is exactly
      +   *   "Important".
          * * `displayName:Impor*` to find Cloud resources whose display name
      -   *   contains "Impor" as a prefix.
      -   * * `description:*por*` to find Cloud resources whose description
      -   *   contains "por" as a substring.
      -   * * `location:us-west*` to find Cloud resources whose location is
      -   *   prefixed with "us-west".
      +   *   contains "Impor" as a prefix of any word in the field.
      +   * * `location:us-west*` to find Cloud resources whose location contains both
      +   *   "us" and "west" as prefixes.
          * * `labels:prod` to find Cloud resources whose labels contain "prod" as
          *   a key or value.
          * * `labels.env:prod` to find Cloud resources that have a label "env"
          *   and its value is "prod".
          * * `labels.env:*` to find Cloud resources that have a label "env".
      +   * * `kmsKey:key` to find Cloud resources encrypted with a customer-managed
      +   *   encryption key whose name contains the word "key".
      +   * * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a
      +   *   word.
      +   * * `NOT state:ACTIVE` to find {{gcp_name}} resources whose state
      +   *   doesn't contain "ACTIVE" as a word.
      +   * * `createTime<1609459200` to find Cloud resources that were created before
      +   *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
      +   *   "2021-01-01 00:00:00 UTC" in seconds.
      +   * * `updateTime>1609459200` to find Cloud resources that were updated after
      +   *   "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of
      +   *   "2021-01-01 00:00:00 UTC" in seconds.
          * * `Important` to find Cloud resources that contain "Important" as a word
          *   in any of the searchable fields.
      -   * * `Impor*` to find Cloud resources that contain "Impor" as a prefix
      -   *   in any of the searchable fields.
      -   * * `*por*` to find Cloud resources that contain "por" as a substring in
      -   *   any of the searchable fields.
      +   * * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any
      +   *   word in any of the searchable fields.
          * * `Important location:(us-west1 OR global)` to find Cloud
          *   resources that contain "Important" as a word in any of the searchable
          *   fields and are also located in the "us-west1" region or the "global"
      @@ -160,6 +170,14 @@ public interface SearchAllResourcesRequestOrBuilder
          * Optional. A list of asset types that this request searches for. If empty, it will
          * search all the [searchable asset
          * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types).
      +   * Regular expressions are also supported. For example:
      +   * * "compute.googleapis.com.*" snapshots resources whose asset type starts
      +   * with "compute.googleapis.com".
      +   * * ".*Instance" snapshots resources whose asset type ends with "Instance".
      +   * * ".*Instance.*" snapshots resources whose asset type contains "Instance".
      +   * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported
      +   * regular expression syntax. If the regular expression does not match any
      +   * supported asset type, an INVALID_ARGUMENT error will be returned.
          * 
      * * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -174,6 +192,14 @@ public interface SearchAllResourcesRequestOrBuilder * Optional. A list of asset types that this request searches for. If empty, it will * search all the [searchable asset * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). + * Regular expressions are also supported. For example: + * * "compute.googleapis.com.*" snapshots resources whose asset type starts + * with "compute.googleapis.com". + * * ".*Instance" snapshots resources whose asset type ends with "Instance". + * * ".*Instance.*" snapshots resources whose asset type contains "Instance". + * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + * regular expression syntax. If the regular expression does not match any + * supported asset type, an INVALID_ARGUMENT error will be returned. *
      * * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -188,6 +214,14 @@ public interface SearchAllResourcesRequestOrBuilder * Optional. A list of asset types that this request searches for. If empty, it will * search all the [searchable asset * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). + * Regular expressions are also supported. For example: + * * "compute.googleapis.com.*" snapshots resources whose asset type starts + * with "compute.googleapis.com". + * * ".*Instance" snapshots resources whose asset type ends with "Instance". + * * ".*Instance.*" snapshots resources whose asset type contains "Instance". + * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + * regular expression syntax. If the regular expression does not match any + * supported asset type, an INVALID_ARGUMENT error will be returned. *
      * * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -203,6 +237,14 @@ public interface SearchAllResourcesRequestOrBuilder * Optional. A list of asset types that this request searches for. If empty, it will * search all the [searchable asset * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). + * Regular expressions are also supported. For example: + * * "compute.googleapis.com.*" snapshots resources whose asset type starts + * with "compute.googleapis.com". + * * ".*Instance" snapshots resources whose asset type ends with "Instance". + * * ".*Instance.*" snapshots resources whose asset type contains "Instance". + * See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + * regular expression syntax. If the regular expression does not match any + * supported asset type, an INVALID_ARGUMENT error will be returned. *
      * * repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL]; @@ -263,12 +305,24 @@ public interface SearchAllResourcesRequestOrBuilder * * *
      -   * Optional. A comma separated list of fields specifying the sorting order of the
      +   * Optional. A comma-separated list of fields specifying the sorting order of the
          * results. The default order is ascending. Add " DESC" after the field name
          * to indicate descending order. Redundant space characters are ignored.
      -   * Example: "location DESC, name". Only string fields in the response are
      -   * sortable, including `name`, `displayName`, `description`, `location`. All
      -   * the other fields such as repeated fields (e.g., `networkTags`), map
      +   * Example: "location DESC, name".
      +   * Only singular primitive fields in the response are sortable:
      +   *   * name
      +   *   * assetType
      +   *   * project
      +   *   * displayName
      +   *   * description
      +   *   * location
      +   *   * kmsKey
      +   *   * createTime
      +   *   * updateTime
      +   *   * state
      +   *   * parentFullResourceName
      +   *   * parentAssetType
      +   * All the other fields such as repeated fields (e.g., `networkTags`), map
          * fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`)
          * are not supported.
          * 
      @@ -282,12 +336,24 @@ public interface SearchAllResourcesRequestOrBuilder * * *
      -   * Optional. A comma separated list of fields specifying the sorting order of the
      +   * Optional. A comma-separated list of fields specifying the sorting order of the
          * results. The default order is ascending. Add " DESC" after the field name
          * to indicate descending order. Redundant space characters are ignored.
      -   * Example: "location DESC, name". Only string fields in the response are
      -   * sortable, including `name`, `displayName`, `description`, `location`. All
      -   * the other fields such as repeated fields (e.g., `networkTags`), map
      +   * Example: "location DESC, name".
      +   * Only singular primitive fields in the response are sortable:
      +   *   * name
      +   *   * assetType
      +   *   * project
      +   *   * displayName
      +   *   * description
      +   *   * location
      +   *   * kmsKey
      +   *   * createTime
      +   *   * updateTime
      +   *   * state
      +   *   * parentFullResourceName
      +   *   * parentAssetType
      +   * All the other fields such as repeated fields (e.g., `networkTags`), map
          * fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`)
          * are not supported.
          * 
      diff --git a/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/asset_service.proto b/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/asset_service.proto index d7d22fee9..eadaef285 100644 --- a/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/asset_service.proto +++ b/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/asset_service.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,6 +25,7 @@ import "google/longrunning/operations.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; +import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; import "google/type/expr.proto"; @@ -61,6 +62,15 @@ service AssetService { }; } + // Lists assets with time and resource types and returns paged results in + // response. + rpc ListAssets(ListAssetsRequest) returns (ListAssetsResponse) { + option (google.api.http) = { + get: "/v1/{parent=*/*}/assets" + }; + option (google.api.method_signature) = "parent"; + } + // Batch gets the update history of assets that overlap a time window. // For IAM_POLICY content, this API outputs history when the asset and its // attached IAM POLICY both exist. This can create gaps in the output history. @@ -234,6 +244,74 @@ message ExportAssetsResponse { OutputResult output_result = 3; } +// ListAssets request. +message ListAssetsRequest { + // Required. Name of the organization or project the assets belong to. Format: + // "organizations/[organization-number]" (such as "organizations/123"), + // "projects/[project-id]" (such as "projects/my-project-id"), or + // "projects/[project-number]" (such as "projects/12345"). + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "cloudasset.googleapis.com/Asset" + } + ]; + + // Timestamp to take an asset snapshot. This can only be set to a timestamp + // between the current time and the current time minus 35 days (inclusive). + // If not specified, the current time will be used. Due to delays in resource + // data collection and indexing, there is a volatile window during which + // running the same query may get different results. + google.protobuf.Timestamp read_time = 2; + + // A list of asset types to take a snapshot for. For example: + // "compute.googleapis.com/Disk". + // + // Regular expression is also supported. For example: + // + // * "compute.googleapis.com.*" snapshots resources whose asset type starts + // with "compute.googleapis.com". + // * ".*Instance" snapshots resources whose asset type ends with "Instance". + // * ".*Instance.*" snapshots resources whose asset type contains "Instance". + // + // See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + // regular expression syntax. If the regular expression does not match any + // supported asset type, an INVALID_ARGUMENT error will be returned. + // + // If specified, only matching assets will be returned, otherwise, it will + // snapshot all asset types. See [Introduction to Cloud Asset + // Inventory](https://cloud.google.com/asset-inventory/docs/overview) + // for all supported asset types. + repeated string asset_types = 3; + + // Asset content type. If not specified, no content but the asset name will + // be returned. + ContentType content_type = 4; + + // The maximum number of assets to be returned in a single response. Default + // is 100, minimum is 1, and maximum is 1000. + int32 page_size = 5; + + // The `next_page_token` returned from the previous `ListAssetsResponse`, or + // unspecified for the first `ListAssetsRequest`. It is a continuation of a + // prior `ListAssets` call, and the API should return the next page of assets. + string page_token = 6; +} + +// ListAssets response. +message ListAssetsResponse { + // Time the snapshot was taken. + google.protobuf.Timestamp read_time = 1; + + // Assets. + repeated Asset assets = 2; + + // Token to retrieve the next page of results. It expires 72 hours after the + // page token for the first page is generated. Set to empty if there are no + // remaining results. + string next_page_token = 3; +} + // Batch get assets history request. message BatchGetAssetsHistoryRequest { // Required. The relative name of the root asset. It can only be an @@ -388,6 +466,10 @@ message GcsDestination { // Editing Object // Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) // for more information. + // + // If the specified Cloud Storage object already exists and there is no + // [hold](https://cloud.google.com/storage/docs/object-holds), it will be + // overwritten with the exported result. string uri = 1; // The uri prefix of all generated Cloud Storage objects. Example: @@ -586,7 +668,7 @@ message Feed { message SearchAllResourcesRequest { // Required. A scope can be a project, a folder, or an organization. The search is // limited to the resources within the `scope`. The caller must be granted the - // [`cloudasset.assets.searchAllResources`](http://cloud.google.com/asset-inventory/docs/access-control#required_permissions) + // [`cloudasset.assets.searchAllResources`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) // permission on the desired scope. // // The allowed values are: @@ -598,36 +680,41 @@ message SearchAllResourcesRequest { string scope = 1 [(google.api.field_behavior) = REQUIRED]; // Optional. The query statement. See [how to construct a - // query](http://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query) + // query](https://cloud.google.com/asset-inventory/docs/searching-resources#how_to_construct_a_query) // for more information. If not specified or empty, it will search all the - // resources within the specified `scope`. Note that the query string is - // compared against each Cloud IAM policy binding, including its members, - // roles, and Cloud IAM conditions. The returned Cloud IAM policies will only - // contain the bindings that match your query. To learn more about the IAM - // policy structure, see [IAM policy - // doc](https://cloud.google.com/iam/docs/policies#structure). + // resources within the specified `scope`. // // Examples: // // * `name:Important` to find Cloud resources whose name contains // "Important" as a word. + // * `name=Important` to find the Cloud resource whose name is exactly + // "Important". // * `displayName:Impor*` to find Cloud resources whose display name - // contains "Impor" as a prefix. - // * `description:*por*` to find Cloud resources whose description - // contains "por" as a substring. - // * `location:us-west*` to find Cloud resources whose location is - // prefixed with "us-west". + // contains "Impor" as a prefix of any word in the field. + // * `location:us-west*` to find Cloud resources whose location contains both + // "us" and "west" as prefixes. // * `labels:prod` to find Cloud resources whose labels contain "prod" as // a key or value. // * `labels.env:prod` to find Cloud resources that have a label "env" // and its value is "prod". // * `labels.env:*` to find Cloud resources that have a label "env". + // * `kmsKey:key` to find Cloud resources encrypted with a customer-managed + // encryption key whose name contains the word "key". + // * `state:ACTIVE` to find Cloud resources whose state contains "ACTIVE" as a + // word. + // * `NOT state:ACTIVE` to find {{gcp_name}} resources whose state + // doesn't contain "ACTIVE" as a word. + // * `createTime<1609459200` to find Cloud resources that were created before + // "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of + // "2021-01-01 00:00:00 UTC" in seconds. + // * `updateTime>1609459200` to find Cloud resources that were updated after + // "2021-01-01 00:00:00 UTC". 1609459200 is the epoch timestamp of + // "2021-01-01 00:00:00 UTC" in seconds. // * `Important` to find Cloud resources that contain "Important" as a word // in any of the searchable fields. - // * `Impor*` to find Cloud resources that contain "Impor" as a prefix - // in any of the searchable fields. - // * `*por*` to find Cloud resources that contain "por" as a substring in - // any of the searchable fields. + // * `Impor*` to find Cloud resources that contain "Impor" as a prefix of any + // word in any of the searchable fields. // * `Important location:(us-west1 OR global)` to find Cloud // resources that contain "Important" as a word in any of the searchable // fields and are also located in the "us-west1" region or the "global" @@ -637,6 +724,17 @@ message SearchAllResourcesRequest { // Optional. A list of asset types that this request searches for. If empty, it will // search all the [searchable asset // types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types). + // + // Regular expressions are also supported. For example: + // + // * "compute.googleapis.com.*" snapshots resources whose asset type starts + // with "compute.googleapis.com". + // * ".*Instance" snapshots resources whose asset type ends with "Instance". + // * ".*Instance.*" snapshots resources whose asset type contains "Instance". + // + // See [RE2](https://github.com/google/re2/wiki/Syntax) for all supported + // regular expression syntax. If the regular expression does not match any + // supported asset type, an INVALID_ARGUMENT error will be returned. repeated string asset_types = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. The page size for search result pagination. Page size is capped at 500 even @@ -651,12 +749,24 @@ message SearchAllResourcesRequest { // identical to those in the previous call. string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; - // Optional. A comma separated list of fields specifying the sorting order of the + // Optional. A comma-separated list of fields specifying the sorting order of the // results. The default order is ascending. Add " DESC" after the field name // to indicate descending order. Redundant space characters are ignored. - // Example: "location DESC, name". Only string fields in the response are - // sortable, including `name`, `displayName`, `description`, `location`. All - // the other fields such as repeated fields (e.g., `networkTags`), map + // Example: "location DESC, name". + // Only singular primitive fields in the response are sortable: + // * name + // * assetType + // * project + // * displayName + // * description + // * location + // * kmsKey + // * createTime + // * updateTime + // * state + // * parentFullResourceName + // * parentAssetType + // All the other fields such as repeated fields (e.g., `networkTags`), map // fields (e.g., `labels`) and struct fields (e.g., `additionalAttributes`) // are not supported. string order_by = 6 [(google.api.field_behavior) = OPTIONAL]; @@ -679,7 +789,7 @@ message SearchAllIamPoliciesRequest { // Required. A scope can be a project, a folder, or an organization. The search is // limited to the IAM policies within the `scope`. The caller must be granted // the - // [`cloudasset.assets.searchAllIamPolicies`](http://cloud.google.com/asset-inventory/docs/access-control#required_permissions) + // [`cloudasset.assets.searchAllIamPolicies`](https://cloud.google.com/asset-inventory/docs/access-control#required_permissions) // permission on the desired scope. // // The allowed values are: @@ -693,7 +803,12 @@ message SearchAllIamPoliciesRequest { // Optional. The query statement. See [how to construct a // query](https://cloud.google.com/asset-inventory/docs/searching-iam-policies#how_to_construct_a_query) // for more information. If not specified or empty, it will search all the - // IAM policies within the specified `scope`. + // IAM policies within the specified `scope`. Note that the query string is + // compared against each Cloud IAM policy binding, including its members, + // roles, and Cloud IAM conditions. The returned Cloud IAM policies will only + // contain the bindings that match your query. To learn more about the IAM + // policy structure, see [IAM policy + // doc](https://cloud.google.com/iam/docs/policies#structure). // // Examples: // @@ -701,18 +816,25 @@ message SearchAllIamPoliciesRequest { // "amy@gmail.com". // * `policy:roles/compute.admin` to find IAM policy bindings that specify // the Compute Admin role. + // * `policy:comp*` to find IAM policy bindings that contain "comp" as a + // prefix of any word in the binding. // * `policy.role.permissions:storage.buckets.update` to find IAM policy // bindings that specify a role containing "storage.buckets.update" // permission. Note that if callers don't have `iam.roles.get` access to a // role's included permissions, policy bindings that specify this role will // be dropped from the search results. + // * `policy.role.permissions:upd*` to find IAM policy bindings that specify a + // role containing "upd" as a prefix of any word in the role permission. + // Note that if callers don't have `iam.roles.get` access to a role's + // included permissions, policy bindings that specify this role will be + // dropped from the search results. // * `resource:organizations/123456` to find IAM policy bindings // that are set on "organizations/123456". + // * `resource=//cloudresourcemanager.googleapis.com/projects/myproject` to + // find IAM policy bindings that are set on the project named "myproject". // * `Important` to find IAM policy bindings that contain "Important" as a // word in any of the searchable fields (except for the included // permissions). - // * `*por*` to find IAM policy bindings that contain "por" as a substring - // in any of the searchable fields (except for the included permissions). // * `resource:(instance1 OR instance2) policy:amy` to find // IAM policy bindings that are set on resources "instance1" or // "instance2" and also specify user "amy". @@ -743,7 +865,7 @@ message SearchAllIamPoliciesResponse { string next_page_token = 2; } -// IAM policy analysis query message. +// ## IAM policy analysis query message. message IamPolicyAnalysisQuery { // Specifies the resource to analyze for access policies, which may be set // directly on the resource, or on ancestors such as organizations, folders or @@ -869,6 +991,17 @@ message IamPolicyAnalysisQuery { bool analyze_service_account_impersonation = 6 [(google.api.field_behavior) = OPTIONAL]; } + // The IAM conditions context. + message ConditionContext { + // The IAM conditions time context. + oneof TimeContext { + // The hypothetical access timestamp to evaluate IAM conditions. Note that + // this value must not be earlier than the current time; otherwise, an + // INVALID_ARGUMENT error will be returned. + google.protobuf.Timestamp access_time = 1; + } + } + // Required. The relative name of the root asset. Only resources and IAM policies within // the scope will be analyzed. // @@ -894,6 +1027,9 @@ message IamPolicyAnalysisQuery { // Optional. The query options. Options options = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The hypothetical context for IAM conditions evaluation. + ConditionContext condition_context = 6 [(google.api.field_behavior) = OPTIONAL]; } // A request message for [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]. @@ -952,9 +1088,14 @@ message IamPolicyAnalysisOutputConfig { // A Cloud Storage location. message GcsDestination { // Required. The uri of the Cloud Storage object. It's the same uri that is used by - // gsutil. For example: "gs://bucket_name/object_name". See - // [Quickstart: Using the gsutil tool] - // (https://cloud.google.com/storage/docs/quickstart-gsutil) for examples. + // gsutil. Example: "gs://bucket_name/object_name". See [Viewing and + // Editing Object + // Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) + // for more information. + // + // If the specified Cloud Storage object already exists and there is no + // [hold](https://cloud.google.com/storage/docs/object-holds), it will be + // overwritten with the analysis result. string uri = 1 [(google.api.field_behavior) = REQUIRED]; } diff --git a/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto b/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto index f7e2432fc..572ed739a 100644 --- a/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto +++ b/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -89,7 +89,8 @@ message TimeWindow { // [resource // hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), // a resource outside the Google Cloud resource hierarchy (such as Google -// Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy). +// Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy), +// or a relationship (e.g. an INSTANCE_TO_INSTANCEGROUP relationship). // See [Supported asset // types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) // for more information. @@ -242,14 +243,40 @@ message ResourceSearchResult { string asset_type = 2; // The project that this resource belongs to, in the form of - // projects/{PROJECT_NUMBER}. + // projects/{PROJECT_NUMBER}. This field is available when the resource + // belongs to a project. // - // To search against the `project`: + // To search against `project`: // + // * use a field query. Example: `project:12345` + // * use a free text query. Example: `12345` // * specify the `scope` field as this project in your search request. string project = 3; - // The display name of this resource. + // The folder(s) that this resource belongs to, in the form of + // folders/{FOLDER_NUMBER}. This field is available when the resource + // belongs to one or more folders. + // + // To search against `folders`: + // + // * use a field query. Example: `folders:(123 OR 456)` + // * use a free text query. Example: `123` + // * specify the `scope` field as this folder in your search request. + repeated string folders = 17; + + // The organization that this resource belongs to, in the form of + // organizations/{ORGANIZATION_NUMBER}. This field is available when the + // resource belongs to an organization. + // + // To search against `organization`: + // + // * use a field query. Example: `organization:123` + // * use a free text query. Example: `123` + // * specify the `scope` field as this organization in your search request. + string organization = 18; + + // The display name of this resource. This field is available only when the + // resource's proto contains it. // // To search against the `display_name`: // @@ -258,16 +285,18 @@ message ResourceSearchResult { string display_name = 4; // One or more paragraphs of text description of this resource. Maximum length - // could be up to 1M bytes. + // could be up to 1M bytes. This field is available only when the resource's + // proto contains it. // // To search against the `description`: // - // * use a field query. Example: `description:"*important instance*"` - // * use a free text query. Example: `"*important instance*"` + // * use a field query. Example: `description:"important instance"` + // * use a free text query. Example: `"important instance"` string description = 5; // Location can be `global`, regional like `us-east1`, or zonal like - // `us-west1-b`. + // `us-west1-b`. This field is available only when the resource's proto + // contains it. // // To search against the `location`: // @@ -277,7 +306,8 @@ message ResourceSearchResult { // Labels associated with this resource. See [Labelling and grouping GCP // resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) - // for more information. + // for more information. This field is available only when the resource's + // proto contains it. // // To search against the `labels`: // @@ -291,7 +321,8 @@ message ResourceSearchResult { // Network tags associated with this resource. Like labels, network tags are a // type of annotations used to group GCP resources. See [Labelling GCP // resources](https://cloud.google.com/blog/products/gcp/labelling-and-grouping-your-google-cloud-platform-resources) - // for more information. + // for more information. This field is available only when the resource's + // proto contains it. // // To search against the `network_tags`: // @@ -299,6 +330,66 @@ message ResourceSearchResult { // * use a free text query. Example: `internal` repeated string network_tags = 8; + // The Cloud KMS + // [CryptoKey](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys?hl=en) + // name or + // [CryptoKeyVersion](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions?hl=en) + // name. This field is available only when the resource's proto contains it. + // + // To search against the `kms_key`: + // + // * use a field query. Example: `kmsKey:key` + // * use a free text query. Example: `key` + string kms_key = 10; + + // The create timestamp of this resource, at which the resource was created. + // The granularity is in seconds. Timestamp.nanos will always be 0. This field + // is available only when the resource's proto contains it. + // + // To search against `create_time`: + // + // * use a field query. + // - value in seconds since unix epoch. Example: `createTime > 1609459200` + // - value in date string. Example: `createTime > 2021-01-01` + // - value in date-time string (must be quoted). Example: `createTime > + // "2021-01-01T00:00:00"` + google.protobuf.Timestamp create_time = 11; + + // The last update timestamp of this resource, at which the resource was last + // modified or deleted. The granularity is in seconds. Timestamp.nanos will + // always be 0. This field is available only when the resource's proto + // contains it. + // + // To search against `update_time`: + // + // * use a field query. + // - value in seconds since unix epoch. Example: `updateTime < 1609459200` + // - value in date string. Example: `updateTime < 2021-01-01` + // - value in date-time string (must be quoted). Example: `updateTime < + // "2021-01-01T00:00:00"` + google.protobuf.Timestamp update_time = 12; + + // The state of this resource. Different resources types have different state + // definitions that are mapped from various fields of different resource + // types. This field is available only when the resource's proto contains it. + // + // Example: + // If the resource is an instance provided by Compute Engine, + // its state will include PROVISIONING, STAGING, RUNNING, STOPPING, + // SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. See `status` definition + // in [API + // Reference](https://cloud.google.com/compute/docs/reference/rest/v1/instances). + // If the resource is a project provided by Cloud Resource Manager, its state + // will include LIFECYCLE_STATE_UNSPECIFIED, ACTIVE, DELETE_REQUESTED and + // DELETE_IN_PROGRESS. See `lifecycleState` definition in [API + // Reference](https://cloud.google.com/resource-manager/reference/rest/v1/projects). + // + // To search against the `state`: + // + // * use a field query. Example: `state:RUNNING` + // * use a free text query. Example: `RUNNING` + string state = 13; + // The additional searchable attributes of this resource. The attributes may // vary from one resource type to another. Examples: `projectId` for Project, // `dnsName` for DNS ManagedZone. This field contains a subset of the resource @@ -306,7 +397,7 @@ message ResourceSearchResult { // corresponding GCP service (e.g., Compute Engine). see [API references and // supported searchable // attributes](https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types) - // for more information. + // to see which fields are included. // // You can search values of these fields through free text search. However, // you should not consume the field programically as the field names and @@ -319,6 +410,25 @@ message ResourceSearchResult { // `additional_attributes = { dnsName: "foobar" }`, you can issue a query // `foobar`. google.protobuf.Struct additional_attributes = 9; + + // The full resource name of this resource's parent, if it has one. + // To search against the `parent_full_resource_name`: + // + // * use a field query. Example: + // `parentFullResourceName:"project-name"` + // * use a free text query. Example: + // `project-name` + string parent_full_resource_name = 19; + + // The type of this resource's immediate parent, if there is one. + // + // To search against the `parent_asset_type`: + // + // * use a field query. Example: + // `parentAssetType:"cloudresourcemanager.googleapis.com/Project"` + // * use a free text query. Example: + // `cloudresourcemanager.googleapis.com/Project` + string parent_asset_type = 103; } // A result of IAM Policy search, containing information of an IAM policy. @@ -357,7 +467,7 @@ message IamPolicySearchResult { // projects/{PROJECT_NUMBER}. If an IAM policy is set on a resource (like VM // instance, Cloud Storage bucket), the project field will indicate the // project that contains the resource. If an IAM policy is set on a folder or - // orgnization, the project field will be empty. + // orgnization, this field will be empty. // // To search against the `project`: // @@ -400,6 +510,29 @@ message IamPolicyAnalysisState { string cause = 2; } +// The Condition evaluation. +message ConditionEvaluation { + // Value of this expression. + enum EvaluationValue { + // Reserved for future use. + EVALUATION_VALUE_UNSPECIFIED = 0; + + // The evaluation result is `true`. + TRUE = 1; + + // The evaluation result is `false`. + FALSE = 2; + + // The evaluation result is `conditional` when the condition expression + // contains variables that are either missing input values or have not been + // supported by Analyzer yet. + CONDITIONAL = 3; + } + + // The evaluation result. + EvaluationValue evaluation_value = 1; +} + // IAM Policy analysis result, consisting of one IAM policy binding and derived // access control lists. message IamPolicyAnalysisResult { @@ -489,6 +622,10 @@ message IamPolicyAnalysisResult { // contains the full resource name of a child resource. This field is // present only if the output_resource_edges option is enabled in request. repeated Edge resource_edges = 3; + + // Condition evaluation for this AccessControlList, if there is a condition + // defined in the above IAM policy binding. + ConditionEvaluation condition_evaluation = 4; } // The identities and group edges. diff --git a/synth.metadata b/synth.metadata index 3833b427e..c43ac7319 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,47 +4,47 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-asset.git", - "sha": "988f5a79632094ca78ad916691df39aed4dfa9f6" + "sha": "22ae64211f53312f1dff43aa49fe41dc419b0eeb" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "63d5639586a018e459e85fe98637d7f0837c8b34", - "internalRef": "371155589" + "sha": "de04592991247b9b617d06d4ec68f7e90adf2b81", + "internalRef": "375731640" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "63d5639586a018e459e85fe98637d7f0837c8b34", - "internalRef": "371155589" + "sha": "de04592991247b9b617d06d4ec68f7e90adf2b81", + "internalRef": "375731640" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "63d5639586a018e459e85fe98637d7f0837c8b34", - "internalRef": "371155589" + "sha": "de04592991247b9b617d06d4ec68f7e90adf2b81", + "internalRef": "375731640" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "63d5639586a018e459e85fe98637d7f0837c8b34", - "internalRef": "371155589" + "sha": "de04592991247b9b617d06d4ec68f7e90adf2b81", + "internalRef": "375731640" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "63d5639586a018e459e85fe98637d7f0837c8b34", - "internalRef": "371155589" + "sha": "de04592991247b9b617d06d4ec68f7e90adf2b81", + "internalRef": "375731640" } }, { @@ -250,6 +250,8 @@ "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryResponseOrBuilder.java", "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BigQueryDestination.java", "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BigQueryDestinationOrBuilder.java", + "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ConditionEvaluation.java", + "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ConditionEvaluationOrBuilder.java", "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ContentType.java", "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateFeedRequest.java", "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/CreateFeedRequestOrBuilder.java", @@ -280,6 +282,10 @@ "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisStateOrBuilder.java", "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResult.java", "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResultOrBuilder.java", + "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequest.java", + "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequestOrBuilder.java", + "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsResponse.java", + "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsResponseOrBuilder.java", "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsRequest.java", "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsRequestOrBuilder.java", "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsResponse.java",