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

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

#import "google/api/Annotations.pbobjc.h"
#import "google/api/FieldBehavior.pbobjc.h"

@implementation KEYAPISDADATAV1DaDataSyncService

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

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

#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 PostSyncOrpon(PostSyncOrponRequest) returns (PostSyncOrponResponse)

/**
 * Метод синхронизации дома по ОРПОНу.
 * Метод доступен для: admin, service
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postSyncOrponWithRequest:(KEYAPISDADATAV1PostSyncOrponRequest *)request handler:(void(^)(KEYAPISDADATAV1PostSyncOrponResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostSyncOrponWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод синхронизации дома по ОРПОНу.
 * Метод доступен для: admin, service
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToPostSyncOrponWithRequest:(KEYAPISDADATAV1PostSyncOrponRequest *)request handler:(void(^)(KEYAPISDADATAV1PostSyncOrponResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostSyncOrpon"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISDADATAV1PostSyncOrponResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод синхронизации дома по ОРПОНу.
 * Метод доступен для: admin, service
 */
- (GRPCUnaryProtoCall *)postSyncOrponWithMessage:(KEYAPISDADATAV1PostSyncOrponRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostSyncOrpon"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISDADATAV1PostSyncOrponResponse class]];
}

@end
#endif
