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

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

#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
#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/subscription/v1/KeyapisSubscriptionPrivilegeV1.pbobjc.h"

@implementation KEYAPISSUBSCRIPTIONV1PlanService

#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:@"PlanService"
                 callOptions:callOptions];
}

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

#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 GetPlan(GetPlanRequest) returns (GetPlanResponse)

/**
 * Метод получения технологического плана.
 * Метод доступен для: 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)getPlanWithRequest:(KEYAPISSUBSCRIPTIONV1GetPlanRequest *)request handler:(void(^)(KEYAPISSUBSCRIPTIONV1GetPlanResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToGetPlanWithRequest: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 *)RPCToGetPlanWithRequest:(KEYAPISSUBSCRIPTIONV1GetPlanRequest *)request handler:(void(^)(KEYAPISSUBSCRIPTIONV1GetPlanResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"GetPlan"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISSUBSCRIPTIONV1GetPlanResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод получения технологического плана.
 * Метод доступен для: admin, mrf, master, ltp_first, service, application(subscription:read или subscription:edit)
 */
- (GRPCUnaryProtoCall *)getPlanWithMessage:(KEYAPISSUBSCRIPTIONV1GetPlanRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetPlan"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISSUBSCRIPTIONV1GetPlanResponse class]];
}

#pragma mark GetPlanList(GetPlanListRequest) returns (stream GetPlanListResponse)

/**
 * Метод получения списка технологических планов.
 * Метод доступен для: admin, service, 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)getPlanListWithRequest:(KEYAPISSUBSCRIPTIONV1GetPlanListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISSUBSCRIPTIONV1GetPlanListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  [[self RPCToGetPlanListWithRequest:request eventHandler:eventHandler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения списка технологических планов.
 * Метод доступен для: admin, service, 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 *)RPCToGetPlanListWithRequest:(KEYAPISSUBSCRIPTIONV1GetPlanListRequest *)request eventHandler:(void(^)(BOOL done, KEYAPISSUBSCRIPTIONV1GetPlanListResponse *_Nullable response, NSError *_Nullable error))eventHandler{
  return [self RPCToMethod:@"GetPlanList"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISSUBSCRIPTIONV1GetPlanListResponse class]
        responsesWriteable:[GRXWriteable writeableWithEventHandler:eventHandler]];
}
/**
 * Метод получения списка технологических планов.
 * Метод доступен для: admin, service, mrf, master, ltp_first, service, application(subscription:read или subscription:edit)
 */
- (GRPCUnaryProtoCall *)getPlanListWithMessage:(KEYAPISSUBSCRIPTIONV1GetPlanListRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetPlanList"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISSUBSCRIPTIONV1GetPlanListResponse class]];
}

#pragma mark GetPlanCount(GetPlanCountRequest) returns (GetPlanCountResponse)

/**
 * Метод получения количества технологических планов.
 * Метод доступен для: admin, service, 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)getPlanCountWithRequest:(KEYAPISSUBSCRIPTIONV1GetPlanCountRequest *)request handler:(void(^)(KEYAPISSUBSCRIPTIONV1GetPlanCountResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToGetPlanCountWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения количества технологических планов.
 * Метод доступен для: admin, service, 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 *)RPCToGetPlanCountWithRequest:(KEYAPISSUBSCRIPTIONV1GetPlanCountRequest *)request handler:(void(^)(KEYAPISSUBSCRIPTIONV1GetPlanCountResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"GetPlanCount"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISSUBSCRIPTIONV1GetPlanCountResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод получения количества технологических планов.
 * Метод доступен для: admin, service, mrf, master, ltp_first, service, application(subscription:read или subscription:edit)
 */
- (GRPCUnaryProtoCall *)getPlanCountWithMessage:(KEYAPISSUBSCRIPTIONV1GetPlanCountRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetPlanCount"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISSUBSCRIPTIONV1GetPlanCountResponse class]];
}

@end
#endif
