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

#if !defined(GPB_GRPC_PROTOCOL_ONLY) || !GPB_GRPC_PROTOCOL_ONLY
#import "keyapis/notification/v1/KeyapisNotificationPushTokenV1.pbrpc.h"
#import "keyapis/notification/v1/KeyapisNotificationPushTokenV1.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/GPBTimestamp.pbobjc.h>
#else
#import "GPBTimestamp.pbobjc.h"
#endif
#if defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) && GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
#import <Protobuf/GPBWrappers.pbobjc.h>
#else
#import "GPBWrappers.pbobjc.h"
#endif
#import "google/api/Visibility.pbobjc.h"

@implementation KEYAPISNOTIFICATIONV1PushTokenService

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

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

#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 PostPushToken(PostPushTokenRequest) returns (PostPushTokenResponse)

/**
 * Метод сохранения пуш-токенов.
 * Поддерживает создание и обновление.
 * Метод доступен для: admin, master, employee, owner, service, application(notification:edit).
 * Для ролей master, employee, owner можно сохранять только собственные пуш-токены.
 * Для ролей admin, service доступны все пуш-токены
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postPushTokenWithRequest:(KEYAPISNOTIFICATIONV1PostPushTokenRequest *)request handler:(void(^)(KEYAPISNOTIFICATIONV1PostPushTokenResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostPushTokenWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод сохранения пуш-токенов.
 * Поддерживает создание и обновление.
 * Метод доступен для: admin, master, employee, owner, service, application(notification:edit).
 * Для ролей master, employee, owner можно сохранять только собственные пуш-токены.
 * Для ролей admin, service доступны все пуш-токены
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToPostPushTokenWithRequest:(KEYAPISNOTIFICATIONV1PostPushTokenRequest *)request handler:(void(^)(KEYAPISNOTIFICATIONV1PostPushTokenResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostPushToken"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISNOTIFICATIONV1PostPushTokenResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод сохранения пуш-токенов.
 * Поддерживает создание и обновление.
 * Метод доступен для: admin, master, employee, owner, service, application(notification:edit).
 * Для ролей master, employee, owner можно сохранять только собственные пуш-токены.
 * Для ролей admin, service доступны все пуш-токены
 */
- (GRPCUnaryProtoCall *)postPushTokenWithMessage:(KEYAPISNOTIFICATIONV1PostPushTokenRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostPushToken"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISNOTIFICATIONV1PostPushTokenResponse class]];
}

#pragma mark GetPushTokenList(GetPushTokenListRequest) returns (stream GetPushTokenListResponse)

/**
 * Метод получения пуш-токенов.
 * Метод доступен для: admin, master, employee, owner, service, application(notification:read или notification:edit).
 * Для ролей master, employee, owner можно просматривать только собственные пуш-токены.
 * Для ролей admin, service доступны все пуш-токены
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getPushTokenListWithRequest:(KEYAPISNOTIFICATIONV1GetPushTokenListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISNOTIFICATIONV1GetPushTokenListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  [[self RPCToGetPushTokenListWithRequest:request eventHandler:eventHandler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения пуш-токенов.
 * Метод доступен для: admin, master, employee, owner, service, application(notification:read или notification:edit).
 * Для ролей master, employee, owner можно просматривать только собственные пуш-токены.
 * Для ролей admin, service доступны все пуш-токены
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetPushTokenListWithRequest:(KEYAPISNOTIFICATIONV1GetPushTokenListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISNOTIFICATIONV1GetPushTokenListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  return [self RPCToMethod:@"GetPushTokenList"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISNOTIFICATIONV1GetPushTokenListResponse class]
        responsesWriteable:[GRXWriteable writeableWithEventHandler:eventHandler]];
}
/**
 * Метод получения пуш-токенов.
 * Метод доступен для: admin, master, employee, owner, service, application(notification:read или notification:edit).
 * Для ролей master, employee, owner можно просматривать только собственные пуш-токены.
 * Для ролей admin, service доступны все пуш-токены
 */
- (GRPCUnaryProtoCall *)getPushTokenListWithMessage:(KEYAPISNOTIFICATIONV1GetPushTokenListRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetPushTokenList"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISNOTIFICATIONV1GetPushTokenListResponse class]];
}

#pragma mark GetPushTokenCount(GetPushTokenCountRequest) returns (GetPushTokenCountResponse)

/**
 * Метод получения количества пуш-токенов.
 * Метод доступен для: admin, master, employee, owner, service, application(notification:read или notification:edit).
 * Для ролей master, employee, owner можно просматривать только собственные пуш-токены.
 * Для ролей admin, service доступны все пуш-токены
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getPushTokenCountWithRequest:(KEYAPISNOTIFICATIONV1GetPushTokenCountRequest *)request handler:(void(^)(KEYAPISNOTIFICATIONV1GetPushTokenCountResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToGetPushTokenCountWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения количества пуш-токенов.
 * Метод доступен для: admin, master, employee, owner, service, application(notification:read или notification:edit).
 * Для ролей master, employee, owner можно просматривать только собственные пуш-токены.
 * Для ролей admin, service доступны все пуш-токены
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetPushTokenCountWithRequest:(KEYAPISNOTIFICATIONV1GetPushTokenCountRequest *)request handler:(void(^)(KEYAPISNOTIFICATIONV1GetPushTokenCountResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"GetPushTokenCount"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISNOTIFICATIONV1GetPushTokenCountResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод получения количества пуш-токенов.
 * Метод доступен для: admin, master, employee, owner, service, application(notification:read или notification:edit).
 * Для ролей master, employee, owner можно просматривать только собственные пуш-токены.
 * Для ролей admin, service доступны все пуш-токены
 */
