endpoint.proto 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. // Copyright 2020 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.cloud.servicedirectory.v1;
  16. import "google/api/annotations.proto";
  17. import "google/api/field_behavior.proto";
  18. import "google/api/resource.proto";
  19. option cc_enable_arenas = true;
  20. option csharp_namespace = "Google.Cloud.ServiceDirectory.V1";
  21. option go_package = "google.golang.org/genproto/googleapis/cloud/servicedirectory/v1;servicedirectory";
  22. option java_multiple_files = true;
  23. option java_outer_classname = "EndpointProto";
  24. option java_package = "com.google.cloud.servicedirectory.v1";
  25. option php_namespace = "Google\\Cloud\\ServiceDirectory\\V1";
  26. option ruby_package = "Google::Cloud::ServiceDirectory::V1";
  27. // An individual endpoint that provides a
  28. // [service][google.cloud.servicedirectory.v1.Service]. The service must
  29. // already exist to create an endpoint.
  30. message Endpoint {
  31. option (google.api.resource) = {
  32. type: "servicedirectory.googleapis.com/Endpoint"
  33. pattern: "projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}/endpoints/{endpoint}"
  34. };
  35. // Immutable. The resource name for the endpoint in the format
  36. // 'projects/*/locations/*/namespaces/*/services/*/endpoints/*'.
  37. string name = 1 [(google.api.field_behavior) = IMMUTABLE];
  38. // Optional. An IPv4 or IPv6 address. Service Directory will reject bad
  39. // addresses like:
  40. // "8.8.8"
  41. // "8.8.8.8:53"
  42. // "test:bad:address"
  43. // "[::1]"
  44. // "[::1]:8080"
  45. // Limited to 45 characters.
  46. string address = 2 [(google.api.field_behavior) = OPTIONAL];
  47. // Optional. Service Directory will reject values outside of [0, 65535].
  48. int32 port = 3 [(google.api.field_behavior) = OPTIONAL];
  49. // Optional. Annotations for the endpoint. This data can be consumed by
  50. // service clients. Restrictions:
  51. // - The entire annotations dictionary may contain up to 512 characters,
  52. // spread accoss all key-value pairs. Annotations that goes beyond any
  53. // these limits will be rejected.
  54. // - Valid annotation keys have two segments: an optional prefix and name,
  55. // separated by a slash (/). The name segment is required and must be 63
  56. // characters or less, beginning and ending with an alphanumeric character
  57. // ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and
  58. // alphanumerics between. The prefix is optional. If specified, the prefix
  59. // must be a DNS subdomain: a series of DNS labels separated by dots (.),
  60. // not longer than 253 characters in total, followed by a slash (/).
  61. // Annotations that fails to meet these requirements will be rejected.
  62. // - The '(*.)google.com/' and '(*.)googleapis.com/' prefixes are reserved
  63. // for system annotations managed by Service Directory. If the user tries
  64. // to write to these keyspaces, those entries will be silently ignored by
  65. // the system.
  66. // Note: This field is equivalent to the 'metadata' field in the v1beta1 API.
  67. // They have the same syntax and read/write to the same location in Service
  68. // Directory.
  69. map<string, string> annotations = 5 [(google.api.field_behavior) = OPTIONAL];
  70. }