endpoint.proto 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. // Copyright 2023 Google LLC
  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. syntax = "proto3";
  15. package google.api;
  16. option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";
  17. option java_multiple_files = true;
  18. option java_outer_classname = "EndpointProto";
  19. option java_package = "com.google.api";
  20. option objc_class_prefix = "GAPI";
  21. // `Endpoint` describes a network address of a service that serves a set of
  22. // APIs. It is commonly known as a service endpoint. A service may expose
  23. // any number of service endpoints, and all service endpoints share the same
  24. // service definition, such as quota limits and monitoring metrics.
  25. //
  26. // Example:
  27. //
  28. // type: google.api.Service
  29. // name: library-example.googleapis.com
  30. // endpoints:
  31. // # Declares network address `https://library-example.googleapis.com`
  32. // # for service `library-example.googleapis.com`. The `https` scheme
  33. // # is implicit for all service endpoints. Other schemes may be
  34. // # supported in the future.
  35. // - name: library-example.googleapis.com
  36. // allow_cors: false
  37. // - name: content-staging-library-example.googleapis.com
  38. // # Allows HTTP OPTIONS calls to be passed to the API frontend, for it
  39. // # to decide whether the subsequent cross-origin request is allowed
  40. // # to proceed.
  41. // allow_cors: true
  42. message Endpoint {
  43. // The canonical name of this endpoint.
  44. string name = 1;
  45. // Unimplemented. Dot not use.
  46. //
  47. // DEPRECATED: This field is no longer supported. Instead of using aliases,
  48. // please specify multiple [google.api.Endpoint][google.api.Endpoint] for each
  49. // of the intended aliases.
  50. //
  51. // Additional names that this endpoint will be hosted on.
  52. repeated string aliases = 2 [deprecated = true];
  53. // The specification of an Internet routable address of API frontend that will
  54. // handle requests to this [API
  55. // Endpoint](https://cloud.google.com/apis/design/glossary). It should be
  56. // either a valid IPv4 address or a fully-qualified domain name. For example,
  57. // "8.8.8.8" or "myservice.appspot.com".
  58. string target = 101;
  59. // Allowing
  60. // [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka
  61. // cross-domain traffic, would allow the backends served from this endpoint to
  62. // receive and respond to HTTP OPTIONS requests. The response will be used by
  63. // the browser to determine whether the subsequent cross-origin request is
  64. // allowed to proceed.
  65. bool allow_cors = 5;
  66. }