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

#if !defined(GPB_GRPC_PROTOCOL_ONLY) || !GPB_GRPC_PROTOCOL_ONLY
#import "keyapis/vc/v1/KeyapisVcCompanyV1.pbrpc.h"
#import "keyapis/vc/v1/KeyapisVcCompanyV1.pbobjc.h"
#import <ProtoRPC/ProtoRPCLegacy.h>
#import <RxLibrary/GRXWriter+Immediate.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/GPBTimestamp.pbobjc.h>
#else
#import "GPBTimestamp.pbobjc.h"
#endif
#import "keyapis/vc/v1/KeyapisVcCameraV1.pbobjc.h"

@implementation KEYAPISVCV1CompanyService

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

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

#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 PostCompanyImpersonation(PostCompanyImpersonationRequest) returns (PostCompanyImpersonationResponse)

/**
 * Метод генерации имперсонационной ссылки для владельца компании.
 * Возвращает одноразовую ссылку для имперсонации в сервисе inkey-front.
 * Сценарий работы метода: https://confluence.rt.ru/pages/viewpage.action?pageId=1013775798.
 * Метод доступен для: service, bti, admin
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postCompanyImpersonationWithRequest:(KEYAPISVCV1PostCompanyImpersonationRequest *)request handler:(void(^)(KEYAPISVCV1PostCompanyImpersonationResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostCompanyImpersonationWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод генерации имперсонационной ссылки для владельца компании.
 * Возвращает одноразовую ссылку для имперсонации в сервисе inkey-front.
 * Сценарий работы метода: https://confluence.rt.ru/pages/viewpage.action?pageId=1013775798.
 * Метод доступен для: service, bti, admin
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToPostCompanyImpersonationWithRequest:(KEYAPISVCV1PostCompanyImpersonationRequest *)request handler:(void(^)(KEYAPISVCV1PostCompanyImpersonationResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostCompanyImpersonation"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISVCV1PostCompanyImpersonationResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод генерации имперсонационной ссылки для владельца компании.
 * Возвращает одноразовую ссылку для имперсонации в сервисе inkey-front.
 * Сценарий работы метода: https://confluence.rt.ru/pages/viewpage.action?pageId=1013775798.
 * Метод доступен для: service, bti, admin
 */
- (GRPCUnaryProtoCall *)postCompanyImpersonationWithMessage:(KEYAPISVCV1PostCompanyImpersonationRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostCompanyImpersonation"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISVCV1PostCompanyImpersonationResponse class]];
}

@end
#endif
