blob: b508e0487faddcf5bf6c65b88aafa3e3c3edfb03 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.example.endpointsapis.v1;
import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
option java_multiple_files = true;
option java_package = "com.google.example.endpointsapis.v1";
option java_outer_classname = "WorkspaceProto";
// Manages workspaces.
service Workspaces {
// List workspaces.
rpc ListWorkspaces(ListWorkspacesRequest) returns (ListWorkspacesResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*}/workspaces"
};
}
// Get information about a Workspace.
rpc GetWorkspace(GetWorkspaceRequest) returns (Workspace) {
option (google.api.http) = {
get: "/v1/{name=projects/*/locations/*/workspaces/*}"
};
}
// Create a Workspace.
rpc CreateWorkspace(CreateWorkspaceRequest) returns (Workspace) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*}/workspaces"
body: "workspace"
};
}
// Updates a Workspace.
rpc UpdateWorkspace(UpdateWorkspaceRequest) returns (Workspace) {
option (google.api.http) = {
patch: "/v1/{name=projects/*/locations/*/Workspaces/*}"
body: "workspace"
};
}
// Deletes a Workspace.
rpc DeleteWorkspace(DeleteWorkspaceRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1/{name=projects/*/locations/*/workspaces/*}"
};
}
}
// Presents a workspace
message Workspace {
// The Workspace name in the format of "projects/*/locations/*/workspaces/*".
string name = 1;
}
// Request message for listing Workspaces.
message ListWorkspacesRequest {
// The parent used for listing. It should have the format of
// `projects/{number}/locations/{location}`.
string parent = 1;
// The page size for list pagination.
int32 page_size = 2;
// The page token for list pagination.
string page_token = 3;
}
// A list of workspaces.
message ListWorkspacesResponse {
// The list of workspaces.
repeated Workspace items = 1;
// The next page token for list pagination.
string next_page_token = 2;
}
// Request message for retrieving a Workspace.
message GetWorkspaceRequest {
// The name of the Workspace to retrieve.
string name = 1;
}
// Request message for creating a Workspace.
message CreateWorkspaceRequest {
// The namespace in which the Workspace should be created.
string parent = 1;
// The Workspace instance to create.
Workspace workspace = 2;
}
// Request message for replacing a Workspace.
message UpdateWorkspaceRequest {
// The name of the Workspace being replaced.
string name = 1;
// The Workspace object being replaced.
Workspace workspace = 2;
}
// Request message for deleting a Workspace.
message DeleteWorkspaceRequest {
// The name of the Workspace to delete.
string name = 1;
}
|