service.proto 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. import "google/cloud/servicedirectory/v1/endpoint.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 = "ServiceProto";
  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 service. A service contains a name and optional metadata.
  28. // A service must exist before
  29. // [endpoints][google.cloud.servicedirectory.v1.Endpoint] can be
  30. // added to it.
  31. message Service {
  32. option (google.api.resource) = {
  33. type: "servicedirectory.googleapis.com/Service"
  34. pattern: "projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}"
  35. };
  36. // Immutable. The resource name for the service in the format
  37. // `projects/*/locations/*/namespaces/*/services/*`.
  38. string name = 1 [(google.api.field_behavior) = IMMUTABLE];
  39. // Optional. Annotations for the service. This data can be consumed by service
  40. // clients.
  41. // Restrictions:
  42. // - The entire annotations dictionary may contain up to 2000 characters,
  43. // spread accoss all key-value pairs. Annotations that goes beyond any
  44. // these limits will be rejected.
  45. // - Valid annotation keys have two segments: an optional prefix and name,
  46. // separated by a slash (/). The name segment is required and must be 63
  47. // characters or less, beginning and ending with an alphanumeric character
  48. // ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and
  49. // alphanumerics between. The prefix is optional. If specified, the prefix
  50. // must be a DNS subdomain: a series of DNS labels separated by dots (.),
  51. // not longer than 253 characters in total, followed by a slash (/).
  52. // Annotations that fails to meet these requirements will be rejected.
  53. // - The '(*.)google.com/' and '(*.)googleapis.com/' prefixes are reserved
  54. // for system annotations managed by Service Directory. If the user tries
  55. // to write to these keyspaces, those entries will be silently ignored by
  56. // the system.
  57. // Note: This field is equivalent to the 'metadata' field in the v1beta1 API.
  58. // They have the same syntax and read/write to the same location in Service
  59. // Directory.
  60. map<string, string> annotations = 4 [(google.api.field_behavior) = OPTIONAL];
  61. // Output only. Endpoints associated with this service. Returned on
  62. // LookupService.Resolve. Control plane clients should use
  63. // RegistrationService.ListEndpoints.
  64. repeated Endpoint endpoints = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  65. }