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

#if !defined(GPB_GRPC_PROTOCOL_ONLY) || !GPB_GRPC_PROTOCOL_ONLY
#import "keyapis/ad/v1/KeyapisAdMarketplaceV1.pbrpc.h"
#import "keyapis/ad/v1/KeyapisAdMarketplaceV1.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 KEYAPISADV1MarketplaceService

#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:@"MarketplaceService"
                 callOptions:callOptions];
}

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

#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 PostMarketplace(PostMarketplaceRequest) returns (PostMarketplaceResponse)

/**
 * Метод сохранения маркетплейса.
 * Поддерживает создание и обновление.
 * Метод доступен для: manager, service, application(ad:edit)
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postMarketplaceWithRequest:(KEYAPISADV1PostMarketplaceRequest *)request handler:(void(^)(KEYAPISADV1PostMarketplaceResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostMarketplaceWithRequest: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 *)RPCToPostMarketplaceWithRequest:(KEYAPISADV1PostMarketplaceRequest *)request handler:(void(^)(KEYAPISADV1PostMarketplaceResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostMarketplace"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISADV1PostMarketplaceResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод сохранения маркетплейса.
 * Поддерживает создание и обновление.
 * Метод доступен для: manager, service, application(ad:edit)
 */
- (GRPCUnaryProtoCall *)postMarketplaceWithMessage:(KEYAPISADV1PostMarketplaceRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostMarketplace"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISADV1PostMarketplaceResponse class]];
}

#pragma mark GetMarketplace(GetMarketplaceRequest) returns (GetMarketplaceResponse)

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

#pragma mark GetMarketplaceList(GetMarketplaceListRequest) returns (stream GetMarketplaceListResponse)

/**
 * Метод получения списка маркетплейсов.
 * Не требует авторизации
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getMarketplaceListWithRequest:(KEYAPISADV1GetMarketplaceListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISADV1GetMarketplaceListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  [[self RPCToGetMarketplaceListWithRequest: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 *)RPCToGetMarketplaceListWithRequest:(KEYAPISADV1GetMarketplaceListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISADV1GetMarketplaceListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  return [self RPCToMethod:@"GetMarketplaceList"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISADV1GetMarketplaceListResponse class]
        responsesWriteable:[GRXWriteable writeableWithEventHandler:eventHandler]];
}
/**
 * Метод получения списка маркетплейсов.
 * Не требует авторизации
 */
- (GRPCUnaryProtoCall *)getMarketplaceListWithMessage:(KEYAPISADV1GetMarketplaceListRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetMarketplaceList"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISADV1GetMarketplaceListResponse class]];
}

#pragma mark GetMarketplaceCount(GetMarketplaceCountRequest) returns (GetMarketplaceCountResponse)

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

@end
#endif
