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

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

@implementation KEYAPISSUBSCRIPTIONV1ServiceService

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

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

#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 GetServiceList(GetServiceListRequest) returns (stream GetServiceListResponse)

/**
 * Метод получения услуг квартиры.
 * Вернёт все услуги на квартире и недоступные по адресу как неактивные.
 * Метод доступен для: admin, master, service, application(subscription:read или subscription:edit)
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getServiceListWithRequest:(KEYAPISSUBSCRIPTIONV1GetServiceListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISSUBSCRIPTIONV1GetServiceListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  [[self RPCToGetServiceListWithRequest:request eventHandler:eventHandler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения услуг квартиры.
 * Вернёт все услуги на квартире и недоступные по адресу как неактивные.
 * Метод доступен для: admin, master, service, application(subscription:read или subscription:edit)
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetServiceListWithRequest:(KEYAPISSUBSCRIPTIONV1GetServiceListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISSUBSCRIPTIONV1GetServiceListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  return [self RPCToMethod:@"GetServiceList"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISSUBSCRIPTIONV1GetServiceListResponse class]
        responsesWriteable:[GRXWriteable writeableWithEventHandler:eventHandler]];
}
/**
 * Метод получения услуг квартиры.
 * Вернёт все услуги на квартире и недоступные по адресу как неактивные.
 * Метод доступен для: admin, master, service, application(subscription:read или subscription:edit)
 */
- (GRPCUnaryProtoCall *)getServiceListWithMessage:(KEYAPISSUBSCRIPTIONV1GetServiceListRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetServiceList"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISSUBSCRIPTIONV1GetServiceListResponse class]];
}

#pragma mark GetServicePrivilegeList(GetServicePrivilegeListRequest) returns (stream GetServicePrivilegeListResponse)

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

#pragma mark GetServicePrivilegeCount(GetServicePrivilegeCountRequest) returns (GetServicePrivilegeCountResponse)

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

#pragma mark GetServiceKindList(GetServiceKindListRequest) returns (stream GetServiceKindListResponse)

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

@end
#endif
