-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: generator setting incorrect name/class for sample due to region …
…tag (2nd attempt) (#3293) Fixes #1272 Tested by following instructions https://github.com/googleapis/sdk-platform-java/blob/main/gapic-generator-java/DEVELOPMENT.md#running-the-plugin-under-googleapis-with-local-gapic-generator-java Ran ``` bazelisk build //google/cloud/tpu/v2:google-cloud-tpu-v2-java ``` Generated samples, included new google-cloud-tpu-v2-java/samples/snippets/generated/com/google/cloud/tpu/v2/tpu/create/SyncCreateUseHttpJsonTransport.java ``` /* * Copyright 2024 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.v2.samples; // [START tpu_v2_generated_Tpu_Create_UseHttpJsonTransport_sync] import com.google.cloud.tpu.v2.TpuClient; import com.google.cloud.tpu.v2.TpuSettings; public class SyncCreateUseHttpJsonTransport { public static void main(String[] args) throws Exception { syncCreateUseHttpJsonTransport(); } public static void syncCreateUseHttpJsonTransport() 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.newHttpJsonBuilder().build(); TpuClient tpuClient = TpuClient.create(tpuSettings); } } // [END tpu_v2_generated_Tpu_Create_UseHttpJsonTransport_sync] ```
- Loading branch information
1 parent
5a0e254
commit 771bd0e
Showing
6 changed files
with
26 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters