Skip to content

Commit

Permalink
chore(bazel): Update WORKSPACE files for rules_gapic, gax_java, gener…
Browse files Browse the repository at this point in the history
…ator_java versions (#230)

- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 472750037

Source-Link: googleapis/googleapis@88f2ea3

Source-Link: https://github.com/googleapis/googleapis-gen/commit/230a5588306aae18fe8f2a57f14d4039ad72c901
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjMwYTU1ODgzMDZhYWUxOGZlOGYyYTU3ZjE0ZDQwMzlhZDcyYzkwMSJ9
  • Loading branch information
gcf-owl-bot[bot] authored Sep 8, 2022
1 parent f35e8bf commit 5142eca
Show file tree
Hide file tree
Showing 113 changed files with 5,584 additions and 234 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,16 @@
* <p>For example, to set the total timeout of getNode to 30 seconds:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // 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
* TpuSettings.Builder tpuSettingsBuilder = TpuSettings.newBuilder();
* tpuSettingsBuilder
* .getNodeSettings()
* .setRetrySettings(
* tpuSettingsBuilder
* .getNodeSettings()
* .getRetrySettings()
* .toBuilder()
* tpuSettingsBuilder.getNodeSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* TpuSettings tpuSettings = tpuSettingsBuilder.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@
* <p>Sample for TpuClient:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // 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 (TpuClient tpuClient = TpuClient.create()) {
* NodeName name = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]");
* Node response = tpuClient.getNode(name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,16 @@
* <p>For example, to set the total timeout of getNode to 30 seconds:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // 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
* TpuStubSettings.Builder tpuSettingsBuilder = TpuStubSettings.newBuilder();
* tpuSettingsBuilder
* .getNodeSettings()
* .setRetrySettings(
* tpuSettingsBuilder
* .getNodeSettings()
* .getRetrySettings()
* .toBuilder()
* tpuSettingsBuilder.getNodeSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* TpuStubSettings tpuSettings = tpuSettingsBuilder.build();
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,16 @@
* <p>For example, to set the total timeout of getNode to 30 seconds:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // 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
* TpuSettings.Builder tpuSettingsBuilder = TpuSettings.newBuilder();
* tpuSettingsBuilder
* .getNodeSettings()
* .setRetrySettings(
* tpuSettingsBuilder
* .getNodeSettings()
* .getRetrySettings()
* .toBuilder()
* tpuSettingsBuilder.getNodeSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* TpuSettings tpuSettings = tpuSettingsBuilder.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@
* <p>Sample for TpuClient:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // 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 (TpuClient tpuClient = TpuClient.create()) {
* NodeName name = NodeName.of("[PROJECT]", "[LOCATION]", "[NODE]");
* Node response = tpuClient.getNode(name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,16 @@
* <p>For example, to set the total timeout of getNode to 30 seconds:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* // 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
* TpuStubSettings.Builder tpuSettingsBuilder = TpuStubSettings.newBuilder();
* tpuSettingsBuilder
* .getNodeSettings()
* .setRetrySettings(
* tpuSettingsBuilder
* .getNodeSettings()
* .getRetrySettings()
* .toBuilder()
* tpuSettingsBuilder.getNodeSettings().getRetrySettings().toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
* .build());
* TpuStubSettings tpuSettings = tpuSettingsBuilder.build();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Copyright 2022 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.
*/

package com.google.cloud.tpu.v1.stub.samples;

// [START tpu_v1_generated_tpustubsettings_getnode_sync]
import com.google.cloud.tpu.v1.stub.TpuStubSettings;
import java.time.Duration;

public class SyncGetNode {

public static void main(String[] args) throws Exception {
syncGetNode();
}

public static void syncGetNode() throws Exception {
// 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
TpuStubSettings.Builder tpuSettingsBuilder = TpuStubSettings.newBuilder();
tpuSettingsBuilder
.getNodeSettings()
.setRetrySettings(
tpuSettingsBuilder.getNodeSettings().getRetrySettings().toBuilder()
.setTotalTimeout(Duration.ofSeconds(30))
.build());
TpuStubSettings tpuSettings = tpuSettingsBuilder.build();
}
}
// [END tpu_v1_generated_tpustubsettings_getnode_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* Copyright 2022 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.
*/

package com.google.cloud.tpu.v1.samples;

// [START tpu_v1_generated_tpuclient_create_setcredentialsprovider_sync]
import com.google.api.gax.core.FixedCredentialsProvider;
import com.google.cloud.tpu.v1.TpuClient;
import com.google.cloud.tpu.v1.TpuSettings;
import com.google.cloud.tpu.v1.myCredentials;

public class SyncCreateSetCredentialsProvider {

public static void main(String[] args) throws Exception {
syncCreateSetCredentialsProvider();
}

public static void syncCreateSetCredentialsProvider() throws Exception {
// 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
TpuSettings tpuSettings =
TpuSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
TpuClient tpuClient = TpuClient.create(tpuSettings);
}
}
// [END tpu_v1_generated_tpuclient_create_setcredentialsprovider_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Copyright 2022 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.
*/

package com.google.cloud.tpu.v1.samples;

// [START tpu_v1_generated_tpuclient_create_setendpoint_sync]
import com.google.cloud.tpu.v1.TpuClient;
import com.google.cloud.tpu.v1.TpuSettings;
import com.google.cloud.tpu.v1.myEndpoint;

public class SyncCreateSetEndpoint {

public static void main(String[] args) throws Exception {
syncCreateSetEndpoint();
}

public static void syncCreateSetEndpoint() throws Exception {
// 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
TpuSettings tpuSettings = TpuSettings.newBuilder().setEndpoint(myEndpoint).build();
TpuClient tpuClient = TpuClient.create(tpuSettings);
}
}
// [END tpu_v1_generated_tpuclient_create_setendpoint_sync]
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* Copyright 2022 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.
*/

package com.google.cloud.tpu.v1.samples;

// [START tpu_v1_generated_tpuclient_createnode_async]
import com.google.api.core.ApiFuture;
import com.google.cloud.tpu.v1.CreateNodeRequest;
import com.google.cloud.tpu.v1.LocationName;
import com.google.cloud.tpu.v1.Node;
import com.google.cloud.tpu.v1.TpuClient;
import com.google.longrunning.Operation;

public class AsyncCreateNode {

public static void main(String[] args) throws Exception {
asyncCreateNode();
}

public static void asyncCreateNode() throws Exception {
// 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 (TpuClient tpuClient = TpuClient.create()) {
CreateNodeRequest request =
CreateNodeRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setNodeId("nodeId-1040171331")
.setNode(Node.newBuilder().build())
.build();
ApiFuture<Operation> future = tpuClient.createNodeCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
}
}
// [END tpu_v1_generated_tpuclient_createnode_async]
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* Copyright 2022 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.
*/

package com.google.cloud.tpu.v1.samples;

// [START tpu_v1_generated_tpuclient_createnode_lro_async]
import com.google.api.gax.longrunning.OperationFuture;
import com.google.cloud.tpu.v1.CreateNodeRequest;
import com.google.cloud.tpu.v1.LocationName;
import com.google.cloud.tpu.v1.Node;
import com.google.cloud.tpu.v1.OperationMetadata;
import com.google.cloud.tpu.v1.TpuClient;

public class AsyncCreateNodeLRO {

public static void main(String[] args) throws Exception {
asyncCreateNodeLRO();
}

public static void asyncCreateNodeLRO() throws Exception {
// 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 (TpuClient tpuClient = TpuClient.create()) {
CreateNodeRequest request =
CreateNodeRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setNodeId("nodeId-1040171331")
.setNode(Node.newBuilder().build())
.build();
OperationFuture<Node, OperationMetadata> future =
tpuClient.createNodeOperationCallable().futureCall(request);
// Do something.
Node response = future.get();
}
}
}
// [END tpu_v1_generated_tpuclient_createnode_lro_async]
Loading

0 comments on commit 5142eca

Please sign in to comment.