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

#if !defined(GPB_GRPC_PROTOCOL_ONLY) || !GPB_GRPC_PROTOCOL_ONLY
#import "keyapis/subscription/v1/KeyapisSubscriptionSubscriptionV1.pbrpc.h"
#import "keyapis/subscription/v1/KeyapisSubscriptionSubscriptionV1.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
#import "keyapis/subscription/v1/KeyapisSubscriptionOfferV1.pbobjc.h"

@implementation KEYAPISSUBSCRIPTIONV1SubscriptionService

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

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

#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 GetSubscription(GetSubscriptionRequest) returns (GetSubscriptionResponse)

/**
 * Метод получения подписки.
 * Метод доступен для: admin, mrf, master, ltp_first, service, application(subscription:read или subscription:edit)
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getSubscriptionWithRequest:(KEYAPISSUBSCRIPTIONV1GetSubscriptionRequest *)request handler:(void(^)(KEYAPISSUBSCRIPTIONV1GetSubscriptionResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToGetSubscriptionWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения подписки.
 * Метод доступен для: admin, mrf, master, ltp_first, service, application(subscription:read или subscription:edit)
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetSubscriptionWithRequest:(KEYAPISSUBSCRIPTIONV1GetSubscriptionRequest *)request handler:(void(^)(KEYAPISSUBSCRIPTIONV1GetSubscriptionResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"GetSubscription"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISSUBSCRIPTIONV1GetSubscriptionResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод получения подписки.
 * Метод доступен для: admin, mrf, master, ltp_first, service, application(subscription:read или subscription:edit)
 */
- (GRPCUnaryProtoCall *)getSubscriptionWithMessage:(KEYAPISSUBSCRIPTIONV1GetSubscriptionRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetSubscription"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISSUBSCRIPTIONV1GetSubscriptionResponse class]];
}

#pragma mark GetSubscriptionList(GetSubscriptionListRequest) returns (stream GetSubscriptionListResponse)

/**
 * Метод получения списка подписок.
 * Метод доступен для: admin, mrf, master, ltp_first, service, application(subscription:read или subscription:edit)
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getSubscriptionListWithRequest:(KEYAPISSUBSCRIPTIONV1GetSubscriptionListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISSUBSCRIPTIONV1GetSubscriptionListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  [[self RPCToGetSubscriptionListWithRequest:request eventHandler:eventHandler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения списка подписок.
 * Метод доступен для: admin, mrf, master, ltp_first, service, application(subscription:read или subscription:edit)
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetSubscriptionListWithRequest:(KEYAPISSUBSCRIPTIONV1GetSubscriptionListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISSUBSCRIPTIONV1GetSubscriptionListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  return [self RPCToMethod:@"GetSubscriptionList"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISSUBSCRIPTIONV1GetSubscriptionListResponse class]
        responsesWriteable:[GRXWriteable writeableWithEventHandler:eventHandler]];
}
/**
 * Метод получения списка подписок.
 * Метод доступен для: admin, mrf, master, ltp_first, service, application(subscription:read или subscription:edit)
 */
- (GRPCUnaryProtoCall *)getSubscriptionListWithMessage:(KEYAPISSUBSCRIPTIONV1GetSubscriptionListRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetSubscriptionList"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISSUBSCRIPTIONV1GetSubscriptionListResponse class]];
}

#pragma mark GetSubscriptionCount(GetSubscriptionCountRequest) returns (GetSubscriptionCountResponse)

/**
 * Метод получения количества подписок.
 * Метод доступен для: admin, mrf, master, ltp_first, service, application(subscription:read или subscription:edit)
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getSubscriptionCountWithRequest:(KEYAPISSUBSCRIPTIONV1GetSubscriptionCountRequest *)request handler:(void(^)(KEYAPISSUBSCRIPTIONV1GetSubscriptionCountResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToGetSubscriptionCountWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения количества подписок.
 * Метод доступен для: admin, mrf, master, ltp_first, service, application(subscription:read или subscription:edit)
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetSubscriptionCountWithRequest:(KEYAPISSUBSCRIPTIONV1GetSubscriptionCountRequest *)request handler:(void(^)(KEYAPISSUBSCRIPTIONV1GetSubscriptionCountResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"GetSubscriptionCount"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISSUBSCRIPTIONV1GetSubscriptionCountResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод получения количества подписок.
 * Метод доступен для: admin, mrf, master, ltp_first, service, application(subscription:read или subscription:edit)
 */
- (GRPCUnaryProtoCall *)getSubscriptionCountWithMessage:(KEYAPISSUBSCRIPTIONV1GetSubscriptionCountRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetSubscriptionCount"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISSUBSCRIPTIONV1GetSubscriptionCountResponse class]];
}

@end
#endif
