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

#if !defined(GPB_GRPC_PROTOCOL_ONLY) || !GPB_GRPC_PROTOCOL_ONLY
#import "keyapis/identity_b2b/v1/KeyapisIdentityB2BAuthorizationV1.pbrpc.h"
#import "keyapis/identity_b2b/v1/KeyapisIdentityB2BAuthorizationV1.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

@implementation KEYAPISIDENTITYB2BV1AuthorizationB2bService

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

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

#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 PostAuthorizationLogin(PostAuthorizationLoginRequest) returns (PostAuthorizationLoginResponse)

/**
 * Метод авторизации по ОТП-коду для B2B.
 * Не требует авторизации
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postAuthorizationLoginWithRequest:(KEYAPISIDENTITYB2BV1PostAuthorizationLoginRequest *)request handler:(void(^)(KEYAPISIDENTITYB2BV1PostAuthorizationLoginResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostAuthorizationLoginWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод авторизации по ОТП-коду для B2B.
 * Не требует авторизации
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToPostAuthorizationLoginWithRequest:(KEYAPISIDENTITYB2BV1PostAuthorizationLoginRequest *)request handler:(void(^)(KEYAPISIDENTITYB2BV1PostAuthorizationLoginResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostAuthorizationLogin"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISIDENTITYB2BV1PostAuthorizationLoginResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод авторизации по ОТП-коду для B2B.
 * Не требует авторизации
 */
- (GRPCUnaryProtoCall *)postAuthorizationLoginWithMessage:(KEYAPISIDENTITYB2BV1PostAuthorizationLoginRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostAuthorizationLogin"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISIDENTITYB2BV1PostAuthorizationLoginResponse class]];
}

#pragma mark PostAuthorizationSendCode(PostAuthorizationSendCodeRequest) returns (PostAuthorizationSendCodeResponse)

/**
 * Метод запроса ОТП-кода для B2B.
 * Не требует авторизации
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postAuthorizationSendCodeWithRequest:(KEYAPISIDENTITYB2BV1PostAuthorizationSendCodeRequest *)request handler:(void(^)(KEYAPISIDENTITYB2BV1PostAuthorizationSendCodeResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostAuthorizationSendCodeWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод запроса ОТП-кода для B2B.
 * Не требует авторизации
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToPostAuthorizationSendCodeWithRequest:(KEYAPISIDENTITYB2BV1PostAuthorizationSendCodeRequest *)request handler:(void(^)(KEYAPISIDENTITYB2BV1PostAuthorizationSendCodeResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostAuthorizationSendCode"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISIDENTITYB2BV1PostAuthorizationSendCodeResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод запроса ОТП-кода для B2B.
 * Не требует авторизации
 */
- (GRPCUnaryProtoCall *)postAuthorizationSendCodeWithMessage:(KEYAPISIDENTITYB2BV1PostAuthorizationSendCodeRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostAuthorizationSendCode"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISIDENTITYB2BV1PostAuthorizationSendCodeResponse class]];
}

#pragma mark PostAuthorizationLoginByPassword(PostAuthorizationLoginByPasswordRequest) returns (PostAuthorizationLoginByPasswordResponse)

/**
 * Метод авторизации для B2B по паролю.
 * Не требует авторизации
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postAuthorizationLoginByPasswordWithRequest:(KEYAPISIDENTITYB2BV1PostAuthorizationLoginByPasswordRequest *)request handler:(void(^)(KEYAPISIDENTITYB2BV1PostAuthorizationLoginByPasswordResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostAuthorizationLoginByPasswordWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод авторизации для B2B по паролю.
 * Не требует авторизации
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToPostAuthorizationLoginByPasswordWithRequest:(KEYAPISIDENTITYB2BV1PostAuthorizationLoginByPasswordRequest *)request handler:(void(^)(KEYAPISIDENTITYB2BV1PostAuthorizationLoginByPasswordResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostAuthorizationLoginByPassword"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISIDENTITYB2BV1PostAuthorizationLoginByPasswordResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод авторизации для B2B по паролю.
 * Не требует авторизации
 */
- (GRPCUnaryProtoCall *)postAuthorizationLoginByPasswordWithMessage:(KEYAPISIDENTITYB2BV1PostAuthorizationLoginByPasswordRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostAuthorizationLoginByPassword"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISIDENTITYB2BV1PostAuthorizationLoginByPasswordResponse class]];
}

#pragma mark PostAuthorizationCheckCode(PostAuthorizationCheckCodeRequest) returns (PostAuthorizationCheckCodeResponse)

/**
 * Метод проверки кода двухфакторной авторизации и активация сессии.
 * Не требует авторизации
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postAuthorizationCheckCodeWithRequest:(KEYAPISIDENTITYB2BV1PostAuthorizationCheckCodeRequest *)request handler:(void(^)(KEYAPISIDENTITYB2BV1PostAuthorizationCheckCodeResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostAuthorizationCheckCodeWithRequest: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 *)RPCToPostAuthorizationCheckCodeWithRequest:(KEYAPISIDENTITYB2BV1PostAuthorizationCheckCodeRequest *)request handler:(void(^)(KEYAPISIDENTITYB2BV1PostAuthorizationCheckCodeResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostAuthorizationCheckCode"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISIDENTITYB2BV1PostAuthorizationCheckCodeResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод проверки кода двухфакторной авторизации и активация сессии.
 * Не требует авторизации
 */
- (GRPCUnaryProtoCall *)postAuthorizationCheckCodeWithMessage:(KEYAPISIDENTITYB2BV1PostAuthorizationCheckCodeRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostAuthorizationCheckCode"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISIDENTITYB2BV1PostAuthorizationCheckCodeResponse class]];
}

@end
#endif
