All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.eventarc.publishing.v1.PublisherGrpc Maven / Gradle / Ivy

There is a newer version: 0.54.0
Show newest version
/*
 * Copyright 2023 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.eventarc.publishing.v1;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 *
 *
 * 
 * Eventarc processes events generated by an event provider and delivers them to
 * a subscriber.
 * An event provider is a software-as-a-service (SaaS) system or
 * product that can generate and deliver events through Eventarc.
 * A third-party event provider is an event provider from outside of Google.
 * A partner is a third-party event provider that is integrated with Eventarc.
 * A subscriber is a GCP customer interested in receiving events.
 * Channel is a first-class Eventarc resource that is created and managed
 * by the subscriber in their GCP project. A Channel represents a subscriber's
 * intent to receive events from an event provider. A Channel is associated with
 * exactly one event provider.
 * ChannelConnection is a first-class Eventarc resource that
 * is created and managed by the partner in their GCP project. A
 * ChannelConnection represents a connection between a partner and a
 * subscriber's Channel. A ChannelConnection has a one-to-one mapping with a
 * Channel.
 * Publisher allows an event provider to publish events to Eventarc.
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler", comments = "Source: google/cloud/eventarc/publishing/v1/publisher.proto") @io.grpc.stub.annotations.GrpcGenerated public final class PublisherGrpc { private PublisherGrpc() {} public static final java.lang.String SERVICE_NAME = "google.cloud.eventarc.publishing.v1.Publisher"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor< com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest, com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse> getPublishChannelConnectionEventsMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "PublishChannelConnectionEvents", requestType = com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest.class, responseType = com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest, com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse> getPublishChannelConnectionEventsMethod() { io.grpc.MethodDescriptor< com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest, com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse> getPublishChannelConnectionEventsMethod; if ((getPublishChannelConnectionEventsMethod = PublisherGrpc.getPublishChannelConnectionEventsMethod) == null) { synchronized (PublisherGrpc.class) { if ((getPublishChannelConnectionEventsMethod = PublisherGrpc.getPublishChannelConnectionEventsMethod) == null) { PublisherGrpc.getPublishChannelConnectionEventsMethod = getPublishChannelConnectionEventsMethod = io.grpc.MethodDescriptor . newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName( generateFullMethodName(SERVICE_NAME, "PublishChannelConnectionEvents")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( com.google.cloud.eventarc.publishing.v1 .PublishChannelConnectionEventsRequest.getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( com.google.cloud.eventarc.publishing.v1 .PublishChannelConnectionEventsResponse.getDefaultInstance())) .setSchemaDescriptor( new PublisherMethodDescriptorSupplier("PublishChannelConnectionEvents")) .build(); } } } return getPublishChannelConnectionEventsMethod; } private static volatile io.grpc.MethodDescriptor< com.google.cloud.eventarc.publishing.v1.PublishEventsRequest, com.google.cloud.eventarc.publishing.v1.PublishEventsResponse> getPublishEventsMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "PublishEvents", requestType = com.google.cloud.eventarc.publishing.v1.PublishEventsRequest.class, responseType = com.google.cloud.eventarc.publishing.v1.PublishEventsResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor< com.google.cloud.eventarc.publishing.v1.PublishEventsRequest, com.google.cloud.eventarc.publishing.v1.PublishEventsResponse> getPublishEventsMethod() { io.grpc.MethodDescriptor< com.google.cloud.eventarc.publishing.v1.PublishEventsRequest, com.google.cloud.eventarc.publishing.v1.PublishEventsResponse> getPublishEventsMethod; if ((getPublishEventsMethod = PublisherGrpc.getPublishEventsMethod) == null) { synchronized (PublisherGrpc.class) { if ((getPublishEventsMethod = PublisherGrpc.getPublishEventsMethod) == null) { PublisherGrpc.getPublishEventsMethod = getPublishEventsMethod = io.grpc.MethodDescriptor . newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PublishEvents")) .setSampledToLocalTracing(true) .setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( com.google.cloud.eventarc.publishing.v1.PublishEventsRequest .getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( com.google.cloud.eventarc.publishing.v1.PublishEventsResponse .getDefaultInstance())) .setSchemaDescriptor(new PublisherMethodDescriptorSupplier("PublishEvents")) .build(); } } } return getPublishEventsMethod; } /** Creates a new async stub that supports all call types for the service */ public static PublisherStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public PublisherStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new PublisherStub(channel, callOptions); } }; return PublisherStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static PublisherBlockingStub newBlockingStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public PublisherBlockingStub newStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new PublisherBlockingStub(channel, callOptions); } }; return PublisherBlockingStub.newStub(factory, channel); } /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static PublisherFutureStub newFutureStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public PublisherFutureStub newStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new PublisherFutureStub(channel, callOptions); } }; return PublisherFutureStub.newStub(factory, channel); } /** * * *
   * Eventarc processes events generated by an event provider and delivers them to
   * a subscriber.
   * An event provider is a software-as-a-service (SaaS) system or
   * product that can generate and deliver events through Eventarc.
   * A third-party event provider is an event provider from outside of Google.
   * A partner is a third-party event provider that is integrated with Eventarc.
   * A subscriber is a GCP customer interested in receiving events.
   * Channel is a first-class Eventarc resource that is created and managed
   * by the subscriber in their GCP project. A Channel represents a subscriber's
   * intent to receive events from an event provider. A Channel is associated with
   * exactly one event provider.
   * ChannelConnection is a first-class Eventarc resource that
   * is created and managed by the partner in their GCP project. A
   * ChannelConnection represents a connection between a partner and a
   * subscriber's Channel. A ChannelConnection has a one-to-one mapping with a
   * Channel.
   * Publisher allows an event provider to publish events to Eventarc.
   * 
*/ public interface AsyncService { /** * * *
     * Publish events to a ChannelConnection in a partner's project.
     * 
*/ default void publishChannelConnectionEvents( com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest request, io.grpc.stub.StreamObserver< com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getPublishChannelConnectionEventsMethod(), responseObserver); } /** * * *
     * Publish events to a subscriber's channel.
     * 
*/ default void publishEvents( com.google.cloud.eventarc.publishing.v1.PublishEventsRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getPublishEventsMethod(), responseObserver); } } /** * Base class for the server implementation of the service Publisher. * *
   * Eventarc processes events generated by an event provider and delivers them to
   * a subscriber.
   * An event provider is a software-as-a-service (SaaS) system or
   * product that can generate and deliver events through Eventarc.
   * A third-party event provider is an event provider from outside of Google.
   * A partner is a third-party event provider that is integrated with Eventarc.
   * A subscriber is a GCP customer interested in receiving events.
   * Channel is a first-class Eventarc resource that is created and managed
   * by the subscriber in their GCP project. A Channel represents a subscriber's
   * intent to receive events from an event provider. A Channel is associated with
   * exactly one event provider.
   * ChannelConnection is a first-class Eventarc resource that
   * is created and managed by the partner in their GCP project. A
   * ChannelConnection represents a connection between a partner and a
   * subscriber's Channel. A ChannelConnection has a one-to-one mapping with a
   * Channel.
   * Publisher allows an event provider to publish events to Eventarc.
   * 
*/ public abstract static class PublisherImplBase implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return PublisherGrpc.bindService(this); } } /** * A stub to allow clients to do asynchronous rpc calls to service Publisher. * *
   * Eventarc processes events generated by an event provider and delivers them to
   * a subscriber.
   * An event provider is a software-as-a-service (SaaS) system or
   * product that can generate and deliver events through Eventarc.
   * A third-party event provider is an event provider from outside of Google.
   * A partner is a third-party event provider that is integrated with Eventarc.
   * A subscriber is a GCP customer interested in receiving events.
   * Channel is a first-class Eventarc resource that is created and managed
   * by the subscriber in their GCP project. A Channel represents a subscriber's
   * intent to receive events from an event provider. A Channel is associated with
   * exactly one event provider.
   * ChannelConnection is a first-class Eventarc resource that
   * is created and managed by the partner in their GCP project. A
   * ChannelConnection represents a connection between a partner and a
   * subscriber's Channel. A ChannelConnection has a one-to-one mapping with a
   * Channel.
   * Publisher allows an event provider to publish events to Eventarc.
   * 
*/ public static final class PublisherStub extends io.grpc.stub.AbstractAsyncStub { private PublisherStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected PublisherStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new PublisherStub(channel, callOptions); } /** * * *
     * Publish events to a ChannelConnection in a partner's project.
     * 
*/ public void publishChannelConnectionEvents( com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest request, io.grpc.stub.StreamObserver< com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse> responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getPublishChannelConnectionEventsMethod(), getCallOptions()), request, responseObserver); } /** * * *
     * Publish events to a subscriber's channel.
     * 
*/ public void publishEvents( com.google.cloud.eventarc.publishing.v1.PublishEventsRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getPublishEventsMethod(), getCallOptions()), request, responseObserver); } } /** * A stub to allow clients to do synchronous rpc calls to service Publisher. * *
   * Eventarc processes events generated by an event provider and delivers them to
   * a subscriber.
   * An event provider is a software-as-a-service (SaaS) system or
   * product that can generate and deliver events through Eventarc.
   * A third-party event provider is an event provider from outside of Google.
   * A partner is a third-party event provider that is integrated with Eventarc.
   * A subscriber is a GCP customer interested in receiving events.
   * Channel is a first-class Eventarc resource that is created and managed
   * by the subscriber in their GCP project. A Channel represents a subscriber's
   * intent to receive events from an event provider. A Channel is associated with
   * exactly one event provider.
   * ChannelConnection is a first-class Eventarc resource that
   * is created and managed by the partner in their GCP project. A
   * ChannelConnection represents a connection between a partner and a
   * subscriber's Channel. A ChannelConnection has a one-to-one mapping with a
   * Channel.
   * Publisher allows an event provider to publish events to Eventarc.
   * 
*/ public static final class PublisherBlockingStub extends io.grpc.stub.AbstractBlockingStub { private PublisherBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected PublisherBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new PublisherBlockingStub(channel, callOptions); } /** * * *
     * Publish events to a ChannelConnection in a partner's project.
     * 
*/ public com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse publishChannelConnectionEvents( com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getPublishChannelConnectionEventsMethod(), getCallOptions(), request); } /** * * *
     * Publish events to a subscriber's channel.
     * 
*/ public com.google.cloud.eventarc.publishing.v1.PublishEventsResponse publishEvents( com.google.cloud.eventarc.publishing.v1.PublishEventsRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getPublishEventsMethod(), getCallOptions(), request); } } /** * A stub to allow clients to do ListenableFuture-style rpc calls to service Publisher. * *
   * Eventarc processes events generated by an event provider and delivers them to
   * a subscriber.
   * An event provider is a software-as-a-service (SaaS) system or
   * product that can generate and deliver events through Eventarc.
   * A third-party event provider is an event provider from outside of Google.
   * A partner is a third-party event provider that is integrated with Eventarc.
   * A subscriber is a GCP customer interested in receiving events.
   * Channel is a first-class Eventarc resource that is created and managed
   * by the subscriber in their GCP project. A Channel represents a subscriber's
   * intent to receive events from an event provider. A Channel is associated with
   * exactly one event provider.
   * ChannelConnection is a first-class Eventarc resource that
   * is created and managed by the partner in their GCP project. A
   * ChannelConnection represents a connection between a partner and a
   * subscriber's Channel. A ChannelConnection has a one-to-one mapping with a
   * Channel.
   * Publisher allows an event provider to publish events to Eventarc.
   * 
*/ public static final class PublisherFutureStub extends io.grpc.stub.AbstractFutureStub { private PublisherFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected PublisherFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new PublisherFutureStub(channel, callOptions); } /** * * *
     * Publish events to a ChannelConnection in a partner's project.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture< com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse> publishChannelConnectionEvents( com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getPublishChannelConnectionEventsMethod(), getCallOptions()), request); } /** * * *
     * Publish events to a subscriber's channel.
     * 
*/ public com.google.common.util.concurrent.ListenableFuture< com.google.cloud.eventarc.publishing.v1.PublishEventsResponse> publishEvents(com.google.cloud.eventarc.publishing.v1.PublishEventsRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getPublishEventsMethod(), getCallOptions()), request); } } private static final int METHODID_PUBLISH_CHANNEL_CONNECTION_EVENTS = 0; private static final int METHODID_PUBLISH_EVENTS = 1; 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_PUBLISH_CHANNEL_CONNECTION_EVENTS: serviceImpl.publishChannelConnectionEvents( (com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest) request, (io.grpc.stub.StreamObserver< com.google.cloud.eventarc.publishing.v1 .PublishChannelConnectionEventsResponse>) responseObserver); break; case METHODID_PUBLISH_EVENTS: serviceImpl.publishEvents( (com.google.cloud.eventarc.publishing.v1.PublishEventsRequest) request, (io.grpc.stub.StreamObserver< com.google.cloud.eventarc.publishing.v1.PublishEventsResponse>) 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( getPublishChannelConnectionEventsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest, com.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse>( service, METHODID_PUBLISH_CHANNEL_CONNECTION_EVENTS))) .addMethod( getPublishEventsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.google.cloud.eventarc.publishing.v1.PublishEventsRequest, com.google.cloud.eventarc.publishing.v1.PublishEventsResponse>( service, METHODID_PUBLISH_EVENTS))) .build(); } private abstract static class PublisherBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { PublisherBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return com.google.cloud.eventarc.publishing.v1.PublisherProto.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("Publisher"); } } private static final class PublisherFileDescriptorSupplier extends PublisherBaseDescriptorSupplier { PublisherFileDescriptorSupplier() {} } private static final class PublisherMethodDescriptorSupplier extends PublisherBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final java.lang.String methodName; PublisherMethodDescriptorSupplier(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 (PublisherGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new PublisherFileDescriptorSupplier()) .addMethod(getPublishChannelConnectionEventsMethod()) .addMethod(getPublishEventsMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy