blob: c1f49fd3e2e561885c322578ba2828867f22277b [file] [log] [blame]
David Symondsafbae882012-09-24 13:21:21 +10001// Code generated by protoc-gen-go.
2// source: google/protobuf/compiler/plugin.proto
Rob Pikeaaa3a622010-03-20 22:32:34 -07003// DO NOT EDIT!
4
David Symonds7d640de2014-01-13 16:01:41 +11005/*
6Package google_protobuf_compiler is a generated protocol buffer package.
7
8It is generated from these files:
9 google/protobuf/compiler/plugin.proto
10
11It has these top-level messages:
12 CodeGeneratorRequest
13 CodeGeneratorResponse
14*/
Rob Pikeaaa3a622010-03-20 22:32:34 -070015package google_protobuf_compiler
16
David Symonds558f13f2014-11-24 10:28:53 +110017import proto "github.com/golang/protobuf/proto"
David Symonds59b73b32015-08-24 13:22:02 +100018import fmt "fmt"
David Symondsafbae882012-09-24 13:21:21 +100019import math "math"
David Symonds558f13f2014-11-24 10:28:53 +110020import google_protobuf "github.com/golang/protobuf/protoc-gen-go/descriptor"
Rob Pikeaaa3a622010-03-20 22:32:34 -070021
David Symondsf530f252014-04-14 09:53:00 +100022// Reference imports to suppress errors if they are not otherwise used.
David Symonds62539862012-08-04 10:06:55 +100023var _ = proto.Marshal
David Symonds59b73b32015-08-24 13:22:02 +100024var _ = fmt.Errorf
David Symondsfa6a18d2011-01-19 09:30:28 +110025var _ = math.Inf
David Symonds8935abf2011-07-04 15:53:16 +100026
David Symonds52925902013-07-26 19:20:20 +100027// An encoded CodeGeneratorRequest is written to the plugin's stdin.
Rob Pikeaaa3a622010-03-20 22:32:34 -070028type CodeGeneratorRequest struct {
David Symonds52925902013-07-26 19:20:20 +100029 // The .proto files that were explicitly listed on the command-line. The
30 // code generator should generate code only for these files. Each file's
31 // descriptor will be included in proto_file, below.
32 FileToGenerate []string `protobuf:"bytes,1,rep,name=file_to_generate" json:"file_to_generate,omitempty"`
33 // The generator parameter passed on the command-line.
34 Parameter *string `protobuf:"bytes,2,opt,name=parameter" json:"parameter,omitempty"`
35 // FileDescriptorProtos for all files in files_to_generate and everything
36 // they import. The files will appear in topological order, so each file
37 // appears before any file that imports it.
38 //
39 // protoc guarantees that all proto_files will be written after
40 // the fields above, even though this is not technically guaranteed by the
41 // protobuf wire format. This theoretically could allow a plugin to stream
42 // in the FileDescriptorProtos and handle them one by one rather than read
43 // the entire set into memory at once. However, as of this writing, this
44 // is not similarly optimized on protoc's end -- it will store all fields in
45 // memory at once before sending them to the plugin.
David Symonds8bb32ca2012-06-28 10:22:09 -070046 ProtoFile []*google_protobuf.FileDescriptorProto `protobuf:"bytes,15,rep,name=proto_file" json:"proto_file,omitempty"`
47 XXX_unrecognized []byte `json:"-"`
Rob Pikeaaa3a622010-03-20 22:32:34 -070048}
David Symonds8935abf2011-07-04 15:53:16 +100049
David Symonds221834d2015-12-01 09:32:49 +110050func (m *CodeGeneratorRequest) Reset() { *m = CodeGeneratorRequest{} }
51func (m *CodeGeneratorRequest) String() string { return proto.CompactTextString(m) }
52func (*CodeGeneratorRequest) ProtoMessage() {}
53func (*CodeGeneratorRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
Rob Pikeaaa3a622010-03-20 22:32:34 -070054
David Symonds22e7eb42013-03-23 12:17:58 +110055func (m *CodeGeneratorRequest) GetFileToGenerate() []string {
56 if m != nil {
57 return m.FileToGenerate
58 }
59 return nil
60}
61
62func (m *CodeGeneratorRequest) GetParameter() string {
63 if m != nil && m.Parameter != nil {
64 return *m.Parameter
David Symonds8bb32ca2012-06-28 10:22:09 -070065 }
66 return ""
67}
68
David Symonds22e7eb42013-03-23 12:17:58 +110069func (m *CodeGeneratorRequest) GetProtoFile() []*google_protobuf.FileDescriptorProto {
70 if m != nil {
71 return m.ProtoFile
72 }
73 return nil
74}
75
David Symonds52925902013-07-26 19:20:20 +100076// The plugin writes an encoded CodeGeneratorResponse to stdout.
Rob Pikeaaa3a622010-03-20 22:32:34 -070077type CodeGeneratorResponse struct {
David Symonds52925902013-07-26 19:20:20 +100078 // Error message. If non-empty, code generation failed. The plugin process
79 // should exit with status code zero even if it reports an error in this way.
80 //
81 // This should be used to indicate errors in .proto files which prevent the
82 // code generator from generating correct code. Errors which indicate a
83 // problem in protoc itself -- such as the input CodeGeneratorRequest being
84 // unparseable -- should be reported by writing a message to stderr and
85 // exiting with a non-zero status code.
David Symonds8bb32ca2012-06-28 10:22:09 -070086 Error *string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
87 File []*CodeGeneratorResponse_File `protobuf:"bytes,15,rep,name=file" json:"file,omitempty"`
88 XXX_unrecognized []byte `json:"-"`
Rob Pikeaaa3a622010-03-20 22:32:34 -070089}
Rob Pikeaaa3a622010-03-20 22:32:34 -070090
David Symonds221834d2015-12-01 09:32:49 +110091func (m *CodeGeneratorResponse) Reset() { *m = CodeGeneratorResponse{} }
92func (m *CodeGeneratorResponse) String() string { return proto.CompactTextString(m) }
93func (*CodeGeneratorResponse) ProtoMessage() {}
94func (*CodeGeneratorResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
David Symonds8935abf2011-07-04 15:53:16 +100095
David Symonds22e7eb42013-03-23 12:17:58 +110096func (m *CodeGeneratorResponse) GetError() string {
97 if m != nil && m.Error != nil {
98 return *m.Error
David Symonds8bb32ca2012-06-28 10:22:09 -070099 }
100 return ""
101}
102
David Symonds22e7eb42013-03-23 12:17:58 +1100103func (m *CodeGeneratorResponse) GetFile() []*CodeGeneratorResponse_File {
104 if m != nil {
105 return m.File
106 }
107 return nil
108}
109
David Symonds52925902013-07-26 19:20:20 +1000110// Represents a single generated file.
Rob Pikeaaa3a622010-03-20 22:32:34 -0700111type CodeGeneratorResponse_File struct {
David Symonds52925902013-07-26 19:20:20 +1000112 // The file name, relative to the output directory. The name must not
113 // contain "." or ".." components and must be relative, not be absolute (so,
114 // the file cannot lie outside the output directory). "/" must be used as
115 // the path separator, not "\".
116 //
117 // If the name is omitted, the content will be appended to the previous
118 // file. This allows the generator to break large files into small chunks,
119 // and allows the generated text to be streamed back to protoc so that large
120 // files need not reside completely in memory at one time. Note that as of
121 // this writing protoc does not optimize for this -- it will read the entire
122 // CodeGeneratorResponse before writing files to disk.
123 Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
124 // If non-empty, indicates that the named file should already exist, and the
125 // content here is to be inserted into that file at a defined insertion
126 // point. This feature allows a code generator to extend the output
127 // produced by another code generator. The original generator may provide
128 // insertion points by placing special annotations in the file that look
129 // like:
130 // @@protoc_insertion_point(NAME)
131 // The annotation can have arbitrary text before and after it on the line,
132 // which allows it to be placed in a comment. NAME should be replaced with
133 // an identifier naming the point -- this is what other generators will use
134 // as the insertion_point. Code inserted at this point will be placed
135 // immediately above the line containing the insertion point (thus multiple
136 // insertions to the same point will come out in the order they were added).
137 // The double-@ is intended to make it unlikely that the generated code
138 // could contain things that look like insertion points by accident.
139 //
140 // For example, the C++ code generator places the following line in the
141 // .pb.h files that it generates:
142 // // @@protoc_insertion_point(namespace_scope)
143 // This line appears within the scope of the file's package namespace, but
144 // outside of any particular class. Another plugin can then specify the
145 // insertion_point "namespace_scope" to generate additional classes or
146 // other declarations that should be placed in this scope.
147 //
148 // Note that if the line containing the insertion point begins with
149 // whitespace, the same whitespace will be added to every line of the
150 // inserted text. This is useful for languages like Python, where
151 // indentation matters. In these languages, the insertion point comment
152 // should be indented the same amount as any inserted code will need to be
153 // in order to work correctly in that context.
154 //
155 // The code generator that generates the initial file and the one which
156 // inserts into it must both run as part of a single invocation of protoc.
157 // Code generators are executed in the order in which they appear on the
158 // command line.
159 //
160 // If |insertion_point| is present, |name| must also be present.
161 InsertionPoint *string `protobuf:"bytes,2,opt,name=insertion_point" json:"insertion_point,omitempty"`
162 // The file contents.
David Symonds8bb32ca2012-06-28 10:22:09 -0700163 Content *string `protobuf:"bytes,15,opt,name=content" json:"content,omitempty"`
164 XXX_unrecognized []byte `json:"-"`
Rob Pikeaaa3a622010-03-20 22:32:34 -0700165}
David Symonds8935abf2011-07-04 15:53:16 +1000166
David Symonds221834d2015-12-01 09:32:49 +1100167func (m *CodeGeneratorResponse_File) Reset() { *m = CodeGeneratorResponse_File{} }
168func (m *CodeGeneratorResponse_File) String() string { return proto.CompactTextString(m) }
169func (*CodeGeneratorResponse_File) ProtoMessage() {}
170func (*CodeGeneratorResponse_File) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 0} }
Rob Pikeaaa3a622010-03-20 22:32:34 -0700171
David Symonds22e7eb42013-03-23 12:17:58 +1100172func (m *CodeGeneratorResponse_File) GetName() string {
173 if m != nil && m.Name != nil {
174 return *m.Name
David Symonds8bb32ca2012-06-28 10:22:09 -0700175 }
176 return ""
177}
178
David Symonds22e7eb42013-03-23 12:17:58 +1100179func (m *CodeGeneratorResponse_File) GetInsertionPoint() string {
180 if m != nil && m.InsertionPoint != nil {
181 return *m.InsertionPoint
David Symonds8bb32ca2012-06-28 10:22:09 -0700182 }
183 return ""
184}
185
David Symonds22e7eb42013-03-23 12:17:58 +1100186func (m *CodeGeneratorResponse_File) GetContent() string {
187 if m != nil && m.Content != nil {
188 return *m.Content
David Symonds8bb32ca2012-06-28 10:22:09 -0700189 }
190 return ""
191}
David Symonds221834d2015-12-01 09:32:49 +1100192
193func init() {
194 proto.RegisterType((*CodeGeneratorRequest)(nil), "google.protobuf.compiler.CodeGeneratorRequest")
195 proto.RegisterType((*CodeGeneratorResponse)(nil), "google.protobuf.compiler.CodeGeneratorResponse")
196 proto.RegisterType((*CodeGeneratorResponse_File)(nil), "google.protobuf.compiler.CodeGeneratorResponse.File")
197}
198
199var fileDescriptor0 = []byte{
200 // 269 bytes of a gzipped FileDescriptorProto
201 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x91, 0xc1, 0x4a, 0xc3, 0x40,
202 0x10, 0x86, 0xa9, 0x46, 0xa4, 0x63, 0x25, 0x1a, 0x14, 0x43, 0xf1, 0x10, 0x44, 0xc1, 0x83, 0x6c,
203 0x40, 0x3c, 0x78, 0xf2, 0x10, 0x45, 0xaf, 0xc5, 0x17, 0x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 0x10, 0x6b, 0xa9,
215 0xb0, 0xd7, 0x64, 0x4a, 0x4b, 0xda, 0xf8, 0xcd, 0x55, 0x31, 0x1c, 0xd6, 0x64, 0x3c, 0x4a, 0x10,
216 0xf7, 0x41, 0x71, 0x07, 0x97, 0xa2, 0xd9, 0xa9, 0x2e, 0x66, 0x8b, 0xf0, 0x2a, 0xe1, 0x32, 0xf7,
217 0x13, 0x00, 0x00, 0xff, 0xff, 0xdb, 0x18, 0x2a, 0x2a, 0xbd, 0x01, 0x00, 0x00,
218}