You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

352 lines
14 KiB

  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: google/api/backend.proto
  3. package serviceconfig // import "google.golang.org/genproto/googleapis/api/serviceconfig"
  4. import proto "github.com/golang/protobuf/proto"
  5. import fmt "fmt"
  6. import math "math"
  7. // Reference imports to suppress errors if they are not otherwise used.
  8. var _ = proto.Marshal
  9. var _ = fmt.Errorf
  10. var _ = math.Inf
  11. // This is a compile-time assertion to ensure that this generated file
  12. // is compatible with the proto package it is being compiled against.
  13. // A compilation error at this line likely means your copy of the
  14. // proto package needs to be updated.
  15. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  16. // Path Translation specifies how to combine the backend address with the
  17. // request path in order to produce the appropriate forwarding URL for the
  18. // request.
  19. //
  20. // Path Translation is applicable only to HTTP-based backends. Backends which
  21. // do not accept requests over HTTP/HTTPS should leave `path_translation`
  22. // unspecified.
  23. type BackendRule_PathTranslation int32
  24. const (
  25. BackendRule_PATH_TRANSLATION_UNSPECIFIED BackendRule_PathTranslation = 0
  26. // Use the backend address as-is, with no modification to the path. If the
  27. // URL pattern contains variables, the variable names and values will be
  28. // appended to the query string. If a query string parameter and a URL
  29. // pattern variable have the same name, this may result in duplicate keys in
  30. // the query string.
  31. //
  32. // # Examples
  33. //
  34. // Given the following operation config:
  35. //
  36. // Method path: /api/company/{cid}/user/{uid}
  37. // Backend address: https://example.cloudfunctions.net/getUser
  38. //
  39. // Requests to the following request paths will call the backend at the
  40. // translated path:
  41. //
  42. // Request path: /api/company/widgetworks/user/johndoe
  43. // Translated:
  44. // https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe
  45. //
  46. // Request path: /api/company/widgetworks/user/johndoe?timezone=EST
  47. // Translated:
  48. // https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe
  49. BackendRule_CONSTANT_ADDRESS BackendRule_PathTranslation = 1
  50. // The request path will be appended to the backend address.
  51. //
  52. // # Examples
  53. //
  54. // Given the following operation config:
  55. //
  56. // Method path: /api/company/{cid}/user/{uid}
  57. // Backend address: https://example.appspot.com
  58. //
  59. // Requests to the following request paths will call the backend at the
  60. // translated path:
  61. //
  62. // Request path: /api/company/widgetworks/user/johndoe
  63. // Translated:
  64. // https://example.appspot.com/api/company/widgetworks/user/johndoe
  65. //
  66. // Request path: /api/company/widgetworks/user/johndoe?timezone=EST
  67. // Translated:
  68. // https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST
  69. BackendRule_APPEND_PATH_TO_ADDRESS BackendRule_PathTranslation = 2
  70. )
  71. var BackendRule_PathTranslation_name = map[int32]string{
  72. 0: "PATH_TRANSLATION_UNSPECIFIED",
  73. 1: "CONSTANT_ADDRESS",
  74. 2: "APPEND_PATH_TO_ADDRESS",
  75. }
  76. var BackendRule_PathTranslation_value = map[string]int32{
  77. "PATH_TRANSLATION_UNSPECIFIED": 0,
  78. "CONSTANT_ADDRESS": 1,
  79. "APPEND_PATH_TO_ADDRESS": 2,
  80. }
  81. func (x BackendRule_PathTranslation) String() string {
  82. return proto.EnumName(BackendRule_PathTranslation_name, int32(x))
  83. }
  84. func (BackendRule_PathTranslation) EnumDescriptor() ([]byte, []int) {
  85. return fileDescriptor_backend_525705f4783ed271, []int{1, 0}
  86. }
  87. // `Backend` defines the backend configuration for a service.
  88. type Backend struct {
  89. // A list of API backend rules that apply to individual API methods.
  90. //
  91. // **NOTE:** All service configuration rules follow "last one wins" order.
  92. Rules []*BackendRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"`
  93. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  94. XXX_unrecognized []byte `json:"-"`
  95. XXX_sizecache int32 `json:"-"`
  96. }
  97. func (m *Backend) Reset() { *m = Backend{} }
  98. func (m *Backend) String() string { return proto.CompactTextString(m) }
  99. func (*Backend) ProtoMessage() {}
  100. func (*Backend) Descriptor() ([]byte, []int) {
  101. return fileDescriptor_backend_525705f4783ed271, []int{0}
  102. }
  103. func (m *Backend) XXX_Unmarshal(b []byte) error {
  104. return xxx_messageInfo_Backend.Unmarshal(m, b)
  105. }
  106. func (m *Backend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  107. return xxx_messageInfo_Backend.Marshal(b, m, deterministic)
  108. }
  109. func (dst *Backend) XXX_Merge(src proto.Message) {
  110. xxx_messageInfo_Backend.Merge(dst, src)
  111. }
  112. func (m *Backend) XXX_Size() int {
  113. return xxx_messageInfo_Backend.Size(m)
  114. }
  115. func (m *Backend) XXX_DiscardUnknown() {
  116. xxx_messageInfo_Backend.DiscardUnknown(m)
  117. }
  118. var xxx_messageInfo_Backend proto.InternalMessageInfo
  119. func (m *Backend) GetRules() []*BackendRule {
  120. if m != nil {
  121. return m.Rules
  122. }
  123. return nil
  124. }
  125. // A backend rule provides configuration for an individual API element.
  126. type BackendRule struct {
  127. // Selects the methods to which this rule applies.
  128. //
  129. // Refer to [selector][google.api.DocumentationRule.selector] for syntax
  130. // details.
  131. Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"`
  132. // The address of the API backend.
  133. Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
  134. // The number of seconds to wait for a response from a request. The default
  135. // deadline for gRPC is infinite (no deadline) and HTTP requests is 5 seconds.
  136. Deadline float64 `protobuf:"fixed64,3,opt,name=deadline,proto3" json:"deadline,omitempty"`
  137. // Minimum deadline in seconds needed for this method. Calls having deadline
  138. // value lower than this will be rejected.
  139. MinDeadline float64 `protobuf:"fixed64,4,opt,name=min_deadline,json=minDeadline,proto3" json:"min_deadline,omitempty"`
  140. // The number of seconds to wait for the completion of a long running
  141. // operation. The default is no deadline.
  142. OperationDeadline float64 `protobuf:"fixed64,5,opt,name=operation_deadline,json=operationDeadline,proto3" json:"operation_deadline,omitempty"`
  143. PathTranslation BackendRule_PathTranslation `protobuf:"varint,6,opt,name=path_translation,json=pathTranslation,proto3,enum=google.api.BackendRule_PathTranslation" json:"path_translation,omitempty"`
  144. // Authentication settings used by the backend.
  145. //
  146. // These are typically used to provide service management functionality to
  147. // a backend served on a publicly-routable URL. The `authentication`
  148. // details should match the authentication behavior used by the backend.
  149. //
  150. // For example, specifying `jwt_audience` implies that the backend expects
  151. // authentication via a JWT.
  152. //
  153. // Types that are valid to be assigned to Authentication:
  154. // *BackendRule_JwtAudience
  155. Authentication isBackendRule_Authentication `protobuf_oneof:"authentication"`
  156. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  157. XXX_unrecognized []byte `json:"-"`
  158. XXX_sizecache int32 `json:"-"`
  159. }
  160. func (m *BackendRule) Reset() { *m = BackendRule{} }
  161. func (m *BackendRule) String() string { return proto.CompactTextString(m) }
  162. func (*BackendRule) ProtoMessage() {}
  163. func (*BackendRule) Descriptor() ([]byte, []int) {
  164. return fileDescriptor_backend_525705f4783ed271, []int{1}
  165. }
  166. func (m *BackendRule) XXX_Unmarshal(b []byte) error {
  167. return xxx_messageInfo_BackendRule.Unmarshal(m, b)
  168. }
  169. func (m *BackendRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  170. return xxx_messageInfo_BackendRule.Marshal(b, m, deterministic)
  171. }
  172. func (dst *BackendRule) XXX_Merge(src proto.Message) {
  173. xxx_messageInfo_BackendRule.Merge(dst, src)
  174. }
  175. func (m *BackendRule) XXX_Size() int {
  176. return xxx_messageInfo_BackendRule.Size(m)
  177. }
  178. func (m *BackendRule) XXX_DiscardUnknown() {
  179. xxx_messageInfo_BackendRule.DiscardUnknown(m)
  180. }
  181. var xxx_messageInfo_BackendRule proto.InternalMessageInfo
  182. func (m *BackendRule) GetSelector() string {
  183. if m != nil {
  184. return m.Selector
  185. }
  186. return ""
  187. }
  188. func (m *BackendRule) GetAddress() string {
  189. if m != nil {
  190. return m.Address
  191. }
  192. return ""
  193. }
  194. func (m *BackendRule) GetDeadline() float64 {
  195. if m != nil {
  196. return m.Deadline
  197. }
  198. return 0
  199. }
  200. func (m *BackendRule) GetMinDeadline() float64 {
  201. if m != nil {
  202. return m.MinDeadline
  203. }
  204. return 0
  205. }
  206. func (m *BackendRule) GetOperationDeadline() float64 {
  207. if m != nil {
  208. return m.OperationDeadline
  209. }
  210. return 0
  211. }
  212. func (m *BackendRule) GetPathTranslation() BackendRule_PathTranslation {
  213. if m != nil {
  214. return m.PathTranslation
  215. }
  216. return BackendRule_PATH_TRANSLATION_UNSPECIFIED
  217. }
  218. type isBackendRule_Authentication interface {
  219. isBackendRule_Authentication()
  220. }
  221. type BackendRule_JwtAudience struct {
  222. JwtAudience string `protobuf:"bytes,7,opt,name=jwt_audience,json=jwtAudience,proto3,oneof"`
  223. }
  224. func (*BackendRule_JwtAudience) isBackendRule_Authentication() {}
  225. func (m *BackendRule) GetAuthentication() isBackendRule_Authentication {
  226. if m != nil {
  227. return m.Authentication
  228. }
  229. return nil
  230. }
  231. func (m *BackendRule) GetJwtAudience() string {
  232. if x, ok := m.GetAuthentication().(*BackendRule_JwtAudience); ok {
  233. return x.JwtAudience
  234. }
  235. return ""
  236. }
  237. // XXX_OneofFuncs is for the internal use of the proto package.
  238. func (*BackendRule) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
  239. return _BackendRule_OneofMarshaler, _BackendRule_OneofUnmarshaler, _BackendRule_OneofSizer, []interface{}{
  240. (*BackendRule_JwtAudience)(nil),
  241. }
  242. }
  243. func _BackendRule_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  244. m := msg.(*BackendRule)
  245. // authentication
  246. switch x := m.Authentication.(type) {
  247. case *BackendRule_JwtAudience:
  248. b.EncodeVarint(7<<3 | proto.WireBytes)
  249. b.EncodeStringBytes(x.JwtAudience)
  250. case nil:
  251. default:
  252. return fmt.Errorf("BackendRule.Authentication has unexpected type %T", x)
  253. }
  254. return nil
  255. }
  256. func _BackendRule_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  257. m := msg.(*BackendRule)
  258. switch tag {
  259. case 7: // authentication.jwt_audience
  260. if wire != proto.WireBytes {
  261. return true, proto.ErrInternalBadWireType
  262. }
  263. x, err := b.DecodeStringBytes()
  264. m.Authentication = &BackendRule_JwtAudience{x}
  265. return true, err
  266. default:
  267. return false, nil
  268. }
  269. }
  270. func _BackendRule_OneofSizer(msg proto.Message) (n int) {
  271. m := msg.(*BackendRule)
  272. // authentication
  273. switch x := m.Authentication.(type) {
  274. case *BackendRule_JwtAudience:
  275. n += 1 // tag and wire
  276. n += proto.SizeVarint(uint64(len(x.JwtAudience)))
  277. n += len(x.JwtAudience)
  278. case nil:
  279. default:
  280. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  281. }
  282. return n
  283. }
  284. func init() {
  285. proto.RegisterType((*Backend)(nil), "google.api.Backend")
  286. proto.RegisterType((*BackendRule)(nil), "google.api.BackendRule")
  287. proto.RegisterEnum("google.api.BackendRule_PathTranslation", BackendRule_PathTranslation_name, BackendRule_PathTranslation_value)
  288. }
  289. func init() { proto.RegisterFile("google/api/backend.proto", fileDescriptor_backend_525705f4783ed271) }
  290. var fileDescriptor_backend_525705f4783ed271 = []byte{
  291. // 408 bytes of a gzipped FileDescriptorProto
  292. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x41, 0x6f, 0xd3, 0x30,
  293. 0x14, 0xc7, 0x97, 0x76, 0x5b, 0xe1, 0xb5, 0xea, 0x82, 0x85, 0x20, 0x9a, 0x38, 0x84, 0x72, 0xa0,
  294. 0x97, 0xa5, 0xd2, 0xb8, 0x20, 0x71, 0x4a, 0x97, 0xc0, 0x2a, 0xa1, 0x34, 0x72, 0xc2, 0x85, 0x4b,
  295. 0xe4, 0x25, 0x8f, 0xd4, 0x23, 0xb5, 0x23, 0xc7, 0x65, 0xdf, 0x07, 0xbe, 0x28, 0xaa, 0x93, 0x65,
  296. 0x2d, 0x12, 0xc7, 0xff, 0xfb, 0xfd, 0x9e, 0xad, 0xbf, 0xf4, 0xc0, 0x29, 0xa5, 0x2c, 0x2b, 0x5c,
  297. 0xb0, 0x9a, 0x2f, 0xee, 0x58, 0xfe, 0x13, 0x45, 0xe1, 0xd5, 0x4a, 0x6a, 0x49, 0xa0, 0x25, 0x1e,
  298. 0xab, 0xf9, 0xec, 0x23, 0x8c, 0x96, 0x2d, 0x24, 0x57, 0x70, 0xa6, 0x76, 0x15, 0x36, 0x8e, 0xe5,
  299. 0x0e, 0xe7, 0xe3, 0xeb, 0xd7, 0xde, 0x93, 0xe6, 0x75, 0x0e, 0xdd, 0x55, 0x48, 0x5b, 0x6b, 0xf6,
  300. 0x67, 0x08, 0xe3, 0x83, 0x31, 0xb9, 0x84, 0x67, 0x0d, 0x56, 0x98, 0x6b, 0xa9, 0x1c, 0xcb, 0xb5,
  301. 0xe6, 0xcf, 0x69, 0x9f, 0x89, 0x03, 0x23, 0x56, 0x14, 0x0a, 0x9b, 0xc6, 0x19, 0x18, 0xf4, 0x18,
  302. 0xf7, 0x5b, 0x05, 0xb2, 0xa2, 0xe2, 0x02, 0x9d, 0xa1, 0x6b, 0xcd, 0x2d, 0xda, 0x67, 0xf2, 0x16,
  303. 0x26, 0x5b, 0x2e, 0xb2, 0x9e, 0x9f, 0x1a, 0x3e, 0xde, 0x72, 0x11, 0x3c, 0x2a, 0x57, 0x40, 0x64,
  304. 0x8d, 0x8a, 0x69, 0x2e, 0x0f, 0xc4, 0x33, 0x23, 0xbe, 0xe8, 0x49, 0xaf, 0x53, 0xb0, 0x6b, 0xa6,
  305. 0x37, 0x99, 0x56, 0x4c, 0x34, 0x95, 0x61, 0xce, 0xb9, 0x6b, 0xcd, 0xa7, 0xd7, 0xef, 0xff, 0xd3,
  306. 0xd6, 0x8b, 0x99, 0xde, 0xa4, 0x4f, 0x3a, 0xbd, 0xa8, 0x8f, 0x07, 0xe4, 0x1d, 0x4c, 0xee, 0x1f,
  307. 0x74, 0xc6, 0x76, 0x05, 0x47, 0x91, 0xa3, 0x33, 0xda, 0x17, 0xbc, 0x3d, 0xa1, 0xe3, 0xfb, 0x07,
  308. 0xed, 0x77, 0xc3, 0x19, 0xc2, 0xc5, 0x3f, 0x0f, 0x11, 0x17, 0xde, 0xc4, 0x7e, 0x7a, 0x9b, 0xa5,
  309. 0xd4, 0x8f, 0x92, 0xaf, 0x7e, 0xba, 0x5a, 0x47, 0xd9, 0xb7, 0x28, 0x89, 0xc3, 0x9b, 0xd5, 0xe7,
  310. 0x55, 0x18, 0xd8, 0x27, 0xe4, 0x25, 0xd8, 0x37, 0xeb, 0x28, 0x49, 0xfd, 0x28, 0xcd, 0xfc, 0x20,
  311. 0xa0, 0x61, 0x92, 0xd8, 0x16, 0xb9, 0x84, 0x57, 0x7e, 0x1c, 0x87, 0x51, 0x90, 0xb5, 0xeb, 0xeb,
  312. 0x9e, 0x0d, 0x96, 0x36, 0x4c, 0xd9, 0x4e, 0x6f, 0x50, 0x68, 0x9e, 0x9b, 0x5f, 0x96, 0x02, 0xa6,
  313. 0xb9, 0xdc, 0x1e, 0x94, 0x5b, 0x4e, 0xba, 0x76, 0xf1, 0xfe, 0x16, 0x62, 0xeb, 0x7b, 0xd8, 0xb1,
  314. 0x52, 0x56, 0x4c, 0x94, 0x9e, 0x54, 0xe5, 0xa2, 0x44, 0x61, 0x2e, 0x65, 0xd1, 0x22, 0x56, 0xf3,
  315. 0xc6, 0x9c, 0x51, 0x83, 0xea, 0x17, 0xcf, 0x31, 0x97, 0xe2, 0x07, 0x2f, 0x3f, 0x1d, 0xa5, 0xdf,
  316. 0x83, 0xd3, 0x2f, 0x7e, 0xbc, 0xba, 0x3b, 0x37, 0x8b, 0x1f, 0xfe, 0x06, 0x00, 0x00, 0xff, 0xff,
  317. 0x2b, 0x64, 0x62, 0xc8, 0x7e, 0x02, 0x00, 0x00,
  318. }