service.proto 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. // Copyright 2021 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.v1beta1;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. import "google/cloud/servicedirectory/v1beta1/endpoint.proto";
  19. import "google/protobuf/timestamp.proto";
  20. option cc_enable_arenas = true;
  21. option csharp_namespace = "Google.Cloud.ServiceDirectory.V1Beta1";
  22. option go_package = "google.golang.org/genproto/googleapis/cloud/servicedirectory/v1beta1;servicedirectory";
  23. option java_multiple_files = true;
  24. option java_outer_classname = "ServiceProto";
  25. option java_package = "com.google.cloud.servicedirectory.v1beta1";
  26. option php_namespace = "Google\\Cloud\\ServiceDirectory\\V1beta1";
  27. option ruby_package = "Google::Cloud::ServiceDirectory::V1beta1";
  28. // An individual service. A service contains a name and optional metadata.
  29. // A service must exist before
  30. // [endpoints][google.cloud.servicedirectory.v1beta1.Endpoint] can be
  31. // added to it.
  32. message Service {
  33. option (google.api.resource) = {
  34. type: "servicedirectory.googleapis.com/Service"
  35. pattern: "projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}"
  36. };
  37. // Immutable. The resource name for the service in the format
  38. // `projects/*/locations/*/namespaces/*/services/*`.
  39. string name = 1 [(google.api.field_behavior) = IMMUTABLE];
  40. // Optional. Metadata for the service. This data can be consumed by service
  41. // clients.
  42. //
  43. // Restrictions:
  44. //
  45. // * The entire metadata dictionary may contain up to 2000 characters,
  46. // spread accoss all key-value pairs. Metadata that goes beyond this
  47. // limit are rejected
  48. // * Valid metadata keys have two segments: an optional prefix and name,
  49. // separated by a slash (/). The name segment is required and must be 63
  50. // characters or less, beginning and ending with an alphanumeric character
  51. // ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and
  52. // alphanumerics between. The prefix is optional. If specified, the prefix
  53. // must be a DNS subdomain: a series of DNS labels separated by dots (.),
  54. // not longer than 253 characters in total, followed by a slash (/).
  55. // Metadata that fails to meet these requirements are rejected
  56. // * The `(*.)google.com/` and `(*.)googleapis.com/` prefixes are reserved
  57. // for system metadata managed by Service Directory. If the user tries
  58. // to write to these keyspaces, those entries are silently ignored by
  59. // the system
  60. //
  61. // Note: This field is equivalent to the `annotations` field in the v1 API.
  62. // They have the same syntax and read/write to the same location in Service
  63. // Directory.
  64. map<string, string> metadata = 2 [(google.api.field_behavior) = OPTIONAL];
  65. // Output only. Endpoints associated with this service. Returned on
  66. // [LookupService.ResolveService][google.cloud.servicedirectory.v1beta1.LookupService.ResolveService]. Control plane clients should use
  67. // [RegistrationService.ListEndpoints][google.cloud.servicedirectory.v1beta1.RegistrationService.ListEndpoints].
  68. repeated Endpoint endpoints = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  69. // Output only. The timestamp when the service was created.
  70. google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  71. // Output only. The timestamp when the service was last updated. Note: endpoints being
  72. // created/deleted/updated within the service are not considered service
  73. // updates for the purpose of this timestamp.
  74. google.protobuf.Timestamp update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  75. }