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

#if !defined(GPB_GRPC_PROTOCOL_ONLY) || !GPB_GRPC_PROTOCOL_ONLY
#import "keyapis/encryption_profile/v1/KeyapisEncryptionProfileEncryptionProfileV1.pbrpc.h"
#import "keyapis/encryption_profile/v1/KeyapisEncryptionProfileEncryptionProfileV1.pbobjc.h"
#import <ProtoRPC/ProtoRPCLegacy.h>
#import <RxLibrary/GRXWriter+Immediate.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 "google/api/Annotations.pbobjc.h"
#import "google/api/FieldBehavior.pbobjc.h"
#import "google/protobuf/Descriptor.pbobjc.h"
#if defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) && GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
#import <Protobuf/GPBWrappers.pbobjc.h>
#else
#import "GPBWrappers.pbobjc.h"
#endif

@implementation KEYAPISENCRYPTIONPROFILEV1EncryptionProfileService

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

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

#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 PostEncryptionProfile(PostEncryptionProfileRequest) returns (PostEncryptionProfileResponse)

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

#pragma mark GetEncryptionProfile(GetEncryptionProfileRequest) returns (GetEncryptionProfileResponse)

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

#pragma mark GetEncryptionProfileList(GetEncryptionProfileListRequest) returns (stream GetEncryptionProfileListResponse)

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

#pragma mark GetEncryptionProfileCount(GetEncryptionProfileCountRequest) returns (GetEncryptionProfileCountResponse)

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

#pragma mark DeleteEncryptionProfile(DeleteEncryptionProfileRequest) returns (DeleteEncryptionProfileResponse)

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

#pragma mark PostEncryptionProfileRestore(PostEncryptionProfileRestoreRequest) returns (PostEncryptionProfileRestoreResponse)

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

@end
#endif
