-
Notifications
You must be signed in to change notification settings - Fork 2.3k
/
services.proto
281 lines (241 loc) · 9.32 KB
/
services.proto
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
// Copyright 2023 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.cloud.video.transcoder.v1;
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/video/transcoder/v1/resources.proto";
import "google/protobuf/empty.proto";
option csharp_namespace = "Google.Cloud.Video.Transcoder.V1";
option go_package = "cloud.google.com/go/video/transcoder/apiv1/transcoderpb;transcoderpb";
option java_multiple_files = true;
option java_outer_classname = "ServicesProto";
option java_package = "com.google.cloud.video.transcoder.v1";
option php_namespace = "Google\\Cloud\\Video\\Transcoder\\V1";
option ruby_package = "Google::Cloud::Video::Transcoder::V1";
// Using the Transcoder API, you can queue asynchronous jobs for transcoding
// media into various output formats. Output formats may include different
// streaming standards such as HTTP Live Streaming (HLS) and Dynamic Adaptive
// Streaming over HTTP (DASH). You can also customize jobs using advanced
// features such as Digital Rights Management (DRM), audio equalization, content
// concatenation, and digital ad-stitch ready content generation.
service TranscoderService {
option (google.api.default_host) = "transcoder.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform";
// Creates a job in the specified region.
rpc CreateJob(CreateJobRequest) returns (Job) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*}/jobs"
body: "job"
};
option (google.api.method_signature) = "parent,job";
}
// Lists jobs in the specified region.
rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*}/jobs"
};
option (google.api.method_signature) = "parent";
}
// Returns the job data.
rpc GetJob(GetJobRequest) returns (Job) {
option (google.api.http) = {
get: "/v1/{name=projects/*/locations/*/jobs/*}"
};
option (google.api.method_signature) = "name";
}
// Deletes a job.
rpc DeleteJob(DeleteJobRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1/{name=projects/*/locations/*/jobs/*}"
};
option (google.api.method_signature) = "name";
}
// Creates a job template in the specified region.
rpc CreateJobTemplate(CreateJobTemplateRequest) returns (JobTemplate) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*}/jobTemplates"
body: "job_template"
};
option (google.api.method_signature) =
"parent,job_template,job_template_id";
}
// Lists job templates in the specified region.
rpc ListJobTemplates(ListJobTemplatesRequest)
returns (ListJobTemplatesResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*}/jobTemplates"
};
option (google.api.method_signature) = "parent";
}
// Returns the job template data.
rpc GetJobTemplate(GetJobTemplateRequest) returns (JobTemplate) {
option (google.api.http) = {
get: "/v1/{name=projects/*/locations/*/jobTemplates/*}"
};
option (google.api.method_signature) = "name";
}
// Deletes a job template.
rpc DeleteJobTemplate(DeleteJobTemplateRequest)
returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/v1/{name=projects/*/locations/*/jobTemplates/*}"
};
option (google.api.method_signature) = "name";
}
}
// Request message for `TranscoderService.CreateJob`.
message CreateJobRequest {
// Required. The parent location to create and process this job.
// Format: `projects/{project}/locations/{location}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];
// Required. Parameters for creating transcoding job.
Job job = 2 [(google.api.field_behavior) = REQUIRED];
}
// Request message for `TranscoderService.ListJobs`.
// The parent location from which to retrieve the collection of jobs.
message ListJobsRequest {
// Required. Format: `projects/{project}/locations/{location}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];
// The maximum number of items to return.
int32 page_size = 2;
// The `next_page_token` value returned from a previous List request, if
// any.
string page_token = 3;
// The filter expression, following the syntax outlined in
// https://google.aip.dev/160.
string filter = 4;
// One or more fields to compare and use to sort the output.
// See https://google.aip.dev/132#ordering.
string order_by = 5;
}
// Request message for `TranscoderService.GetJob`.
message GetJobRequest {
// Required. The name of the job to retrieve.
// Format: `projects/{project}/locations/{location}/jobs/{job}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = { type: "transcoder.googleapis.com/Job" }
];
}
// Request message for `TranscoderService.DeleteJob`.
message DeleteJobRequest {
// Required. The name of the job to delete.
// Format: `projects/{project}/locations/{location}/jobs/{job}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = { type: "transcoder.googleapis.com/Job" }
];
// If set to true, and the job is not found, the request will succeed but no
// action will be taken on the server.
bool allow_missing = 2;
}
// Response message for `TranscoderService.ListJobs`.
message ListJobsResponse {
// List of jobs in the specified region.
repeated Job jobs = 1;
// The pagination token.
string next_page_token = 2;
// List of regions that could not be reached.
repeated string unreachable = 3;
}
// Request message for `TranscoderService.CreateJobTemplate`.
message CreateJobTemplateRequest {
// Required. The parent location to create this job template.
// Format: `projects/{project}/locations/{location}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];
// Required. Parameters for creating job template.
JobTemplate job_template = 2 [(google.api.field_behavior) = REQUIRED];
// Required. The ID to use for the job template, which will become the final
// component of the job template's resource name.
//
// This value should be 4-63 characters, and valid characters must match the
// regular expression `[a-zA-Z][a-zA-Z0-9_-]*`.
string job_template_id = 3 [(google.api.field_behavior) = REQUIRED];
}
// Request message for `TranscoderService.ListJobTemplates`.
message ListJobTemplatesRequest {
// Required. The parent location from which to retrieve the collection of job
// templates. Format: `projects/{project}/locations/{location}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];
// The maximum number of items to return.
int32 page_size = 2;
// The `next_page_token` value returned from a previous List request, if
// any.
string page_token = 3;
// The filter expression, following the syntax outlined in
// https://google.aip.dev/160.
string filter = 4;
// One or more fields to compare and use to sort the output.
// See https://google.aip.dev/132#ordering.
string order_by = 5;
}
// Request message for `TranscoderService.GetJobTemplate`.
message GetJobTemplateRequest {
// Required. The name of the job template to retrieve.
// Format:
// `projects/{project}/locations/{location}/jobTemplates/{job_template}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "transcoder.googleapis.com/JobTemplate"
}
];
}
// Request message for `TranscoderService.DeleteJobTemplate`.
message DeleteJobTemplateRequest {
// Required. The name of the job template to delete.
// `projects/{project}/locations/{location}/jobTemplates/{job_template}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "transcoder.googleapis.com/JobTemplate"
}
];
// If set to true, and the job template is not found, the request will succeed
// but no action will be taken on the server.
bool allow_missing = 2;
}
// Response message for `TranscoderService.ListJobTemplates`.
message ListJobTemplatesResponse {
// List of job templates in the specified region.
repeated JobTemplate job_templates = 1;
// The pagination token.
string next_page_token = 2;
// List of regions that could not be reached.
repeated string unreachable = 3;
}