com.google.cloud.dataproc.v1.NodeGroupControllerGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of grpc-google-cloud-dataproc-v1 Show documentation
Show all versions of grpc-google-cloud-dataproc-v1 Show documentation
GRPC library for grpc-google-cloud-dataproc-v1
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.cloud.dataproc.v1;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*
*
*
* The `NodeGroupControllerService` provides methods to manage node groups
* of Compute Engine managed instances.
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler",
comments = "Source: google/cloud/dataproc/v1/node_groups.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class NodeGroupControllerGrpc {
private NodeGroupControllerGrpc() {}
public static final java.lang.String SERVICE_NAME =
"google.cloud.dataproc.v1.NodeGroupController";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.dataproc.v1.CreateNodeGroupRequest, com.google.longrunning.Operation>
getCreateNodeGroupMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "CreateNodeGroup",
requestType = com.google.cloud.dataproc.v1.CreateNodeGroupRequest.class,
responseType = com.google.longrunning.Operation.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.dataproc.v1.CreateNodeGroupRequest, com.google.longrunning.Operation>
getCreateNodeGroupMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.dataproc.v1.CreateNodeGroupRequest, com.google.longrunning.Operation>
getCreateNodeGroupMethod;
if ((getCreateNodeGroupMethod = NodeGroupControllerGrpc.getCreateNodeGroupMethod) == null) {
synchronized (NodeGroupControllerGrpc.class) {
if ((getCreateNodeGroupMethod = NodeGroupControllerGrpc.getCreateNodeGroupMethod) == null) {
NodeGroupControllerGrpc.getCreateNodeGroupMethod =
getCreateNodeGroupMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateNodeGroup"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dataproc.v1.CreateNodeGroupRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.longrunning.Operation.getDefaultInstance()))
.setSchemaDescriptor(
new NodeGroupControllerMethodDescriptorSupplier("CreateNodeGroup"))
.build();
}
}
}
return getCreateNodeGroupMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.dataproc.v1.ResizeNodeGroupRequest, com.google.longrunning.Operation>
getResizeNodeGroupMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ResizeNodeGroup",
requestType = com.google.cloud.dataproc.v1.ResizeNodeGroupRequest.class,
responseType = com.google.longrunning.Operation.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.dataproc.v1.ResizeNodeGroupRequest, com.google.longrunning.Operation>
getResizeNodeGroupMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.dataproc.v1.ResizeNodeGroupRequest, com.google.longrunning.Operation>
getResizeNodeGroupMethod;
if ((getResizeNodeGroupMethod = NodeGroupControllerGrpc.getResizeNodeGroupMethod) == null) {
synchronized (NodeGroupControllerGrpc.class) {
if ((getResizeNodeGroupMethod = NodeGroupControllerGrpc.getResizeNodeGroupMethod) == null) {
NodeGroupControllerGrpc.getResizeNodeGroupMethod =
getResizeNodeGroupMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "ResizeNodeGroup"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dataproc.v1.ResizeNodeGroupRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.longrunning.Operation.getDefaultInstance()))
.setSchemaDescriptor(
new NodeGroupControllerMethodDescriptorSupplier("ResizeNodeGroup"))
.build();
}
}
}
return getResizeNodeGroupMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.dataproc.v1.GetNodeGroupRequest, com.google.cloud.dataproc.v1.NodeGroup>
getGetNodeGroupMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetNodeGroup",
requestType = com.google.cloud.dataproc.v1.GetNodeGroupRequest.class,
responseType = com.google.cloud.dataproc.v1.NodeGroup.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.dataproc.v1.GetNodeGroupRequest, com.google.cloud.dataproc.v1.NodeGroup>
getGetNodeGroupMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.dataproc.v1.GetNodeGroupRequest,
com.google.cloud.dataproc.v1.NodeGroup>
getGetNodeGroupMethod;
if ((getGetNodeGroupMethod = NodeGroupControllerGrpc.getGetNodeGroupMethod) == null) {
synchronized (NodeGroupControllerGrpc.class) {
if ((getGetNodeGroupMethod = NodeGroupControllerGrpc.getGetNodeGroupMethod) == null) {
NodeGroupControllerGrpc.getGetNodeGroupMethod =
getGetNodeGroupMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetNodeGroup"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dataproc.v1.GetNodeGroupRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dataproc.v1.NodeGroup.getDefaultInstance()))
.setSchemaDescriptor(
new NodeGroupControllerMethodDescriptorSupplier("GetNodeGroup"))
.build();
}
}
}
return getGetNodeGroupMethod;
}
/** Creates a new async stub that supports all call types for the service */
public static NodeGroupControllerStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public NodeGroupControllerStub newStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new NodeGroupControllerStub(channel, callOptions);
}
};
return NodeGroupControllerStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static NodeGroupControllerBlockingStub newBlockingStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public NodeGroupControllerBlockingStub newStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new NodeGroupControllerBlockingStub(channel, callOptions);
}
};
return NodeGroupControllerBlockingStub.newStub(factory, channel);
}
/** Creates a new ListenableFuture-style stub that supports unary calls on the service */
public static NodeGroupControllerFutureStub newFutureStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public NodeGroupControllerFutureStub newStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new NodeGroupControllerFutureStub(channel, callOptions);
}
};
return NodeGroupControllerFutureStub.newStub(factory, channel);
}
/**
*
*
*
* The `NodeGroupControllerService` provides methods to manage node groups
* of Compute Engine managed instances.
*
*/
public interface AsyncService {
/**
*
*
*
* Creates a node group in a cluster. The returned
* [Operation.metadata][google.longrunning.Operation.metadata] is
* [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata).
*
*/
default void createNodeGroup(
com.google.cloud.dataproc.v1.CreateNodeGroupRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getCreateNodeGroupMethod(), responseObserver);
}
/**
*
*
*
* Resizes a node group in a cluster. The returned
* [Operation.metadata][google.longrunning.Operation.metadata] is
* [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata).
*
*/
default void resizeNodeGroup(
com.google.cloud.dataproc.v1.ResizeNodeGroupRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getResizeNodeGroupMethod(), responseObserver);
}
/**
*
*
*
* Gets the resource representation for a node group in a
* cluster.
*
*/
default void getNodeGroup(
com.google.cloud.dataproc.v1.GetNodeGroupRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getGetNodeGroupMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service NodeGroupController.
*
*
* The `NodeGroupControllerService` provides methods to manage node groups
* of Compute Engine managed instances.
*
*/
public abstract static class NodeGroupControllerImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override
public final io.grpc.ServerServiceDefinition bindService() {
return NodeGroupControllerGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service NodeGroupController.
*
*
* The `NodeGroupControllerService` provides methods to manage node groups
* of Compute Engine managed instances.
*
*/
public static final class NodeGroupControllerStub
extends io.grpc.stub.AbstractAsyncStub {
private NodeGroupControllerStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected NodeGroupControllerStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new NodeGroupControllerStub(channel, callOptions);
}
/**
*
*
*
* Creates a node group in a cluster. The returned
* [Operation.metadata][google.longrunning.Operation.metadata] is
* [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata).
*
*/
public void createNodeGroup(
com.google.cloud.dataproc.v1.CreateNodeGroupRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getCreateNodeGroupMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Resizes a node group in a cluster. The returned
* [Operation.metadata][google.longrunning.Operation.metadata] is
* [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata).
*
*/
public void resizeNodeGroup(
com.google.cloud.dataproc.v1.ResizeNodeGroupRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getResizeNodeGroupMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Gets the resource representation for a node group in a
* cluster.
*
*/
public void getNodeGroup(
com.google.cloud.dataproc.v1.GetNodeGroupRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetNodeGroupMethod(), getCallOptions()),
request,
responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service NodeGroupController.
*
*
* The `NodeGroupControllerService` provides methods to manage node groups
* of Compute Engine managed instances.
*
*/
public static final class NodeGroupControllerBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private NodeGroupControllerBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected NodeGroupControllerBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new NodeGroupControllerBlockingStub(channel, callOptions);
}
/**
*
*
*
* Creates a node group in a cluster. The returned
* [Operation.metadata][google.longrunning.Operation.metadata] is
* [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata).
*
*/
public com.google.longrunning.Operation createNodeGroup(
com.google.cloud.dataproc.v1.CreateNodeGroupRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getCreateNodeGroupMethod(), getCallOptions(), request);
}
/**
*
*
*
* Resizes a node group in a cluster. The returned
* [Operation.metadata][google.longrunning.Operation.metadata] is
* [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata).
*
*/
public com.google.longrunning.Operation resizeNodeGroup(
com.google.cloud.dataproc.v1.ResizeNodeGroupRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getResizeNodeGroupMethod(), getCallOptions(), request);
}
/**
*
*
*
* Gets the resource representation for a node group in a
* cluster.
*
*/
public com.google.cloud.dataproc.v1.NodeGroup getNodeGroup(
com.google.cloud.dataproc.v1.GetNodeGroupRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetNodeGroupMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service NodeGroupController.
*
*
* The `NodeGroupControllerService` provides methods to manage node groups
* of Compute Engine managed instances.
*
*/
public static final class NodeGroupControllerFutureStub
extends io.grpc.stub.AbstractFutureStub {
private NodeGroupControllerFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected NodeGroupControllerFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new NodeGroupControllerFutureStub(channel, callOptions);
}
/**
*
*
*
* Creates a node group in a cluster. The returned
* [Operation.metadata][google.longrunning.Operation.metadata] is
* [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata).
*
*/
public com.google.common.util.concurrent.ListenableFuture
createNodeGroup(com.google.cloud.dataproc.v1.CreateNodeGroupRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getCreateNodeGroupMethod(), getCallOptions()), request);
}
/**
*
*
*
* Resizes a node group in a cluster. The returned
* [Operation.metadata][google.longrunning.Operation.metadata] is
* [NodeGroupOperationMetadata](https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#nodegroupoperationmetadata).
*
*/
public com.google.common.util.concurrent.ListenableFuture
resizeNodeGroup(com.google.cloud.dataproc.v1.ResizeNodeGroupRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getResizeNodeGroupMethod(), getCallOptions()), request);
}
/**
*
*
*
* Gets the resource representation for a node group in a
* cluster.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.cloud.dataproc.v1.NodeGroup>
getNodeGroup(com.google.cloud.dataproc.v1.GetNodeGroupRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetNodeGroupMethod(), getCallOptions()), request);
}
}
private static final int METHODID_CREATE_NODE_GROUP = 0;
private static final int METHODID_RESIZE_NODE_GROUP = 1;
private static final int METHODID_GET_NODE_GROUP = 2;
private static final class MethodHandlers
implements io.grpc.stub.ServerCalls.UnaryMethod,
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
private final AsyncService serviceImpl;
private final int methodId;
MethodHandlers(AsyncService serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
case METHODID_CREATE_NODE_GROUP:
serviceImpl.createNodeGroup(
(com.google.cloud.dataproc.v1.CreateNodeGroupRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_RESIZE_NODE_GROUP:
serviceImpl.resizeNodeGroup(
(com.google.cloud.dataproc.v1.ResizeNodeGroupRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_GET_NODE_GROUP:
serviceImpl.getNodeGroup(
(com.google.cloud.dataproc.v1.GetNodeGroupRequest) request,
(io.grpc.stub.StreamObserver)
responseObserver);
break;
default:
throw new AssertionError();
}
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public io.grpc.stub.StreamObserver invoke(
io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
default:
throw new AssertionError();
}
}
}
public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getCreateNodeGroupMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dataproc.v1.CreateNodeGroupRequest,
com.google.longrunning.Operation>(service, METHODID_CREATE_NODE_GROUP)))
.addMethod(
getResizeNodeGroupMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dataproc.v1.ResizeNodeGroupRequest,
com.google.longrunning.Operation>(service, METHODID_RESIZE_NODE_GROUP)))
.addMethod(
getGetNodeGroupMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dataproc.v1.GetNodeGroupRequest,
com.google.cloud.dataproc.v1.NodeGroup>(service, METHODID_GET_NODE_GROUP)))
.build();
}
private abstract static class NodeGroupControllerBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier,
io.grpc.protobuf.ProtoServiceDescriptorSupplier {
NodeGroupControllerBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.google.cloud.dataproc.v1.NodeGroupsProto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("NodeGroupController");
}
}
private static final class NodeGroupControllerFileDescriptorSupplier
extends NodeGroupControllerBaseDescriptorSupplier {
NodeGroupControllerFileDescriptorSupplier() {}
}
private static final class NodeGroupControllerMethodDescriptorSupplier
extends NodeGroupControllerBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final java.lang.String methodName;
NodeGroupControllerMethodDescriptorSupplier(java.lang.String methodName) {
this.methodName = methodName;
}
@java.lang.Override
public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
return getServiceDescriptor().findMethodByName(methodName);
}
}
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
io.grpc.ServiceDescriptor result = serviceDescriptor;
if (result == null) {
synchronized (NodeGroupControllerGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor =
result =
io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new NodeGroupControllerFileDescriptorSupplier())
.addMethod(getCreateNodeGroupMethod())
.addMethod(getResizeNodeGroupMethod())
.addMethod(getGetNodeGroupMethod())
.build();
}
}
}
return result;
}
}