1 /* 2 * Copyright 2020 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 package com.google.cloud.dataproc.v1; 17 18 import static io.grpc.MethodDescriptor.generateFullMethodName; 19 20 /** 21 * 22 * 23 * <pre> 24 * The ClusterControllerService provides methods to manage clusters 25 * of Compute Engine instances. 26 * </pre> 27 */ 28 @javax.annotation.Generated( 29 value = "by gRPC proto compiler", 30 comments = "Source: google/cloud/dataproc/v1/clusters.proto") 31 @io.grpc.stub.annotations.GrpcGenerated 32 public final class ClusterControllerGrpc { 33 ClusterControllerGrpc()34 private ClusterControllerGrpc() {} 35 36 public static final String SERVICE_NAME = "google.cloud.dataproc.v1.ClusterController"; 37 38 // Static method descriptors that strictly reflect the proto. 39 private static volatile io.grpc.MethodDescriptor< 40 com.google.cloud.dataproc.v1.CreateClusterRequest, com.google.longrunning.Operation> 41 getCreateClusterMethod; 42 43 @io.grpc.stub.annotations.RpcMethod( 44 fullMethodName = SERVICE_NAME + '/' + "CreateCluster", 45 requestType = com.google.cloud.dataproc.v1.CreateClusterRequest.class, 46 responseType = com.google.longrunning.Operation.class, 47 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 48 public static io.grpc.MethodDescriptor< 49 com.google.cloud.dataproc.v1.CreateClusterRequest, com.google.longrunning.Operation> getCreateClusterMethod()50 getCreateClusterMethod() { 51 io.grpc.MethodDescriptor< 52 com.google.cloud.dataproc.v1.CreateClusterRequest, com.google.longrunning.Operation> 53 getCreateClusterMethod; 54 if ((getCreateClusterMethod = ClusterControllerGrpc.getCreateClusterMethod) == null) { 55 synchronized (ClusterControllerGrpc.class) { 56 if ((getCreateClusterMethod = ClusterControllerGrpc.getCreateClusterMethod) == null) { 57 ClusterControllerGrpc.getCreateClusterMethod = 58 getCreateClusterMethod = 59 io.grpc.MethodDescriptor 60 .<com.google.cloud.dataproc.v1.CreateClusterRequest, 61 com.google.longrunning.Operation> 62 newBuilder() 63 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 64 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateCluster")) 65 .setSampledToLocalTracing(true) 66 .setRequestMarshaller( 67 io.grpc.protobuf.ProtoUtils.marshaller( 68 com.google.cloud.dataproc.v1.CreateClusterRequest 69 .getDefaultInstance())) 70 .setResponseMarshaller( 71 io.grpc.protobuf.ProtoUtils.marshaller( 72 com.google.longrunning.Operation.getDefaultInstance())) 73 .setSchemaDescriptor( 74 new ClusterControllerMethodDescriptorSupplier("CreateCluster")) 75 .build(); 76 } 77 } 78 } 79 return getCreateClusterMethod; 80 } 81 82 private static volatile io.grpc.MethodDescriptor< 83 com.google.cloud.dataproc.v1.UpdateClusterRequest, com.google.longrunning.Operation> 84 getUpdateClusterMethod; 85 86 @io.grpc.stub.annotations.RpcMethod( 87 fullMethodName = SERVICE_NAME + '/' + "UpdateCluster", 88 requestType = com.google.cloud.dataproc.v1.UpdateClusterRequest.class, 89 responseType = com.google.longrunning.Operation.class, 90 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 91 public static io.grpc.MethodDescriptor< 92 com.google.cloud.dataproc.v1.UpdateClusterRequest, com.google.longrunning.Operation> getUpdateClusterMethod()93 getUpdateClusterMethod() { 94 io.grpc.MethodDescriptor< 95 com.google.cloud.dataproc.v1.UpdateClusterRequest, com.google.longrunning.Operation> 96 getUpdateClusterMethod; 97 if ((getUpdateClusterMethod = ClusterControllerGrpc.getUpdateClusterMethod) == null) { 98 synchronized (ClusterControllerGrpc.class) { 99 if ((getUpdateClusterMethod = ClusterControllerGrpc.getUpdateClusterMethod) == null) { 100 ClusterControllerGrpc.getUpdateClusterMethod = 101 getUpdateClusterMethod = 102 io.grpc.MethodDescriptor 103 .<com.google.cloud.dataproc.v1.UpdateClusterRequest, 104 com.google.longrunning.Operation> 105 newBuilder() 106 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 107 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateCluster")) 108 .setSampledToLocalTracing(true) 109 .setRequestMarshaller( 110 io.grpc.protobuf.ProtoUtils.marshaller( 111 com.google.cloud.dataproc.v1.UpdateClusterRequest 112 .getDefaultInstance())) 113 .setResponseMarshaller( 114 io.grpc.protobuf.ProtoUtils.marshaller( 115 com.google.longrunning.Operation.getDefaultInstance())) 116 .setSchemaDescriptor( 117 new ClusterControllerMethodDescriptorSupplier("UpdateCluster")) 118 .build(); 119 } 120 } 121 } 122 return getUpdateClusterMethod; 123 } 124 125 private static volatile io.grpc.MethodDescriptor< 126 com.google.cloud.dataproc.v1.StopClusterRequest, com.google.longrunning.Operation> 127 getStopClusterMethod; 128 129 @io.grpc.stub.annotations.RpcMethod( 130 fullMethodName = SERVICE_NAME + '/' + "StopCluster", 131 requestType = com.google.cloud.dataproc.v1.StopClusterRequest.class, 132 responseType = com.google.longrunning.Operation.class, 133 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 134 public static io.grpc.MethodDescriptor< 135 com.google.cloud.dataproc.v1.StopClusterRequest, com.google.longrunning.Operation> getStopClusterMethod()136 getStopClusterMethod() { 137 io.grpc.MethodDescriptor< 138 com.google.cloud.dataproc.v1.StopClusterRequest, com.google.longrunning.Operation> 139 getStopClusterMethod; 140 if ((getStopClusterMethod = ClusterControllerGrpc.getStopClusterMethod) == null) { 141 synchronized (ClusterControllerGrpc.class) { 142 if ((getStopClusterMethod = ClusterControllerGrpc.getStopClusterMethod) == null) { 143 ClusterControllerGrpc.getStopClusterMethod = 144 getStopClusterMethod = 145 io.grpc.MethodDescriptor 146 .<com.google.cloud.dataproc.v1.StopClusterRequest, 147 com.google.longrunning.Operation> 148 newBuilder() 149 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 150 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StopCluster")) 151 .setSampledToLocalTracing(true) 152 .setRequestMarshaller( 153 io.grpc.protobuf.ProtoUtils.marshaller( 154 com.google.cloud.dataproc.v1.StopClusterRequest.getDefaultInstance())) 155 .setResponseMarshaller( 156 io.grpc.protobuf.ProtoUtils.marshaller( 157 com.google.longrunning.Operation.getDefaultInstance())) 158 .setSchemaDescriptor( 159 new ClusterControllerMethodDescriptorSupplier("StopCluster")) 160 .build(); 161 } 162 } 163 } 164 return getStopClusterMethod; 165 } 166 167 private static volatile io.grpc.MethodDescriptor< 168 com.google.cloud.dataproc.v1.StartClusterRequest, com.google.longrunning.Operation> 169 getStartClusterMethod; 170 171 @io.grpc.stub.annotations.RpcMethod( 172 fullMethodName = SERVICE_NAME + '/' + "StartCluster", 173 requestType = com.google.cloud.dataproc.v1.StartClusterRequest.class, 174 responseType = com.google.longrunning.Operation.class, 175 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 176 public static io.grpc.MethodDescriptor< 177 com.google.cloud.dataproc.v1.StartClusterRequest, com.google.longrunning.Operation> getStartClusterMethod()178 getStartClusterMethod() { 179 io.grpc.MethodDescriptor< 180 com.google.cloud.dataproc.v1.StartClusterRequest, com.google.longrunning.Operation> 181 getStartClusterMethod; 182 if ((getStartClusterMethod = ClusterControllerGrpc.getStartClusterMethod) == null) { 183 synchronized (ClusterControllerGrpc.class) { 184 if ((getStartClusterMethod = ClusterControllerGrpc.getStartClusterMethod) == null) { 185 ClusterControllerGrpc.getStartClusterMethod = 186 getStartClusterMethod = 187 io.grpc.MethodDescriptor 188 .<com.google.cloud.dataproc.v1.StartClusterRequest, 189 com.google.longrunning.Operation> 190 newBuilder() 191 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 192 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StartCluster")) 193 .setSampledToLocalTracing(true) 194 .setRequestMarshaller( 195 io.grpc.protobuf.ProtoUtils.marshaller( 196 com.google.cloud.dataproc.v1.StartClusterRequest 197 .getDefaultInstance())) 198 .setResponseMarshaller( 199 io.grpc.protobuf.ProtoUtils.marshaller( 200 com.google.longrunning.Operation.getDefaultInstance())) 201 .setSchemaDescriptor( 202 new ClusterControllerMethodDescriptorSupplier("StartCluster")) 203 .build(); 204 } 205 } 206 } 207 return getStartClusterMethod; 208 } 209 210 private static volatile io.grpc.MethodDescriptor< 211 com.google.cloud.dataproc.v1.DeleteClusterRequest, com.google.longrunning.Operation> 212 getDeleteClusterMethod; 213 214 @io.grpc.stub.annotations.RpcMethod( 215 fullMethodName = SERVICE_NAME + '/' + "DeleteCluster", 216 requestType = com.google.cloud.dataproc.v1.DeleteClusterRequest.class, 217 responseType = com.google.longrunning.Operation.class, 218 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 219 public static io.grpc.MethodDescriptor< 220 com.google.cloud.dataproc.v1.DeleteClusterRequest, com.google.longrunning.Operation> getDeleteClusterMethod()221 getDeleteClusterMethod() { 222 io.grpc.MethodDescriptor< 223 com.google.cloud.dataproc.v1.DeleteClusterRequest, com.google.longrunning.Operation> 224 getDeleteClusterMethod; 225 if ((getDeleteClusterMethod = ClusterControllerGrpc.getDeleteClusterMethod) == null) { 226 synchronized (ClusterControllerGrpc.class) { 227 if ((getDeleteClusterMethod = ClusterControllerGrpc.getDeleteClusterMethod) == null) { 228 ClusterControllerGrpc.getDeleteClusterMethod = 229 getDeleteClusterMethod = 230 io.grpc.MethodDescriptor 231 .<com.google.cloud.dataproc.v1.DeleteClusterRequest, 232 com.google.longrunning.Operation> 233 newBuilder() 234 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 235 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteCluster")) 236 .setSampledToLocalTracing(true) 237 .setRequestMarshaller( 238 io.grpc.protobuf.ProtoUtils.marshaller( 239 com.google.cloud.dataproc.v1.DeleteClusterRequest 240 .getDefaultInstance())) 241 .setResponseMarshaller( 242 io.grpc.protobuf.ProtoUtils.marshaller( 243 com.google.longrunning.Operation.getDefaultInstance())) 244 .setSchemaDescriptor( 245 new ClusterControllerMethodDescriptorSupplier("DeleteCluster")) 246 .build(); 247 } 248 } 249 } 250 return getDeleteClusterMethod; 251 } 252 253 private static volatile io.grpc.MethodDescriptor< 254 com.google.cloud.dataproc.v1.GetClusterRequest, com.google.cloud.dataproc.v1.Cluster> 255 getGetClusterMethod; 256 257 @io.grpc.stub.annotations.RpcMethod( 258 fullMethodName = SERVICE_NAME + '/' + "GetCluster", 259 requestType = com.google.cloud.dataproc.v1.GetClusterRequest.class, 260 responseType = com.google.cloud.dataproc.v1.Cluster.class, 261 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 262 public static io.grpc.MethodDescriptor< 263 com.google.cloud.dataproc.v1.GetClusterRequest, com.google.cloud.dataproc.v1.Cluster> getGetClusterMethod()264 getGetClusterMethod() { 265 io.grpc.MethodDescriptor< 266 com.google.cloud.dataproc.v1.GetClusterRequest, com.google.cloud.dataproc.v1.Cluster> 267 getGetClusterMethod; 268 if ((getGetClusterMethod = ClusterControllerGrpc.getGetClusterMethod) == null) { 269 synchronized (ClusterControllerGrpc.class) { 270 if ((getGetClusterMethod = ClusterControllerGrpc.getGetClusterMethod) == null) { 271 ClusterControllerGrpc.getGetClusterMethod = 272 getGetClusterMethod = 273 io.grpc.MethodDescriptor 274 .<com.google.cloud.dataproc.v1.GetClusterRequest, 275 com.google.cloud.dataproc.v1.Cluster> 276 newBuilder() 277 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 278 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetCluster")) 279 .setSampledToLocalTracing(true) 280 .setRequestMarshaller( 281 io.grpc.protobuf.ProtoUtils.marshaller( 282 com.google.cloud.dataproc.v1.GetClusterRequest.getDefaultInstance())) 283 .setResponseMarshaller( 284 io.grpc.protobuf.ProtoUtils.marshaller( 285 com.google.cloud.dataproc.v1.Cluster.getDefaultInstance())) 286 .setSchemaDescriptor( 287 new ClusterControllerMethodDescriptorSupplier("GetCluster")) 288 .build(); 289 } 290 } 291 } 292 return getGetClusterMethod; 293 } 294 295 private static volatile io.grpc.MethodDescriptor< 296 com.google.cloud.dataproc.v1.ListClustersRequest, 297 com.google.cloud.dataproc.v1.ListClustersResponse> 298 getListClustersMethod; 299 300 @io.grpc.stub.annotations.RpcMethod( 301 fullMethodName = SERVICE_NAME + '/' + "ListClusters", 302 requestType = com.google.cloud.dataproc.v1.ListClustersRequest.class, 303 responseType = com.google.cloud.dataproc.v1.ListClustersResponse.class, 304 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 305 public static io.grpc.MethodDescriptor< 306 com.google.cloud.dataproc.v1.ListClustersRequest, 307 com.google.cloud.dataproc.v1.ListClustersResponse> getListClustersMethod()308 getListClustersMethod() { 309 io.grpc.MethodDescriptor< 310 com.google.cloud.dataproc.v1.ListClustersRequest, 311 com.google.cloud.dataproc.v1.ListClustersResponse> 312 getListClustersMethod; 313 if ((getListClustersMethod = ClusterControllerGrpc.getListClustersMethod) == null) { 314 synchronized (ClusterControllerGrpc.class) { 315 if ((getListClustersMethod = ClusterControllerGrpc.getListClustersMethod) == null) { 316 ClusterControllerGrpc.getListClustersMethod = 317 getListClustersMethod = 318 io.grpc.MethodDescriptor 319 .<com.google.cloud.dataproc.v1.ListClustersRequest, 320 com.google.cloud.dataproc.v1.ListClustersResponse> 321 newBuilder() 322 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 323 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListClusters")) 324 .setSampledToLocalTracing(true) 325 .setRequestMarshaller( 326 io.grpc.protobuf.ProtoUtils.marshaller( 327 com.google.cloud.dataproc.v1.ListClustersRequest 328 .getDefaultInstance())) 329 .setResponseMarshaller( 330 io.grpc.protobuf.ProtoUtils.marshaller( 331 com.google.cloud.dataproc.v1.ListClustersResponse 332 .getDefaultInstance())) 333 .setSchemaDescriptor( 334 new ClusterControllerMethodDescriptorSupplier("ListClusters")) 335 .build(); 336 } 337 } 338 } 339 return getListClustersMethod; 340 } 341 342 private static volatile io.grpc.MethodDescriptor< 343 com.google.cloud.dataproc.v1.DiagnoseClusterRequest, com.google.longrunning.Operation> 344 getDiagnoseClusterMethod; 345 346 @io.grpc.stub.annotations.RpcMethod( 347 fullMethodName = SERVICE_NAME + '/' + "DiagnoseCluster", 348 requestType = com.google.cloud.dataproc.v1.DiagnoseClusterRequest.class, 349 responseType = com.google.longrunning.Operation.class, 350 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 351 public static io.grpc.MethodDescriptor< 352 com.google.cloud.dataproc.v1.DiagnoseClusterRequest, com.google.longrunning.Operation> getDiagnoseClusterMethod()353 getDiagnoseClusterMethod() { 354 io.grpc.MethodDescriptor< 355 com.google.cloud.dataproc.v1.DiagnoseClusterRequest, com.google.longrunning.Operation> 356 getDiagnoseClusterMethod; 357 if ((getDiagnoseClusterMethod = ClusterControllerGrpc.getDiagnoseClusterMethod) == null) { 358 synchronized (ClusterControllerGrpc.class) { 359 if ((getDiagnoseClusterMethod = ClusterControllerGrpc.getDiagnoseClusterMethod) == null) { 360 ClusterControllerGrpc.getDiagnoseClusterMethod = 361 getDiagnoseClusterMethod = 362 io.grpc.MethodDescriptor 363 .<com.google.cloud.dataproc.v1.DiagnoseClusterRequest, 364 com.google.longrunning.Operation> 365 newBuilder() 366 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 367 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DiagnoseCluster")) 368 .setSampledToLocalTracing(true) 369 .setRequestMarshaller( 370 io.grpc.protobuf.ProtoUtils.marshaller( 371 com.google.cloud.dataproc.v1.DiagnoseClusterRequest 372 .getDefaultInstance())) 373 .setResponseMarshaller( 374 io.grpc.protobuf.ProtoUtils.marshaller( 375 com.google.longrunning.Operation.getDefaultInstance())) 376 .setSchemaDescriptor( 377 new ClusterControllerMethodDescriptorSupplier("DiagnoseCluster")) 378 .build(); 379 } 380 } 381 } 382 return getDiagnoseClusterMethod; 383 } 384 385 /** Creates a new async stub that supports all call types for the service */ newStub(io.grpc.Channel channel)386 public static ClusterControllerStub newStub(io.grpc.Channel channel) { 387 io.grpc.stub.AbstractStub.StubFactory<ClusterControllerStub> factory = 388 new io.grpc.stub.AbstractStub.StubFactory<ClusterControllerStub>() { 389 @java.lang.Override 390 public ClusterControllerStub newStub( 391 io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 392 return new ClusterControllerStub(channel, callOptions); 393 } 394 }; 395 return ClusterControllerStub.newStub(factory, channel); 396 } 397 398 /** 399 * Creates a new blocking-style stub that supports unary and streaming output calls on the service 400 */ newBlockingStub(io.grpc.Channel channel)401 public static ClusterControllerBlockingStub newBlockingStub(io.grpc.Channel channel) { 402 io.grpc.stub.AbstractStub.StubFactory<ClusterControllerBlockingStub> factory = 403 new io.grpc.stub.AbstractStub.StubFactory<ClusterControllerBlockingStub>() { 404 @java.lang.Override 405 public ClusterControllerBlockingStub newStub( 406 io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 407 return new ClusterControllerBlockingStub(channel, callOptions); 408 } 409 }; 410 return ClusterControllerBlockingStub.newStub(factory, channel); 411 } 412 413 /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ newFutureStub(io.grpc.Channel channel)414 public static ClusterControllerFutureStub newFutureStub(io.grpc.Channel channel) { 415 io.grpc.stub.AbstractStub.StubFactory<ClusterControllerFutureStub> factory = 416 new io.grpc.stub.AbstractStub.StubFactory<ClusterControllerFutureStub>() { 417 @java.lang.Override 418 public ClusterControllerFutureStub newStub( 419 io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 420 return new ClusterControllerFutureStub(channel, callOptions); 421 } 422 }; 423 return ClusterControllerFutureStub.newStub(factory, channel); 424 } 425 426 /** 427 * 428 * 429 * <pre> 430 * The ClusterControllerService provides methods to manage clusters 431 * of Compute Engine instances. 432 * </pre> 433 */ 434 public interface AsyncService { 435 436 /** 437 * 438 * 439 * <pre> 440 * Creates a cluster in a project. The returned 441 * [Operation.metadata][google.longrunning.Operation.metadata] will be 442 * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). 443 * </pre> 444 */ createCluster( com.google.cloud.dataproc.v1.CreateClusterRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)445 default void createCluster( 446 com.google.cloud.dataproc.v1.CreateClusterRequest request, 447 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 448 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 449 getCreateClusterMethod(), responseObserver); 450 } 451 452 /** 453 * 454 * 455 * <pre> 456 * Updates a cluster in a project. The returned 457 * [Operation.metadata][google.longrunning.Operation.metadata] will be 458 * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). 459 * The cluster must be in a 460 * [`RUNNING`][google.cloud.dataproc.v1.ClusterStatus.State] state or an error 461 * is returned. 462 * </pre> 463 */ updateCluster( com.google.cloud.dataproc.v1.UpdateClusterRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)464 default void updateCluster( 465 com.google.cloud.dataproc.v1.UpdateClusterRequest request, 466 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 467 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 468 getUpdateClusterMethod(), responseObserver); 469 } 470 471 /** 472 * 473 * 474 * <pre> 475 * Stops a cluster in a project. 476 * </pre> 477 */ stopCluster( com.google.cloud.dataproc.v1.StopClusterRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)478 default void stopCluster( 479 com.google.cloud.dataproc.v1.StopClusterRequest request, 480 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 481 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 482 getStopClusterMethod(), responseObserver); 483 } 484 485 /** 486 * 487 * 488 * <pre> 489 * Starts a cluster in a project. 490 * </pre> 491 */ startCluster( com.google.cloud.dataproc.v1.StartClusterRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)492 default void startCluster( 493 com.google.cloud.dataproc.v1.StartClusterRequest request, 494 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 495 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 496 getStartClusterMethod(), responseObserver); 497 } 498 499 /** 500 * 501 * 502 * <pre> 503 * Deletes a cluster in a project. The returned 504 * [Operation.metadata][google.longrunning.Operation.metadata] will be 505 * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). 506 * </pre> 507 */ deleteCluster( com.google.cloud.dataproc.v1.DeleteClusterRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)508 default void deleteCluster( 509 com.google.cloud.dataproc.v1.DeleteClusterRequest request, 510 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 511 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 512 getDeleteClusterMethod(), responseObserver); 513 } 514 515 /** 516 * 517 * 518 * <pre> 519 * Gets the resource representation for a cluster in a project. 520 * </pre> 521 */ getCluster( com.google.cloud.dataproc.v1.GetClusterRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dataproc.v1.Cluster> responseObserver)522 default void getCluster( 523 com.google.cloud.dataproc.v1.GetClusterRequest request, 524 io.grpc.stub.StreamObserver<com.google.cloud.dataproc.v1.Cluster> responseObserver) { 525 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetClusterMethod(), responseObserver); 526 } 527 528 /** 529 * 530 * 531 * <pre> 532 * Lists all regions/{region}/clusters in a project alphabetically. 533 * </pre> 534 */ listClusters( com.google.cloud.dataproc.v1.ListClustersRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dataproc.v1.ListClustersResponse> responseObserver)535 default void listClusters( 536 com.google.cloud.dataproc.v1.ListClustersRequest request, 537 io.grpc.stub.StreamObserver<com.google.cloud.dataproc.v1.ListClustersResponse> 538 responseObserver) { 539 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 540 getListClustersMethod(), responseObserver); 541 } 542 543 /** 544 * 545 * 546 * <pre> 547 * Gets cluster diagnostic information. The returned 548 * [Operation.metadata][google.longrunning.Operation.metadata] will be 549 * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). 550 * After the operation completes, 551 * [Operation.response][google.longrunning.Operation.response] 552 * contains 553 * [DiagnoseClusterResults](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults). 554 * </pre> 555 */ diagnoseCluster( com.google.cloud.dataproc.v1.DiagnoseClusterRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)556 default void diagnoseCluster( 557 com.google.cloud.dataproc.v1.DiagnoseClusterRequest request, 558 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 559 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 560 getDiagnoseClusterMethod(), responseObserver); 561 } 562 } 563 564 /** 565 * Base class for the server implementation of the service ClusterController. 566 * 567 * <pre> 568 * The ClusterControllerService provides methods to manage clusters 569 * of Compute Engine instances. 570 * </pre> 571 */ 572 public abstract static class ClusterControllerImplBase 573 implements io.grpc.BindableService, AsyncService { 574 575 @java.lang.Override bindService()576 public final io.grpc.ServerServiceDefinition bindService() { 577 return ClusterControllerGrpc.bindService(this); 578 } 579 } 580 581 /** 582 * A stub to allow clients to do asynchronous rpc calls to service ClusterController. 583 * 584 * <pre> 585 * The ClusterControllerService provides methods to manage clusters 586 * of Compute Engine instances. 587 * </pre> 588 */ 589 public static final class ClusterControllerStub 590 extends io.grpc.stub.AbstractAsyncStub<ClusterControllerStub> { ClusterControllerStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)591 private ClusterControllerStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 592 super(channel, callOptions); 593 } 594 595 @java.lang.Override build( io.grpc.Channel channel, io.grpc.CallOptions callOptions)596 protected ClusterControllerStub build( 597 io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 598 return new ClusterControllerStub(channel, callOptions); 599 } 600 601 /** 602 * 603 * 604 * <pre> 605 * Creates a cluster in a project. The returned 606 * [Operation.metadata][google.longrunning.Operation.metadata] will be 607 * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). 608 * </pre> 609 */ createCluster( com.google.cloud.dataproc.v1.CreateClusterRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)610 public void createCluster( 611 com.google.cloud.dataproc.v1.CreateClusterRequest request, 612 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 613 io.grpc.stub.ClientCalls.asyncUnaryCall( 614 getChannel().newCall(getCreateClusterMethod(), getCallOptions()), 615 request, 616 responseObserver); 617 } 618 619 /** 620 * 621 * 622 * <pre> 623 * Updates a cluster in a project. The returned 624 * [Operation.metadata][google.longrunning.Operation.metadata] will be 625 * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). 626 * The cluster must be in a 627 * [`RUNNING`][google.cloud.dataproc.v1.ClusterStatus.State] state or an error 628 * is returned. 629 * </pre> 630 */ updateCluster( com.google.cloud.dataproc.v1.UpdateClusterRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)631 public void updateCluster( 632 com.google.cloud.dataproc.v1.UpdateClusterRequest request, 633 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 634 io.grpc.stub.ClientCalls.asyncUnaryCall( 635 getChannel().newCall(getUpdateClusterMethod(), getCallOptions()), 636 request, 637 responseObserver); 638 } 639 640 /** 641 * 642 * 643 * <pre> 644 * Stops a cluster in a project. 645 * </pre> 646 */ stopCluster( com.google.cloud.dataproc.v1.StopClusterRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)647 public void stopCluster( 648 com.google.cloud.dataproc.v1.StopClusterRequest request, 649 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 650 io.grpc.stub.ClientCalls.asyncUnaryCall( 651 getChannel().newCall(getStopClusterMethod(), getCallOptions()), 652 request, 653 responseObserver); 654 } 655 656 /** 657 * 658 * 659 * <pre> 660 * Starts a cluster in a project. 661 * </pre> 662 */ startCluster( com.google.cloud.dataproc.v1.StartClusterRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)663 public void startCluster( 664 com.google.cloud.dataproc.v1.StartClusterRequest request, 665 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 666 io.grpc.stub.ClientCalls.asyncUnaryCall( 667 getChannel().newCall(getStartClusterMethod(), getCallOptions()), 668 request, 669 responseObserver); 670 } 671 672 /** 673 * 674 * 675 * <pre> 676 * Deletes a cluster in a project. The returned 677 * [Operation.metadata][google.longrunning.Operation.metadata] will be 678 * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). 679 * </pre> 680 */ deleteCluster( com.google.cloud.dataproc.v1.DeleteClusterRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)681 public void deleteCluster( 682 com.google.cloud.dataproc.v1.DeleteClusterRequest request, 683 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 684 io.grpc.stub.ClientCalls.asyncUnaryCall( 685 getChannel().newCall(getDeleteClusterMethod(), getCallOptions()), 686 request, 687 responseObserver); 688 } 689 690 /** 691 * 692 * 693 * <pre> 694 * Gets the resource representation for a cluster in a project. 695 * </pre> 696 */ getCluster( com.google.cloud.dataproc.v1.GetClusterRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dataproc.v1.Cluster> responseObserver)697 public void getCluster( 698 com.google.cloud.dataproc.v1.GetClusterRequest request, 699 io.grpc.stub.StreamObserver<com.google.cloud.dataproc.v1.Cluster> responseObserver) { 700 io.grpc.stub.ClientCalls.asyncUnaryCall( 701 getChannel().newCall(getGetClusterMethod(), getCallOptions()), request, responseObserver); 702 } 703 704 /** 705 * 706 * 707 * <pre> 708 * Lists all regions/{region}/clusters in a project alphabetically. 709 * </pre> 710 */ listClusters( com.google.cloud.dataproc.v1.ListClustersRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dataproc.v1.ListClustersResponse> responseObserver)711 public void listClusters( 712 com.google.cloud.dataproc.v1.ListClustersRequest request, 713 io.grpc.stub.StreamObserver<com.google.cloud.dataproc.v1.ListClustersResponse> 714 responseObserver) { 715 io.grpc.stub.ClientCalls.asyncUnaryCall( 716 getChannel().newCall(getListClustersMethod(), getCallOptions()), 717 request, 718 responseObserver); 719 } 720 721 /** 722 * 723 * 724 * <pre> 725 * Gets cluster diagnostic information. The returned 726 * [Operation.metadata][google.longrunning.Operation.metadata] will be 727 * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). 728 * After the operation completes, 729 * [Operation.response][google.longrunning.Operation.response] 730 * contains 731 * [DiagnoseClusterResults](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults). 732 * </pre> 733 */ diagnoseCluster( com.google.cloud.dataproc.v1.DiagnoseClusterRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)734 public void diagnoseCluster( 735 com.google.cloud.dataproc.v1.DiagnoseClusterRequest request, 736 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 737 io.grpc.stub.ClientCalls.asyncUnaryCall( 738 getChannel().newCall(getDiagnoseClusterMethod(), getCallOptions()), 739 request, 740 responseObserver); 741 } 742 } 743 744 /** 745 * A stub to allow clients to do synchronous rpc calls to service ClusterController. 746 * 747 * <pre> 748 * The ClusterControllerService provides methods to manage clusters 749 * of Compute Engine instances. 750 * </pre> 751 */ 752 public static final class ClusterControllerBlockingStub 753 extends io.grpc.stub.AbstractBlockingStub<ClusterControllerBlockingStub> { ClusterControllerBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions)754 private ClusterControllerBlockingStub( 755 io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 756 super(channel, callOptions); 757 } 758 759 @java.lang.Override build( io.grpc.Channel channel, io.grpc.CallOptions callOptions)760 protected ClusterControllerBlockingStub build( 761 io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 762 return new ClusterControllerBlockingStub(channel, callOptions); 763 } 764 765 /** 766 * 767 * 768 * <pre> 769 * Creates a cluster in a project. The returned 770 * [Operation.metadata][google.longrunning.Operation.metadata] will be 771 * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). 772 * </pre> 773 */ createCluster( com.google.cloud.dataproc.v1.CreateClusterRequest request)774 public com.google.longrunning.Operation createCluster( 775 com.google.cloud.dataproc.v1.CreateClusterRequest request) { 776 return io.grpc.stub.ClientCalls.blockingUnaryCall( 777 getChannel(), getCreateClusterMethod(), getCallOptions(), request); 778 } 779 780 /** 781 * 782 * 783 * <pre> 784 * Updates a cluster in a project. The returned 785 * [Operation.metadata][google.longrunning.Operation.metadata] will be 786 * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). 787 * The cluster must be in a 788 * [`RUNNING`][google.cloud.dataproc.v1.ClusterStatus.State] state or an error 789 * is returned. 790 * </pre> 791 */ updateCluster( com.google.cloud.dataproc.v1.UpdateClusterRequest request)792 public com.google.longrunning.Operation updateCluster( 793 com.google.cloud.dataproc.v1.UpdateClusterRequest request) { 794 return io.grpc.stub.ClientCalls.blockingUnaryCall( 795 getChannel(), getUpdateClusterMethod(), getCallOptions(), request); 796 } 797 798 /** 799 * 800 * 801 * <pre> 802 * Stops a cluster in a project. 803 * </pre> 804 */ stopCluster( com.google.cloud.dataproc.v1.StopClusterRequest request)805 public com.google.longrunning.Operation stopCluster( 806 com.google.cloud.dataproc.v1.StopClusterRequest request) { 807 return io.grpc.stub.ClientCalls.blockingUnaryCall( 808 getChannel(), getStopClusterMethod(), getCallOptions(), request); 809 } 810 811 /** 812 * 813 * 814 * <pre> 815 * Starts a cluster in a project. 816 * </pre> 817 */ startCluster( com.google.cloud.dataproc.v1.StartClusterRequest request)818 public com.google.longrunning.Operation startCluster( 819 com.google.cloud.dataproc.v1.StartClusterRequest request) { 820 return io.grpc.stub.ClientCalls.blockingUnaryCall( 821 getChannel(), getStartClusterMethod(), getCallOptions(), request); 822 } 823 824 /** 825 * 826 * 827 * <pre> 828 * Deletes a cluster in a project. The returned 829 * [Operation.metadata][google.longrunning.Operation.metadata] will be 830 * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). 831 * </pre> 832 */ deleteCluster( com.google.cloud.dataproc.v1.DeleteClusterRequest request)833 public com.google.longrunning.Operation deleteCluster( 834 com.google.cloud.dataproc.v1.DeleteClusterRequest request) { 835 return io.grpc.stub.ClientCalls.blockingUnaryCall( 836 getChannel(), getDeleteClusterMethod(), getCallOptions(), request); 837 } 838 839 /** 840 * 841 * 842 * <pre> 843 * Gets the resource representation for a cluster in a project. 844 * </pre> 845 */ getCluster( com.google.cloud.dataproc.v1.GetClusterRequest request)846 public com.google.cloud.dataproc.v1.Cluster getCluster( 847 com.google.cloud.dataproc.v1.GetClusterRequest request) { 848 return io.grpc.stub.ClientCalls.blockingUnaryCall( 849 getChannel(), getGetClusterMethod(), getCallOptions(), request); 850 } 851 852 /** 853 * 854 * 855 * <pre> 856 * Lists all regions/{region}/clusters in a project alphabetically. 857 * </pre> 858 */ listClusters( com.google.cloud.dataproc.v1.ListClustersRequest request)859 public com.google.cloud.dataproc.v1.ListClustersResponse listClusters( 860 com.google.cloud.dataproc.v1.ListClustersRequest request) { 861 return io.grpc.stub.ClientCalls.blockingUnaryCall( 862 getChannel(), getListClustersMethod(), getCallOptions(), request); 863 } 864 865 /** 866 * 867 * 868 * <pre> 869 * Gets cluster diagnostic information. The returned 870 * [Operation.metadata][google.longrunning.Operation.metadata] will be 871 * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). 872 * After the operation completes, 873 * [Operation.response][google.longrunning.Operation.response] 874 * contains 875 * [DiagnoseClusterResults](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults). 876 * </pre> 877 */ diagnoseCluster( com.google.cloud.dataproc.v1.DiagnoseClusterRequest request)878 public com.google.longrunning.Operation diagnoseCluster( 879 com.google.cloud.dataproc.v1.DiagnoseClusterRequest request) { 880 return io.grpc.stub.ClientCalls.blockingUnaryCall( 881 getChannel(), getDiagnoseClusterMethod(), getCallOptions(), request); 882 } 883 } 884 885 /** 886 * A stub to allow clients to do ListenableFuture-style rpc calls to service ClusterController. 887 * 888 * <pre> 889 * The ClusterControllerService provides methods to manage clusters 890 * of Compute Engine instances. 891 * </pre> 892 */ 893 public static final class ClusterControllerFutureStub 894 extends io.grpc.stub.AbstractFutureStub<ClusterControllerFutureStub> { ClusterControllerFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)895 private ClusterControllerFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 896 super(channel, callOptions); 897 } 898 899 @java.lang.Override build( io.grpc.Channel channel, io.grpc.CallOptions callOptions)900 protected ClusterControllerFutureStub build( 901 io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 902 return new ClusterControllerFutureStub(channel, callOptions); 903 } 904 905 /** 906 * 907 * 908 * <pre> 909 * Creates a cluster in a project. The returned 910 * [Operation.metadata][google.longrunning.Operation.metadata] will be 911 * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). 912 * </pre> 913 */ 914 public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> createCluster(com.google.cloud.dataproc.v1.CreateClusterRequest request)915 createCluster(com.google.cloud.dataproc.v1.CreateClusterRequest request) { 916 return io.grpc.stub.ClientCalls.futureUnaryCall( 917 getChannel().newCall(getCreateClusterMethod(), getCallOptions()), request); 918 } 919 920 /** 921 * 922 * 923 * <pre> 924 * Updates a cluster in a project. The returned 925 * [Operation.metadata][google.longrunning.Operation.metadata] will be 926 * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). 927 * The cluster must be in a 928 * [`RUNNING`][google.cloud.dataproc.v1.ClusterStatus.State] state or an error 929 * is returned. 930 * </pre> 931 */ 932 public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> updateCluster(com.google.cloud.dataproc.v1.UpdateClusterRequest request)933 updateCluster(com.google.cloud.dataproc.v1.UpdateClusterRequest request) { 934 return io.grpc.stub.ClientCalls.futureUnaryCall( 935 getChannel().newCall(getUpdateClusterMethod(), getCallOptions()), request); 936 } 937 938 /** 939 * 940 * 941 * <pre> 942 * Stops a cluster in a project. 943 * </pre> 944 */ 945 public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> stopCluster(com.google.cloud.dataproc.v1.StopClusterRequest request)946 stopCluster(com.google.cloud.dataproc.v1.StopClusterRequest request) { 947 return io.grpc.stub.ClientCalls.futureUnaryCall( 948 getChannel().newCall(getStopClusterMethod(), getCallOptions()), request); 949 } 950 951 /** 952 * 953 * 954 * <pre> 955 * Starts a cluster in a project. 956 * </pre> 957 */ 958 public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> startCluster(com.google.cloud.dataproc.v1.StartClusterRequest request)959 startCluster(com.google.cloud.dataproc.v1.StartClusterRequest request) { 960 return io.grpc.stub.ClientCalls.futureUnaryCall( 961 getChannel().newCall(getStartClusterMethod(), getCallOptions()), request); 962 } 963 964 /** 965 * 966 * 967 * <pre> 968 * Deletes a cluster in a project. The returned 969 * [Operation.metadata][google.longrunning.Operation.metadata] will be 970 * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). 971 * </pre> 972 */ 973 public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> deleteCluster(com.google.cloud.dataproc.v1.DeleteClusterRequest request)974 deleteCluster(com.google.cloud.dataproc.v1.DeleteClusterRequest request) { 975 return io.grpc.stub.ClientCalls.futureUnaryCall( 976 getChannel().newCall(getDeleteClusterMethod(), getCallOptions()), request); 977 } 978 979 /** 980 * 981 * 982 * <pre> 983 * Gets the resource representation for a cluster in a project. 984 * </pre> 985 */ 986 public com.google.common.util.concurrent.ListenableFuture<com.google.cloud.dataproc.v1.Cluster> getCluster(com.google.cloud.dataproc.v1.GetClusterRequest request)987 getCluster(com.google.cloud.dataproc.v1.GetClusterRequest request) { 988 return io.grpc.stub.ClientCalls.futureUnaryCall( 989 getChannel().newCall(getGetClusterMethod(), getCallOptions()), request); 990 } 991 992 /** 993 * 994 * 995 * <pre> 996 * Lists all regions/{region}/clusters in a project alphabetically. 997 * </pre> 998 */ 999 public com.google.common.util.concurrent.ListenableFuture< 1000 com.google.cloud.dataproc.v1.ListClustersResponse> listClusters(com.google.cloud.dataproc.v1.ListClustersRequest request)1001 listClusters(com.google.cloud.dataproc.v1.ListClustersRequest request) { 1002 return io.grpc.stub.ClientCalls.futureUnaryCall( 1003 getChannel().newCall(getListClustersMethod(), getCallOptions()), request); 1004 } 1005 1006 /** 1007 * 1008 * 1009 * <pre> 1010 * Gets cluster diagnostic information. The returned 1011 * [Operation.metadata][google.longrunning.Operation.metadata] will be 1012 * [ClusterOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). 1013 * After the operation completes, 1014 * [Operation.response][google.longrunning.Operation.response] 1015 * contains 1016 * [DiagnoseClusterResults](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults). 1017 * </pre> 1018 */ 1019 public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> diagnoseCluster(com.google.cloud.dataproc.v1.DiagnoseClusterRequest request)1020 diagnoseCluster(com.google.cloud.dataproc.v1.DiagnoseClusterRequest request) { 1021 return io.grpc.stub.ClientCalls.futureUnaryCall( 1022 getChannel().newCall(getDiagnoseClusterMethod(), getCallOptions()), request); 1023 } 1024 } 1025 1026 private static final int METHODID_CREATE_CLUSTER = 0; 1027 private static final int METHODID_UPDATE_CLUSTER = 1; 1028 private static final int METHODID_STOP_CLUSTER = 2; 1029 private static final int METHODID_START_CLUSTER = 3; 1030 private static final int METHODID_DELETE_CLUSTER = 4; 1031 private static final int METHODID_GET_CLUSTER = 5; 1032 private static final int METHODID_LIST_CLUSTERS = 6; 1033 private static final int METHODID_DIAGNOSE_CLUSTER = 7; 1034 1035 private static final class MethodHandlers<Req, Resp> 1036 implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>, 1037 io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>, 1038 io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>, 1039 io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> { 1040 private final AsyncService serviceImpl; 1041 private final int methodId; 1042 MethodHandlers(AsyncService serviceImpl, int methodId)1043 MethodHandlers(AsyncService serviceImpl, int methodId) { 1044 this.serviceImpl = serviceImpl; 1045 this.methodId = methodId; 1046 } 1047 1048 @java.lang.Override 1049 @java.lang.SuppressWarnings("unchecked") invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver)1050 public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) { 1051 switch (methodId) { 1052 case METHODID_CREATE_CLUSTER: 1053 serviceImpl.createCluster( 1054 (com.google.cloud.dataproc.v1.CreateClusterRequest) request, 1055 (io.grpc.stub.StreamObserver<com.google.longrunning.Operation>) responseObserver); 1056 break; 1057 case METHODID_UPDATE_CLUSTER: 1058 serviceImpl.updateCluster( 1059 (com.google.cloud.dataproc.v1.UpdateClusterRequest) request, 1060 (io.grpc.stub.StreamObserver<com.google.longrunning.Operation>) responseObserver); 1061 break; 1062 case METHODID_STOP_CLUSTER: 1063 serviceImpl.stopCluster( 1064 (com.google.cloud.dataproc.v1.StopClusterRequest) request, 1065 (io.grpc.stub.StreamObserver<com.google.longrunning.Operation>) responseObserver); 1066 break; 1067 case METHODID_START_CLUSTER: 1068 serviceImpl.startCluster( 1069 (com.google.cloud.dataproc.v1.StartClusterRequest) request, 1070 (io.grpc.stub.StreamObserver<com.google.longrunning.Operation>) responseObserver); 1071 break; 1072 case METHODID_DELETE_CLUSTER: 1073 serviceImpl.deleteCluster( 1074 (com.google.cloud.dataproc.v1.DeleteClusterRequest) request, 1075 (io.grpc.stub.StreamObserver<com.google.longrunning.Operation>) responseObserver); 1076 break; 1077 case METHODID_GET_CLUSTER: 1078 serviceImpl.getCluster( 1079 (com.google.cloud.dataproc.v1.GetClusterRequest) request, 1080 (io.grpc.stub.StreamObserver<com.google.cloud.dataproc.v1.Cluster>) responseObserver); 1081 break; 1082 case METHODID_LIST_CLUSTERS: 1083 serviceImpl.listClusters( 1084 (com.google.cloud.dataproc.v1.ListClustersRequest) request, 1085 (io.grpc.stub.StreamObserver<com.google.cloud.dataproc.v1.ListClustersResponse>) 1086 responseObserver); 1087 break; 1088 case METHODID_DIAGNOSE_CLUSTER: 1089 serviceImpl.diagnoseCluster( 1090 (com.google.cloud.dataproc.v1.DiagnoseClusterRequest) request, 1091 (io.grpc.stub.StreamObserver<com.google.longrunning.Operation>) responseObserver); 1092 break; 1093 default: 1094 throw new AssertionError(); 1095 } 1096 } 1097 1098 @java.lang.Override 1099 @java.lang.SuppressWarnings("unchecked") invoke( io.grpc.stub.StreamObserver<Resp> responseObserver)1100 public io.grpc.stub.StreamObserver<Req> invoke( 1101 io.grpc.stub.StreamObserver<Resp> responseObserver) { 1102 switch (methodId) { 1103 default: 1104 throw new AssertionError(); 1105 } 1106 } 1107 } 1108 bindService(AsyncService service)1109 public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { 1110 return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) 1111 .addMethod( 1112 getCreateClusterMethod(), 1113 io.grpc.stub.ServerCalls.asyncUnaryCall( 1114 new MethodHandlers< 1115 com.google.cloud.dataproc.v1.CreateClusterRequest, 1116 com.google.longrunning.Operation>(service, METHODID_CREATE_CLUSTER))) 1117 .addMethod( 1118 getUpdateClusterMethod(), 1119 io.grpc.stub.ServerCalls.asyncUnaryCall( 1120 new MethodHandlers< 1121 com.google.cloud.dataproc.v1.UpdateClusterRequest, 1122 com.google.longrunning.Operation>(service, METHODID_UPDATE_CLUSTER))) 1123 .addMethod( 1124 getStopClusterMethod(), 1125 io.grpc.stub.ServerCalls.asyncUnaryCall( 1126 new MethodHandlers< 1127 com.google.cloud.dataproc.v1.StopClusterRequest, 1128 com.google.longrunning.Operation>(service, METHODID_STOP_CLUSTER))) 1129 .addMethod( 1130 getStartClusterMethod(), 1131 io.grpc.stub.ServerCalls.asyncUnaryCall( 1132 new MethodHandlers< 1133 com.google.cloud.dataproc.v1.StartClusterRequest, 1134 com.google.longrunning.Operation>(service, METHODID_START_CLUSTER))) 1135 .addMethod( 1136 getDeleteClusterMethod(), 1137 io.grpc.stub.ServerCalls.asyncUnaryCall( 1138 new MethodHandlers< 1139 com.google.cloud.dataproc.v1.DeleteClusterRequest, 1140 com.google.longrunning.Operation>(service, METHODID_DELETE_CLUSTER))) 1141 .addMethod( 1142 getGetClusterMethod(), 1143 io.grpc.stub.ServerCalls.asyncUnaryCall( 1144 new MethodHandlers< 1145 com.google.cloud.dataproc.v1.GetClusterRequest, 1146 com.google.cloud.dataproc.v1.Cluster>(service, METHODID_GET_CLUSTER))) 1147 .addMethod( 1148 getListClustersMethod(), 1149 io.grpc.stub.ServerCalls.asyncUnaryCall( 1150 new MethodHandlers< 1151 com.google.cloud.dataproc.v1.ListClustersRequest, 1152 com.google.cloud.dataproc.v1.ListClustersResponse>( 1153 service, METHODID_LIST_CLUSTERS))) 1154 .addMethod( 1155 getDiagnoseClusterMethod(), 1156 io.grpc.stub.ServerCalls.asyncUnaryCall( 1157 new MethodHandlers< 1158 com.google.cloud.dataproc.v1.DiagnoseClusterRequest, 1159 com.google.longrunning.Operation>(service, METHODID_DIAGNOSE_CLUSTER))) 1160 .build(); 1161 } 1162 1163 private abstract static class ClusterControllerBaseDescriptorSupplier 1164 implements io.grpc.protobuf.ProtoFileDescriptorSupplier, 1165 io.grpc.protobuf.ProtoServiceDescriptorSupplier { ClusterControllerBaseDescriptorSupplier()1166 ClusterControllerBaseDescriptorSupplier() {} 1167 1168 @java.lang.Override getFileDescriptor()1169 public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { 1170 return com.google.cloud.dataproc.v1.ClustersProto.getDescriptor(); 1171 } 1172 1173 @java.lang.Override getServiceDescriptor()1174 public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { 1175 return getFileDescriptor().findServiceByName("ClusterController"); 1176 } 1177 } 1178 1179 private static final class ClusterControllerFileDescriptorSupplier 1180 extends ClusterControllerBaseDescriptorSupplier { ClusterControllerFileDescriptorSupplier()1181 ClusterControllerFileDescriptorSupplier() {} 1182 } 1183 1184 private static final class ClusterControllerMethodDescriptorSupplier 1185 extends ClusterControllerBaseDescriptorSupplier 1186 implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { 1187 private final String methodName; 1188 ClusterControllerMethodDescriptorSupplier(String methodName)1189 ClusterControllerMethodDescriptorSupplier(String methodName) { 1190 this.methodName = methodName; 1191 } 1192 1193 @java.lang.Override getMethodDescriptor()1194 public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { 1195 return getServiceDescriptor().findMethodByName(methodName); 1196 } 1197 } 1198 1199 private static volatile io.grpc.ServiceDescriptor serviceDescriptor; 1200 getServiceDescriptor()1201 public static io.grpc.ServiceDescriptor getServiceDescriptor() { 1202 io.grpc.ServiceDescriptor result = serviceDescriptor; 1203 if (result == null) { 1204 synchronized (ClusterControllerGrpc.class) { 1205 result = serviceDescriptor; 1206 if (result == null) { 1207 serviceDescriptor = 1208 result = 1209 io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) 1210 .setSchemaDescriptor(new ClusterControllerFileDescriptorSupplier()) 1211 .addMethod(getCreateClusterMethod()) 1212 .addMethod(getUpdateClusterMethod()) 1213 .addMethod(getStopClusterMethod()) 1214 .addMethod(getStartClusterMethod()) 1215 .addMethod(getDeleteClusterMethod()) 1216 .addMethod(getGetClusterMethod()) 1217 .addMethod(getListClustersMethod()) 1218 .addMethod(getDiagnoseClusterMethod()) 1219 .build(); 1220 } 1221 } 1222 } 1223 return result; 1224 } 1225 } 1226