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

com.google.ads.googleads.v17.services.RecommendationServiceGrpc Maven / Gradle / Ivy

The newest version!
package com.google.ads.googleads.v17.services;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 * 
 * Service to manage recommendations.
 * 
*/ @javax.annotation.Generated( value = "by gRPC proto compiler", comments = "Source: google/ads/googleads/v17/services/recommendation_service.proto") @io.grpc.stub.annotations.GrpcGenerated public final class RecommendationServiceGrpc { private RecommendationServiceGrpc() {} public static final java.lang.String SERVICE_NAME = "google.ads.googleads.v17.services.RecommendationService"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor getApplyRecommendationMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "ApplyRecommendation", requestType = com.google.ads.googleads.v17.services.ApplyRecommendationRequest.class, responseType = com.google.ads.googleads.v17.services.ApplyRecommendationResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getApplyRecommendationMethod() { io.grpc.MethodDescriptor getApplyRecommendationMethod; if ((getApplyRecommendationMethod = RecommendationServiceGrpc.getApplyRecommendationMethod) == null) { synchronized (RecommendationServiceGrpc.class) { if ((getApplyRecommendationMethod = RecommendationServiceGrpc.getApplyRecommendationMethod) == null) { RecommendationServiceGrpc.getApplyRecommendationMethod = getApplyRecommendationMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ApplyRecommendation")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.google.ads.googleads.v17.services.ApplyRecommendationRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.google.ads.googleads.v17.services.ApplyRecommendationResponse.getDefaultInstance())) .setSchemaDescriptor(new RecommendationServiceMethodDescriptorSupplier("ApplyRecommendation")) .build(); } } } return getApplyRecommendationMethod; } private static volatile io.grpc.MethodDescriptor getDismissRecommendationMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "DismissRecommendation", requestType = com.google.ads.googleads.v17.services.DismissRecommendationRequest.class, responseType = com.google.ads.googleads.v17.services.DismissRecommendationResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getDismissRecommendationMethod() { io.grpc.MethodDescriptor getDismissRecommendationMethod; if ((getDismissRecommendationMethod = RecommendationServiceGrpc.getDismissRecommendationMethod) == null) { synchronized (RecommendationServiceGrpc.class) { if ((getDismissRecommendationMethod = RecommendationServiceGrpc.getDismissRecommendationMethod) == null) { RecommendationServiceGrpc.getDismissRecommendationMethod = getDismissRecommendationMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DismissRecommendation")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.google.ads.googleads.v17.services.DismissRecommendationRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.google.ads.googleads.v17.services.DismissRecommendationResponse.getDefaultInstance())) .setSchemaDescriptor(new RecommendationServiceMethodDescriptorSupplier("DismissRecommendation")) .build(); } } } return getDismissRecommendationMethod; } private static volatile io.grpc.MethodDescriptor getGenerateRecommendationsMethod; @io.grpc.stub.annotations.RpcMethod( fullMethodName = SERVICE_NAME + '/' + "GenerateRecommendations", requestType = com.google.ads.googleads.v17.services.GenerateRecommendationsRequest.class, responseType = com.google.ads.googleads.v17.services.GenerateRecommendationsResponse.class, methodType = io.grpc.MethodDescriptor.MethodType.UNARY) public static io.grpc.MethodDescriptor getGenerateRecommendationsMethod() { io.grpc.MethodDescriptor getGenerateRecommendationsMethod; if ((getGenerateRecommendationsMethod = RecommendationServiceGrpc.getGenerateRecommendationsMethod) == null) { synchronized (RecommendationServiceGrpc.class) { if ((getGenerateRecommendationsMethod = RecommendationServiceGrpc.getGenerateRecommendationsMethod) == null) { RecommendationServiceGrpc.getGenerateRecommendationsMethod = getGenerateRecommendationsMethod = io.grpc.MethodDescriptor.newBuilder() .setType(io.grpc.MethodDescriptor.MethodType.UNARY) .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GenerateRecommendations")) .setSampledToLocalTracing(true) .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.google.ads.googleads.v17.services.GenerateRecommendationsRequest.getDefaultInstance())) .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( com.google.ads.googleads.v17.services.GenerateRecommendationsResponse.getDefaultInstance())) .setSchemaDescriptor(new RecommendationServiceMethodDescriptorSupplier("GenerateRecommendations")) .build(); } } } return getGenerateRecommendationsMethod; } /** * Creates a new async stub that supports all call types for the service */ public static RecommendationServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public RecommendationServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new RecommendationServiceStub(channel, callOptions); } }; return RecommendationServiceStub.newStub(factory, channel); } /** * Creates a new blocking-style stub that supports unary and streaming output calls on the service */ public static RecommendationServiceBlockingStub newBlockingStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public RecommendationServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new RecommendationServiceBlockingStub(channel, callOptions); } }; return RecommendationServiceBlockingStub.newStub(factory, channel); } /** * Creates a new ListenableFuture-style stub that supports unary calls on the service */ public static RecommendationServiceFutureStub newFutureStub( io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = new io.grpc.stub.AbstractStub.StubFactory() { @java.lang.Override public RecommendationServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new RecommendationServiceFutureStub(channel, callOptions); } }; return RecommendationServiceFutureStub.newStub(factory, channel); } /** *
   * Service to manage recommendations.
   * 
*/ public interface AsyncService { /** *
     * Applies given recommendations with corresponding apply parameters.
     * List of thrown errors:
     *   [AuthenticationError]()
     *   [AuthorizationError]()
     *   [DatabaseError]()
     *   [FieldError]()
     *   [HeaderError]()
     *   [InternalError]()
     *   [MutateError]()
     *   [QuotaError]()
     *   [RecommendationError]()
     *   [RequestError]()
     *   [UrlFieldError]()
     * 
*/ default void applyRecommendation(com.google.ads.googleads.v17.services.ApplyRecommendationRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getApplyRecommendationMethod(), responseObserver); } /** *
     * Dismisses given recommendations.
     * List of thrown errors:
     *   [AuthenticationError]()
     *   [AuthorizationError]()
     *   [HeaderError]()
     *   [InternalError]()
     *   [QuotaError]()
     *   [RecommendationError]()
     *   [RequestError]()
     * 
*/ default void dismissRecommendation(com.google.ads.googleads.v17.services.DismissRecommendationRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDismissRecommendationMethod(), responseObserver); } /** *
     * Generates Recommendations based off the requested recommendation_types.
     * List of thrown errors:
     *   [AuthenticationError]()
     *   [AuthorizationError]()
     *   [HeaderError]()
     *   [InternalError]()
     *   [QuotaError]()
     *   [RecommendationError]()
     *   [RequestError]()
     * 
*/ default void generateRecommendations(com.google.ads.googleads.v17.services.GenerateRecommendationsRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGenerateRecommendationsMethod(), responseObserver); } } /** * Base class for the server implementation of the service RecommendationService. *
   * Service to manage recommendations.
   * 
*/ public static abstract class RecommendationServiceImplBase implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return RecommendationServiceGrpc.bindService(this); } } /** * A stub to allow clients to do asynchronous rpc calls to service RecommendationService. *
   * Service to manage recommendations.
   * 
*/ public static final class RecommendationServiceStub extends io.grpc.stub.AbstractAsyncStub { private RecommendationServiceStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected RecommendationServiceStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new RecommendationServiceStub(channel, callOptions); } /** *
     * Applies given recommendations with corresponding apply parameters.
     * List of thrown errors:
     *   [AuthenticationError]()
     *   [AuthorizationError]()
     *   [DatabaseError]()
     *   [FieldError]()
     *   [HeaderError]()
     *   [InternalError]()
     *   [MutateError]()
     *   [QuotaError]()
     *   [RecommendationError]()
     *   [RequestError]()
     *   [UrlFieldError]()
     * 
*/ public void applyRecommendation(com.google.ads.googleads.v17.services.ApplyRecommendationRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getApplyRecommendationMethod(), getCallOptions()), request, responseObserver); } /** *
     * Dismisses given recommendations.
     * List of thrown errors:
     *   [AuthenticationError]()
     *   [AuthorizationError]()
     *   [HeaderError]()
     *   [InternalError]()
     *   [QuotaError]()
     *   [RecommendationError]()
     *   [RequestError]()
     * 
*/ public void dismissRecommendation(com.google.ads.googleads.v17.services.DismissRecommendationRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getDismissRecommendationMethod(), getCallOptions()), request, responseObserver); } /** *
     * Generates Recommendations based off the requested recommendation_types.
     * List of thrown errors:
     *   [AuthenticationError]()
     *   [AuthorizationError]()
     *   [HeaderError]()
     *   [InternalError]()
     *   [QuotaError]()
     *   [RecommendationError]()
     *   [RequestError]()
     * 
*/ public void generateRecommendations(com.google.ads.googleads.v17.services.GenerateRecommendationsRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGenerateRecommendationsMethod(), getCallOptions()), request, responseObserver); } } /** * A stub to allow clients to do synchronous rpc calls to service RecommendationService. *
   * Service to manage recommendations.
   * 
*/ public static final class RecommendationServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub { private RecommendationServiceBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected RecommendationServiceBlockingStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new RecommendationServiceBlockingStub(channel, callOptions); } /** *
     * Applies given recommendations with corresponding apply parameters.
     * List of thrown errors:
     *   [AuthenticationError]()
     *   [AuthorizationError]()
     *   [DatabaseError]()
     *   [FieldError]()
     *   [HeaderError]()
     *   [InternalError]()
     *   [MutateError]()
     *   [QuotaError]()
     *   [RecommendationError]()
     *   [RequestError]()
     *   [UrlFieldError]()
     * 
*/ public com.google.ads.googleads.v17.services.ApplyRecommendationResponse applyRecommendation(com.google.ads.googleads.v17.services.ApplyRecommendationRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getApplyRecommendationMethod(), getCallOptions(), request); } /** *
     * Dismisses given recommendations.
     * List of thrown errors:
     *   [AuthenticationError]()
     *   [AuthorizationError]()
     *   [HeaderError]()
     *   [InternalError]()
     *   [QuotaError]()
     *   [RecommendationError]()
     *   [RequestError]()
     * 
*/ public com.google.ads.googleads.v17.services.DismissRecommendationResponse dismissRecommendation(com.google.ads.googleads.v17.services.DismissRecommendationRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getDismissRecommendationMethod(), getCallOptions(), request); } /** *
     * Generates Recommendations based off the requested recommendation_types.
     * List of thrown errors:
     *   [AuthenticationError]()
     *   [AuthorizationError]()
     *   [HeaderError]()
     *   [InternalError]()
     *   [QuotaError]()
     *   [RecommendationError]()
     *   [RequestError]()
     * 
*/ public com.google.ads.googleads.v17.services.GenerateRecommendationsResponse generateRecommendations(com.google.ads.googleads.v17.services.GenerateRecommendationsRequest request) { return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGenerateRecommendationsMethod(), getCallOptions(), request); } } /** * A stub to allow clients to do ListenableFuture-style rpc calls to service RecommendationService. *
   * Service to manage recommendations.
   * 
*/ public static final class RecommendationServiceFutureStub extends io.grpc.stub.AbstractFutureStub { private RecommendationServiceFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); } @java.lang.Override protected RecommendationServiceFutureStub build( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { return new RecommendationServiceFutureStub(channel, callOptions); } /** *
     * Applies given recommendations with corresponding apply parameters.
     * List of thrown errors:
     *   [AuthenticationError]()
     *   [AuthorizationError]()
     *   [DatabaseError]()
     *   [FieldError]()
     *   [HeaderError]()
     *   [InternalError]()
     *   [MutateError]()
     *   [QuotaError]()
     *   [RecommendationError]()
     *   [RequestError]()
     *   [UrlFieldError]()
     * 
*/ public com.google.common.util.concurrent.ListenableFuture applyRecommendation( com.google.ads.googleads.v17.services.ApplyRecommendationRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getApplyRecommendationMethod(), getCallOptions()), request); } /** *
     * Dismisses given recommendations.
     * List of thrown errors:
     *   [AuthenticationError]()
     *   [AuthorizationError]()
     *   [HeaderError]()
     *   [InternalError]()
     *   [QuotaError]()
     *   [RecommendationError]()
     *   [RequestError]()
     * 
*/ public com.google.common.util.concurrent.ListenableFuture dismissRecommendation( com.google.ads.googleads.v17.services.DismissRecommendationRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getDismissRecommendationMethod(), getCallOptions()), request); } /** *
     * Generates Recommendations based off the requested recommendation_types.
     * List of thrown errors:
     *   [AuthenticationError]()
     *   [AuthorizationError]()
     *   [HeaderError]()
     *   [InternalError]()
     *   [QuotaError]()
     *   [RecommendationError]()
     *   [RequestError]()
     * 
*/ public com.google.common.util.concurrent.ListenableFuture generateRecommendations( com.google.ads.googleads.v17.services.GenerateRecommendationsRequest request) { return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getGenerateRecommendationsMethod(), getCallOptions()), request); } } private static final int METHODID_APPLY_RECOMMENDATION = 0; private static final int METHODID_DISMISS_RECOMMENDATION = 1; private static final int METHODID_GENERATE_RECOMMENDATIONS = 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_APPLY_RECOMMENDATION: serviceImpl.applyRecommendation((com.google.ads.googleads.v17.services.ApplyRecommendationRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_DISMISS_RECOMMENDATION: serviceImpl.dismissRecommendation((com.google.ads.googleads.v17.services.DismissRecommendationRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; case METHODID_GENERATE_RECOMMENDATIONS: serviceImpl.generateRecommendations((com.google.ads.googleads.v17.services.GenerateRecommendationsRequest) 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( getApplyRecommendationMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.google.ads.googleads.v17.services.ApplyRecommendationRequest, com.google.ads.googleads.v17.services.ApplyRecommendationResponse>( service, METHODID_APPLY_RECOMMENDATION))) .addMethod( getDismissRecommendationMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.google.ads.googleads.v17.services.DismissRecommendationRequest, com.google.ads.googleads.v17.services.DismissRecommendationResponse>( service, METHODID_DISMISS_RECOMMENDATION))) .addMethod( getGenerateRecommendationsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( new MethodHandlers< com.google.ads.googleads.v17.services.GenerateRecommendationsRequest, com.google.ads.googleads.v17.services.GenerateRecommendationsResponse>( service, METHODID_GENERATE_RECOMMENDATIONS))) .build(); } private static abstract class RecommendationServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { RecommendationServiceBaseDescriptorSupplier() {} @java.lang.Override public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { return com.google.ads.googleads.v17.services.RecommendationServiceProto.getDescriptor(); } @java.lang.Override public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { return getFileDescriptor().findServiceByName("RecommendationService"); } } private static final class RecommendationServiceFileDescriptorSupplier extends RecommendationServiceBaseDescriptorSupplier { RecommendationServiceFileDescriptorSupplier() {} } private static final class RecommendationServiceMethodDescriptorSupplier extends RecommendationServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { private final java.lang.String methodName; RecommendationServiceMethodDescriptorSupplier(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 (RecommendationServiceGrpc.class) { result = serviceDescriptor; if (result == null) { serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) .setSchemaDescriptor(new RecommendationServiceFileDescriptorSupplier()) .addMethod(getApplyRecommendationMethod()) .addMethod(getDismissRecommendationMethod()) .addMethod(getGenerateRecommendationsMethod()) .build(); } } } return result; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy