Skip to content

Commit d05cb98

Browse files
feat: [netapp] add RestrictedAction to Volume (#9734)
* feat: add RestrictedAction to Volume feat: add actions for Operations and Locations docs: add comments to a few messages PiperOrigin-RevId: 553570917 Source-Link: googleapis/googleapis@018ba9f Source-Link: https://github.com/googleapis/googleapis-gen/commit/77d3bf4c38b8610253a88f81b53c5fc12ef182ee Copy-Tag: eyJwIjoiamF2YS1uZXRhcHAvLk93bEJvdC55YW1sIiwiaCI6Ijc3ZDNiZjRjMzhiODYxMDI1M2E4OGY4MWI1M2M1ZmMxMmVmMTgyZWUifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 037b24a commit d05cb98

39 files changed

+2159
-103
lines changed

java-netapp/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
2323
<dependency>
2424
<groupId>com.google.cloud</groupId>
2525
<artifactId>libraries-bom</artifactId>
26-
<version>26.20.0</version>
26+
<version>26.21.0</version>
2727
<type>pom</type>
2828
<scope>import</scope>
2929
</dependency>

java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/NetAppClient.java

Lines changed: 234 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
import com.google.api.gax.rpc.OperationCallable;
2929
import com.google.api.gax.rpc.PageContext;
3030
import com.google.api.gax.rpc.UnaryCallable;
31+
import com.google.cloud.location.GetLocationRequest;
32+
import com.google.cloud.location.ListLocationsRequest;
33+
import com.google.cloud.location.ListLocationsResponse;
34+
import com.google.cloud.location.Location;
3135
import com.google.cloud.netapp.v1.stub.NetAppStub;
3236
import com.google.cloud.netapp.v1.stub.NetAppStubSettings;
3337
import com.google.common.util.concurrent.MoreExecutors;
@@ -5009,6 +5013,160 @@ public final OperationFuture<Replication, OperationMetadata> reverseReplicationD
50095013
return stub.reverseReplicationDirectionCallable();
50105014
}
50115015

5016+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
5017+
/**
5018+
* Lists information about the supported locations for this service.
5019+
*
5020+
* <p>Sample code:
5021+
*
5022+
* <pre>{@code
5023+
* // This snippet has been automatically generated and should be regarded as a code template only.
5024+
* // It will require modifications to work:
5025+
* // - It may require correct/in-range values for request initialization.
5026+
* // - It may require specifying regional endpoints when creating the service client as shown in
5027+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5028+
* try (NetAppClient netAppClient = NetAppClient.create()) {
5029+
* ListLocationsRequest request =
5030+
* ListLocationsRequest.newBuilder()
5031+
* .setName("name3373707")
5032+
* .setFilter("filter-1274492040")
5033+
* .setPageSize(883849137)
5034+
* .setPageToken("pageToken873572522")
5035+
* .build();
5036+
* for (Location element : netAppClient.listLocations(request).iterateAll()) {
5037+
* // doThingsWith(element);
5038+
* }
5039+
* }
5040+
* }</pre>
5041+
*
5042+
* @param request The request object containing all of the parameters for the API call.
5043+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
5044+
*/
5045+
public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
5046+
return listLocationsPagedCallable().call(request);
5047+
}
5048+
5049+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
5050+
/**
5051+
* Lists information about the supported locations for this service.
5052+
*
5053+
* <p>Sample code:
5054+
*
5055+
* <pre>{@code
5056+
* // This snippet has been automatically generated and should be regarded as a code template only.
5057+
* // It will require modifications to work:
5058+
* // - It may require correct/in-range values for request initialization.
5059+
* // - It may require specifying regional endpoints when creating the service client as shown in
5060+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5061+
* try (NetAppClient netAppClient = NetAppClient.create()) {
5062+
* ListLocationsRequest request =
5063+
* ListLocationsRequest.newBuilder()
5064+
* .setName("name3373707")
5065+
* .setFilter("filter-1274492040")
5066+
* .setPageSize(883849137)
5067+
* .setPageToken("pageToken873572522")
5068+
* .build();
5069+
* ApiFuture<Location> future = netAppClient.listLocationsPagedCallable().futureCall(request);
5070+
* // Do something.
5071+
* for (Location element : future.get().iterateAll()) {
5072+
* // doThingsWith(element);
5073+
* }
5074+
* }
5075+
* }</pre>
5076+
*/
5077+
public final UnaryCallable<ListLocationsRequest, ListLocationsPagedResponse>
5078+
listLocationsPagedCallable() {
5079+
return stub.listLocationsPagedCallable();
5080+
}
5081+
5082+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
5083+
/**
5084+
* Lists information about the supported locations for this service.
5085+
*
5086+
* <p>Sample code:
5087+
*
5088+
* <pre>{@code
5089+
* // This snippet has been automatically generated and should be regarded as a code template only.
5090+
* // It will require modifications to work:
5091+
* // - It may require correct/in-range values for request initialization.
5092+
* // - It may require specifying regional endpoints when creating the service client as shown in
5093+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5094+
* try (NetAppClient netAppClient = NetAppClient.create()) {
5095+
* ListLocationsRequest request =
5096+
* ListLocationsRequest.newBuilder()
5097+
* .setName("name3373707")
5098+
* .setFilter("filter-1274492040")
5099+
* .setPageSize(883849137)
5100+
* .setPageToken("pageToken873572522")
5101+
* .build();
5102+
* while (true) {
5103+
* ListLocationsResponse response = netAppClient.listLocationsCallable().call(request);
5104+
* for (Location element : response.getLocationsList()) {
5105+
* // doThingsWith(element);
5106+
* }
5107+
* String nextPageToken = response.getNextPageToken();
5108+
* if (!Strings.isNullOrEmpty(nextPageToken)) {
5109+
* request = request.toBuilder().setPageToken(nextPageToken).build();
5110+
* } else {
5111+
* break;
5112+
* }
5113+
* }
5114+
* }
5115+
* }</pre>
5116+
*/
5117+
public final UnaryCallable<ListLocationsRequest, ListLocationsResponse> listLocationsCallable() {
5118+
return stub.listLocationsCallable();
5119+
}
5120+
5121+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
5122+
/**
5123+
* Gets information about a location.
5124+
*
5125+
* <p>Sample code:
5126+
*
5127+
* <pre>{@code
5128+
* // This snippet has been automatically generated and should be regarded as a code template only.
5129+
* // It will require modifications to work:
5130+
* // - It may require correct/in-range values for request initialization.
5131+
* // - It may require specifying regional endpoints when creating the service client as shown in
5132+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5133+
* try (NetAppClient netAppClient = NetAppClient.create()) {
5134+
* GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
5135+
* Location response = netAppClient.getLocation(request);
5136+
* }
5137+
* }</pre>
5138+
*
5139+
* @param request The request object containing all of the parameters for the API call.
5140+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
5141+
*/
5142+
public final Location getLocation(GetLocationRequest request) {
5143+
return getLocationCallable().call(request);
5144+
}
5145+
5146+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
5147+
/**
5148+
* Gets information about a location.
5149+
*
5150+
* <p>Sample code:
5151+
*
5152+
* <pre>{@code
5153+
* // This snippet has been automatically generated and should be regarded as a code template only.
5154+
* // It will require modifications to work:
5155+
* // - It may require correct/in-range values for request initialization.
5156+
* // - It may require specifying regional endpoints when creating the service client as shown in
5157+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
5158+
* try (NetAppClient netAppClient = NetAppClient.create()) {
5159+
* GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
5160+
* ApiFuture<Location> future = netAppClient.getLocationCallable().futureCall(request);
5161+
* // Do something.
5162+
* Location response = future.get();
5163+
* }
5164+
* }</pre>
5165+
*/
5166+
public final UnaryCallable<GetLocationRequest, Location> getLocationCallable() {
5167+
return stub.getLocationCallable();
5168+
}
5169+
50125170
@Override
50135171
public final void close() {
50145172
stub.close();
@@ -5501,4 +5659,80 @@ protected ListReplicationsFixedSizeCollection createCollection(
55015659
return new ListReplicationsFixedSizeCollection(pages, collectionSize);
55025660
}
55035661
}
5662+
5663+
public static class ListLocationsPagedResponse
5664+
extends AbstractPagedListResponse<
5665+
ListLocationsRequest,
5666+
ListLocationsResponse,
5667+
Location,
5668+
ListLocationsPage,
5669+
ListLocationsFixedSizeCollection> {
5670+
5671+
public static ApiFuture<ListLocationsPagedResponse> createAsync(
5672+
PageContext<ListLocationsRequest, ListLocationsResponse, Location> context,
5673+
ApiFuture<ListLocationsResponse> futureResponse) {
5674+
ApiFuture<ListLocationsPage> futurePage =
5675+
ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse);
5676+
return ApiFutures.transform(
5677+
futurePage,
5678+
input -> new ListLocationsPagedResponse(input),
5679+
MoreExecutors.directExecutor());
5680+
}
5681+
5682+
private ListLocationsPagedResponse(ListLocationsPage page) {
5683+
super(page, ListLocationsFixedSizeCollection.createEmptyCollection());
5684+
}
5685+
}
5686+
5687+
public static class ListLocationsPage
5688+
extends AbstractPage<
5689+
ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> {
5690+
5691+
private ListLocationsPage(
5692+
PageContext<ListLocationsRequest, ListLocationsResponse, Location> context,
5693+
ListLocationsResponse response) {
5694+
super(context, response);
5695+
}
5696+
5697+
private static ListLocationsPage createEmptyPage() {
5698+
return new ListLocationsPage(null, null);
5699+
}
5700+
5701+
@Override
5702+
protected ListLocationsPage createPage(
5703+
PageContext<ListLocationsRequest, ListLocationsResponse, Location> context,
5704+
ListLocationsResponse response) {
5705+
return new ListLocationsPage(context, response);
5706+
}
5707+
5708+
@Override
5709+
public ApiFuture<ListLocationsPage> createPageAsync(
5710+
PageContext<ListLocationsRequest, ListLocationsResponse, Location> context,
5711+
ApiFuture<ListLocationsResponse> futureResponse) {
5712+
return super.createPageAsync(context, futureResponse);
5713+
}
5714+
}
5715+
5716+
public static class ListLocationsFixedSizeCollection
5717+
extends AbstractFixedSizeCollection<
5718+
ListLocationsRequest,
5719+
ListLocationsResponse,
5720+
Location,
5721+
ListLocationsPage,
5722+
ListLocationsFixedSizeCollection> {
5723+
5724+
private ListLocationsFixedSizeCollection(List<ListLocationsPage> pages, int collectionSize) {
5725+
super(pages, collectionSize);
5726+
}
5727+
5728+
private static ListLocationsFixedSizeCollection createEmptyCollection() {
5729+
return new ListLocationsFixedSizeCollection(null, 0);
5730+
}
5731+
5732+
@Override
5733+
protected ListLocationsFixedSizeCollection createCollection(
5734+
List<ListLocationsPage> pages, int collectionSize) {
5735+
return new ListLocationsFixedSizeCollection(pages, collectionSize);
5736+
}
5737+
}
55045738
}

