service.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/annotations.proto";
  17. import "google/api/field_behavior.proto";
  18. import "google/api/resource.proto";
  19. import "google/cloud/servicedirectory/v1/endpoint.proto";
  20. option cc_enable_arenas = true;
  21. option csharp_namespace = "Google.Cloud.ServiceDirectory.V1";
  22. option go_package = "google.golang.org/genproto/googleapis/cloud/servicedirectory/v1;servicedirectory";
  23. option java_multiple_files = true;
  24. option java_outer_classname = "ServiceProto";
  25. option java_package = "com.google.cloud.servicedirectory.v1";
  26. option php_namespace = "Google\\Cloud\\ServiceDirectory\\V1";
  27. option ruby_package = "Google::Cloud::ServiceDirectory::V1";
  28. // An individual service. A service contains a name and optional metadata.
  29. // A service must exist before
  30. // [endpoints][google.cloud.servicedirectory.v1.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. Annotations for the service. This data can be consumed by service
  41. // clients.
  42. // Restrictions:
  43. // - The entire annotations dictionary may contain up to 2000 characters,
  44. // spread accoss all key-value pairs. Annotations that goes beyond any
  45. // these limits will be rejected.
  46. // - Valid annotation keys have two segments: an optional prefix and name,
  47. // separated by a slash (/). The name segment is required and must be 63
  48. // characters or less, beginning and ending with an alphanumeric character
  49. // ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and
  50. // alphanumerics between. The prefix is optional. If specified, the prefix
  51. // must be a DNS subdomain: a series of DNS labels separated by dots (.),
  52. // not longer than 253 characters in total, followed by a slash (/).
  53. // Annotations that fails to meet these requirements will be rejected.
  54. // - The '(*.)google.com/' and '(*.)googleapis.com/' prefixes are reserved
  55. // for system annotations managed by Service Directory. If the user tries
  56. // to write to these keyspaces, those entries will be silently ignored by
  57. // the system.
  58. // Note: This field is equivalent to the 'metadata' field in the v1beta1 API.
  59. // They have the same syntax and read/write to the same location in Service
  60. // Directory.
  61. map<string, string> annotations = 4 [(google.api.field_behavior) = OPTIONAL];
  62. // Output only. Endpoints associated with this service. Returned on
  63. // LookupService.Resolve. Control plane clients should use
  64. // RegistrationService.ListEndpoints.
  65. repeated Endpoint endpoints = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  66. }