// Code generated by gRPC proto compiler.  DO NOT EDIT!
// source: deviceapis/device/v1/deviceapis_device_user_v1.proto

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

#import "google/api/Annotations.pbobjc.h"
#import "google/api/FieldBehavior.pbobjc.h"
#import "protoc-gen-openapiv2/options/Annotations.pbobjc.h"

@implementation DEVICEAPISDEVICEV1UserService

#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:@"deviceapis.device.v1"
                 serviceName:@"UserService"
                 callOptions:callOptions];
}

- (instancetype)initWithHost:(NSString *)host {
  return [super initWithHost:host
                 packageName:@"deviceapis.device.v1"
                 serviceName:@"UserService"];
}

#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 DeleteUser(DeleteUserRequest) returns (DeleteUserResponse)

/**
 * Метод удаления единичной сущности User по ключу
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)deleteUserWithRequest:(DEVICEAPISDEVICEV1DeleteUserRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1DeleteUserResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToDeleteUserWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод удаления единичной сущности User по ключу
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToDeleteUserWithRequest:(DEVICEAPISDEVICEV1DeleteUserRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1DeleteUserResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"DeleteUser"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[DEVICEAPISDEVICEV1DeleteUserResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод удаления единичной сущности User по ключу
 */
- (GRPCUnaryProtoCall *)deleteUserWithMessage:(DEVICEAPISDEVICEV1DeleteUserRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"DeleteUser"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[DEVICEAPISDEVICEV1DeleteUserResponse class]];
}

#pragma mark GetUserList(GetUserListRequest) returns (GetUserListResponse)

/**
 * Метод получения списка сущностей User по фильтру
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getUserListWithRequest:(DEVICEAPISDEVICEV1GetUserListRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1GetUserListResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToGetUserListWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения списка сущностей User по фильтру
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetUserListWithRequest:(DEVICEAPISDEVICEV1GetUserListRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1GetUserListResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"GetUserList"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[DEVICEAPISDEVICEV1GetUserListResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод получения списка сущностей User по фильтру
 */
- (GRPCUnaryProtoCall *)getUserListWithMessage:(DEVICEAPISDEVICEV1GetUserListRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetUserList"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[DEVICEAPISDEVICEV1GetUserListResponse class]];
}

#pragma mark PostUserNameReplace(PostUserNameReplaceRequest) returns (PostUserNameReplaceResponse)

/**
 * Метод замены имени пользователя
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postUserNameReplaceWithRequest:(DEVICEAPISDEVICEV1PostUserNameReplaceRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1PostUserNameReplaceResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostUserNameReplaceWithRequest: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 *)RPCToPostUserNameReplaceWithRequest:(DEVICEAPISDEVICEV1PostUserNameReplaceRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1PostUserNameReplaceResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostUserNameReplace"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[DEVICEAPISDEVICEV1PostUserNameReplaceResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод замены имени пользователя
 */
- (GRPCUnaryProtoCall *)postUserNameReplaceWithMessage:(DEVICEAPISDEVICEV1PostUserNameReplaceRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostUserNameReplace"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[DEVICEAPISDEVICEV1PostUserNameReplaceResponse class]];
}

#pragma mark PostUserPasswordReplace(PostUserPasswordReplaceRequest) returns (PostUserPasswordReplaceResponse)

/**
 * Метод замены пароля пользователя
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postUserPasswordReplaceWithRequest:(DEVICEAPISDEVICEV1PostUserPasswordReplaceRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1PostUserPasswordReplaceResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostUserPasswordReplaceWithRequest: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 *)RPCToPostUserPasswordReplaceWithRequest:(DEVICEAPISDEVICEV1PostUserPasswordReplaceRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1PostUserPasswordReplaceResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostUserPasswordReplace"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[DEVICEAPISDEVICEV1PostUserPasswordReplaceResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод замены пароля пользователя
 */
- (GRPCUnaryProtoCall *)postUserPasswordReplaceWithMessage:(DEVICEAPISDEVICEV1PostUserPasswordReplaceRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostUserPasswordReplace"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[DEVICEAPISDEVICEV1PostUserPasswordReplaceResponse class]];
}

#pragma mark PostUserPermissionReplace(PostUserPermissionReplaceRequest) returns (PostUserPermissionReplaceResponse)

/**
 * Метод замены пароля пользователя.
 * Будут изменены только явно переданные в data.permission разрешения
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postUserPermissionReplaceWithRequest:(DEVICEAPISDEVICEV1PostUserPermissionReplaceRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1PostUserPermissionReplaceResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostUserPermissionReplaceWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод замены пароля пользователя.
 * Будут изменены только явно переданные в data.permission разрешения
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToPostUserPermissionReplaceWithRequest:(DEVICEAPISDEVICEV1PostUserPermissionReplaceRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1PostUserPermissionReplaceResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostUserPermissionReplace"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[DEVICEAPISDEVICEV1PostUserPermissionReplaceResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод замены пароля пользователя.
 * Будут изменены только явно переданные в data.permission разрешения
 */
- (GRPCUnaryProtoCall *)postUserPermissionReplaceWithMessage:(DEVICEAPISDEVICEV1PostUserPermissionReplaceRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostUserPermissionReplace"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[DEVICEAPISDEVICEV1PostUserPermissionReplaceResponse class]];
}

#pragma mark SaveUser(SaveUserRequest) returns (SaveUserResponse)

/**
 * Метод создания/редактирования сущности User
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)saveUserWithRequest:(DEVICEAPISDEVICEV1SaveUserRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1SaveUserResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToSaveUserWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод создания/редактирования сущности User
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToSaveUserWithRequest:(DEVICEAPISDEVICEV1SaveUserRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1SaveUserResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"SaveUser"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[DEVICEAPISDEVICEV1SaveUserResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод создания/редактирования сущности User
 */
- (GRPCUnaryProtoCall *)saveUserWithMessage:(DEVICEAPISDEVICEV1SaveUserRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"SaveUser"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[DEVICEAPISDEVICEV1SaveUserResponse class]];
}

@end
#endif
