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 15syntax = "proto3"; 16 17package google.cloud.servicedirectory.v1; 18 19import "google/api/field_behavior.proto"; 20import "google/api/resource.proto"; 21 22option cc_enable_arenas = true; 23option csharp_namespace = "Google.Cloud.ServiceDirectory.V1"; 24option go_package = "cloud.google.com/go/servicedirectory/apiv1/servicedirectorypb;servicedirectorypb"; 25option java_multiple_files = true; 26option java_outer_classname = "EndpointProto"; 27option java_package = "com.google.cloud.servicedirectory.v1"; 28option php_namespace = "Google\\Cloud\\ServiceDirectory\\V1"; 29option ruby_package = "Google::Cloud::ServiceDirectory::V1"; 30option (google.api.resource_definition) = { 31 type: "servicedirectory.googleapis.com/Network" 32 pattern: "projects/{project}/locations/global/networks/{network}" 33}; 34 35// An individual endpoint that provides a 36// [service][google.cloud.servicedirectory.v1.Service]. The service must 37// already exist to create an endpoint. 38message Endpoint { 39 option (google.api.resource) = { 40 type: "servicedirectory.googleapis.com/Endpoint" 41 pattern: "projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}/endpoints/{endpoint}" 42 }; 43 44 // Immutable. The resource name for the endpoint in the format 45 // `projects/*/locations/*/namespaces/*/services/*/endpoints/*`. 46 string name = 1 [(google.api.field_behavior) = IMMUTABLE]; 47 48 // Optional. An IPv4 or IPv6 address. Service Directory rejects bad addresses 49 // like: 50 // 51 // * `8.8.8` 52 // * `8.8.8.8:53` 53 // * `test:bad:address` 54 // * `[::1]` 55 // * `[::1]:8080` 56 // 57 // Limited to 45 characters. 58 string address = 2 [(google.api.field_behavior) = OPTIONAL]; 59 60 // Optional. Service Directory rejects values outside of `[0, 65535]`. 61 int32 port = 3 [(google.api.field_behavior) = OPTIONAL]; 62 63 // Optional. Annotations for the endpoint. This data can be consumed by 64 // service clients. 65 // 66 // Restrictions: 67 // 68 // * The entire annotations dictionary may contain up to 512 characters, 69 // spread accoss all key-value pairs. Annotations that go beyond this 70 // limit are rejected 71 // * Valid annotation keys have two segments: an optional prefix and name, 72 // separated by a slash (/). The name segment is required and must be 63 73 // characters or less, beginning and ending with an alphanumeric character 74 // ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and 75 // alphanumerics between. The prefix is optional. If specified, the prefix 76 // must be a DNS subdomain: a series of DNS labels separated by dots (.), 77 // not longer than 253 characters in total, followed by a slash (/) 78 // Annotations that fails to meet these requirements are rejected. 79 // 80 // Note: This field is equivalent to the `metadata` field in the v1beta1 API. 81 // They have the same syntax and read/write to the same location in Service 82 // Directory. 83 map<string, string> annotations = 5 [(google.api.field_behavior) = OPTIONAL]; 84 85 // Immutable. The Google Compute Engine network (VPC) of the endpoint in the 86 // format `projects/<project number>/locations/global/networks/*`. 87 // 88 // The project must be specified by project number (project id is rejected). 89 // Incorrectly formatted networks are rejected, we also check to make sure 90 // that you have the servicedirectory.networks.attach permission on the 91 // project specified. 92 string network = 8 [ 93 (google.api.field_behavior) = IMMUTABLE, 94 (google.api.resource_reference) = { 95 type: "servicedirectory.googleapis.com/Network" 96 } 97 ]; 98 99 // Output only. The globally unique identifier of the endpoint in the UUID4 100 // format. 101 string uid = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; 102} 103