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