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

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

#import "google/api/Annotations.pbobjc.h"
#import "google/api/FieldBehavior.pbobjc.h"
#import "keyapis/access_management/v1/KeyapisAccessManagementGroupV1.pbobjc.h"

@implementation KEYAPISACCESSMANAGEMENTV1GroupTemplateService

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

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

#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 GetGroupTemplate(GetGroupTemplateRequest) returns (GetGroupTemplateResponse)

/**
 * Метод получения шаблона группы.
 * Метод доступен для: admin, service, bti, seller
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getGroupTemplateWithRequest:(KEYAPISACCESSMANAGEMENTV1GetGroupTemplateRequest *)request handler:(void(^)(KEYAPISACCESSMANAGEMENTV1GetGroupTemplateResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToGetGroupTemplateWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения шаблона группы.
 * Метод доступен для: admin, service, bti, seller
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetGroupTemplateWithRequest:(KEYAPISACCESSMANAGEMENTV1GetGroupTemplateRequest *)request handler:(void(^)(KEYAPISACCESSMANAGEMENTV1GetGroupTemplateResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"GetGroupTemplate"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISACCESSMANAGEMENTV1GetGroupTemplateResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод получения шаблона группы.
 * Метод доступен для: admin, service, bti, seller
 */
- (GRPCUnaryProtoCall *)getGroupTemplateWithMessage:(KEYAPISACCESSMANAGEMENTV1GetGroupTemplateRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetGroupTemplate"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISACCESSMANAGEMENTV1GetGroupTemplateResponse class]];
}

#pragma mark GetGroupTemplateList(GetGroupTemplateListRequest) returns (stream GetGroupTemplateListResponse)

/**
 * Метод получения списка шаблонов групп.
 * Метод доступен для: admin, service, bti, seller
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getGroupTemplateListWithRequest:(KEYAPISACCESSMANAGEMENTV1GetGroupTemplateListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISACCESSMANAGEMENTV1GetGroupTemplateListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  [[self RPCToGetGroupTemplateListWithRequest:request eventHandler:eventHandler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения списка шаблонов групп.
 * Метод доступен для: admin, service, bti, seller
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetGroupTemplateListWithRequest:(KEYAPISACCESSMANAGEMENTV1GetGroupTemplateListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISACCESSMANAGEMENTV1GetGroupTemplateListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  return [self RPCToMethod:@"GetGroupTemplateList"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISACCESSMANAGEMENTV1GetGroupTemplateListResponse class]
        responsesWriteable:[GRXWriteable writeableWithEventHandler:eventHandler]];
}
/**
 * Метод получения списка шаблонов групп.
 * Метод доступен для: admin, service, bti, seller
 */
- (GRPCUnaryProtoCall *)getGroupTemplateListWithMessage:(KEYAPISACCESSMANAGEMENTV1GetGroupTemplateListRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetGroupTemplateList"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISACCESSMANAGEMENTV1GetGroupTemplateListResponse class]];
}

#pragma mark GetGroupTemplateCount(GetGroupTemplateCountRequest) returns (GetGroupTemplateCountResponse)

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

#pragma mark PostGroupTemplate(PostGroupTemplateRequest) returns (PostGroupTemplateResponse)

/**
 * Метод сохранения шаблона группы.
 * Поддерживает создание и обновление как UPSERT по GroupTemplate.id.
 * Метод доступен для: admin, service
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postGroupTemplateWithRequest:(KEYAPISACCESSMANAGEMENTV1PostGroupTemplateRequest *)request handler:(void(^)(KEYAPISACCESSMANAGEMENTV1PostGroupTemplateResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostGroupTemplateWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод сохранения шаблона группы.
 * Поддерживает создание и обновление как UPSERT по GroupTemplate.id.
 * Метод доступен для: admin, service
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToPostGroupTemplateWithRequest:(KEYAPISACCESSMANAGEMENTV1PostGroupTemplateRequest *)request handler:(void(^)(KEYAPISACCESSMANAGEMENTV1PostGroupTemplateResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostGroupTemplate"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISACCESSMANAGEMENTV1PostGroupTemplateResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод сохранения шаблона группы.
 * Поддерживает создание и обновление как UPSERT по GroupTemplate.id.
 * Метод доступен для: admin, service
 */
