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

#import <Foundation/Foundation.h>

#if !defined(GPB_GRPC_FORWARD_DECLARE_MESSAGE_PROTO) || !GPB_GRPC_FORWARD_DECLARE_MESSAGE_PROTO
#import "keyapis/identity/v1/KeyapisIdentityOauth2V1.pbobjc.h"
#endif

#if !defined(GPB_GRPC_PROTOCOL_ONLY) || !GPB_GRPC_PROTOCOL_ONLY
#import <ProtoRPC/ProtoService.h>
#import <ProtoRPC/ProtoRPCLegacy.h>
#import <RxLibrary/GRXWriteable.h>
#import <RxLibrary/GRXWriter.h>
#endif

@class KEYAPISIDENTITYV1GetOauth2ConsentRequest;
@class KEYAPISIDENTITYV1GetOauth2ConsentResponse;
@class KEYAPISIDENTITYV1PostOauth2LoginByCodeRequest;
@class KEYAPISIDENTITYV1PostOauth2LoginByCodeResponse;
@class KEYAPISIDENTITYV1PostOauth2LoginByPasswordRequest;
@class KEYAPISIDENTITYV1PostOauth2LoginByPasswordResponse;

#if !defined(GPB_GRPC_FORWARD_DECLARE_MESSAGE_PROTO) || !GPB_GRPC_FORWARD_DECLARE_MESSAGE_PROTO
  #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/identity/v1/KeyapisIdentityAuthorizationV1.pbobjc.h"
#endif

@class GRPCUnaryProtoCall;
@class GRPCStreamingProtoCall;
@class GRPCCallOptions;
@protocol GRPCProtoResponseHandler;
@class GRPCProtoCall;


NS_ASSUME_NONNULL_BEGIN

@protocol KEYAPISIDENTITYV1Oauth2Service2 <NSObject>

#pragma mark PostOauth2LoginByCode(PostOauth2LoginByCodeRequest) returns (PostOauth2LoginByCodeResponse)

/**
 * Метод авторизации по ОТП-коду по процедуре OAuth2.
 * Метод возвращает переадресацию в виде GRPC метаданных x-http-code и location.
 * Не требует авторизации
 */
