service_binding.proto 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. // Copyright 2022 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.networkservices.v1;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. import "google/protobuf/timestamp.proto";
  19. option csharp_namespace = "Google.Cloud.NetworkServices.V1";
  20. option go_package = "google.golang.org/genproto/googleapis/cloud/networkservices/v1;networkservices";
  21. option java_multiple_files = true;
  22. option java_outer_classname = "ServiceBindingProto";
  23. option java_package = "com.google.cloud.networkservices.v1";
  24. option php_namespace = "Google\\Cloud\\NetworkServices\\V1";
  25. option ruby_package = "Google::Cloud::NetworkServices::V1";
  26. // ServiceBinding is the resource that defines a Service Directory Service to
  27. // be used in a BackendService resource.
  28. message ServiceBinding {
  29. option (google.api.resource) = {
  30. type: "networkservices.googleapis.com/ServiceBinding"
  31. pattern: "projects/{project}/locations/{location}/serviceBindings/{service_binding}"
  32. };
  33. // Required. Name of the ServiceBinding resource. It matches pattern
  34. // `projects/*/locations/global/serviceBindings/service_binding_name>`.
  35. string name = 1 [(google.api.field_behavior) = REQUIRED];
  36. // Optional. A free-text description of the resource. Max length 1024 characters.
  37. string description = 2 [(google.api.field_behavior) = OPTIONAL];
  38. // Output only. The timestamp when the resource was created.
  39. google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  40. // Output only. The timestamp when the resource was updated.
  41. google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  42. // Required. The full service directory service name of the format
  43. // /projects/*/locations/*/namespaces/*/services/*
  44. string service = 5 [(google.api.field_behavior) = REQUIRED];
  45. // Optional. Set of label tags associated with the ServiceBinding resource.
  46. map<string, string> labels = 7 [(google.api.field_behavior) = OPTIONAL];
  47. }
  48. // Request used with the ListServiceBindings method.
  49. message ListServiceBindingsRequest {
  50. // Required. The project and location from which the ServiceBindings should be
  51. // listed, specified in the format `projects/*/locations/global`.
  52. string parent = 1 [
  53. (google.api.field_behavior) = REQUIRED,
  54. (google.api.resource_reference) = {
  55. child_type: "networkservices.googleapis.com/ServiceBinding"
  56. }
  57. ];
  58. // Maximum number of ServiceBindings to return per call.
  59. int32 page_size = 2;
  60. // The value returned by the last `ListServiceBindingsResponse`
  61. // Indicates that this is a continuation of a prior `ListRouters` call,
  62. // and that the system should return the next page of data.
  63. string page_token = 3;
  64. }
  65. // Response returned by the ListServiceBindings method.
  66. message ListServiceBindingsResponse {
  67. // List of ServiceBinding resources.
  68. repeated ServiceBinding service_bindings = 1;
  69. // If there might be more results than those appearing in this response, then
  70. // `next_page_token` is included. To get the next set of results, call this
  71. // method again using the value of `next_page_token` as `page_token`.
  72. string next_page_token = 2;
  73. }
  74. // Request used by the GetServiceBinding method.
  75. message GetServiceBindingRequest {
  76. // Required. A name of the ServiceBinding to get. Must be in the format
  77. // `projects/*/locations/global/serviceBindings/*`.
  78. string name = 1 [
  79. (google.api.field_behavior) = REQUIRED,
  80. (google.api.resource_reference) = {
  81. type: "networkservices.googleapis.com/ServiceBinding"
  82. }
  83. ];
  84. }
  85. // Request used by the ServiceBinding method.
  86. message CreateServiceBindingRequest {
  87. // Required. The parent resource of the ServiceBinding. Must be in the
  88. // format `projects/*/locations/global`.
  89. string parent = 1 [
  90. (google.api.field_behavior) = REQUIRED,
  91. (google.api.resource_reference) = {
  92. child_type: "networkservices.googleapis.com/ServiceBinding"
  93. }
  94. ];
  95. // Required. Short name of the ServiceBinding resource to be created.
  96. string service_binding_id = 2 [(google.api.field_behavior) = REQUIRED];
  97. // Required. ServiceBinding resource to be created.
  98. ServiceBinding service_binding = 3 [(google.api.field_behavior) = REQUIRED];
  99. }
  100. // Request used by the DeleteServiceBinding method.
  101. message DeleteServiceBindingRequest {
  102. // Required. A name of the ServiceBinding to delete. Must be in the format
  103. // `projects/*/locations/global/serviceBindings/*`.
  104. string name = 1 [
  105. (google.api.field_behavior) = REQUIRED,
  106. (google.api.resource_reference) = {
  107. type: "networkservices.googleapis.com/ServiceBinding"
  108. }
  109. ];
  110. }