java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/NetAppSettings.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import static com.google.cloud.netapp.v1.NetAppClient.ListActiveDirectoriesPagedResponse;
2020
import static com.google.cloud.netapp.v1.NetAppClient.ListKmsConfigsPagedResponse;
21+
import static com.google.cloud.netapp.v1.NetAppClient.ListLocationsPagedResponse;
2122
import static com.google.cloud.netapp.v1.NetAppClient.ListReplicationsPagedResponse;
2223
import static com.google.cloud.netapp.v1.NetAppClient.ListSnapshotsPagedResponse;
2324
import static com.google.cloud.netapp.v1.NetAppClient.ListStoragePoolsPagedResponse;
@@ -36,6 +37,10 @@
3637
import com.google.api.gax.rpc.PagedCallSettings;
3738
import com.google.api.gax.rpc.TransportChannelProvider;
3839
import com.google.api.gax.rpc.UnaryCallSettings;
40+
import com.google.cloud.location.GetLocationRequest;
41+
import com.google.cloud.location.ListLocationsRequest;
42+
import com.google.cloud.location.ListLocationsResponse;
43+
import com.google.cloud.location.Location;
3944
import com.google.cloud.netapp.v1.stub.NetAppStubSettings;
4045
import com.google.longrunning.Operation;
4146
import com.google.protobuf.Empty;
@@ -418,6 +423,17 @@ public UnaryCallSettings<ResumeReplicationRequest, Operation> resumeReplicationS
418423
return ((NetAppStubSettings) getStubSettings()).reverseReplicationDirectionOperationSettings();
419424
}
420425

