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

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

#import "google/api/Annotations.pbobjc.h"
#import "protoc-gen-openapiv2/options/Annotations.pbobjc.h"

@implementation DEVICEAPISDEVICEV1SystemService

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

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

#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 PostSystemReboot(PostSystemRebootRequest) returns (PostSystemRebootResponse)

/**
 * Метод удаленной перезагрузки
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)postSystemRebootWithRequest:(DEVICEAPISDEVICEV1PostSystemRebootRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1PostSystemRebootResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToPostSystemRebootWithRequest: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 *)RPCToPostSystemRebootWithRequest:(DEVICEAPISDEVICEV1PostSystemRebootRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1PostSystemRebootResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"PostSystemReboot"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[DEVICEAPISDEVICEV1PostSystemRebootResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод удаленной перезагрузки
 */
- (GRPCUnaryProtoCall *)postSystemRebootWithMessage:(DEVICEAPISDEVICEV1PostSystemRebootRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"PostSystemReboot"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[DEVICEAPISDEVICEV1PostSystemRebootResponse class]];
}

#pragma mark GetSystemInfo(GetSystemInfoRequest) returns (GetSystemInfoResponse)

/**
 * Метод получения общей информации об устройстве
 *
 * This method belongs to a set of APIs that have been deprecated. Using the v2 API is recommended.
 */
- (void)getSystemInfoWithRequest:(DEVICEAPISDEVICEV1GetSystemInfoRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1GetSystemInfoResponse *_Nullable response, NSError *_Nullable error))handler{
  [[self RPCToGetSystemInfoWithRequest: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 *)RPCToGetSystemInfoWithRequest:(DEVICEAPISDEVICEV1GetSystemInfoRequest *)request handler:(void(^)(DEVICEAPISDEVICEV1GetSystemInfoResponse *_Nullable response, NSError *_Nullable error))handler{
  return [self RPCToMethod:@"GetSystemInfo"
            requestsWriter:[GRXWriter writerWithValue:request]
             responseClass:[DEVICEAPISDEVICEV1GetSystemInfoResponse class]
        responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]];
}
/**
 * Метод получения общей информации об устройстве
 */
- (GRPCUnaryProtoCall *)getSystemInfoWithMessage:(DEVICEAPISDEVICEV1GetSystemInfoRequest *)message responseHandler:(id<GRPCProtoResponseHandler>)handler callOptions:(GRPCCallOptions *_Nullable)callOptions {
  return [self RPCToMethod:@"GetSystemInfo"
                   message:message
           responseHandler:handler
               callOptions:callOptions
             responseClass:[DEVICEAPISDEVICEV1GetSystemInfoResponse class]];
}

@end
#endif
