mirror of https://github.com/pulumi/pulumi.git
121 lines
4.5 KiB
JavaScript
121 lines
4.5 KiB
JavaScript
// GENERATED CODE -- DO NOT EDIT!
|
|
|
|
// Original file comments:
|
|
// Copyright 2016-2017, Pulumi Corporation. All rights reserved.
|
|
//
|
|
'use strict';
|
|
var grpc = require('grpc');
|
|
var language_pb = require('./language_pb.js');
|
|
var plugin_pb = require('./plugin_pb.js');
|
|
var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js');
|
|
|
|
function serialize_google_protobuf_Empty(arg) {
|
|
if (!(arg instanceof google_protobuf_empty_pb.Empty)) {
|
|
throw new Error('Expected argument of type google.protobuf.Empty');
|
|
}
|
|
return new Buffer(arg.serializeBinary());
|
|
}
|
|
|
|
function deserialize_google_protobuf_Empty(buffer_arg) {
|
|
return google_protobuf_empty_pb.Empty.deserializeBinary(new Uint8Array(buffer_arg));
|
|
}
|
|
|
|
function serialize_pulumirpc_GetRequiredPluginsRequest(arg) {
|
|
if (!(arg instanceof language_pb.GetRequiredPluginsRequest)) {
|
|
throw new Error('Expected argument of type pulumirpc.GetRequiredPluginsRequest');
|
|
}
|
|
return new Buffer(arg.serializeBinary());
|
|
}
|
|
|
|
function deserialize_pulumirpc_GetRequiredPluginsRequest(buffer_arg) {
|
|
return language_pb.GetRequiredPluginsRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
}
|
|
|
|
function serialize_pulumirpc_GetRequiredPluginsResponse(arg) {
|
|
if (!(arg instanceof language_pb.GetRequiredPluginsResponse)) {
|
|
throw new Error('Expected argument of type pulumirpc.GetRequiredPluginsResponse');
|
|
}
|
|
return new Buffer(arg.serializeBinary());
|
|
}
|
|
|
|
function deserialize_pulumirpc_GetRequiredPluginsResponse(buffer_arg) {
|
|
return language_pb.GetRequiredPluginsResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
}
|
|
|
|
function serialize_pulumirpc_PluginInfo(arg) {
|
|
if (!(arg instanceof plugin_pb.PluginInfo)) {
|
|
throw new Error('Expected argument of type pulumirpc.PluginInfo');
|
|
}
|
|
return new Buffer(arg.serializeBinary());
|
|
}
|
|
|
|
function deserialize_pulumirpc_PluginInfo(buffer_arg) {
|
|
return plugin_pb.PluginInfo.deserializeBinary(new Uint8Array(buffer_arg));
|
|
}
|
|
|
|
function serialize_pulumirpc_RunRequest(arg) {
|
|
if (!(arg instanceof language_pb.RunRequest)) {
|
|
throw new Error('Expected argument of type pulumirpc.RunRequest');
|
|
}
|
|
return new Buffer(arg.serializeBinary());
|
|
}
|
|
|
|
function deserialize_pulumirpc_RunRequest(buffer_arg) {
|
|
return language_pb.RunRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
}
|
|
|
|
function serialize_pulumirpc_RunResponse(arg) {
|
|
if (!(arg instanceof language_pb.RunResponse)) {
|
|
throw new Error('Expected argument of type pulumirpc.RunResponse');
|
|
}
|
|
return new Buffer(arg.serializeBinary());
|
|
}
|
|
|
|
function deserialize_pulumirpc_RunResponse(buffer_arg) {
|
|
return language_pb.RunResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
}
|
|
|
|
|
|
// LanguageRuntime is the interface that the planning monitor uses to drive execution of an interpreter responsible
|
|
// for confguring and creating resource objects.
|
|
var LanguageRuntimeService = exports.LanguageRuntimeService = {
|
|
// GetRequiredPlugins computes the complete set of anticipated plugins required by a program.
|
|
getRequiredPlugins: {
|
|
path: '/pulumirpc.LanguageRuntime/GetRequiredPlugins',
|
|
requestStream: false,
|
|
responseStream: false,
|
|
requestType: language_pb.GetRequiredPluginsRequest,
|
|
responseType: language_pb.GetRequiredPluginsResponse,
|
|
requestSerialize: serialize_pulumirpc_GetRequiredPluginsRequest,
|
|
requestDeserialize: deserialize_pulumirpc_GetRequiredPluginsRequest,
|
|
responseSerialize: serialize_pulumirpc_GetRequiredPluginsResponse,
|
|
responseDeserialize: deserialize_pulumirpc_GetRequiredPluginsResponse,
|
|
},
|
|
// Run executes a program and returns its result.
|
|
run: {
|
|
path: '/pulumirpc.LanguageRuntime/Run',
|
|
requestStream: false,
|
|
responseStream: false,
|
|
requestType: language_pb.RunRequest,
|
|
responseType: language_pb.RunResponse,
|
|
requestSerialize: serialize_pulumirpc_RunRequest,
|
|
requestDeserialize: deserialize_pulumirpc_RunRequest,
|
|
responseSerialize: serialize_pulumirpc_RunResponse,
|
|
responseDeserialize: deserialize_pulumirpc_RunResponse,
|
|
},
|
|
// GetPluginInfo returns generic information about this plugin, like its version.
|
|
getPluginInfo: {
|
|
path: '/pulumirpc.LanguageRuntime/GetPluginInfo',
|
|
requestStream: false,
|
|
responseStream: false,
|
|
requestType: google_protobuf_empty_pb.Empty,
|
|
responseType: plugin_pb.PluginInfo,
|
|
requestSerialize: serialize_google_protobuf_Empty,
|
|
requestDeserialize: deserialize_google_protobuf_Empty,
|
|
responseSerialize: serialize_pulumirpc_PluginInfo,
|
|
responseDeserialize: deserialize_pulumirpc_PluginInfo,
|
|
},
|
|
};
|
|
|
|
exports.LanguageRuntimeClient = grpc.makeGenericClientConstructor(LanguageRuntimeService);
|