- (GRPCUnaryProtoCall *)postGroupTemplateWithMessage:(KEYAPISACCESSMANAGEMENTV1PostGroupTemplateRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostGroupTemplate"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISACCESSMANAGEMENTV1PostGroupTemplateResponse class]];
}

#pragma mark DeleteGroupTemplate(DeleteGroupTemplateRequest) returns (DeleteGroupTemplateResponse)

/**
 * Метод удаления шаблона группы.
 * Проставляет дату удаления GroupTemplate.deleted_at.
 * Метод доступен для: admin, service
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)deleteGroupTemplateWithRequest:(KEYAPISACCESSMANAGEMENTV1DeleteGroupTemplateRequest *)request handler:(void(^)(KEYAPISACCESSMANAGEMENTV1DeleteGroupTemplateResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToDeleteGroupTemplateWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод удаления шаблона группы.
 * Проставляет дату удаления GroupTemplate.deleted_at.
 * Метод доступен для: admin, service
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToDeleteGroupTemplateWithRequest:(KEYAPISACCESSMANAGEMENTV1DeleteGroupTemplateRequest *)request handler:(void(^)(KEYAPISACCESSMANAGEMENTV1DeleteGroupTemplateResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"DeleteGroupTemplate"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISACCESSMANAGEMENTV1DeleteGroupTemplateResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод удаления шаблона группы.
 * Проставляет дату удаления GroupTemplate.deleted_at.
 * Метод доступен для: admin, service
 */
- (GRPCUnaryProtoCall *)deleteGroupTemplateWithMessage:(KEYAPISACCESSMANAGEMENTV1DeleteGroupTemplateRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"DeleteGroupTemplate"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISACCESSMANAGEMENTV1DeleteGroupTemplateResponse class]];
}

#pragma mark GetGroupTemplateGroupList(GetGroupTemplateGroupListRequest) returns (stream GetGroupTemplateGroupListResponse)

/**
 * Метод получения списка связей шаблонов групп и группы пользователя.
 * Метод доступен для: admin, service
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getGroupTemplateGroupListWithRequest:(KEYAPISACCESSMANAGEMENTV1GetGroupTemplateGroupListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISACCESSMANAGEMENTV1GetGroupTemplateGroupListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  [[self RPCToGetGroupTemplateGroupListWithRequest:request eventHandler:eventHandler] 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 *)RPCToGetGroupTemplateGroupListWithRequest:(KEYAPISACCESSMANAGEMENTV1GetGroupTemplateGroupListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISACCESSMANAGEMENTV1GetGroupTemplateGroupListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  return [self RPCToMethod:@"GetGroupTemplateGroupList"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISACCESSMANAGEMENTV1GetGroupTemplateGroupListResponse class]
        responsesWriteable:[GRXWriteable writeableWithEventHandler:eventHandler]];
}
/**
 * Метод получения списка связей шаблонов групп и группы пользователя.
 * Метод доступен для: admin, service
 */
- (GRPCUnaryProtoCall *)getGroupTemplateGroupListWithMessage:(KEYAPISACCESSMANAGEMENTV1GetGroupTemplateGroupListRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetGroupTemplateGroupList"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISACCESSMANAGEMENTV1GetGroupTemplateGroupListResponse class]];
}

#pragma mark GetGroupTemplateGroupCount(GetGroupTemplateGroupCountRequest) returns (GetGroupTemplateGroupCountResponse)

