com.google.cloud.dataproc.v1beta2.AutoscalingPolicyServiceGrpc 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-v1beta2 Show documentation
Show all versions of grpc-google-cloud-dataproc-v1beta2 Show documentation
GRPC library for grpc-google-cloud-dataproc-v1beta2
/*
* Copyright 2020 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.v1beta2;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*
*
*
* The API interface for managing autoscaling policies in the
* Cloud Dataproc API.
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler",
comments = "Source: google/cloud/dataproc/v1beta2/autoscaling_policies.proto")
public final class AutoscalingPolicyServiceGrpc {
private AutoscalingPolicyServiceGrpc() {}
public static final String SERVICE_NAME =
"google.cloud.dataproc.v1beta2.AutoscalingPolicyService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest,
com.google.cloud.dataproc.v1beta2.AutoscalingPolicy>
getCreateAutoscalingPolicyMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "CreateAutoscalingPolicy",
requestType = com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest.class,
responseType = com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest,
com.google.cloud.dataproc.v1beta2.AutoscalingPolicy>
getCreateAutoscalingPolicyMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest,
com.google.cloud.dataproc.v1beta2.AutoscalingPolicy>
getCreateAutoscalingPolicyMethod;
if ((getCreateAutoscalingPolicyMethod =
AutoscalingPolicyServiceGrpc.getCreateAutoscalingPolicyMethod)
== null) {
synchronized (AutoscalingPolicyServiceGrpc.class) {
if ((getCreateAutoscalingPolicyMethod =
AutoscalingPolicyServiceGrpc.getCreateAutoscalingPolicyMethod)
== null) {
AutoscalingPolicyServiceGrpc.getCreateAutoscalingPolicyMethod =
getCreateAutoscalingPolicyMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
generateFullMethodName(SERVICE_NAME, "CreateAutoscalingPolicy"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dataproc.v1beta2.AutoscalingPolicy
.getDefaultInstance()))
.setSchemaDescriptor(
new AutoscalingPolicyServiceMethodDescriptorSupplier(
"CreateAutoscalingPolicy"))
.build();
}
}
}
return getCreateAutoscalingPolicyMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest,
com.google.cloud.dataproc.v1beta2.AutoscalingPolicy>
getUpdateAutoscalingPolicyMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "UpdateAutoscalingPolicy",
requestType = com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest.class,
responseType = com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest,
com.google.cloud.dataproc.v1beta2.AutoscalingPolicy>
getUpdateAutoscalingPolicyMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest,
com.google.cloud.dataproc.v1beta2.AutoscalingPolicy>
getUpdateAutoscalingPolicyMethod;
if ((getUpdateAutoscalingPolicyMethod =
AutoscalingPolicyServiceGrpc.getUpdateAutoscalingPolicyMethod)
== null) {
synchronized (AutoscalingPolicyServiceGrpc.class) {
if ((getUpdateAutoscalingPolicyMethod =
AutoscalingPolicyServiceGrpc.getUpdateAutoscalingPolicyMethod)
== null) {
AutoscalingPolicyServiceGrpc.getUpdateAutoscalingPolicyMethod =
getUpdateAutoscalingPolicyMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
generateFullMethodName(SERVICE_NAME, "UpdateAutoscalingPolicy"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dataproc.v1beta2.AutoscalingPolicy
.getDefaultInstance()))
.setSchemaDescriptor(
new AutoscalingPolicyServiceMethodDescriptorSupplier(
"UpdateAutoscalingPolicy"))
.build();
}
}
}
return getUpdateAutoscalingPolicyMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest,
com.google.cloud.dataproc.v1beta2.AutoscalingPolicy>
getGetAutoscalingPolicyMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetAutoscalingPolicy",
requestType = com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest.class,
responseType = com.google.cloud.dataproc.v1beta2.AutoscalingPolicy.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest,
com.google.cloud.dataproc.v1beta2.AutoscalingPolicy>
getGetAutoscalingPolicyMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest,
com.google.cloud.dataproc.v1beta2.AutoscalingPolicy>
getGetAutoscalingPolicyMethod;
if ((getGetAutoscalingPolicyMethod = AutoscalingPolicyServiceGrpc.getGetAutoscalingPolicyMethod)
== null) {
synchronized (AutoscalingPolicyServiceGrpc.class) {
if ((getGetAutoscalingPolicyMethod =
AutoscalingPolicyServiceGrpc.getGetAutoscalingPolicyMethod)
== null) {
AutoscalingPolicyServiceGrpc.getGetAutoscalingPolicyMethod =
getGetAutoscalingPolicyMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
generateFullMethodName(SERVICE_NAME, "GetAutoscalingPolicy"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dataproc.v1beta2.AutoscalingPolicy
.getDefaultInstance()))
.setSchemaDescriptor(
new AutoscalingPolicyServiceMethodDescriptorSupplier(
"GetAutoscalingPolicy"))
.build();
}
}
}
return getGetAutoscalingPolicyMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest,
com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse>
getListAutoscalingPoliciesMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ListAutoscalingPolicies",
requestType = com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest.class,
responseType = com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest,
com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse>
getListAutoscalingPoliciesMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest,
com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse>
getListAutoscalingPoliciesMethod;
if ((getListAutoscalingPoliciesMethod =
AutoscalingPolicyServiceGrpc.getListAutoscalingPoliciesMethod)
== null) {
synchronized (AutoscalingPolicyServiceGrpc.class) {
if ((getListAutoscalingPoliciesMethod =
AutoscalingPolicyServiceGrpc.getListAutoscalingPoliciesMethod)
== null) {
AutoscalingPolicyServiceGrpc.getListAutoscalingPoliciesMethod =
getListAutoscalingPoliciesMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
generateFullMethodName(SERVICE_NAME, "ListAutoscalingPolicies"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse
.getDefaultInstance()))
.setSchemaDescriptor(
new AutoscalingPolicyServiceMethodDescriptorSupplier(
"ListAutoscalingPolicies"))
.build();
}
}
}
return getListAutoscalingPoliciesMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest,
com.google.protobuf.Empty>
getDeleteAutoscalingPolicyMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "DeleteAutoscalingPolicy",
requestType = com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest.class,
responseType = com.google.protobuf.Empty.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest,
com.google.protobuf.Empty>
getDeleteAutoscalingPolicyMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest,
com.google.protobuf.Empty>
getDeleteAutoscalingPolicyMethod;
if ((getDeleteAutoscalingPolicyMethod =
AutoscalingPolicyServiceGrpc.getDeleteAutoscalingPolicyMethod)
== null) {
synchronized (AutoscalingPolicyServiceGrpc.class) {
if ((getDeleteAutoscalingPolicyMethod =
AutoscalingPolicyServiceGrpc.getDeleteAutoscalingPolicyMethod)
== null) {
AutoscalingPolicyServiceGrpc.getDeleteAutoscalingPolicyMethod =
getDeleteAutoscalingPolicyMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(
generateFullMethodName(SERVICE_NAME, "DeleteAutoscalingPolicy"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest
.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.protobuf.Empty.getDefaultInstance()))
.setSchemaDescriptor(
new AutoscalingPolicyServiceMethodDescriptorSupplier(
"DeleteAutoscalingPolicy"))
.build();
}
}
}
return getDeleteAutoscalingPolicyMethod;
}
/** Creates a new async stub that supports all call types for the service */
public static AutoscalingPolicyServiceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public AutoscalingPolicyServiceStub newStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AutoscalingPolicyServiceStub(channel, callOptions);
}
};
return AutoscalingPolicyServiceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static AutoscalingPolicyServiceBlockingStub newBlockingStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public AutoscalingPolicyServiceBlockingStub newStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AutoscalingPolicyServiceBlockingStub(channel, callOptions);
}
};
return AutoscalingPolicyServiceBlockingStub.newStub(factory, channel);
}
/** Creates a new ListenableFuture-style stub that supports unary calls on the service */
public static AutoscalingPolicyServiceFutureStub newFutureStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public AutoscalingPolicyServiceFutureStub newStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AutoscalingPolicyServiceFutureStub(channel, callOptions);
}
};
return AutoscalingPolicyServiceFutureStub.newStub(factory, channel);
}
/**
*
*
*
* The API interface for managing autoscaling policies in the
* Cloud Dataproc API.
*
*/
public abstract static class AutoscalingPolicyServiceImplBase implements io.grpc.BindableService {
/**
*
*
*
* Creates new autoscaling policy.
*
*/
public void createAutoscalingPolicy(
com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getCreateAutoscalingPolicyMethod(), responseObserver);
}
/**
*
*
*
* Updates (replaces) autoscaling policy.
* Disabled check for update_mask, because all updates will be full
* replacements.
*
*/
public void updateAutoscalingPolicy(
com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getUpdateAutoscalingPolicyMethod(), responseObserver);
}
/**
*
*
*
* Retrieves autoscaling policy.
*
*/
public void getAutoscalingPolicy(
com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getGetAutoscalingPolicyMethod(), responseObserver);
}
/**
*
*
*
* Lists autoscaling policies in the project.
*
*/
public void listAutoscalingPolicies(
com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest request,
io.grpc.stub.StreamObserver<
com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse>
responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getListAutoscalingPoliciesMethod(), responseObserver);
}
/**
*
*
*
* Deletes an autoscaling policy. It is an error to delete an autoscaling
* policy that is in use by one or more clusters.
*
*/
public void deleteAutoscalingPolicy(
com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getDeleteAutoscalingPolicyMethod(), responseObserver);
}
@java.lang.Override
public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getCreateAutoscalingPolicyMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest,
com.google.cloud.dataproc.v1beta2.AutoscalingPolicy>(
this, METHODID_CREATE_AUTOSCALING_POLICY)))
.addMethod(
getUpdateAutoscalingPolicyMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest,
com.google.cloud.dataproc.v1beta2.AutoscalingPolicy>(
this, METHODID_UPDATE_AUTOSCALING_POLICY)))
.addMethod(
getGetAutoscalingPolicyMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest,
com.google.cloud.dataproc.v1beta2.AutoscalingPolicy>(
this, METHODID_GET_AUTOSCALING_POLICY)))
.addMethod(
getListAutoscalingPoliciesMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest,
com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse>(
this, METHODID_LIST_AUTOSCALING_POLICIES)))
.addMethod(
getDeleteAutoscalingPolicyMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest,
com.google.protobuf.Empty>(this, METHODID_DELETE_AUTOSCALING_POLICY)))
.build();
}
}
/**
*
*
*
* The API interface for managing autoscaling policies in the
* Cloud Dataproc API.
*
*/
public static final class AutoscalingPolicyServiceStub
extends io.grpc.stub.AbstractAsyncStub {
private AutoscalingPolicyServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected AutoscalingPolicyServiceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AutoscalingPolicyServiceStub(channel, callOptions);
}
/**
*
*
*
* Creates new autoscaling policy.
*
*/
public void createAutoscalingPolicy(
com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getCreateAutoscalingPolicyMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Updates (replaces) autoscaling policy.
* Disabled check for update_mask, because all updates will be full
* replacements.
*
*/
public void updateAutoscalingPolicy(
com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getUpdateAutoscalingPolicyMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Retrieves autoscaling policy.
*
*/
public void getAutoscalingPolicy(
com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetAutoscalingPolicyMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Lists autoscaling policies in the project.
*
*/
public void listAutoscalingPolicies(
com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest request,
io.grpc.stub.StreamObserver<
com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse>
responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getListAutoscalingPoliciesMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Deletes an autoscaling policy. It is an error to delete an autoscaling
* policy that is in use by one or more clusters.
*
*/
public void deleteAutoscalingPolicy(
com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getDeleteAutoscalingPolicyMethod(), getCallOptions()),
request,
responseObserver);
}
}
/**
*
*
*
* The API interface for managing autoscaling policies in the
* Cloud Dataproc API.
*
*/
public static final class AutoscalingPolicyServiceBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private AutoscalingPolicyServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected AutoscalingPolicyServiceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AutoscalingPolicyServiceBlockingStub(channel, callOptions);
}
/**
*
*
*
* Creates new autoscaling policy.
*
*/
public com.google.cloud.dataproc.v1beta2.AutoscalingPolicy createAutoscalingPolicy(
com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getCreateAutoscalingPolicyMethod(), getCallOptions(), request);
}
/**
*
*
*
* Updates (replaces) autoscaling policy.
* Disabled check for update_mask, because all updates will be full
* replacements.
*
*/
public com.google.cloud.dataproc.v1beta2.AutoscalingPolicy updateAutoscalingPolicy(
com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getUpdateAutoscalingPolicyMethod(), getCallOptions(), request);
}
/**
*
*
*
* Retrieves autoscaling policy.
*
*/
public com.google.cloud.dataproc.v1beta2.AutoscalingPolicy getAutoscalingPolicy(
com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetAutoscalingPolicyMethod(), getCallOptions(), request);
}
/**
*
*
*
* Lists autoscaling policies in the project.
*
*/
public com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse
listAutoscalingPolicies(
com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getListAutoscalingPoliciesMethod(), getCallOptions(), request);
}
/**
*
*
*
* Deletes an autoscaling policy. It is an error to delete an autoscaling
* policy that is in use by one or more clusters.
*
*/
public com.google.protobuf.Empty deleteAutoscalingPolicy(
com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getDeleteAutoscalingPolicyMethod(), getCallOptions(), request);
}
}
/**
*
*
*
* The API interface for managing autoscaling policies in the
* Cloud Dataproc API.
*
*/
public static final class AutoscalingPolicyServiceFutureStub
extends io.grpc.stub.AbstractFutureStub {
private AutoscalingPolicyServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected AutoscalingPolicyServiceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AutoscalingPolicyServiceFutureStub(channel, callOptions);
}
/**
*
*
*
* Creates new autoscaling policy.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.cloud.dataproc.v1beta2.AutoscalingPolicy>
createAutoscalingPolicy(
com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getCreateAutoscalingPolicyMethod(), getCallOptions()), request);
}
/**
*
*
*
* Updates (replaces) autoscaling policy.
* Disabled check for update_mask, because all updates will be full
* replacements.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.cloud.dataproc.v1beta2.AutoscalingPolicy>
updateAutoscalingPolicy(
com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getUpdateAutoscalingPolicyMethod(), getCallOptions()), request);
}
/**
*
*
*
* Retrieves autoscaling policy.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.cloud.dataproc.v1beta2.AutoscalingPolicy>
getAutoscalingPolicy(
com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetAutoscalingPolicyMethod(), getCallOptions()), request);
}
/**
*
*
*
* Lists autoscaling policies in the project.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse>
listAutoscalingPolicies(
com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getListAutoscalingPoliciesMethod(), getCallOptions()), request);
}
/**
*
*
*
* Deletes an autoscaling policy. It is an error to delete an autoscaling
* policy that is in use by one or more clusters.
*
*/
public com.google.common.util.concurrent.ListenableFuture
deleteAutoscalingPolicy(
com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getDeleteAutoscalingPolicyMethod(), getCallOptions()), request);
}
}
private static final int METHODID_CREATE_AUTOSCALING_POLICY = 0;
private static final int METHODID_UPDATE_AUTOSCALING_POLICY = 1;
private static final int METHODID_GET_AUTOSCALING_POLICY = 2;
private static final int METHODID_LIST_AUTOSCALING_POLICIES = 3;
private static final int METHODID_DELETE_AUTOSCALING_POLICY = 4;
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 AutoscalingPolicyServiceImplBase serviceImpl;
private final int methodId;
MethodHandlers(AutoscalingPolicyServiceImplBase 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_AUTOSCALING_POLICY:
serviceImpl.createAutoscalingPolicy(
(com.google.cloud.dataproc.v1beta2.CreateAutoscalingPolicyRequest) request,
(io.grpc.stub.StreamObserver)
responseObserver);
break;
case METHODID_UPDATE_AUTOSCALING_POLICY:
serviceImpl.updateAutoscalingPolicy(
(com.google.cloud.dataproc.v1beta2.UpdateAutoscalingPolicyRequest) request,
(io.grpc.stub.StreamObserver)
responseObserver);
break;
case METHODID_GET_AUTOSCALING_POLICY:
serviceImpl.getAutoscalingPolicy(
(com.google.cloud.dataproc.v1beta2.GetAutoscalingPolicyRequest) request,
(io.grpc.stub.StreamObserver)
responseObserver);
break;
case METHODID_LIST_AUTOSCALING_POLICIES:
serviceImpl.listAutoscalingPolicies(
(com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesRequest) request,
(io.grpc.stub.StreamObserver<
com.google.cloud.dataproc.v1beta2.ListAutoscalingPoliciesResponse>)
responseObserver);
break;
case METHODID_DELETE_AUTOSCALING_POLICY:
serviceImpl.deleteAutoscalingPolicy(
(com.google.cloud.dataproc.v1beta2.DeleteAutoscalingPolicyRequest) 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();
}
}
}
private abstract static class AutoscalingPolicyServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier,
io.grpc.protobuf.ProtoServiceDescriptorSupplier {
AutoscalingPolicyServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.google.cloud.dataproc.v1beta2.AutoscalingPoliciesProto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("AutoscalingPolicyService");
}
}
private static final class AutoscalingPolicyServiceFileDescriptorSupplier
extends AutoscalingPolicyServiceBaseDescriptorSupplier {
AutoscalingPolicyServiceFileDescriptorSupplier() {}
}
private static final class AutoscalingPolicyServiceMethodDescriptorSupplier
extends AutoscalingPolicyServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
AutoscalingPolicyServiceMethodDescriptorSupplier(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 (AutoscalingPolicyServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor =
result =
io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new AutoscalingPolicyServiceFileDescriptorSupplier())
.addMethod(getCreateAutoscalingPolicyMethod())
.addMethod(getUpdateAutoscalingPolicyMethod())
.addMethod(getGetAutoscalingPolicyMethod())
.addMethod(getListAutoscalingPoliciesMethod())
.addMethod(getDeleteAutoscalingPolicyMethod())
.build();
}
}
}
return result;
}
}