Skip to content

Commit

Permalink
feat: update autogenerated snippet disclaimer (#1029)
Browse files Browse the repository at this point in the history
* feat: update autogenerated snippet disclaimer

* update integration tests
  • Loading branch information
alicejli authored Aug 24, 2022
1 parent 0a89829 commit 16f26f6
Show file tree
Hide file tree
Showing 944 changed files with 9,100 additions and 3,638 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,16 @@ public class CommentComposer {
Arrays.asList(
CommentStatement.withComment(
LineComment.withComment(
"This snippet has been automatically generated for illustrative purposes only.")),
"This snippet has been automatically generated and should be regarded as a code template only.")),
CommentStatement.withComment(
LineComment.withComment("It will require modifications to work:")),
CommentStatement.withComment(
LineComment.withComment(
"- It may require correct/in-range values for request initialization.")),
CommentStatement.withComment(
LineComment.withComment(
"- It may require specifying regional endpoints when creating the service client as shown in")),
CommentStatement.withComment(
LineComment.withComment(
"It may require modifications to work in your environment.")));
"https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library")));
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ import javax.annotation.Generated;
* that map to API methods. Sample code to get started:
*
* <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 (BookshopClient bookshopClient = BookshopClient.create()) {
* int booksCount = 1618425911;
* List<Book> books = new ArrayList<>();
Expand Down Expand Up @@ -54,8 +57,11 @@ import javax.annotation.Generated;
* <p>To customize credentials:
*
* <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
* BookshopSettings bookshopSettings =
* BookshopSettings.newBuilder()
* .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
Expand All @@ -66,8 +72,11 @@ import javax.annotation.Generated;
* <p>To customize the endpoint:
*
* <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
* BookshopSettings bookshopSettings =
* BookshopSettings.newBuilder().setEndpoint(myEndpoint).build();
* BookshopClient bookshopClient = BookshopClient.create(bookshopSettings);
Expand Down Expand Up @@ -129,8 +138,11 @@ public class BookshopClient implements BackgroundResource {
* Sample code:
*
* <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 (BookshopClient bookshopClient = BookshopClient.create()) {
* int booksCount = 1618425911;
* List<Book> books = new ArrayList<>();
Expand All @@ -153,8 +165,11 @@ public class BookshopClient implements BackgroundResource {
* Sample code:
*
* <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 (BookshopClient bookshopClient = BookshopClient.create()) {
* String booksList = "booksList2-1119589686";
* List<Book> books = new ArrayList<>();
Expand All @@ -177,8 +192,11 @@ public class BookshopClient implements BackgroundResource {
* Sample code:
*
* <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 (BookshopClient bookshopClient = BookshopClient.create()) {
* GetBookRequest request =
* GetBookRequest.newBuilder()
Expand All @@ -202,8 +220,11 @@ public class BookshopClient implements BackgroundResource {
* Sample code:
*
* <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 (BookshopClient bookshopClient = BookshopClient.create()) {
* GetBookRequest request =
* GetBookRequest.newBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ import javax.annotation.Generated;
* that map to API methods. Sample code to get started:
*
* <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 (DeprecatedServiceClient deprecatedServiceClient = DeprecatedServiceClient.create()) {
* FibonacciRequest request = FibonacciRequest.newBuilder().setValue(111972721).build();
* deprecatedServiceClient.fastFibonacci(request);
Expand Down Expand Up @@ -53,8 +56,11 @@ import javax.annotation.Generated;
* <p>To customize credentials:
*
* <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
* DeprecatedServiceSettings deprecatedServiceSettings =
* DeprecatedServiceSettings.newBuilder()
* .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
Expand All @@ -66,8 +72,11 @@ import javax.annotation.Generated;
* <p>To customize the endpoint:
*
* <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
* DeprecatedServiceSettings deprecatedServiceSettings =
* DeprecatedServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
* DeprecatedServiceClient deprecatedServiceClient =
Expand Down Expand Up @@ -134,8 +143,11 @@ public class DeprecatedServiceClient implements BackgroundResource {
* Sample code:
*
* <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 (DeprecatedServiceClient deprecatedServiceClient = DeprecatedServiceClient.create()) {
* FibonacciRequest request = FibonacciRequest.newBuilder().setValue(111972721).build();
* deprecatedServiceClient.fastFibonacci(request);
Expand All @@ -154,8 +166,11 @@ public class DeprecatedServiceClient implements BackgroundResource {
* Sample code:
*
* <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 (DeprecatedServiceClient deprecatedServiceClient = DeprecatedServiceClient.create()) {
* FibonacciRequest request = FibonacciRequest.newBuilder().setValue(111972721).build();
* ApiFuture<Empty> future = deprecatedServiceClient.fastFibonacciCallable().futureCall(request);
Expand All @@ -173,8 +188,11 @@ public class DeprecatedServiceClient implements BackgroundResource {
* Sample code:
*
* <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 (DeprecatedServiceClient deprecatedServiceClient = DeprecatedServiceClient.create()) {
* FibonacciRequest request = FibonacciRequest.newBuilder().setValue(111972721).build();
* deprecatedServiceClient.slowFibonacci(request);
Expand All @@ -195,8 +213,11 @@ public class DeprecatedServiceClient implements BackgroundResource {
* Sample code:
*
* <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 (DeprecatedServiceClient deprecatedServiceClient = DeprecatedServiceClient.create()) {
* FibonacciRequest request = FibonacciRequest.newBuilder().setValue(111972721).build();
* ApiFuture<Empty> future = deprecatedServiceClient.slowFibonacciCallable().futureCall(request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ import javax.annotation.Generated;
* <p>For example, to set the total timeout of fastFibonacci 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
* DeprecatedServiceSettings.Builder deprecatedServiceSettingsBuilder =
* DeprecatedServiceSettings.newBuilder();
* deprecatedServiceSettingsBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ import org.threeten.bp.Duration;
* <p>For example, to set the total timeout of fastFibonacci 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
* DeprecatedServiceStubSettings.Builder deprecatedServiceSettingsBuilder =
* DeprecatedServiceStubSettings.newBuilder();
* deprecatedServiceSettingsBuilder
Expand Down
Loading

0 comments on commit 16f26f6

Please sign in to comment.