1 /* 2 * Copyright 2022 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 /** 18 * A client to Cloud Dataproc API 19 * 20 * <p>The interfaces provided are listed below, along with usage samples. 21 * 22 * <p>======================= AutoscalingPolicyServiceClient ======================= 23 * 24 * <p>Service Description: The API interface for managing autoscaling policies in the Dataproc API. 25 * 26 * <p>Sample for AutoscalingPolicyServiceClient: 27 * 28 * <pre>{@code 29 * // This snippet has been automatically generated and should be regarded as a code template only. 30 * // It will require modifications to work: 31 * // - It may require correct/in-range values for request initialization. 32 * // - It may require specifying regional endpoints when creating the service client as shown in 33 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library 34 * try (AutoscalingPolicyServiceClient autoscalingPolicyServiceClient = 35 * AutoscalingPolicyServiceClient.create()) { 36 * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); 37 * AutoscalingPolicy policy = AutoscalingPolicy.newBuilder().build(); 38 * AutoscalingPolicy response = 39 * autoscalingPolicyServiceClient.createAutoscalingPolicy(parent, policy); 40 * } 41 * }</pre> 42 * 43 * <p>======================= BatchControllerClient ======================= 44 * 45 * <p>Service Description: The BatchController provides methods to manage batch workloads. 46 * 47 * <p>Sample for BatchControllerClient: 48 * 49 * <pre>{@code 50 * // This snippet has been automatically generated and should be regarded as a code template only. 51 * // It will require modifications to work: 52 * // - It may require correct/in-range values for request initialization. 53 * // - It may require specifying regional endpoints when creating the service client as shown in 54 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library 55 * try (BatchControllerClient batchControllerClient = BatchControllerClient.create()) { 56 * BatchName name = BatchName.of("[PROJECT]", "[LOCATION]", "[BATCH]"); 57 * Batch response = batchControllerClient.getBatch(name); 58 * } 59 * }</pre> 60 * 61 * <p>======================= ClusterControllerClient ======================= 62 * 63 * <p>Service Description: The ClusterControllerService provides methods to manage clusters of 64 * Compute Engine instances. 65 * 66 * <p>Sample for ClusterControllerClient: 67 * 68 * <pre>{@code 69 * // This snippet has been automatically generated and should be regarded as a code template only. 70 * // It will require modifications to work: 71 * // - It may require correct/in-range values for request initialization. 72 * // - It may require specifying regional endpoints when creating the service client as shown in 73 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library 74 * try (ClusterControllerClient clusterControllerClient = ClusterControllerClient.create()) { 75 * String projectId = "projectId-894832108"; 76 * String region = "region-934795532"; 77 * String clusterName = "clusterName-1141738587"; 78 * Cluster response = clusterControllerClient.getCluster(projectId, region, clusterName); 79 * } 80 * }</pre> 81 * 82 * <p>======================= JobControllerClient ======================= 83 * 84 * <p>Service Description: The JobController provides methods to manage jobs. 85 * 86 * <p>Sample for JobControllerClient: 87 * 88 * <pre>{@code 89 * // This snippet has been automatically generated and should be regarded as a code template only. 90 * // It will require modifications to work: 91 * // - It may require correct/in-range values for request initialization. 92 * // - It may require specifying regional endpoints when creating the service client as shown in 93 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library 94 * try (JobControllerClient jobControllerClient = JobControllerClient.create()) { 95 * String projectId = "projectId-894832108"; 96 * String region = "region-934795532"; 97 * Job job = Job.newBuilder().build(); 98 * Job response = jobControllerClient.submitJob(projectId, region, job); 99 * } 100 * }</pre> 101 * 102 * <p>======================= NodeGroupControllerClient ======================= 103 * 104 * <p>Service Description: The `NodeGroupControllerService` provides methods to manage node groups 105 * of Compute Engine managed instances. 106 * 107 * <p>Sample for NodeGroupControllerClient: 108 * 109 * <pre>{@code 110 * // This snippet has been automatically generated and should be regarded as a code template only. 111 * // It will require modifications to work: 112 * // - It may require correct/in-range values for request initialization. 113 * // - It may require specifying regional endpoints when creating the service client as shown in 114 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library 115 * try (NodeGroupControllerClient nodeGroupControllerClient = NodeGroupControllerClient.create()) { 116 * NodeGroupName name = NodeGroupName.of("[PROJECT]", "[REGION]", "[CLUSTER]", "[NODE_GROUP]"); 117 * NodeGroup response = nodeGroupControllerClient.getNodeGroup(name); 118 * } 119 * }</pre> 120 * 121 * <p>======================= WorkflowTemplateServiceClient ======================= 122 * 123 * <p>Service Description: The API interface for managing Workflow Templates in the Dataproc API. 124 * 125 * <p>Sample for WorkflowTemplateServiceClient: 126 * 127 * <pre>{@code 128 * // This snippet has been automatically generated and should be regarded as a code template only. 129 * // It will require modifications to work: 130 * // - It may require correct/in-range values for request initialization. 131 * // - It may require specifying regional endpoints when creating the service client as shown in 132 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library 133 * try (WorkflowTemplateServiceClient workflowTemplateServiceClient = 134 * WorkflowTemplateServiceClient.create()) { 135 * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); 136 * WorkflowTemplate template = WorkflowTemplate.newBuilder().build(); 137 * WorkflowTemplate response = 138 * workflowTemplateServiceClient.createWorkflowTemplate(parent, template); 139 * } 140 * }</pre> 141 */ 142 @Generated("by gapic-generator-java") 143 package com.google.cloud.dataproc.v1; 144 145 import javax.annotation.Generated; 146