com.google.cloud.ids.v1.IDSGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of grpc-google-cloud-ids-v1 Show documentation
Show all versions of grpc-google-cloud-ids-v1 Show documentation
GRPC library for google-cloud-ids
The newest version!
/*
* 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.ids.v1;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*
*
*
* The IDS Service
*
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler",
comments = "Source: google/cloud/ids/v1/ids.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class IDSGrpc {
private IDSGrpc() {}
public static final java.lang.String SERVICE_NAME = "google.cloud.ids.v1.IDS";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.ids.v1.ListEndpointsRequest,
com.google.cloud.ids.v1.ListEndpointsResponse>
getListEndpointsMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ListEndpoints",
requestType = com.google.cloud.ids.v1.ListEndpointsRequest.class,
responseType = com.google.cloud.ids.v1.ListEndpointsResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.ids.v1.ListEndpointsRequest,
com.google.cloud.ids.v1.ListEndpointsResponse>
getListEndpointsMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.ids.v1.ListEndpointsRequest,
com.google.cloud.ids.v1.ListEndpointsResponse>
getListEndpointsMethod;
if ((getListEndpointsMethod = IDSGrpc.getListEndpointsMethod) == null) {
synchronized (IDSGrpc.class) {
if ((getListEndpointsMethod = IDSGrpc.getListEndpointsMethod) == null) {
IDSGrpc.getListEndpointsMethod =
getListEndpointsMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListEndpoints"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.ids.v1.ListEndpointsRequest.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.ids.v1.ListEndpointsResponse.getDefaultInstance()))
.setSchemaDescriptor(new IDSMethodDescriptorSupplier("ListEndpoints"))
.build();
}
}
}
return getListEndpointsMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.ids.v1.GetEndpointRequest, com.google.cloud.ids.v1.Endpoint>
getGetEndpointMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "GetEndpoint",
requestType = com.google.cloud.ids.v1.GetEndpointRequest.class,
responseType = com.google.cloud.ids.v1.Endpoint.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.ids.v1.GetEndpointRequest, com.google.cloud.ids.v1.Endpoint>
getGetEndpointMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.ids.v1.GetEndpointRequest, com.google.cloud.ids.v1.Endpoint>
getGetEndpointMethod;
if ((getGetEndpointMethod = IDSGrpc.getGetEndpointMethod) == null) {
synchronized (IDSGrpc.class) {
if ((getGetEndpointMethod = IDSGrpc.getGetEndpointMethod) == null) {
IDSGrpc.getGetEndpointMethod =
getGetEndpointMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetEndpoint"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.ids.v1.GetEndpointRequest.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.ids.v1.Endpoint.getDefaultInstance()))
.setSchemaDescriptor(new IDSMethodDescriptorSupplier("GetEndpoint"))
.build();
}
}
}
return getGetEndpointMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.ids.v1.CreateEndpointRequest, com.google.longrunning.Operation>
getCreateEndpointMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "CreateEndpoint",
requestType = com.google.cloud.ids.v1.CreateEndpointRequest.class,
responseType = com.google.longrunning.Operation.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.ids.v1.CreateEndpointRequest, com.google.longrunning.Operation>
getCreateEndpointMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.ids.v1.CreateEndpointRequest, com.google.longrunning.Operation>
getCreateEndpointMethod;
if ((getCreateEndpointMethod = IDSGrpc.getCreateEndpointMethod) == null) {
synchronized (IDSGrpc.class) {
if ((getCreateEndpointMethod = IDSGrpc.getCreateEndpointMethod) == null) {
IDSGrpc.getCreateEndpointMethod =
getCreateEndpointMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateEndpoint"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.ids.v1.CreateEndpointRequest.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.longrunning.Operation.getDefaultInstance()))
.setSchemaDescriptor(new IDSMethodDescriptorSupplier("CreateEndpoint"))
.build();
}
}
}
return getCreateEndpointMethod;
}
private static volatile io.grpc.MethodDescriptor<
com.google.cloud.ids.v1.DeleteEndpointRequest, com.google.longrunning.Operation>
getDeleteEndpointMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "DeleteEndpoint",
requestType = com.google.cloud.ids.v1.DeleteEndpointRequest.class,
responseType = com.google.longrunning.Operation.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<
com.google.cloud.ids.v1.DeleteEndpointRequest, com.google.longrunning.Operation>
getDeleteEndpointMethod() {
io.grpc.MethodDescriptor<
com.google.cloud.ids.v1.DeleteEndpointRequest, com.google.longrunning.Operation>
getDeleteEndpointMethod;
if ((getDeleteEndpointMethod = IDSGrpc.getDeleteEndpointMethod) == null) {
synchronized (IDSGrpc.class) {
if ((getDeleteEndpointMethod = IDSGrpc.getDeleteEndpointMethod) == null) {
IDSGrpc.getDeleteEndpointMethod =
getDeleteEndpointMethod =
io.grpc.MethodDescriptor
.
newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteEndpoint"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.cloud.ids.v1.DeleteEndpointRequest.getDefaultInstance()))
.setResponseMarshaller(
io.grpc.protobuf.ProtoUtils.marshaller(
com.google.longrunning.Operation.getDefaultInstance()))
.setSchemaDescriptor(new IDSMethodDescriptorSupplier("DeleteEndpoint"))
.build();
}
}
}
return getDeleteEndpointMethod;
}
/** Creates a new async stub that supports all call types for the service */
public static IDSStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public IDSStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new IDSStub(channel, callOptions);
}
};
return IDSStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static IDSBlockingStub newBlockingStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public IDSBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new IDSBlockingStub(channel, callOptions);
}
};
return IDSBlockingStub.newStub(factory, channel);
}
/** Creates a new ListenableFuture-style stub that supports unary calls on the service */
public static IDSFutureStub newFutureStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public IDSFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new IDSFutureStub(channel, callOptions);
}
};
return IDSFutureStub.newStub(factory, channel);
}
/**
*
*
*
* The IDS Service
*
*/
public interface AsyncService {
/**
*
*
*
* Lists Endpoints in a given project and location.
*
*/
default void listEndpoints(
com.google.cloud.ids.v1.ListEndpointsRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getListEndpointsMethod(), responseObserver);
}
/**
*
*
*
* Gets details of a single Endpoint.
*
*/
default void getEndpoint(
com.google.cloud.ids.v1.GetEndpointRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getGetEndpointMethod(), responseObserver);
}
/**
*
*
*
* Creates a new Endpoint in a given project and location.
*
*/
default void createEndpoint(
com.google.cloud.ids.v1.CreateEndpointRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getCreateEndpointMethod(), responseObserver);
}
/**
*
*
*
* Deletes a single Endpoint.
*
*/
default void deleteEndpoint(
com.google.cloud.ids.v1.DeleteEndpointRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
getDeleteEndpointMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service IDS.
*
*
* The IDS Service
*
*/
public abstract static class IDSImplBase implements io.grpc.BindableService, AsyncService {
@java.lang.Override
public final io.grpc.ServerServiceDefinition bindService() {
return IDSGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service IDS.
*
*
* The IDS Service
*
*/
public static final class IDSStub extends io.grpc.stub.AbstractAsyncStub {
private IDSStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected IDSStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new IDSStub(channel, callOptions);
}
/**
*
*
*
* Lists Endpoints in a given project and location.
*
*/
public void listEndpoints(
com.google.cloud.ids.v1.ListEndpointsRequest request,
io.grpc.stub.StreamObserver
responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getListEndpointsMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Gets details of a single Endpoint.
*
*/
public void getEndpoint(
com.google.cloud.ids.v1.GetEndpointRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getGetEndpointMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Creates a new Endpoint in a given project and location.
*
*/
public void createEndpoint(
com.google.cloud.ids.v1.CreateEndpointRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getCreateEndpointMethod(), getCallOptions()),
request,
responseObserver);
}
/**
*
*
*
* Deletes a single Endpoint.
*
*/
public void deleteEndpoint(
com.google.cloud.ids.v1.DeleteEndpointRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getDeleteEndpointMethod(), getCallOptions()),
request,
responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service IDS.
*
*
* The IDS Service
*
*/
public static final class IDSBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private IDSBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected IDSBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new IDSBlockingStub(channel, callOptions);
}
/**
*
*
*
* Lists Endpoints in a given project and location.
*
*/
public com.google.cloud.ids.v1.ListEndpointsResponse listEndpoints(
com.google.cloud.ids.v1.ListEndpointsRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getListEndpointsMethod(), getCallOptions(), request);
}
/**
*
*
*
* Gets details of a single Endpoint.
*
*/
public com.google.cloud.ids.v1.Endpoint getEndpoint(
com.google.cloud.ids.v1.GetEndpointRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getGetEndpointMethod(), getCallOptions(), request);
}
/**
*
*
*
* Creates a new Endpoint in a given project and location.
*
*/
public com.google.longrunning.Operation createEndpoint(
com.google.cloud.ids.v1.CreateEndpointRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getCreateEndpointMethod(), getCallOptions(), request);
}
/**
*
*
*
* Deletes a single Endpoint.
*
*/
public com.google.longrunning.Operation deleteEndpoint(
com.google.cloud.ids.v1.DeleteEndpointRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getDeleteEndpointMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service IDS.
*
*
* The IDS Service
*
*/
public static final class IDSFutureStub extends io.grpc.stub.AbstractFutureStub {
private IDSFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected IDSFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new IDSFutureStub(channel, callOptions);
}
/**
*
*
*
* Lists Endpoints in a given project and location.
*
*/
public com.google.common.util.concurrent.ListenableFuture<
com.google.cloud.ids.v1.ListEndpointsResponse>
listEndpoints(com.google.cloud.ids.v1.ListEndpointsRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getListEndpointsMethod(), getCallOptions()), request);
}
/**
*
*
*
* Gets details of a single Endpoint.
*
*/
public com.google.common.util.concurrent.ListenableFuture
getEndpoint(com.google.cloud.ids.v1.GetEndpointRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getGetEndpointMethod(), getCallOptions()), request);
}
/**
*
*
*
* Creates a new Endpoint in a given project and location.
*
*/
public com.google.common.util.concurrent.ListenableFuture
createEndpoint(com.google.cloud.ids.v1.CreateEndpointRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getCreateEndpointMethod(), getCallOptions()), request);
}
/**
*
*
*
* Deletes a single Endpoint.
*
*/
public com.google.common.util.concurrent.ListenableFuture
deleteEndpoint(com.google.cloud.ids.v1.DeleteEndpointRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getDeleteEndpointMethod(), getCallOptions()), request);
}
}
private static final int METHODID_LIST_ENDPOINTS = 0;
private static final int METHODID_GET_ENDPOINT = 1;
private static final int METHODID_CREATE_ENDPOINT = 2;
private static final int METHODID_DELETE_ENDPOINT = 3;
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_LIST_ENDPOINTS:
serviceImpl.listEndpoints(
(com.google.cloud.ids.v1.ListEndpointsRequest) request,
(io.grpc.stub.StreamObserver)
responseObserver);
break;
case METHODID_GET_ENDPOINT:
serviceImpl.getEndpoint(
(com.google.cloud.ids.v1.GetEndpointRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_CREATE_ENDPOINT:
serviceImpl.createEndpoint(
(com.google.cloud.ids.v1.CreateEndpointRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_DELETE_ENDPOINT:
serviceImpl.deleteEndpoint(
(com.google.cloud.ids.v1.DeleteEndpointRequest) 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(
getListEndpointsMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.ids.v1.ListEndpointsRequest,
com.google.cloud.ids.v1.ListEndpointsResponse>(
service, METHODID_LIST_ENDPOINTS)))
.addMethod(
getGetEndpointMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.ids.v1.GetEndpointRequest, com.google.cloud.ids.v1.Endpoint>(
service, METHODID_GET_ENDPOINT)))
.addMethod(
getCreateEndpointMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.ids.v1.CreateEndpointRequest,
com.google.longrunning.Operation>(service, METHODID_CREATE_ENDPOINT)))
.addMethod(
getDeleteEndpointMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.google.cloud.ids.v1.DeleteEndpointRequest,
com.google.longrunning.Operation>(service, METHODID_DELETE_ENDPOINT)))
.build();
}
private abstract static class IDSBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier,
io.grpc.protobuf.ProtoServiceDescriptorSupplier {
IDSBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.google.cloud.ids.v1.IdsProto.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("IDS");
}
}
private static final class IDSFileDescriptorSupplier extends IDSBaseDescriptorSupplier {
IDSFileDescriptorSupplier() {}
}
private static final class IDSMethodDescriptorSupplier extends IDSBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final java.lang.String methodName;
IDSMethodDescriptorSupplier(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 (IDSGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor =
result =
io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new IDSFileDescriptorSupplier())
.addMethod(getListEndpointsMethod())
.addMethod(getGetEndpointMethod())
.addMethod(getCreateEndpointMethod())
.addMethod(getDeleteEndpointMethod())
.build();
}
}
}
return result;
}
}