// Code generated by gRPC proto compiler.  DO NOT EDIT!
// source: keyapis/ad/v1/keyapis_ad_salepoint_v1.proto

#if !defined(GPB_GRPC_PROTOCOL_ONLY) || !GPB_GRPC_PROTOCOL_ONLY
#import "keyapis/ad/v1/KeyapisAdSalepointV1.pbrpc.h"
#import "keyapis/ad/v1/KeyapisAdSalepointV1.pbobjc.h"
#import <ProtoRPC/ProtoRPCLegacy.h>
#import <RxLibrary/GRXWriter+Immediate.h>

#import "google/api/Annotations.pbobjc.h"
#import "google/api/FieldBehavior.pbobjc.h"
#import "google/protobuf/Descriptor.pbobjc.h"
#if defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) && GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
#import <Protobuf/GPBWrappers.pbobjc.h>
#else
#import "GPBWrappers.pbobjc.h"
#endif
#if defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) && GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
#import <Protobuf/GPBTimestamp.pbobjc.h>
#else
#import "GPBTimestamp.pbobjc.h"
#endif

@implementation KEYAPISADV1SalepointService

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wobjc-designated-initializers"

// Designated initializer
- (instancetype)initWithHost:(NSString *)host callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [super initWithHost:host
                 packageName:@"keyapis.ad.v1"
                 serviceName:@"SalepointService"
                 callOptions:callOptions];
}

- (instancetype)initWithHost:(NSString *)host {
  return [super initWithHost:host
                 packageName:@"keyapis.ad.v1"
                 serviceName:@"SalepointService"];
}

#pragma clang diagnostic pop

// Override superclass initializer to disallow different package and service names.
- (instancetype)initWithHost:(NSString *)host
                 packageName:(NSString *)packageName
                 serviceName:(NSString *)serviceName {
  return [self initWithHost:host];
}

- (instancetype)initWithHost:(NSString *)host
                 packageName:(NSString *)packageName
                 serviceName:(NSString *)serviceName
                 callOptions:(GRPCCallOptions *)callOptions {
  return [self initWithHost:host callOptions:callOptions];
}

#pragma mark - Class Methods

+ (instancetype)serviceWithHost:(NSString *)host {
  return [[self alloc] initWithHost:host];
}

+ (instancetype)serviceWithHost:(NSString *)host callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [[self alloc] initWithHost:host callOptions:callOptions];
}

#pragma mark - Method Implementations

#pragma mark PostSalepoint(PostSalepointRequest) returns (PostSalepointResponse)

/**
 * Метод сохранения точки продаж.
 * Поддерживает создание и обновление.
 * Метод доступен для: manager, service, application(ad:edit)
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postSalepointWithRequest:(KEYAPISADV1PostSalepointRequest *)request handler:(void(^)(KEYAPISADV1PostSalepointResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostSalepointWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод сохранения точки продаж.
 * Поддерживает создание и обновление.
 * Метод доступен для: manager, service, application(ad:edit)
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToPostSalepointWithRequest:(KEYAPISADV1PostSalepointRequest *)request handler:(void(^)(KEYAPISADV1PostSalepointResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostSalepoint"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISADV1PostSalepointResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод сохранения точки продаж.
 * Поддерживает создание и обновление.
 * Метод доступен для: manager, service, application(ad:edit)
 */
- (GRPCUnaryProtoCall *)postSalepointWithMessage:(KEYAPISADV1PostSalepointRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostSalepoint"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISADV1PostSalepointResponse class]];
}

#pragma mark GetSalepoint(GetSalepointRequest) returns (GetSalepointResponse)

/**
 * Метод получения точки продаж.
 * Не требует авторизации
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getSalepointWithRequest:(KEYAPISADV1GetSalepointRequest *)request handler:(void(^)(KEYAPISADV1GetSalepointResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToGetSalepointWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения точки продаж.
 * Не требует авторизации
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetSalepointWithRequest:(KEYAPISADV1GetSalepointRequest *)request handler:(void(^)(KEYAPISADV1GetSalepointResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"GetSalepoint"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISADV1GetSalepointResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод получения точки продаж.
 * Не требует авторизации
 */
- (GRPCUnaryProtoCall *)getSalepointWithMessage:(KEYAPISADV1GetSalepointRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetSalepoint"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISADV1GetSalepointResponse class]];
}

#pragma mark GetSalepointList(GetSalepointListRequest) returns (stream GetSalepointListResponse)

/**
 * Метод получения списка точек продаж.
 * Не требует авторизации
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getSalepointListWithRequest:(KEYAPISADV1GetSalepointListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISADV1GetSalepointListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  [[self RPCToGetSalepointListWithRequest:request eventHandler:eventHandler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения списка точек продаж.
 * Не требует авторизации
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetSalepointListWithRequest:(KEYAPISADV1GetSalepointListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISADV1GetSalepointListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  return [self RPCToMethod:@"GetSalepointList"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISADV1GetSalepointListResponse class]
        responsesWriteable:[GRXWriteable writeableWithEventHandler:eventHandler]];
}
/**
 * Метод получения списка точек продаж.
 * Не требует авторизации
 */
- (GRPCUnaryProtoCall *)getSalepointListWithMessage:(KEYAPISADV1GetSalepointListRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetSalepointList"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISADV1GetSalepointListResponse class]];
}

#pragma mark GetSalepointCount(GetSalepointCountRequest) returns (GetSalepointCountResponse)

/**
 * Метод получения количества точек продаж.
 * Не требует авторизации
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getSalepointCountWithRequest:(KEYAPISADV1GetSalepointCountRequest *)request handler:(void(^)(KEYAPISADV1GetSalepointCountResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToGetSalepointCountWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения количества точек продаж.
 * Не требует авторизации
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetSalepointCountWithRequest:(KEYAPISADV1GetSalepointCountRequest *)request handler:(void(^)(KEYAPISADV1GetSalepointCountResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"GetSalepointCount"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISADV1GetSalepointCountResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод получения количества точек продаж.
 * Не требует авторизации
 */
- (GRPCUnaryProtoCall *)getSalepointCountWithMessage:(KEYAPISADV1GetSalepointCountRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetSalepointCount"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISADV1GetSalepointCountResponse class]];
}

@end
#endif
