Skip to content

Commit

Permalink
chore(bazel): update protobuf to v3.21.7 (#436)
Browse files Browse the repository at this point in the history
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 477955264

Source-Link: https://togithub.com/googleapis/googleapis/commit/a724450af76d0001f23602684c49cd6a4b3a5654

Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/4abcbcaec855e74a0b22a4988cf9e0eb61a83094
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGFiY2JjYWVjODU1ZTc0YTBiMjJhNDk4OGNmOWUwZWI2MWE4MzA5NCJ9

feat!: remove ListApplicablePolicies

PiperOrigin-RevId: 475955031

Source-Link: https://togithub.com/googleapis/googleapis/commit/65376f43de1a43dcd40b21a5c2f844bde0049604

Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/c8504e97891ed9e664cf68270d7e61bec160fe57
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzg1MDRlOTc4OTFlZDllNjY0Y2Y2ODI3MGQ3ZTYxYmVjMTYwZmU1NyJ9
  • Loading branch information
gcf-owl-bot[bot] authored Oct 2, 2022
1 parent 2b67643 commit 2f76c74
Show file tree
Hide file tree
Showing 55 changed files with 2,121 additions and 7,095 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -780,175 +780,6 @@ public final UnaryCallable<DeletePolicyRequest, Operation> deletePolicyCallable(
return stub.deletePolicyCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Retrieves all the policies that are attached to the specified resource, or anywhere in the
* ancestry of the resource. For example, for a project this endpoint would return all the
* `denyPolicy` kind policies attached to the project, its parent folder (if any), and its parent
* organization (if any). The endpoint requires the same permissions that it would take to call
* `ListPolicies` or `GetPolicy`.
*
* <p>The main reason to use this endpoint is as a policy admin to debug access issues for a
* resource.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (PoliciesClient policiesClient = PoliciesClient.create()) {
* String attachmentPoint = "attachmentPoint-686994899";
* for (Policy element : policiesClient.listApplicablePolicies(attachmentPoint).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }</pre>
*
* @param attachmentPoint Required. The Cloud resource at which the applicable policies are to be
* retrieved. Format: `{attachment-point}` Use the URL-encoded full resource name, which means
* that the forward-slash character, `/`, must be written as `%2F`. For example,
* `cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListApplicablePoliciesPagedResponse listApplicablePolicies(String attachmentPoint) {
ListApplicablePoliciesRequest request =
ListApplicablePoliciesRequest.newBuilder().setAttachmentPoint(attachmentPoint).build();
return listApplicablePolicies(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Retrieves all the policies that are attached to the specified resource, or anywhere in the
* ancestry of the resource. For example, for a project this endpoint would return all the
* `denyPolicy` kind policies attached to the project, its parent folder (if any), and its parent
* organization (if any). The endpoint requires the same permissions that it would take to call
* `ListPolicies` or `GetPolicy`.
*
* <p>The main reason to use this endpoint is as a policy admin to debug access issues for a
* resource.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (PoliciesClient policiesClient = PoliciesClient.create()) {
* ListApplicablePoliciesRequest request =
* ListApplicablePoliciesRequest.newBuilder()
* .setAttachmentPoint("attachmentPoint-686994899")
* .setFilter("filter-1274492040")
* .setPageToken("pageToken873572522")
* .setPageSize(883849137)
* .build();
* for (Policy element : policiesClient.listApplicablePolicies(request).iterateAll()) {
* // doThingsWith(element);
* }
* }
* }</pre>
*
* @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 ListApplicablePoliciesPagedResponse listApplicablePolicies(
ListApplicablePoliciesRequest request) {
return listApplicablePoliciesPagedCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Retrieves all the policies that are attached to the specified resource, or anywhere in the
* ancestry of the resource. For example, for a project this endpoint would return all the
* `denyPolicy` kind policies attached to the project, its parent folder (if any), and its parent
* organization (if any). The endpoint requires the same permissions that it would take to call
* `ListPolicies` or `GetPolicy`.
*
* <p>The main reason to use this endpoint is as a policy admin to debug access issues for a
* resource.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (PoliciesClient policiesClient = PoliciesClient.create()) {
* ListApplicablePoliciesRequest request =
* ListApplicablePoliciesRequest.newBuilder()
* .setAttachmentPoint("attachmentPoint-686994899")
* .setFilter("filter-1274492040")
* .setPageToken("pageToken873572522")
* .setPageSize(883849137)
* .build();
* ApiFuture<Policy> future =
* policiesClient.listApplicablePoliciesPagedCallable().futureCall(request);
* // Do something.
* for (Policy element : future.get().iterateAll()) {
* // doThingsWith(element);
* }
* }
* }</pre>
*/
public final UnaryCallable<ListApplicablePoliciesRequest, ListApplicablePoliciesPagedResponse>
listApplicablePoliciesPagedCallable() {
return stub.listApplicablePoliciesPagedCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Retrieves all the policies that are attached to the specified resource, or anywhere in the
* ancestry of the resource. For example, for a project this endpoint would return all the
* `denyPolicy` kind policies attached to the project, its parent folder (if any), and its parent
* organization (if any). The endpoint requires the same permissions that it would take to call
* `ListPolicies` or `GetPolicy`.
*
* <p>The main reason to use this endpoint is as a policy admin to debug access issues for a
* resource.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
* // It will require modifications to work:
* // - It may require correct/in-range values for request initialization.
* // - It may require specifying regional endpoints when creating the service client as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (PoliciesClient policiesClient = PoliciesClient.create()) {
* ListApplicablePoliciesRequest request =
* ListApplicablePoliciesRequest.newBuilder()
* .setAttachmentPoint("attachmentPoint-686994899")
* .setFilter("filter-1274492040")
* .setPageToken("pageToken873572522")
* .setPageSize(883849137)
* .build();
* while (true) {
* ListApplicablePoliciesResponse response =
* policiesClient.listApplicablePoliciesCallable().call(request);
* for (Policy element : response.getPoliciesList()) {
* // doThingsWith(element);
* }
* String nextPageToken = response.getNextPageToken();
* if (!Strings.isNullOrEmpty(nextPageToken)) {
* request = request.toBuilder().setPageToken(nextPageToken).build();
* } else {
* break;
* }
* }
* }
* }</pre>
*/
public final UnaryCallable<ListApplicablePoliciesRequest, ListApplicablePoliciesResponse>
listApplicablePoliciesCallable() {
return stub.listApplicablePoliciesCallable();
}

@Override
public final void close() {
stub.close();
Expand Down Expand Up @@ -1053,84 +884,4 @@ protected ListPoliciesFixedSizeCollection createCollection(
return new ListPoliciesFixedSizeCollection(pages, collectionSize);
}
}

public static class ListApplicablePoliciesPagedResponse
extends AbstractPagedListResponse<
ListApplicablePoliciesRequest,
ListApplicablePoliciesResponse,
Policy,
ListApplicablePoliciesPage,
ListApplicablePoliciesFixedSizeCollection> {

public static ApiFuture<ListApplicablePoliciesPagedResponse> createAsync(
PageContext<ListApplicablePoliciesRequest, ListApplicablePoliciesResponse, Policy> context,
ApiFuture<ListApplicablePoliciesResponse> futureResponse) {
ApiFuture<ListApplicablePoliciesPage> futurePage =
ListApplicablePoliciesPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
input -> new ListApplicablePoliciesPagedResponse(input),
MoreExecutors.directExecutor());
}

private ListApplicablePoliciesPagedResponse(ListApplicablePoliciesPage page) {
super(page, ListApplicablePoliciesFixedSizeCollection.createEmptyCollection());
}
}

public static class ListApplicablePoliciesPage
extends AbstractPage<
ListApplicablePoliciesRequest,
ListApplicablePoliciesResponse,
Policy,
ListApplicablePoliciesPage> {

private ListApplicablePoliciesPage(
PageContext<ListApplicablePoliciesRequest, ListApplicablePoliciesResponse, Policy> context,
ListApplicablePoliciesResponse response) {
super(context, response);
}

private static ListApplicablePoliciesPage createEmptyPage() {
return new ListApplicablePoliciesPage(null, null);
}

@Override
protected ListApplicablePoliciesPage createPage(
PageContext<ListApplicablePoliciesRequest, ListApplicablePoliciesResponse, Policy> context,
ListApplicablePoliciesResponse response) {
return new ListApplicablePoliciesPage(context, response);
}

@Override
public ApiFuture<ListApplicablePoliciesPage> createPageAsync(
PageContext<ListApplicablePoliciesRequest, ListApplicablePoliciesResponse, Policy> context,
ApiFuture<ListApplicablePoliciesResponse> futureResponse) {
return super.createPageAsync(context, futureResponse);
}
}

public static class ListApplicablePoliciesFixedSizeCollection
extends AbstractFixedSizeCollection<
ListApplicablePoliciesRequest,
ListApplicablePoliciesResponse,
Policy,
ListApplicablePoliciesPage,
ListApplicablePoliciesFixedSizeCollection> {

private ListApplicablePoliciesFixedSizeCollection(
List<ListApplicablePoliciesPage> pages, int collectionSize) {
super(pages, collectionSize);
}

private static ListApplicablePoliciesFixedSizeCollection createEmptyCollection() {
return new ListApplicablePoliciesFixedSizeCollection(null, 0);
}

@Override
protected ListApplicablePoliciesFixedSizeCollection createCollection(
List<ListApplicablePoliciesPage> pages, int collectionSize) {
return new ListApplicablePoliciesFixedSizeCollection(pages, collectionSize);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.iam.v2;

import static com.google.iam.v2.PoliciesClient.ListApplicablePoliciesPagedResponse;
import static com.google.iam.v2.PoliciesClient.ListPoliciesPagedResponse;

import com.google.api.core.ApiFunction;
Expand Down Expand Up @@ -118,15 +117,6 @@ public UnaryCallSettings<DeletePolicyRequest, Operation> deletePolicySettings()
return ((PoliciesStubSettings) getStubSettings()).deletePolicyOperationSettings();
}

/** Returns the object with the settings used for calls to listApplicablePolicies. */
public PagedCallSettings<
ListApplicablePoliciesRequest,
ListApplicablePoliciesResponse,
ListApplicablePoliciesPagedResponse>
listApplicablePoliciesSettings() {
return ((PoliciesStubSettings) getStubSettings()).listApplicablePoliciesSettings();
}

public static final PoliciesSettings create(PoliciesStubSettings stub) throws IOException {
return new PoliciesSettings.Builder(stub.toBuilder()).build();
}
Expand Down Expand Up @@ -286,15 +276,6 @@ public UnaryCallSettings.Builder<DeletePolicyRequest, Operation> deletePolicySet
return getStubSettingsBuilder().deletePolicyOperationSettings();
}

/** Returns the builder for the settings used for calls to listApplicablePolicies. */
public PagedCallSettings.Builder<
ListApplicablePoliciesRequest,
ListApplicablePoliciesResponse,
ListApplicablePoliciesPagedResponse>
listApplicablePoliciesSettings() {
return getStubSettingsBuilder().listApplicablePoliciesSettings();
}

@Override
public PoliciesSettings build() throws IOException {
return new PoliciesSettings(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
"GetPolicy": {
"methods": ["getPolicy", "getPolicy", "getPolicyCallable"]
},
"ListApplicablePolicies": {
"methods": ["listApplicablePolicies", "listApplicablePolicies", "listApplicablePoliciesPagedCallable", "listApplicablePoliciesCallable"]
},
"ListPolicies": {
"methods": ["listPolicies", "listPolicies", "listPoliciesPagedCallable", "listPoliciesCallable"]
},
Expand Down
Loading

0 comments on commit 2f76c74

Please sign in to comment.