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

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

@implementation KEYAPISSUBSCRIPTIONV1PrivilegeService

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

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

#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 GetPrivilegeList(GetPrivilegeListRequest) returns (stream GetPrivilegeListResponse)

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

#pragma mark GetPrivilegeCount(GetPrivilegeCountRequest) returns (GetPrivilegeCountResponse)

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

#pragma mark GetPrivilegeCheck(GetPrivilegeCheckRequest) returns (GetPrivilegeCheckResponse)

/**
 * Метод проверки привилегии.
 * Метод доступен для: admin, master, service, ltp_first, application(subscription:read или subscription:edit)
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getPrivilegeCheckWithRequest:(KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckRequest *)request handler:(void(^)(KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToGetPrivilegeCheckWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод проверки привилегии.
 * Метод доступен для: admin, master, service, ltp_first, application(subscription:read или subscription:edit)
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetPrivilegeCheckWithRequest:(KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckRequest *)request handler:(void(^)(KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"GetPrivilegeCheck"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод проверки привилегии.
 * Метод доступен для: admin, master, service, ltp_first, application(subscription:read или subscription:edit)
 */
- (GRPCUnaryProtoCall *)getPrivilegeCheckWithMessage:(KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetPrivilegeCheck"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISSUBSCRIPTIONV1GetPrivilegeCheckResponse class]];
}

@end
#endif
