diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index de9173d..6259292 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:d4b80feffe1579818cdc39466152e9de95789a193408506cd4a1ffbe8804dc00 -# created: 2022-07-13T13:53:17.676447481Z + digest: sha256:8175681a918181d306d9c370d3262f16b4c724cc73d74111b7d42fc985ca7f93 diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 30fdb7b..db2d8ad 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -8,3 +8,6 @@ # The java-samples-reviewers team is the default owner for samples changes samples/**/*.java @googleapis/java-samples-reviewers + +# Generated snippets should not be owned by samples reviewers +samples/snippets/generated/ @googleapis/yoshi-java diff --git a/CHANGELOG.md b/CHANGELOG.md index 12bbd2d..5d2ccdd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.3.3](https://github.com/googleapis/java-profiler/compare/v2.3.2...v2.3.3) (2022-09-15) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.3 ([#303](https://github.com/googleapis/java-profiler/issues/303)) ([b22061a](https://github.com/googleapis/java-profiler/commit/b22061ae9f7dd80ecce6c7ea8b03ba3a6151e02f)) + ## [2.3.2](https://github.com/googleapis/java-profiler/compare/v2.3.1...v2.3.2) (2022-09-09) diff --git a/README.md b/README.md index 4cbbbb5..5811411 100644 --- a/README.md +++ b/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-profiler - 2.3.1 + 2.3.2 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-profiler:2.3.1' +implementation 'com.google.cloud:google-cloud-profiler:2.3.2' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-profiler" % "2.3.1" +libraryDependencies += "com.google.cloud" % "google-cloud-profiler" % "2.3.2" ``` ## Authentication diff --git a/google-cloud-profiler-bom/pom.xml b/google-cloud-profiler-bom/pom.xml index 10fef13..d96adb4 100644 --- a/google-cloud-profiler-bom/pom.xml +++ b/google-cloud-profiler-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-profiler-bom - 2.3.2 + 2.3.3 pom com.google.cloud @@ -56,17 +56,17 @@ com.google.cloud google-cloud-profiler - 2.3.2 + 2.3.3 com.google.api.grpc grpc-google-cloud-profiler-v2 - 2.3.2 + 2.3.3 com.google.api.grpc proto-google-cloud-profiler-v2 - 2.3.2 + 2.3.3 diff --git a/google-cloud-profiler/pom.xml b/google-cloud-profiler/pom.xml index dd80d25..4d9e2b4 100644 --- a/google-cloud-profiler/pom.xml +++ b/google-cloud-profiler/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-profiler - 2.3.2 + 2.3.3 jar Google Cloud Profiler https://github.com/googleapis/java-profiler @@ -11,7 +11,7 @@ com.google.cloud google-cloud-profiler-parent - 2.3.2 + 2.3.3 google-cloud-profiler diff --git a/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/ProfilerServiceClient.java b/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/ProfilerServiceClient.java index fb07f73..659a206 100644 --- a/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/ProfilerServiceClient.java +++ b/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/ProfilerServiceClient.java @@ -40,8 +40,11 @@ * calls that map to API methods. Sample code to get started: * *
{@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 (ProfilerServiceClient profilerServiceClient = ProfilerServiceClient.create()) {
  *   CreateProfileRequest request =
  *       CreateProfileRequest.newBuilder()
@@ -83,8 +86,11 @@
  * 

To customize credentials: * *

{@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
  * ProfilerServiceSettings profilerServiceSettings =
  *     ProfilerServiceSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -96,8 +102,11 @@
  * 

To customize the endpoint: * *

{@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
  * ProfilerServiceSettings profilerServiceSettings =
  *     ProfilerServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
  * ProfilerServiceClient profilerServiceClient =
@@ -108,8 +117,11 @@
  * the wire:
  *
  * 
{@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
  * ProfilerServiceSettings profilerServiceSettings =
  *     ProfilerServiceSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -187,8 +199,11 @@ public ProfilerServiceStub getStub() {
    * 

Sample code: * *

{@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 (ProfilerServiceClient profilerServiceClient = ProfilerServiceClient.create()) {
    *   CreateProfileRequest request =
    *       CreateProfileRequest.newBuilder()
@@ -223,8 +238,11 @@ public final Profile createProfile(CreateProfileRequest request) {
    * 

Sample code: * *

{@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 (ProfilerServiceClient profilerServiceClient = ProfilerServiceClient.create()) {
    *   CreateProfileRequest request =
    *       CreateProfileRequest.newBuilder()
@@ -250,8 +268,11 @@ public final UnaryCallable createProfileCallable(
    * 

Sample code: * *

{@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 (ProfilerServiceClient profilerServiceClient = ProfilerServiceClient.create()) {
    *   CreateOfflineProfileRequest request =
    *       CreateOfflineProfileRequest.newBuilder()
@@ -277,8 +298,11 @@ public final Profile createOfflineProfile(CreateOfflineProfileRequest request) {
    * 

Sample code: * *

{@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 (ProfilerServiceClient profilerServiceClient = ProfilerServiceClient.create()) {
    *   CreateOfflineProfileRequest request =
    *       CreateOfflineProfileRequest.newBuilder()
@@ -305,8 +329,11 @@ public final UnaryCallable createOfflinePr
    * 

Sample code: * *

{@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 (ProfilerServiceClient profilerServiceClient = ProfilerServiceClient.create()) {
    *   UpdateProfileRequest request =
    *       UpdateProfileRequest.newBuilder()
@@ -333,8 +360,11 @@ public final Profile updateProfile(UpdateProfileRequest request) {
    * 

Sample code: * *

{@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 (ProfilerServiceClient profilerServiceClient = ProfilerServiceClient.create()) {
    *   UpdateProfileRequest request =
    *       UpdateProfileRequest.newBuilder()
diff --git a/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/ProfilerServiceSettings.java b/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/ProfilerServiceSettings.java
index 33f1b1e..8e67981 100644
--- a/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/ProfilerServiceSettings.java
+++ b/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/ProfilerServiceSettings.java
@@ -50,17 +50,17 @@
  * 

For example, to set the total timeout of createProfile to 30 seconds: * *

{@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
  * ProfilerServiceSettings.Builder profilerServiceSettingsBuilder =
  *     ProfilerServiceSettings.newBuilder();
  * profilerServiceSettingsBuilder
  *     .createProfileSettings()
  *     .setRetrySettings(
- *         profilerServiceSettingsBuilder
- *             .createProfileSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         profilerServiceSettingsBuilder.createProfileSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ProfilerServiceSettings profilerServiceSettings = profilerServiceSettingsBuilder.build();
diff --git a/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/package-info.java b/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/package-info.java
index e3dea24..7b505ca 100644
--- a/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/package-info.java
+++ b/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/package-info.java
@@ -32,8 +32,11 @@
  * 

Sample for ProfilerServiceClient: * *

{@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 (ProfilerServiceClient profilerServiceClient = ProfilerServiceClient.create()) {
  *   CreateProfileRequest request =
  *       CreateProfileRequest.newBuilder()
diff --git a/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/stub/HttpJsonProfilerServiceStub.java b/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/stub/HttpJsonProfilerServiceStub.java
index 2ba41df..779f439 100644
--- a/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/stub/HttpJsonProfilerServiceStub.java
+++ b/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/stub/HttpJsonProfilerServiceStub.java
@@ -79,7 +79,7 @@ public class HttpJsonProfilerServiceStub extends ProfilerServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearParent().build()))
+                                  .toBody("*", request.toBuilder().clearParent().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -115,7 +115,8 @@ public class HttpJsonProfilerServiceStub extends ProfilerServiceStub {
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("profile", request.getProfile()))
+                              ProtoRestSerializer.create()
+                                  .toBody("profile", request.getProfile(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -152,7 +153,8 @@ public class HttpJsonProfilerServiceStub extends ProfilerServiceStub {
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("profile", request.getProfile()))
+                              ProtoRestSerializer.create()
+                                  .toBody("profile", request.getProfile(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
diff --git a/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/stub/ProfilerServiceStubSettings.java b/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/stub/ProfilerServiceStubSettings.java
index f2ed96c..b8da891 100644
--- a/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/stub/ProfilerServiceStubSettings.java
+++ b/google-cloud-profiler/src/main/java/com/google/devtools/cloudprofiler/v2/stub/ProfilerServiceStubSettings.java
@@ -65,17 +65,17 @@
  * 

For example, to set the total timeout of createProfile to 30 seconds: * *

{@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
  * ProfilerServiceStubSettings.Builder profilerServiceSettingsBuilder =
  *     ProfilerServiceStubSettings.newBuilder();
  * profilerServiceSettingsBuilder
  *     .createProfileSettings()
  *     .setRetrySettings(
- *         profilerServiceSettingsBuilder
- *             .createProfileSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         profilerServiceSettingsBuilder.createProfileSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ProfilerServiceStubSettings profilerServiceSettings = profilerServiceSettingsBuilder.build();
diff --git a/grpc-google-cloud-profiler-v2/pom.xml b/grpc-google-cloud-profiler-v2/pom.xml
index 45aa83f..bcdafdc 100644
--- a/grpc-google-cloud-profiler-v2/pom.xml
+++ b/grpc-google-cloud-profiler-v2/pom.xml
@@ -4,13 +4,13 @@
   4.0.0
   com.google.api.grpc
   grpc-google-cloud-profiler-v2
-  2.3.2
+  2.3.3
   grpc-google-cloud-profiler-v2
   GRPC library for google-cloud-profiler
   
     com.google.cloud
     google-cloud-profiler-parent
-    2.3.2
+    2.3.3
   
   
     
diff --git a/pom.xml b/pom.xml
index e21eb7a..5ac5a4c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
   com.google.cloud
   google-cloud-profiler-parent
   pom
-  2.3.2
+  2.3.3
   Google Cloud Profiler Parent
   https://github.com/googleapis/java-profiler
   
@@ -61,23 +61,23 @@
       
         com.google.cloud
         google-cloud-profiler
-        2.3.2
+        2.3.3
       
       
         com.google.api.grpc
         proto-google-cloud-profiler-v2
-        2.3.2
+        2.3.3
       
       
         com.google.api.grpc
         grpc-google-cloud-profiler-v2
-        2.3.2
+        2.3.3
       
 
       
         com.google.cloud
         google-cloud-shared-dependencies
-        3.0.2
+        3.0.3
         pom
         import
       
diff --git a/proto-google-cloud-profiler-v2/pom.xml b/proto-google-cloud-profiler-v2/pom.xml
index 453da21..a566f56 100644
--- a/proto-google-cloud-profiler-v2/pom.xml
+++ b/proto-google-cloud-profiler-v2/pom.xml
@@ -4,13 +4,13 @@
   4.0.0
   com.google.api.grpc
   proto-google-cloud-profiler-v2
-  2.3.2
+  2.3.3
   proto-google-cloud-profiler-v2
   Proto library for google-cloud-profiler
   
     com.google.cloud
     google-cloud-profiler-parent
-    2.3.2
+    2.3.3
   
   
     
diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml
index c73ec2f..134f03a 100644
--- a/samples/install-without-bom/pom.xml
+++ b/samples/install-without-bom/pom.xml
@@ -29,7 +29,7 @@
     
       com.google.cloud
       google-cloud-profiler
-      2.3.1
+      2.3.2
     
     
 
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml
index 753d8fb..bf0d234 100644
--- a/samples/snapshot/pom.xml
+++ b/samples/snapshot/pom.xml
@@ -28,7 +28,7 @@
     
       com.google.cloud
       google-cloud-profiler
-      2.3.1
+      2.3.2
     
   
 
diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml
index 1bf58ce..a89a26c 100644
--- a/samples/snippets/pom.xml
+++ b/samples/snippets/pom.xml
@@ -28,7 +28,7 @@
     
       com.google.cloud
       google-cloud-profiler
-      2.3.1
+      2.3.2
     
 
     
diff --git a/versions.txt b/versions.txt
index 9cfeb04..188d111 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,6 +1,6 @@
 # Format:
 # module:released-version:current-version
 
-google-cloud-profiler:2.3.2:2.3.2
-grpc-google-cloud-profiler-v2:2.3.2:2.3.2
-proto-google-cloud-profiler-v2:2.3.2:2.3.2
+google-cloud-profiler:2.3.3:2.3.3
+grpc-google-cloud-profiler-v2:2.3.3:2.3.3
+proto-google-cloud-profiler-v2:2.3.3:2.3.3