- (GRPCUnaryProtoCall *)getPushTokenCountWithMessage:(KEYAPISNOTIFICATIONV1GetPushTokenCountRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetPushTokenCount"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISNOTIFICATIONV1GetPushTokenCountResponse class]];
}

#pragma mark DeletePushToken(DeletePushTokenRequest) returns (DeletePushTokenResponse)

/**
 * Метод удаления пуш-токена.
 * Метод доступен для: admin, master, employee, owner, service, application(notification:edit).
 * Для ролей master, employee, owner можно удалять только собственные пуш-токены.
 * Для ролей admin, service можно удалять все пуш-токены
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)deletePushTokenWithRequest:(KEYAPISNOTIFICATIONV1DeletePushTokenRequest *)request handler:(void(^)(KEYAPISNOTIFICATIONV1DeletePushTokenResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToDeletePushTokenWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод удаления пуш-токена.
 * Метод доступен для: admin, master, employee, owner, service, application(notification:edit).
 * Для ролей master, employee, owner можно удалять только собственные пуш-токены.
 * Для ролей admin, service можно удалять все пуш-токены
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToDeletePushTokenWithRequest:(KEYAPISNOTIFICATIONV1DeletePushTokenRequest *)request handler:(void(^)(KEYAPISNOTIFICATIONV1DeletePushTokenResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"DeletePushToken"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISNOTIFICATIONV1DeletePushTokenResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод удаления пуш-токена.
 * Метод доступен для: admin, master, employee, owner, service, application(notification:edit).
 * Для ролей master, employee, owner можно удалять только собственные пуш-токены.
 * Для ролей admin, service можно удалять все пуш-токены
 */
- (GRPCUnaryProtoCall *)deletePushTokenWithMessage:(KEYAPISNOTIFICATIONV1DeletePushTokenRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"DeletePushToken"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISNOTIFICATIONV1DeletePushTokenResponse class]];
}

#pragma mark DeletePushTokenUserAppId(DeletePushTokenUserAppIdRequest) returns (DeletePushTokenUserAppIdResponse)

/**
 * Метод удаления пуш-токена по идентификатору устройства пользователя.
 * Метод доступен для: admin, master, employee, owner, service, application(notification:edit).
 * Для ролей master, employee, owner можно удалять только собственные пуш-токены.
 * Для ролей admin, service можно удалять все пуш-токены
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)deletePushTokenUserAppIdWithRequest:(KEYAPISNOTIFICATIONV1DeletePushTokenUserAppIdRequest *)request handler:(void(^)(KEYAPISNOTIFICATIONV1DeletePushTokenUserAppIdResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToDeletePushTokenUserAppIdWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод удаления пуш-токена по идентификатору устройства пользователя.
 * Метод доступен для: admin, master, employee, owner, service, application(notification:edit).
 * Для ролей master, employee, owner можно удалять только собственные пуш-токены.
 * Для ролей admin, service можно удалять все пуш-токены
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToDeletePushTokenUserAppIdWithRequest:(KEYAPISNOTIFICATIONV1DeletePushTokenUserAppIdRequest *)request handler:(void(^)(KEYAPISNOTIFICATIONV1DeletePushTokenUserAppIdResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"DeletePushTokenUserAppId"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISNOTIFICATIONV1DeletePushTokenUserAppIdResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод удаления пуш-токена по идентификатору устройства пользователя.
 * Метод доступен для: admin, master, employee, owner, service, application(notification:edit).
 * Для ролей master, employee, owner можно удалять только собственные пуш-токены.
 * Для ролей admin, service можно удалять все пуш-токены
 */
- (GRPCUnaryProtoCall *)deletePushTokenUserAppIdWithMessage:(KEYAPISNOTIFICATIONV1DeletePushTokenUserAppIdRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"DeletePushTokenUserAppId"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISNOTIFICATIONV1DeletePushTokenUserAppIdResponse class]];
}

#pragma mark DeletePushTokenUserId(DeletePushTokenUserIdRequest) returns (DeletePushTokenUserIdResponse)

/**
 * Метод удаления пуш-токенов по идентификатору пользователя.
 * Метод доступен для: admin, master, employee, owner, service, application(notification:edit).
 * Для ролей master, employee, owner можно удалять только собственные пуш-токены.
 * Для ролей admin, service можно удалять все пуш-токены
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)deletePushTokenUserIdWithRequest:(KEYAPISNOTIFICATIONV1DeletePushTokenUserIdRequest *)request handler:(void(^)(KEYAPISNOTIFICATIONV1DeletePushTokenUserIdResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToDeletePushTokenUserIdWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод удаления пуш-токенов по идентификатору пользователя.
 * Метод доступен для: admin, master, employee, owner, service, application(notification:edit).
 * Для ролей master, employee, owner можно удалять только собственные пуш-токены.
 * Для ролей admin, service можно удалять все пуш-токены
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToDeletePushTokenUserIdWithRequest:(KEYAPISNOTIFICATIONV1DeletePushTokenUserIdRequest *)request handler:(void(^)(KEYAPISNOTIFICATIONV1DeletePushTokenUserIdResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"DeletePushTokenUserId"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISNOTIFICATIONV1DeletePushTokenUserIdResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод удаления пуш-токенов по идентификатору пользователя.
 * Метод доступен для: admin, master, employee, owner, service, application(notification:edit).
 * Для ролей master, employee, owner можно удалять только собственные пуш-токены.
 * Для ролей admin, service можно удалять все пуш-токены
 */
- (GRPCUnaryProtoCall *)deletePushTokenUserIdWithMessage:(KEYAPISNOTIFICATIONV1DeletePushTokenUserIdRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"DeletePushTokenUserId"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISNOTIFICATIONV1DeletePushTokenUserIdResponse class]];
}

@end
#endif
