service.proto 4.1 KB

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