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

#if !defined(GPB_GRPC_PROTOCOL_ONLY) || !GPB_GRPC_PROTOCOL_ONLY
#import "deviceapis/device/v1/DeviceapisDeviceSosV1.pbrpc.h"
#import "deviceapis/device/v1/DeviceapisDeviceSosV1.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"
#if defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) && GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
#import <Protobuf/GPBFieldMask.pbobjc.h>
#else
#import "GPBFieldMask.pbobjc.h"
#endif
#import "protoc-gen-openapiv2/options/Annotations.pbobjc.h"

@implementation DEVICEAPISDEVICEV1SosService

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

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

#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 EditSos(EditSosRequest) returns (EditSosResponse)

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

#pragma mark GetSos(GetSosRequest) returns (GetSosResponse)

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

@end
#endif
