@protobuf-ts/plugin-framework
Version:
framework to create protoc plugins
114 lines (113 loc) • 5.97 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CodeGeneratorResponse_File = exports.CodeGeneratorResponse = exports.CodeGeneratorRequest = exports.Version = exports.CodeGeneratorResponse_Feature = void 0;
// @generated by protobuf-ts 2.11.0 with parameter force_optimize_code_size,long_type_string
// @generated from protobuf file "google/protobuf/compiler/plugin.proto" (package "google.protobuf.compiler", syntax proto2)
// tslint:disable
//
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
//
//
// Author: kenton@google.com (Kenton Varda)
//
// protoc (aka the Protocol Compiler) can be extended via plugins. A plugin is
// just a program that reads a CodeGeneratorRequest from stdin and writes a
// CodeGeneratorResponse to stdout.
//
// Plugins written using C++ can use google/protobuf/compiler/plugin.h instead
// of dealing with the raw protocol defined here.
//
// A plugin executable needs only to be placed somewhere in the path. The
// plugin should be named "protoc-gen-$NAME", and will then be used when the
// flag "--${NAME}_out" is passed to protoc.
//
const runtime_1 = require("@protobuf-ts/runtime");
const descriptor_1 = require("../descriptor");
const descriptor_2 = require("../descriptor");
/**
* Sync with code_generator.h.
*
* @generated from protobuf enum google.protobuf.compiler.CodeGeneratorResponse.Feature
*/
var CodeGeneratorResponse_Feature;
(function (CodeGeneratorResponse_Feature) {
/**
* @generated from protobuf enum value: FEATURE_NONE = 0;
*/
CodeGeneratorResponse_Feature[CodeGeneratorResponse_Feature["NONE"] = 0] = "NONE";
/**
* @generated from protobuf enum value: FEATURE_PROTO3_OPTIONAL = 1;
*/
CodeGeneratorResponse_Feature[CodeGeneratorResponse_Feature["PROTO3_OPTIONAL"] = 1] = "PROTO3_OPTIONAL";
/**
* @generated from protobuf enum value: FEATURE_SUPPORTS_EDITIONS = 2;
*/
CodeGeneratorResponse_Feature[CodeGeneratorResponse_Feature["SUPPORTS_EDITIONS"] = 2] = "SUPPORTS_EDITIONS";
})(CodeGeneratorResponse_Feature = exports.CodeGeneratorResponse_Feature || (exports.CodeGeneratorResponse_Feature = {}));
// @generated message type with reflection information, may provide speed optimized methods
class Version$Type extends runtime_1.MessageType {
constructor() {
super("google.protobuf.compiler.Version", [
{ no: 1, name: "major", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
{ no: 2, name: "minor", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
{ no: 3, name: "patch", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
{ no: 4, name: "suffix", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }
]);
}
}
/**
* @generated MessageType for protobuf message google.protobuf.compiler.Version
*/
exports.Version = new Version$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CodeGeneratorRequest$Type extends runtime_1.MessageType {
constructor() {
super("google.protobuf.compiler.CodeGeneratorRequest", [
{ no: 1, name: "file_to_generate", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "parameter", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 15, name: "proto_file", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => descriptor_2.FileDescriptorProto },
{ no: 17, name: "source_file_descriptors", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => descriptor_2.FileDescriptorProto },
{ no: 3, name: "compiler_version", kind: "message", T: () => exports.Version }
]);
}
}
/**
* @generated MessageType for protobuf message google.protobuf.compiler.CodeGeneratorRequest
*/
exports.CodeGeneratorRequest = new CodeGeneratorRequest$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CodeGeneratorResponse$Type extends runtime_1.MessageType {
constructor() {
super("google.protobuf.compiler.CodeGeneratorResponse", [
{ no: 1, name: "error", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "supported_features", kind: "scalar", opt: true, T: 4 /*ScalarType.UINT64*/ },
{ no: 3, name: "minimum_edition", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
{ no: 4, name: "maximum_edition", kind: "scalar", opt: true, T: 5 /*ScalarType.INT32*/ },
{ no: 15, name: "file", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => exports.CodeGeneratorResponse_File }
]);
}
}
/**
* @generated MessageType for protobuf message google.protobuf.compiler.CodeGeneratorResponse
*/
exports.CodeGeneratorResponse = new CodeGeneratorResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CodeGeneratorResponse_File$Type extends runtime_1.MessageType {
constructor() {
super("google.protobuf.compiler.CodeGeneratorResponse.File", [
{ no: 1, name: "name", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 2, name: "insertion_point", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 15, name: "content", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ },
{ no: 16, name: "generated_code_info", kind: "message", T: () => descriptor_1.GeneratedCodeInfo }
]);
}
}
/**
* @generated MessageType for protobuf message google.protobuf.compiler.CodeGeneratorResponse.File
*/
exports.CodeGeneratorResponse_File = new CodeGeneratorResponse_File$Type();