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