gateway.proto 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  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/field_mask.proto";
  19. import "google/protobuf/timestamp.proto";
  20. option csharp_namespace = "Google.Cloud.NetworkServices.V1";
  21. option go_package = "google.golang.org/genproto/googleapis/cloud/networkservices/v1;networkservices";
  22. option java_multiple_files = true;
  23. option java_outer_classname = "GatewayProto";
  24. option java_package = "com.google.cloud.networkservices.v1";
  25. option php_namespace = "Google\\Cloud\\NetworkServices\\V1";
  26. option ruby_package = "Google::Cloud::NetworkServices::V1";
  27. // Gateway represents the configuration for a proxy, typically a load balancer.
  28. // It captures the ip:port over which the services are exposed by the proxy,
  29. // along with any policy configurations. Routes have reference to to Gateways to
  30. // dictate how requests should be routed by this Gateway.
  31. message Gateway {
  32. option (google.api.resource) = {
  33. type: "networkservices.googleapis.com/Gateway"
  34. pattern: "projects/{project}/locations/{location}/gateways/{gateway}"
  35. };
  36. // The type of the customer-managed gateway.
  37. // Possible values are:
  38. // * OPEN_MESH
  39. // * SECURE_WEB_GATEWAY
  40. enum Type {
  41. // The type of the customer managed gateway is unspecified.
  42. TYPE_UNSPECIFIED = 0;
  43. // The type of the customer managed gateway is TrafficDirector Open
  44. // Mesh.
  45. OPEN_MESH = 1;
  46. // The type of the customer managed gateway is SecureWebGateway (SWG).
  47. SECURE_WEB_GATEWAY = 2;
  48. }
  49. // Required. Name of the Gateway resource. It matches pattern
  50. // `projects/*/locations/*/gateways/<gateway_name>`.
  51. string name = 1 [(google.api.field_behavior) = REQUIRED];
  52. // Output only. Server-defined URL of this resource
  53. string self_link = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
  54. // Output only. The timestamp when the resource was created.
  55. google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  56. // Output only. The timestamp when the resource was updated.
  57. google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  58. // Optional. Set of label tags associated with the Gateway resource.
  59. map<string, string> labels = 4 [(google.api.field_behavior) = OPTIONAL];
  60. // Optional. A free-text description of the resource. Max length 1024 characters.
  61. string description = 5 [(google.api.field_behavior) = OPTIONAL];
  62. // Immutable. The type of the customer managed gateway.
  63. // This field is required. If unspecified, an error is returned.
  64. Type type = 6 [(google.api.field_behavior) = IMMUTABLE];
  65. // Required. One or more ports that the Gateway must receive traffic on. The proxy binds
  66. // to the ports specified. Gateway listen on 0.0.0.0 on the ports specified
  67. // below.
  68. repeated int32 ports = 11 [(google.api.field_behavior) = REQUIRED];
  69. // Required. Immutable. Scope determines how configuration across multiple Gateway instances are
  70. // merged. The configuration for multiple Gateway instances with the same
  71. // scope will be merged as presented as a single coniguration to the
  72. // proxy/load balancer.
  73. //
  74. // Max length 64 characters.
  75. // Scope should start with a letter and can only have letters, numbers,
  76. // hyphens.
  77. string scope = 8 [
  78. (google.api.field_behavior) = REQUIRED,
  79. (google.api.field_behavior) = IMMUTABLE
  80. ];
  81. // Optional. A fully-qualified ServerTLSPolicy URL reference. Specifies how TLS
  82. // traffic is terminated. If empty, TLS termination is disabled.
  83. string server_tls_policy = 9 [(google.api.field_behavior) = OPTIONAL];
  84. }
  85. // Request used with the ListGateways method.
  86. message ListGatewaysRequest {
  87. // Required. The project and location from which the Gateways should be
  88. // listed, specified in the format `projects/*/locations/*`.
  89. string parent = 1 [
  90. (google.api.field_behavior) = REQUIRED,
  91. (google.api.resource_reference) = {
  92. child_type: "networkservices.googleapis.com/Gateway"
  93. }
  94. ];
  95. // Maximum number of Gateways to return per call.
  96. int32 page_size = 2;
  97. // The value returned by the last `ListGatewaysResponse`
  98. // Indicates that this is a continuation of a prior `ListGateways` call,
  99. // and that the system should return the next page of data.
  100. string page_token = 3;
  101. }
  102. // Response returned by the ListGateways method.
  103. message ListGatewaysResponse {
  104. // List of Gateway resources.
  105. repeated Gateway gateways = 1;
  106. // If there might be more results than those appearing in this response, then
  107. // `next_page_token` is included. To get the next set of results, call this
  108. // method again using the value of `next_page_token` as `page_token`.
  109. string next_page_token = 2;
  110. }
  111. // Request used by the GetGateway method.
  112. message GetGatewayRequest {
  113. // Required. A name of the Gateway to get. Must be in the format
  114. // `projects/*/locations/*/gateways/*`.
  115. string name = 1 [
  116. (google.api.field_behavior) = REQUIRED,
  117. (google.api.resource_reference) = {
  118. type: "networkservices.googleapis.com/Gateway"
  119. }
  120. ];
  121. }
  122. // Request used by the CreateGateway method.
  123. message CreateGatewayRequest {
  124. // Required. The parent resource of the Gateway. Must be in the
  125. // format `projects/*/locations/*`.
  126. string parent = 1 [
  127. (google.api.field_behavior) = REQUIRED,
  128. (google.api.resource_reference) = {
  129. child_type: "networkservices.googleapis.com/Gateway"
  130. }
  131. ];
  132. // Required. Short name of the Gateway resource to be created.
  133. string gateway_id = 2 [(google.api.field_behavior) = REQUIRED];
  134. // Required. Gateway resource to be created.
  135. Gateway gateway = 3 [(google.api.field_behavior) = REQUIRED];
  136. }
  137. // Request used by the UpdateGateway method.
  138. message UpdateGatewayRequest {
  139. // Optional. Field mask is used to specify the fields to be overwritten in the
  140. // Gateway resource by the update.
  141. // The fields specified in the update_mask are relative to the resource, not
  142. // the full request. A field will be overwritten if it is in the mask. If the
  143. // user does not provide a mask then all fields will be overwritten.
  144. google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = OPTIONAL];
  145. // Required. Updated Gateway resource.
  146. Gateway gateway = 2 [(google.api.field_behavior) = REQUIRED];
  147. }
  148. // Request used by the DeleteGateway method.
  149. message DeleteGatewayRequest {
  150. // Required. A name of the Gateway to delete. Must be in the format
  151. // `projects/*/locations/*/gateways/*`.
  152. string name = 1 [
  153. (google.api.field_behavior) = REQUIRED,
  154. (google.api.resource_reference) = {
  155. type: "networkservices.googleapis.com/Gateway"
  156. }
  157. ];
  158. }