endpoint.proto 3.5 KB

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