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

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

#if defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) && GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
#import <Protobuf/GPBTimestamp.pbobjc.h>
#else
#import "GPBTimestamp.pbobjc.h"
#endif
#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

@implementation KEYAPISBANNERV1BannerService

#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.banner.v1"
                 serviceName:@"BannerService"
                 callOptions:callOptions];
}

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

#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 PostBanner(PostBannerRequest) returns (PostBannerResponse)

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

#pragma mark GetBanner(GetBannerRequest) returns (GetBannerResponse)

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

#pragma mark GetBannerLite(GetBannerLiteRequest) returns (GetBannerLiteResponse)

/**
 * Метод получения упрощённого баннера.
 * Не требует авторизации
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getBannerLiteWithRequest:(KEYAPISBANNERV1GetBannerLiteRequest *)request handler:(void(^)(KEYAPISBANNERV1GetBannerLiteResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToGetBannerLiteWithRequest: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 *)RPCToGetBannerLiteWithRequest:(KEYAPISBANNERV1GetBannerLiteRequest *)request handler:(void(^)(KEYAPISBANNERV1GetBannerLiteResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"GetBannerLite"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISBANNERV1GetBannerLiteResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод получения упрощённого баннера.
 * Не требует авторизации
 */
- (GRPCUnaryProtoCall *)getBannerLiteWithMessage:(KEYAPISBANNERV1GetBannerLiteRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetBannerLite"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISBANNERV1GetBannerLiteResponse class]];
}

#pragma mark GetBannerList(GetBannerListRequest) returns (stream GetBannerListResponse)

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

#pragma mark GetBannerLiteList(GetBannerLiteListRequest) returns (stream GetBannerLiteListResponse)

/**
 * Метод получения списка упрощённых баннеров.
 * Возвращает всегда активные баннеры.
 * По умолчанию возвращает первые 20 баннеров осортированных по приоритету, затем по дате начала акции(от самых важных к не важным, затем от самых новых акций к самым старым).
 * Если запрос выполнен хотя бы без одного изпризнака приложения возвращает пустой список.
 * Если запрос выполнен без признаков пользователя метод возвращает пустой список.
 * Не требует авторизации
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getBannerLiteListWithRequest:(KEYAPISBANNERV1GetBannerLiteListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISBANNERV1GetBannerLiteListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  [[self RPCToGetBannerLiteListWithRequest:request eventHandler:eventHandler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения списка упрощённых баннеров.
 * Возвращает всегда активные баннеры.
 * По умолчанию возвращает первые 20 баннеров осортированных по приоритету, затем по дате начала акции(от самых важных к не важным, затем от самых новых акций к самым старым).
 * Если запрос выполнен хотя бы без одного изпризнака приложения возвращает пустой список.
 * Если запрос выполнен без признаков пользователя метод возвращает пустой список.
 * Не требует авторизации
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetBannerLiteListWithRequest:(KEYAPISBANNERV1GetBannerLiteListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISBANNERV1GetBannerLiteListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  return [self RPCToMethod:@"GetBannerLiteList"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISBANNERV1GetBannerLiteListResponse class]
        responsesWriteable:[GRXWriteable writeableWithEventHandler:eventHandler]];
}
/**
 * Метод получения списка упрощённых баннеров.
 * Возвращает всегда активные баннеры.
 * По умолчанию возвращает первые 20 баннеров осортированных по приоритету, затем по дате начала акции(от самых важных к не важным, затем от самых новых акций к самым старым).
 * Если запрос выполнен хотя бы без одного изпризнака приложения возвращает пустой список.
 * Если запрос выполнен без признаков пользователя метод возвращает пустой список.
 * Не требует авторизации
 */
- (GRPCUnaryProtoCall *)getBannerLiteListWithMessage:(KEYAPISBANNERV1GetBannerLiteListRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetBannerLiteList"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISBANNERV1GetBannerLiteListResponse class]];
}

#pragma mark GetBannerCount(GetBannerCountRequest) returns (GetBannerCountResponse)

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

#pragma mark PostBannerUploadImage(PostBannerUploadImageRequest) returns (PostBannerUploadImageResponse)

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

@end
#endif
