Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.

Commit bb35671

Browse files
docs: generate sample code in the Java microgenerator (#437)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/2eb44d9f-9230-443a-a6c3-d1d42a6b9d96/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 356341083 Source-Link: googleapis/googleapis@8d8c008
1 parent 2406563 commit bb35671

11 files changed

+3300
-5
lines changed

google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/AutoscalingPolicyServiceClient.java

Lines changed: 340 additions & 0 deletions
Large diffs are not rendered by default.

google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/ClusterControllerClient.java

Lines changed: 377 additions & 0 deletions
Large diffs are not rendered by default.

google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/JobControllerClient.java

Lines changed: 337 additions & 0 deletions
Large diffs are not rendered by default.

google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/WorkflowTemplateServiceClient.java

Lines changed: 553 additions & 0 deletions
Large diffs are not rendered by default.

google-cloud-dataproc/src/main/java/com/google/cloud/dataproc/v1/package-info.java

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,62 @@
2323
*
2424
* <p>Sample for AutoscalingPolicyServiceClient:
2525
*
26+
* <pre>{@code
27+
* try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient =
28+
* AutoscalingPolicyServiceClient.create()) {
29+
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
30+
* AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build();
31+
* AutoscalingPolicy response =
32+
* autoscalingPolicyServiceClient.createAutoscalingPolicy(parent, policy);
33+
* }
34+
* }</pre>
35+
*
2636
* <p>======================= ClusterControllerClient =======================
2737
*
2838
* <p>Service Description: The ClusterControllerService provides methods to manage clusters of
2939
* Compute Engine instances.
3040
*
3141
* <p>Sample for ClusterControllerClient:
3242
*
43+
* <pre>{@code
44+
* try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) {
45+
* String projectId = "projectId-894832108";
46+
* String region = "region-934795532";
47+
* String clusterName = "clusterName-1141738587";
48+
* Cluster response = clusterControllerClient.getCluster(projectId, region, clusterName);
49+
* }
50+
* }</pre>
51+
*
3352
* <p>======================= JobControllerClient =======================
3453
*
3554
* <p>Service Description: The JobController provides methods to manage jobs.
3655
*
3756
* <p>Sample for JobControllerClient:
3857
*
58+
* <pre>{@code
59+
* try (JobControllerClient jobControllerClient = JobControllerClient.create()) {
60+
* String projectId = "projectId-894832108";
61+
* String region = "region-934795532";
62+
* Job job = Job.newBuilder().build();
63+
* Job response = jobControllerClient.submitJob(projectId, region, job);
64+
* }
65+
* }</pre>
66+
*
3967
* <p>======================= WorkflowTemplateServiceClient =======================
4068
*
4169
* <p>Service Description: The API interface for managing Workflow Templates in the Dataproc API.
4270
*
4371
* <p>Sample for WorkflowTemplateServiceClient:
72+
*
73+
* <pre>{@code
74+
* try (WorkflowTemplateServiceClient workflowTemplateServiceClient =
75+
* WorkflowTemplateServiceClient.create()) {
76+
* LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
77+
* WorkflowTemplate template = WorkflowTemplate.newBuilder().build();
78+
* WorkflowTemplate response =
79+
* workflowTemplateServiceClient.createWorkflowTemplate(parent, template);
80+
* }
81+
* }</pre>
4482
*/
4583
@Generated("by gapic-generator-java")
4684
package com.google.cloud.dataproc.v1;

0 commit comments

Comments
 (0)