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

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

@implementation KEYAPISSUBSCRIPTIONV1OfferService

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

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

#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 GetOffer(GetOfferRequest) returns (GetOfferResponse)

/**
 * Метод получения коммерческой возможности.
 * Метод доступен для: 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)getOfferWithRequest:(KEYAPISSUBSCRIPTIONV1GetOfferRequest *)request handler:(void(^)(KEYAPISSUBSCRIPTIONV1GetOfferResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToGetOfferWithRequest: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 *)RPCToGetOfferWithRequest:(KEYAPISSUBSCRIPTIONV1GetOfferRequest *)request handler:(void(^)(KEYAPISSUBSCRIPTIONV1GetOfferResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"GetOffer"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISSUBSCRIPTIONV1GetOfferResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод получения коммерческой возможности.
 * Метод доступен для: admin, mrf, master, ltp_first, service, application(subscription:read или subscription:edit)
 */
- (GRPCUnaryProtoCall *)getOfferWithMessage:(KEYAPISSUBSCRIPTIONV1GetOfferRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetOffer"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISSUBSCRIPTIONV1GetOfferResponse class]];
}

#pragma mark GetOfferList(GetOfferListRequest) returns (stream GetOfferListResponse)

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

#pragma mark GetOfferCount(GetOfferCountRequest) returns (GetOfferCountResponse)

/**
 * Метод получения количества коммерческих возможностей.
 * Метод доступен для: admin, mrf, master, external_seller, ltp_first, owner, employee, 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)getOfferCountWithRequest:(KEYAPISSUBSCRIPTIONV1GetOfferCountRequest *)request handler:(void(^)(KEYAPISSUBSCRIPTIONV1GetOfferCountResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToGetOfferCountWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения количества коммерческих возможностей.
 * Метод доступен для: admin, mrf, master, external_seller, ltp_first, owner, employee, 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 *)RPCToGetOfferCountWithRequest:(KEYAPISSUBSCRIPTIONV1GetOfferCountRequest *)request handler:(void(^)(KEYAPISSUBSCRIPTIONV1GetOfferCountResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"GetOfferCount"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[KEYAPISSUBSCRIPTIONV1GetOfferCountResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод получения количества коммерческих возможностей.
 * Метод доступен для: admin, mrf, master, external_seller, ltp_first, owner, employee, service, application(subscription:read или subscription:edit)
 */
- (GRPCUnaryProtoCall *)getOfferCountWithMessage:(KEYAPISSUBSCRIPTIONV1GetOfferCountRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetOfferCount"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[KEYAPISSUBSCRIPTIONV1GetOfferCountResponse class]];
}

@end
#endif
