xref: /aosp_15_r20/external/googleapis/google/cloud/networkservices/v1/mesh.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 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
15syntax = "proto3";
16
17package google.cloud.networkservices.v1;
18
19import "google/api/field_behavior.proto";
20import "google/api/resource.proto";
21import "google/protobuf/field_mask.proto";
22import "google/protobuf/timestamp.proto";
23
24option csharp_namespace = "Google.Cloud.NetworkServices.V1";
25option go_package = "cloud.google.com/go/networkservices/apiv1/networkservicespb;networkservicespb";
26option java_multiple_files = true;
27option java_outer_classname = "MeshProto";
28option java_package = "com.google.cloud.networkservices.v1";
29option php_namespace = "Google\\Cloud\\NetworkServices\\V1";
30option ruby_package = "Google::Cloud::NetworkServices::V1";
31
32// Mesh represents a logical configuration grouping for workload to workload
33// communication within a service mesh. Routes that point to mesh dictate how
34// requests are routed within this logical mesh boundary.
35message Mesh {
36  option (google.api.resource) = {
37    type: "networkservices.googleapis.com/Mesh"
38    pattern: "projects/{project}/locations/{location}/meshes/{mesh}"
39  };
40
41  // Required. Name of the Mesh resource. It matches pattern
42  // `projects/*/locations/global/meshes/<mesh_name>`.
43  string name = 1 [(google.api.field_behavior) = REQUIRED];
44
45  // Output only. Server-defined URL of this resource
46  string self_link = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
47
48  // Output only. The timestamp when the resource was created.
49  google.protobuf.Timestamp create_time = 2
50      [(google.api.field_behavior) = OUTPUT_ONLY];
51
52  // Output only. The timestamp when the resource was updated.
53  google.protobuf.Timestamp update_time = 3
54      [(google.api.field_behavior) = OUTPUT_ONLY];
55
56  // Optional. Set of label tags associated with the Mesh resource.
57  map<string, string> labels = 4 [(google.api.field_behavior) = OPTIONAL];
58
59  // Optional. A free-text description of the resource. Max length 1024
60  // characters.
61  string description = 5 [(google.api.field_behavior) = OPTIONAL];
62
63  // Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy
64  // to listen on the specified port of localhost (127.0.0.1) address. The
65  // SIDECAR proxy will expect all traffic to be redirected to this port
66  // regardless of its actual ip:port destination. If unset, a port '15001' is
67  // used as the interception port. This is applicable only for sidecar proxy
68  // deployments.
69  int32 interception_port = 8 [(google.api.field_behavior) = OPTIONAL];
70}
71
72// Request used with the ListMeshes method.
73message ListMeshesRequest {
74  // Required. The project and location from which the Meshes should be
75  // listed, specified in the format `projects/*/locations/global`.
76  string parent = 1 [
77    (google.api.field_behavior) = REQUIRED,
78    (google.api.resource_reference) = {
79      child_type: "networkservices.googleapis.com/Mesh"
80    }
81  ];
82
83  // Maximum number of Meshes to return per call.
84  int32 page_size = 2;
85
86  // The value returned by the last `ListMeshesResponse`
87  // Indicates that this is a continuation of a prior `ListMeshes` call,
88  // and that the system should return the next page of data.
89  string page_token = 3;
90}
91
92// Response returned by the ListMeshes method.
93message ListMeshesResponse {
94  // List of Mesh resources.
95  repeated Mesh meshes = 1;
96
97  // If there might be more results than those appearing in this response, then
98  // `next_page_token` is included. To get the next set of results, call this
99  // method again using the value of `next_page_token` as `page_token`.
100  string next_page_token = 2;
101}
102
103// Request used by the GetMesh method.
104message GetMeshRequest {
105  // Required. A name of the Mesh to get. Must be in the format
106  // `projects/*/locations/global/meshes/*`.
107  string name = 1 [
108    (google.api.field_behavior) = REQUIRED,
109    (google.api.resource_reference) = {
110      type: "networkservices.googleapis.com/Mesh"
111    }
112  ];
113}
114
115// Request used by the CreateMesh method.
116message CreateMeshRequest {
117  // Required. The parent resource of the Mesh. Must be in the
118  // format `projects/*/locations/global`.
119  string parent = 1 [
120    (google.api.field_behavior) = REQUIRED,
121    (google.api.resource_reference) = {
122      child_type: "networkservices.googleapis.com/Mesh"
123    }
124  ];
125
126  // Required. Short name of the Mesh resource to be created.
127  string mesh_id = 2 [(google.api.field_behavior) = REQUIRED];
128
129  // Required. Mesh resource to be created.
130  Mesh mesh = 3 [(google.api.field_behavior) = REQUIRED];
131}
132
133// Request used by the UpdateMesh method.
134message UpdateMeshRequest {
135  // Optional. Field mask is used to specify the fields to be overwritten in the
136  // Mesh resource by the update.
137  // The fields specified in the update_mask are relative to the resource, not
138  // the full request. A field will be overwritten if it is in the mask. If the
139  // user does not provide a mask then all fields will be overwritten.
140  google.protobuf.FieldMask update_mask = 1
141      [(google.api.field_behavior) = OPTIONAL];
142
143  // Required. Updated Mesh resource.
144  Mesh mesh = 2 [(google.api.field_behavior) = REQUIRED];
145}
146
147// Request used by the DeleteMesh method.
148message DeleteMeshRequest {
149  // Required. A name of the Mesh to delete. Must be in the format
150  // `projects/*/locations/global/meshes/*`.
151  string name = 1 [
152    (google.api.field_behavior) = REQUIRED,
153    (google.api.resource_reference) = {
154      type: "networkservices.googleapis.com/Mesh"
155    }
156  ];
157}
158