426+
/** Returns the object with the settings used for calls to listLocations. */
427+
public PagedCallSettings<ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
428+
listLocationsSettings() {
429+
return ((NetAppStubSettings) getStubSettings()).listLocationsSettings();
430+
}
431+
432+
/** Returns the object with the settings used for calls to getLocation. */
433+
public UnaryCallSettings<GetLocationRequest, Location> getLocationSettings() {
434+
return ((NetAppStubSettings) getStubSettings()).getLocationSettings();
435+
}
436+
421437
public static final NetAppSettings create(NetAppStubSettings stub) throws IOException {
422438
return new NetAppSettings.Builder(stub.toBuilder()).build();
423439
}
@@ -880,6 +896,18 @@ public UnaryCallSettings.Builder<StopReplicationRequest, Operation> stopReplicat
880896
return getStubSettingsBuilder().reverseReplicationDirectionOperationSettings();
881897
}
882898

899+
/** Returns the builder for the settings used for calls to listLocations. */
900+
public PagedCallSettings.Builder<
901+
ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
902+
listLocationsSettings() {
903+
return getStubSettingsBuilder().listLocationsSettings();
904+
}
905+
906+
/** Returns the builder for the settings used for calls to getLocation. */
907+
public UnaryCallSettings.Builder<GetLocationRequest, Location> getLocationSettings() {
908+
return getStubSettingsBuilder().getLocationSettings();
909+
}
910+
883911
@Override
884912
public NetAppSettings build() throws IOException {
885913
return new NetAppSettings(this);

java-netapp/google-cloud-netapp/src/main/java/com/google/cloud/netapp/v1/gapic_metadata.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@
5555
"GetKmsConfig": {
5656
"methods": ["getKmsConfig", "getKmsConfig", "getKmsConfig", "getKmsConfigCallable"]
5757
},
58+
"GetLocation": {
59+
"methods": ["getLocation", "getLocationCallable"]
60+
},
5861
"GetReplication": {
5962
"methods": ["getReplication", "getReplication", "getReplication", "getReplicationCallable"]
6063
},
@@ -73,6 +76,9 @@
7376
"ListKmsConfigs": {
7477
"methods": ["listKmsConfigs", "listKmsConfigs", "listKmsConfigs", "listKmsConfigsPagedCallable", "listKmsConfigsCallable"]
7578
},
79+
"ListLocations": {
80+
"methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"]
81+
},
7682
"ListReplications": {
7783
"methods": ["listReplications", "listReplications", "listReplications", "listReplicationsPagedCallable", "listReplicationsCallable"]
7884
},

0 commit comments

Comments
 (0)