// Code generated by gRPC proto compiler.  DO NOT EDIT!
// source: deviceapis/device/v1/deviceapis_device_capability_v1.proto

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

#import "google/api/Annotations.pbobjc.h"

@implementation DEVICEAPISDEVICEV1CapabilityService

#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:@"deviceapis.device.v1"
                 serviceName:@"CapabilityService"
                 callOptions:callOptions];
}

- (instancetype)initWithHost:(NSString *)host {
  return [super initWithHost:host
                 packageName:@"deviceapis.device.v1"
                 serviceName:@"CapabilityService"];
}

#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 GetCapabilityList(GetCapabilityListRequest) returns (GetCapabilityListResponse)

/**
 * Метод получения возможностей устройства
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getCapabilityListWithRequest:(DEVICEAPISDEVICEV1GetCapabilityListRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1GetCapabilityListResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToGetCapabilityListWithRequest:request handler:handler] start];
}
// Returns a not-yet-started RPC object.
/**
 * Метод получения возможностей устройства
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (GRPCProtoCall *)RPCToGetCapabilityListWithRequest:(DEVICEAPISDEVICEV1GetCapabilityListRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1GetCapabilityListResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"GetCapabilityList"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[DEVICEAPISDEVICEV1GetCapabilityListResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод получения возможностей устройства
 */
- (GRPCUnaryProtoCall *)getCapabilityListWithMessage:(DEVICEAPISDEVICEV1GetCapabilityListRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetCapabilityList"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[DEVICEAPISDEVICEV1GetCapabilityListResponse class]];
}

@end
#endif
