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

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

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

@implementation DEVICEAPISDEVICEV1SafeCityEmergencyFileService

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

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

#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 DeleteSafeCityEmergencyFile(DeleteSafeCityEmergencyFileRequest) returns (DeleteSafeCityEmergencyFileResponse)

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

#pragma mark GetSafeCityEmergencyFileList(GetSafeCityEmergencyFileListRequest) returns (GetSafeCityEmergencyFileListResponse)

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

#pragma mark SaveSafeCityEmergencyFile(SaveSafeCityEmergencyFileRequest) returns (SaveSafeCityEmergencyFileResponse)

/**
 * Метод загрузки файла на устройство.
 * Syslog: EVENT:000: Upload Emergency File: File size nnn byte: File Duration nnn sec
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)saveSafeCityEmergencyFileWithRequest:(DEVICEAPISDEVICEV1SaveSafeCityEmergencyFileRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1SaveSafeCityEmergencyFileResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToSaveSafeCityEmergencyFileWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод загрузки файла на устройство.
 * Syslog: EVENT:000: Upload Emergency File: File size nnn byte: File Duration nnn sec
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToSaveSafeCityEmergencyFileWithRequest:(DEVICEAPISDEVICEV1SaveSafeCityEmergencyFileRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1SaveSafeCityEmergencyFileResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"SaveSafeCityEmergencyFile"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[DEVICEAPISDEVICEV1SaveSafeCityEmergencyFileResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод загрузки файла на устройство.
 * Syslog: EVENT:000: Upload Emergency File: File size nnn byte: File Duration nnn sec
 */
- (GRPCUnaryProtoCall *)saveSafeCityEmergencyFileWithMessage:(DEVICEAPISDEVICEV1SaveSafeCityEmergencyFileRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"SaveSafeCityEmergencyFile"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[DEVICEAPISDEVICEV1SaveSafeCityEmergencyFileResponse class]];
}

@end
#endif