- (GRPCUnaryProtoCall *)postOauth2LoginByCodeWithMessage:(KEYAPISIDENTITYV1PostOauth2LoginByCodeRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions;

#pragma mark PostOauth2LoginByPassword(PostOauth2LoginByPasswordRequest) returns (PostOauth2LoginByPasswordResponse)

/**
 * Метод авторизации по паролю по процедуре OAuth2.
 * Метод возвращает переадресацию в виде GRPC метаданных x-http-code и location.
 * Не требует авторизации
 */
- (GRPCUnaryProtoCall *)postOauth2LoginByPasswordWithMessage:(KEYAPISIDENTITYV1PostOauth2LoginByPasswordRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions;

#pragma mark GetOauth2Consent(GetOauth2ConsentRequest) returns (GetOauth2ConsentResponse)

/**
 * Метод запроса соглашения пользователя по процедуре OAuth2.
 * Метод возвращает переадресацию в виде GRPC метаданных x-http-code и location.
 * Не требует авторизации
 */
- (GRPCUnaryProtoCall *)getOauth2ConsentWithMessage:(KEYAPISIDENTITYV1GetOauth2ConsentRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions;

@end

/**
 * The methods in this protocol belong to a set of old APIs that have been deprecated. They do not
 * recognize call options provided in the initializer. Using the v2 protocol is recommended.
 */
@protocol KEYAPISIDENTITYV1Oauth2Service <NSObject>

#pragma mark PostOauth2LoginByCode(PostOauth2LoginByCodeRequest) returns (PostOauth2LoginByCodeResponse)

/**
 * Метод авторизации по ОТП-коду по процедуре OAuth2.
 * Метод возвращает переадресацию в виде GRPC метаданных x-http-code и location.
 * Не требует авторизации
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postOauth2LoginByCodeWithRequest:(KEYAPISIDENTITYV1PostOauth2LoginByCodeRequest *)request handler:(void(^)(KEYAPISIDENTITYV1PostOauth2LoginByCodeResponse *_Nullable response, NSError *_Nullable error))handler;

/**
 * Метод авторизации по ОТП-коду по процедуре OAuth2.
 * Метод возвращает переадресацию в виде GRPC метаданных x-http-code и location.
 * Не требует авторизации
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToPostOauth2LoginByCodeWithRequest:(KEYAPISIDENTITYV1PostOauth2LoginByCodeRequest *)request handler:(void(^)(KEYAPISIDENTITYV1PostOauth2LoginByCodeResponse *_Nullable response, NSError *_Nullable error))handler;


#pragma mark PostOauth2LoginByPassword(PostOauth2LoginByPasswordRequest) returns (PostOauth2LoginByPasswordResponse)

/**
 * Метод авторизации по паролю по процедуре OAuth2.
 * Метод возвращает переадресацию в виде GRPC метаданных x-http-code и location.
 * Не требует авторизации
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postOauth2LoginByPasswordWithRequest:(KEYAPISIDENTITYV1PostOauth2LoginByPasswordRequest *)request handler:(void(^)(KEYAPISIDENTITYV1PostOauth2LoginByPasswordResponse *_Nullable response, NSError *_Nullable error))handler;

/**
 * Метод авторизации по паролю по процедуре OAuth2.
 * Метод возвращает переадресацию в виде GRPC метаданных x-http-code и location.
 * Не требует авторизации
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToPostOauth2LoginByPasswordWithRequest:(KEYAPISIDENTITYV1PostOauth2LoginByPasswordRequest *)request handler:(void(^)(KEYAPISIDENTITYV1PostOauth2LoginByPasswordResponse *_Nullable response, NSError *_Nullable error))handler;


#pragma mark GetOauth2Consent(GetOauth2ConsentRequest) returns (GetOauth2ConsentResponse)

/**
 * Метод запроса соглашения пользователя по процедуре OAuth2.
 * Метод возвращает переадресацию в виде GRPC метаданных x-http-code и location.
 * Не требует авторизации
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getOauth2ConsentWithRequest:(KEYAPISIDENTITYV1GetOauth2ConsentRequest *)request handler:(void(^)(KEYAPISIDENTITYV1GetOauth2ConsentResponse *_Nullable response, NSError *_Nullable error))handler;

/**
 * Метод запроса соглашения пользователя по процедуре OAuth2.
 * Метод возвращает переадресацию в виде GRPC метаданных x-http-code и location.
 * Не требует авторизации
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetOauth2ConsentWithRequest:(KEYAPISIDENTITYV1GetOauth2ConsentRequest *)request handler:(void(^)(KEYAPISIDENTITYV1GetOauth2ConsentResponse *_Nullable response, NSError *_Nullable error))handler;


@end


#if !defined(GPB_GRPC_PROTOCOL_ONLY) || !GPB_GRPC_PROTOCOL_ONLY
/**
 * Basic service implementation, over gRPC, that only does
 * marshalling and parsing.
 */
@interface KEYAPISIDENTITYV1Oauth2Service : GRPCProtoService<KEYAPISIDENTITYV1Oauth2Service2, KEYAPISIDENTITYV1Oauth2Service>
- (instancetype)initWithHost:(NSString *)host callOptions:(GRPCCallOptions *_Nullable)callOptions NS_DESIGNATED_INITIALIZER;
+ (instancetype)serviceWithHost:(NSString *)host callOptions:(GRPCCallOptions *_Nullable)callOptions;
// The following methods belong to a set of old APIs that have been deprecated.
- (instancetype)initWithHost:(NSString *)host;
+ (instancetype)serviceWithHost:(NSString *)host;
@end
#endif

NS_ASSUME_NONNULL_END

