extension.pb.go 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  1. // Copyright 2017 Google LLC. All Rights Reserved.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. // Code generated by protoc-gen-go. DO NOT EDIT.
  15. // versions:
  16. // protoc-gen-go v1.35.1
  17. // protoc v4.23.4
  18. // source: extensions/extension.proto
  19. package gnostic_extension_v1
  20. import (
  21. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  22. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  23. anypb "google.golang.org/protobuf/types/known/anypb"
  24. reflect "reflect"
  25. sync "sync"
  26. )
  27. const (
  28. // Verify that this generated code is sufficiently up-to-date.
  29. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  30. // Verify that runtime/protoimpl is sufficiently up-to-date.
  31. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  32. )
  33. // The version number of Gnostic.
  34. type Version struct {
  35. state protoimpl.MessageState
  36. sizeCache protoimpl.SizeCache
  37. unknownFields protoimpl.UnknownFields
  38. Major int32 `protobuf:"varint,1,opt,name=major,proto3" json:"major,omitempty"`
  39. Minor int32 `protobuf:"varint,2,opt,name=minor,proto3" json:"minor,omitempty"`
  40. Patch int32 `protobuf:"varint,3,opt,name=patch,proto3" json:"patch,omitempty"`
  41. // A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should
  42. // be empty for mainline stable releases.
  43. Suffix string `protobuf:"bytes,4,opt,name=suffix,proto3" json:"suffix,omitempty"`
  44. }
  45. func (x *Version) Reset() {
  46. *x = Version{}
  47. mi := &file_extensions_extension_proto_msgTypes[0]
  48. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  49. ms.StoreMessageInfo(mi)
  50. }
  51. func (x *Version) String() string {
  52. return protoimpl.X.MessageStringOf(x)
  53. }
  54. func (*Version) ProtoMessage() {}
  55. func (x *Version) ProtoReflect() protoreflect.Message {
  56. mi := &file_extensions_extension_proto_msgTypes[0]
  57. if x != nil {
  58. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  59. if ms.LoadMessageInfo() == nil {
  60. ms.StoreMessageInfo(mi)
  61. }
  62. return ms
  63. }
  64. return mi.MessageOf(x)
  65. }
  66. // Deprecated: Use Version.ProtoReflect.Descriptor instead.
  67. func (*Version) Descriptor() ([]byte, []int) {
  68. return file_extensions_extension_proto_rawDescGZIP(), []int{0}
  69. }
  70. func (x *Version) GetMajor() int32 {
  71. if x != nil {
  72. return x.Major
  73. }
  74. return 0
  75. }
  76. func (x *Version) GetMinor() int32 {
  77. if x != nil {
  78. return x.Minor
  79. }
  80. return 0
  81. }
  82. func (x *Version) GetPatch() int32 {
  83. if x != nil {
  84. return x.Patch
  85. }
  86. return 0
  87. }
  88. func (x *Version) GetSuffix() string {
  89. if x != nil {
  90. return x.Suffix
  91. }
  92. return ""
  93. }
  94. // An encoded Request is written to the ExtensionHandler's stdin.
  95. type ExtensionHandlerRequest struct {
  96. state protoimpl.MessageState
  97. sizeCache protoimpl.SizeCache
  98. unknownFields protoimpl.UnknownFields
  99. // The extension to process.
  100. Wrapper *Wrapper `protobuf:"bytes,1,opt,name=wrapper,proto3" json:"wrapper,omitempty"`
  101. // The version number of Gnostic.
  102. CompilerVersion *Version `protobuf:"bytes,2,opt,name=compiler_version,json=compilerVersion,proto3" json:"compiler_version,omitempty"`
  103. }
  104. func (x *ExtensionHandlerRequest) Reset() {
  105. *x = ExtensionHandlerRequest{}
  106. mi := &file_extensions_extension_proto_msgTypes[1]
  107. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  108. ms.StoreMessageInfo(mi)
  109. }
  110. func (x *ExtensionHandlerRequest) String() string {
  111. return protoimpl.X.MessageStringOf(x)
  112. }
  113. func (*ExtensionHandlerRequest) ProtoMessage() {}
  114. func (x *ExtensionHandlerRequest) ProtoReflect() protoreflect.Message {
  115. mi := &file_extensions_extension_proto_msgTypes[1]
  116. if x != nil {
  117. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  118. if ms.LoadMessageInfo() == nil {
  119. ms.StoreMessageInfo(mi)
  120. }
  121. return ms
  122. }
  123. return mi.MessageOf(x)
  124. }
  125. // Deprecated: Use ExtensionHandlerRequest.ProtoReflect.Descriptor instead.
  126. func (*ExtensionHandlerRequest) Descriptor() ([]byte, []int) {
  127. return file_extensions_extension_proto_rawDescGZIP(), []int{1}
  128. }
  129. func (x *ExtensionHandlerRequest) GetWrapper() *Wrapper {
  130. if x != nil {
  131. return x.Wrapper
  132. }
  133. return nil
  134. }
  135. func (x *ExtensionHandlerRequest) GetCompilerVersion() *Version {
  136. if x != nil {
  137. return x.CompilerVersion
  138. }
  139. return nil
  140. }
  141. // The extensions writes an encoded ExtensionHandlerResponse to stdout.
  142. type ExtensionHandlerResponse struct {
  143. state protoimpl.MessageState
  144. sizeCache protoimpl.SizeCache
  145. unknownFields protoimpl.UnknownFields
  146. // true if the extension is handled by the extension handler; false otherwise
  147. Handled bool `protobuf:"varint,1,opt,name=handled,proto3" json:"handled,omitempty"`
  148. // Error message(s). If non-empty, the extension handling failed.
  149. // The extension handler process should exit with status code zero
  150. // even if it reports an error in this way.
  151. //
  152. // This should be used to indicate errors which prevent the extension from
  153. // operating as intended. Errors which indicate a problem in gnostic
  154. // itself -- such as the input Document being unparseable -- should be
  155. // reported by writing a message to stderr and exiting with a non-zero
  156. // status code.
  157. Errors []string `protobuf:"bytes,2,rep,name=errors,proto3" json:"errors,omitempty"`
  158. // text output
  159. Value *anypb.Any `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
  160. }
  161. func (x *ExtensionHandlerResponse) Reset() {
  162. *x = ExtensionHandlerResponse{}
  163. mi := &file_extensions_extension_proto_msgTypes[2]
  164. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  165. ms.StoreMessageInfo(mi)
  166. }
  167. func (x *ExtensionHandlerResponse) String() string {
  168. return protoimpl.X.MessageStringOf(x)
  169. }
  170. func (*ExtensionHandlerResponse) ProtoMessage() {}
  171. func (x *ExtensionHandlerResponse) ProtoReflect() protoreflect.Message {
  172. mi := &file_extensions_extension_proto_msgTypes[2]
  173. if x != nil {
  174. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  175. if ms.LoadMessageInfo() == nil {
  176. ms.StoreMessageInfo(mi)
  177. }
  178. return ms
  179. }
  180. return mi.MessageOf(x)
  181. }
  182. // Deprecated: Use ExtensionHandlerResponse.ProtoReflect.Descriptor instead.
  183. func (*ExtensionHandlerResponse) Descriptor() ([]byte, []int) {
  184. return file_extensions_extension_proto_rawDescGZIP(), []int{2}
  185. }
  186. func (x *ExtensionHandlerResponse) GetHandled() bool {
  187. if x != nil {
  188. return x.Handled
  189. }
  190. return false
  191. }
  192. func (x *ExtensionHandlerResponse) GetErrors() []string {
  193. if x != nil {
  194. return x.Errors
  195. }
  196. return nil
  197. }
  198. func (x *ExtensionHandlerResponse) GetValue() *anypb.Any {
  199. if x != nil {
  200. return x.Value
  201. }
  202. return nil
  203. }
  204. type Wrapper struct {
  205. state protoimpl.MessageState
  206. sizeCache protoimpl.SizeCache
  207. unknownFields protoimpl.UnknownFields
  208. // version of the OpenAPI specification in which this extension was written.
  209. Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
  210. // Name of the extension.
  211. ExtensionName string `protobuf:"bytes,2,opt,name=extension_name,json=extensionName,proto3" json:"extension_name,omitempty"`
  212. // YAML-formatted extension value.
  213. Yaml string `protobuf:"bytes,3,opt,name=yaml,proto3" json:"yaml,omitempty"`
  214. }
  215. func (x *Wrapper) Reset() {
  216. *x = Wrapper{}
  217. mi := &file_extensions_extension_proto_msgTypes[3]
  218. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  219. ms.StoreMessageInfo(mi)
  220. }
  221. func (x *Wrapper) String() string {
  222. return protoimpl.X.MessageStringOf(x)
  223. }
  224. func (*Wrapper) ProtoMessage() {}
  225. func (x *Wrapper) ProtoReflect() protoreflect.Message {
  226. mi := &file_extensions_extension_proto_msgTypes[3]
  227. if x != nil {
  228. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  229. if ms.LoadMessageInfo() == nil {
  230. ms.StoreMessageInfo(mi)
  231. }
  232. return ms
  233. }
  234. return mi.MessageOf(x)
  235. }
  236. // Deprecated: Use Wrapper.ProtoReflect.Descriptor instead.
  237. func (*Wrapper) Descriptor() ([]byte, []int) {
  238. return file_extensions_extension_proto_rawDescGZIP(), []int{3}
  239. }
  240. func (x *Wrapper) GetVersion() string {
  241. if x != nil {
  242. return x.Version
  243. }
  244. return ""
  245. }
  246. func (x *Wrapper) GetExtensionName() string {
  247. if x != nil {
  248. return x.ExtensionName
  249. }
  250. return ""
  251. }
  252. func (x *Wrapper) GetYaml() string {
  253. if x != nil {
  254. return x.Yaml
  255. }
  256. return ""
  257. }
  258. var File_extensions_extension_proto protoreflect.FileDescriptor
  259. var file_extensions_extension_proto_rawDesc = []byte{
  260. 0x0a, 0x1a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x65, 0x78, 0x74,
  261. 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x67, 0x6e,
  262. 0x6f, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e,
  263. 0x76, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
  264. 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x63, 0x0a,
  265. 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x6a, 0x6f,
  266. 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x12, 0x14,
  267. 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d,
  268. 0x69, 0x6e, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20,
  269. 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75,
  270. 0x66, 0x66, 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x75, 0x66, 0x66,
  271. 0x69, 0x78, 0x22, 0x9c, 0x01, 0x0a, 0x17, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
  272. 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37,
  273. 0x0a, 0x07, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
  274. 0x1d, 0x2e, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73,
  275. 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x07,
  276. 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x48, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x69,
  277. 0x6c, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28,
  278. 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x65, 0x78, 0x74, 0x65,
  279. 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
  280. 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
  281. 0x6e, 0x22, 0x78, 0x0a, 0x18, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x61,
  282. 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a,
  283. 0x07, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07,
  284. 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72,
  285. 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x12,
  286. 0x2a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14,
  287. 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
  288. 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x5e, 0x0a, 0x07, 0x57,
  289. 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
  290. 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
  291. 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61,
  292. 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73,
  293. 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x79, 0x61, 0x6d, 0x6c, 0x18,
  294. 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x79, 0x61, 0x6d, 0x6c, 0x42, 0x4d, 0x0a, 0x0e, 0x6f,
  295. 0x72, 0x67, 0x2e, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x2e, 0x76, 0x31, 0x42, 0x10, 0x47,
  296. 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50,
  297. 0x01, 0x5a, 0x21, 0x2e, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x3b,
  298. 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
  299. 0x6e, 0x5f, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x47, 0x4e, 0x58, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
  300. 0x6f, 0x33,
  301. }
  302. var (
  303. file_extensions_extension_proto_rawDescOnce sync.Once
  304. file_extensions_extension_proto_rawDescData = file_extensions_extension_proto_rawDesc
  305. )
  306. func file_extensions_extension_proto_rawDescGZIP() []byte {
  307. file_extensions_extension_proto_rawDescOnce.Do(func() {
  308. file_extensions_extension_proto_rawDescData = protoimpl.X.CompressGZIP(file_extensions_extension_proto_rawDescData)
  309. })
  310. return file_extensions_extension_proto_rawDescData
  311. }
  312. var file_extensions_extension_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
  313. var file_extensions_extension_proto_goTypes = []any{
  314. (*Version)(nil), // 0: gnostic.extension.v1.Version
  315. (*ExtensionHandlerRequest)(nil), // 1: gnostic.extension.v1.ExtensionHandlerRequest
  316. (*ExtensionHandlerResponse)(nil), // 2: gnostic.extension.v1.ExtensionHandlerResponse
  317. (*Wrapper)(nil), // 3: gnostic.extension.v1.Wrapper
  318. (*anypb.Any)(nil), // 4: google.protobuf.Any
  319. }
  320. var file_extensions_extension_proto_depIdxs = []int32{
  321. 3, // 0: gnostic.extension.v1.ExtensionHandlerRequest.wrapper:type_name -> gnostic.extension.v1.Wrapper
  322. 0, // 1: gnostic.extension.v1.ExtensionHandlerRequest.compiler_version:type_name -> gnostic.extension.v1.Version
  323. 4, // 2: gnostic.extension.v1.ExtensionHandlerResponse.value:type_name -> google.protobuf.Any
  324. 3, // [3:3] is the sub-list for method output_type
  325. 3, // [3:3] is the sub-list for method input_type
  326. 3, // [3:3] is the sub-list for extension type_name
  327. 3, // [3:3] is the sub-list for extension extendee
  328. 0, // [0:3] is the sub-list for field type_name
  329. }
  330. func init() { file_extensions_extension_proto_init() }
  331. func file_extensions_extension_proto_init() {
  332. if File_extensions_extension_proto != nil {
  333. return
  334. }
  335. type x struct{}
  336. out := protoimpl.TypeBuilder{
  337. File: protoimpl.DescBuilder{
  338. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  339. RawDescriptor: file_extensions_extension_proto_rawDesc,
  340. NumEnums: 0,
  341. NumMessages: 4,
  342. NumExtensions: 0,
  343. NumServices: 0,
  344. },
  345. GoTypes: file_extensions_extension_proto_goTypes,
  346. DependencyIndexes: file_extensions_extension_proto_depIdxs,
  347. MessageInfos: file_extensions_extension_proto_msgTypes,
  348. }.Build()
  349. File_extensions_extension_proto = out.File
  350. file_extensions_extension_proto_rawDesc = nil
  351. file_extensions_extension_proto_goTypes = nil
  352. file_extensions_extension_proto_depIdxs = nil
  353. }