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

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

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

@implementation DEVICEAPISDEVICEV1SafeCityEmergencyService

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

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

#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 PostSafeCityEmergencyStart(PostSafeCityEmergencyStartRequest) returns (PostSafeCityEmergencyStartResponse)

/**
 * Старт оповещения.
 * Где Tick - один цикл оповещения на одном или двух направлениях (трубка, динамик или трубка и динамик).
 * playbacks_per_tick - Количество воспроизведений файла в каждом цикле оповещения на одном направлении (трубка или динамик).
 * tick_count - Количество воспроизведений циклов оповещения.
 * Длительность оповещения = tick_count * (Х * playbacks_per_tick (трубка) + Х * playbacks_per_tick (динамик)).
 * total_duration - Максимальная общая длительность оповещения. По истечении total_duration секунд оповещение прекращается независимо от количества циклов
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postSafeCityEmergencyStartWithRequest:(DEVICEAPISDEVICEV1PostSafeCityEmergencyStartRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1PostSafeCityEmergencyStartResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostSafeCityEmergencyStartWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Старт оповещения.
 * Где Tick - один цикл оповещения на одном или двух направлениях (трубка, динамик или трубка и динамик).
 * playbacks_per_tick - Количество воспроизведений файла в каждом цикле оповещения на одном направлении (трубка или динамик).
 * tick_count - Количество воспроизведений циклов оповещения.
 * Длительность оповещения = tick_count * (Х * playbacks_per_tick (трубка) + Х * playbacks_per_tick (динамик)).
 * total_duration - Максимальная общая длительность оповещения. По истечении total_duration секунд оповещение прекращается независимо от количества циклов
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToPostSafeCityEmergencyStartWithRequest:(DEVICEAPISDEVICEV1PostSafeCityEmergencyStartRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1PostSafeCityEmergencyStartResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostSafeCityEmergencyStart"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[DEVICEAPISDEVICEV1PostSafeCityEmergencyStartResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Старт оповещения.
 * Где Tick - один цикл оповещения на одном или двух направлениях (трубка, динамик или трубка и динамик).
 * playbacks_per_tick - Количество воспроизведений файла в каждом цикле оповещения на одном направлении (трубка или динамик).
 * tick_count - Количество воспроизведений циклов оповещения.
 * Длительность оповещения = tick_count * (Х * playbacks_per_tick (трубка) + Х * playbacks_per_tick (динамик)).
 * total_duration - Максимальная общая длительность оповещения. По истечении total_duration секунд оповещение прекращается независимо от количества циклов
 */
- (GRPCUnaryProtoCall *)postSafeCityEmergencyStartWithMessage:(DEVICEAPISDEVICEV1PostSafeCityEmergencyStartRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostSafeCityEmergencyStart"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[DEVICEAPISDEVICEV1PostSafeCityEmergencyStartResponse class]];
}

#pragma mark PostSafeCityEmergencyStop(PostSafeCityEmergencyStopRequest) returns (PostSafeCityEmergencyStopResponse)

/**
 * Прекращение оповещения
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postSafeCityEmergencyStopWithRequest:(DEVICEAPISDEVICEV1PostSafeCityEmergencyStopRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1PostSafeCityEmergencyStopResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostSafeCityEmergencyStopWithRequest: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 *)RPCToPostSafeCityEmergencyStopWithRequest:(DEVICEAPISDEVICEV1PostSafeCityEmergencyStopRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1PostSafeCityEmergencyStopResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostSafeCityEmergencyStop"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[DEVICEAPISDEVICEV1PostSafeCityEmergencyStopResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Прекращение оповещения
 */
- (GRPCUnaryProtoCall *)postSafeCityEmergencyStopWithMessage:(DEVICEAPISDEVICEV1PostSafeCityEmergencyStopRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostSafeCityEmergencyStop"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[DEVICEAPISDEVICEV1PostSafeCityEmergencyStopResponse class]];
}

#pragma mark GetSafeCityEmergencyStatus(GetSafeCityEmergencyStatusRequest) returns (GetSafeCityEmergencyStatusResponse)

/**
 * Получение статуса оповещения
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getSafeCityEmergencyStatusWithRequest:(DEVICEAPISDEVICEV1GetSafeCityEmergencyStatusRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1GetSafeCityEmergencyStatusResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToGetSafeCityEmergencyStatusWithRequest: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 *)RPCToGetSafeCityEmergencyStatusWithRequest:(DEVICEAPISDEVICEV1GetSafeCityEmergencyStatusRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1GetSafeCityEmergencyStatusResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"GetSafeCityEmergencyStatus"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[DEVICEAPISDEVICEV1GetSafeCityEmergencyStatusResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Получение статуса оповещения
 */
- (GRPCUnaryProtoCall *)getSafeCityEmergencyStatusWithMessage:(DEVICEAPISDEVICEV1GetSafeCityEmergencyStatusRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetSafeCityEmergencyStatus"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[DEVICEAPISDEVICEV1GetSafeCityEmergencyStatusResponse class]];
}

@end
#endif