/**
 * Метод получения количества связей шаблонов групп и группы пользователя.
 * Метод доступен для: admin, service
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getGroupTemplateGroupCountWithRequest:(KEYAPISACCESSMANAGEMENTV1GetGroupTemplateGroupCountRequest *)request handler:(void(^)(KEYAPISACCESSMANAGEMENTV1GetGroupTemplateGroupCountResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToGetGroupTemplateGroupCountWithRequest: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 *)RPCToGetGroupTemplateGroupCountWithRequest:(KEYAPISACCESSMANAGEMENTV1GetGroupTemplateGroupCountRequest *)request handler:(void(^)(KEYAPISACCESSMANAGEMENTV1GetGroupTemplateGroupCountResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"GetGroupTemplateGroupCount"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISACCESSMANAGEMENTV1GetGroupTemplateGroupCountResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод получения количества связей шаблонов групп и группы пользователя.
 * Метод доступен для: admin, service
 */
- (GRPCUnaryProtoCall *)getGroupTemplateGroupCountWithMessage:(KEYAPISACCESSMANAGEMENTV1GetGroupTemplateGroupCountRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetGroupTemplateGroupCount"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISACCESSMANAGEMENTV1GetGroupTemplateGroupCountResponse class]];
}

#pragma mark PutGroupTemplateGroupAttach(PutGroupTemplateGroupAttachRequest) returns (PutGroupTemplateGroupAttachResponse)

/**
 * Метод сохранения связей шаблонов групп и группы пользователя.
 * Метод доступен для: admin, service
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)putGroupTemplateGroupAttachWithRequest:(KEYAPISACCESSMANAGEMENTV1PutGroupTemplateGroupAttachRequest *)request handler:(void(^)(KEYAPISACCESSMANAGEMENTV1PutGroupTemplateGroupAttachResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPutGroupTemplateGroupAttachWithRequest: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 *)RPCToPutGroupTemplateGroupAttachWithRequest:(KEYAPISACCESSMANAGEMENTV1PutGroupTemplateGroupAttachRequest *)request handler:(void(^)(KEYAPISACCESSMANAGEMENTV1PutGroupTemplateGroupAttachResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PutGroupTemplateGroupAttach"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISACCESSMANAGEMENTV1PutGroupTemplateGroupAttachResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод сохранения связей шаблонов групп и группы пользователя.
 * Метод доступен для: admin, service
 */
- (GRPCUnaryProtoCall *)putGroupTemplateGroupAttachWithMessage:(KEYAPISACCESSMANAGEMENTV1PutGroupTemplateGroupAttachRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PutGroupTemplateGroupAttach"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISACCESSMANAGEMENTV1PutGroupTemplateGroupAttachResponse class]];
}

#pragma mark PutGroupTemplateGroupDetach(PutGroupTemplateGroupDetachRequest) returns (PutGroupTemplateGroupDetachResponse)

/**
 * Метод удаления связей шаблонов групп и группы пользователя.
 * Метод доступен для: admin, service
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)putGroupTemplateGroupDetachWithRequest:(KEYAPISACCESSMANAGEMENTV1PutGroupTemplateGroupDetachRequest *)request handler:(void(^)(KEYAPISACCESSMANAGEMENTV1PutGroupTemplateGroupDetachResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPutGroupTemplateGroupDetachWithRequest: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 *)RPCToPutGroupTemplateGroupDetachWithRequest:(KEYAPISACCESSMANAGEMENTV1PutGroupTemplateGroupDetachRequest *)request handler:(void(^)(KEYAPISACCESSMANAGEMENTV1PutGroupTemplateGroupDetachResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PutGroupTemplateGroupDetach"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISACCESSMANAGEMENTV1PutGroupTemplateGroupDetachResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод удаления связей шаблонов групп и группы пользователя.
 * Метод доступен для: admin, service
 */
- (GRPCUnaryProtoCall *)putGroupTemplateGroupDetachWithMessage:(KEYAPISACCESSMANAGEMENTV1PutGroupTemplateGroupDetachRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PutGroupTemplateGroupDetach"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISACCESSMANAGEMENTV1PutGroupTemplateGroupDetachResponse class]];
}

@end
#endif
