services.proto 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. // Copyright 2020 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.video.transcoder.v1beta1;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/resource.proto";
  20. import "google/cloud/video/transcoder/v1beta1/resources.proto";
  21. import "google/protobuf/empty.proto";
  22. option go_package = "google.golang.org/genproto/googleapis/cloud/video/transcoder/v1beta1;transcoder";
  23. option java_multiple_files = true;
  24. option java_outer_classname = "ServicesProto";
  25. option java_package = "com.google.cloud.video.transcoder.v1beta1";
  26. // Using the Transcoder API, you can queue asynchronous jobs for transcoding
  27. // media into various output formats. Output formats may include different
  28. // streaming standards such as HTTP Live Streaming (HLS) and Dynamic Adaptive
  29. // Streaming over HTTP (DASH). You can also customize jobs using advanced
  30. // features such as Digital Rights Management (DRM), audio equalization, content
  31. // concatenation, and digital ad-stitch ready content generation.
  32. service TranscoderService {
  33. option (google.api.default_host) = "transcoder.googleapis.com";
  34. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
  35. // Creates a job in the specified region.
  36. rpc CreateJob(CreateJobRequest) returns (Job) {
  37. option (google.api.http) = {
  38. post: "/v1beta1/{parent=projects/*/locations/*}/jobs"
  39. body: "job"
  40. };
  41. option (google.api.method_signature) = "parent,job";
  42. }
  43. // Lists jobs in the specified region.
  44. rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) {
  45. option (google.api.http) = {
  46. get: "/v1beta1/{parent=projects/*/locations/*}/jobs"
  47. };
  48. option (google.api.method_signature) = "parent";
  49. }
  50. // Returns the job data.
  51. rpc GetJob(GetJobRequest) returns (Job) {
  52. option (google.api.http) = {
  53. get: "/v1beta1/{name=projects/*/locations/*/jobs/*}"
  54. };
  55. option (google.api.method_signature) = "name";
  56. }
  57. // Deletes a job.
  58. rpc DeleteJob(DeleteJobRequest) returns (google.protobuf.Empty) {
  59. option (google.api.http) = {
  60. delete: "/v1beta1/{name=projects/*/locations/*/jobs/*}"
  61. };
  62. option (google.api.method_signature) = "name";
  63. }
  64. // Creates a job template in the specified region.
  65. rpc CreateJobTemplate(CreateJobTemplateRequest) returns (JobTemplate) {
  66. option (google.api.http) = {
  67. post: "/v1beta1/{parent=projects/*/locations/*}/jobTemplates"
  68. body: "job_template"
  69. };
  70. option (google.api.method_signature) = "parent,job_template,job_template_id";
  71. }
  72. // Lists job templates in the specified region.
  73. rpc ListJobTemplates(ListJobTemplatesRequest) returns (ListJobTemplatesResponse) {
  74. option (google.api.http) = {
  75. get: "/v1beta1/{parent=projects/*/locations/*}/jobTemplates"
  76. };
  77. option (google.api.method_signature) = "parent";
  78. }
  79. // Returns the job template data.
  80. rpc GetJobTemplate(GetJobTemplateRequest) returns (JobTemplate) {
  81. option (google.api.http) = {
  82. get: "/v1beta1/{name=projects/*/locations/*/jobTemplates/*}"
  83. };
  84. option (google.api.method_signature) = "name";
  85. }
  86. // Deletes a job template.
  87. rpc DeleteJobTemplate(DeleteJobTemplateRequest) returns (google.protobuf.Empty) {
  88. option (google.api.http) = {
  89. delete: "/v1beta1/{name=projects/*/locations/*/jobTemplates/*}"
  90. };
  91. option (google.api.method_signature) = "name";
  92. }
  93. }
  94. // Request message for `TranscoderService.CreateJob`.
  95. message CreateJobRequest {
  96. // Required. The parent location to create and process this job.
  97. // Format: `projects/{project}/locations/{location}`
  98. string parent = 1 [
  99. (google.api.field_behavior) = REQUIRED,
  100. (google.api.resource_reference) = {
  101. type: "locations.googleapis.com/Location"
  102. }
  103. ];
  104. // Required. Parameters for creating transcoding job.
  105. Job job = 2 [(google.api.field_behavior) = REQUIRED];
  106. }
  107. // Request message for `TranscoderService.ListJobs`.
  108. // The parent location from which to retrieve the collection of jobs.
  109. message ListJobsRequest {
  110. // Required. Format: `projects/{project}/locations/{location}`
  111. string parent = 1 [
  112. (google.api.field_behavior) = REQUIRED,
  113. (google.api.resource_reference) = {
  114. type: "locations.googleapis.com/Location"
  115. }
  116. ];
  117. // The maximum number of items to return.
  118. int32 page_size = 2;
  119. // The `next_page_token` value returned from a previous List request, if
  120. // any.
  121. string page_token = 3;
  122. }
  123. // Request message for `TranscoderService.GetJob`.
  124. message GetJobRequest {
  125. // Required. The name of the job to retrieve.
  126. // Format: `projects/{project}/locations/{location}/jobs/{job}`
  127. string name = 1 [
  128. (google.api.field_behavior) = REQUIRED,
  129. (google.api.resource_reference) = {
  130. type: "transcoder.googleapis.com/Job"
  131. }
  132. ];
  133. }
  134. // Request message for `TranscoderService.DeleteJob`.
  135. message DeleteJobRequest {
  136. // Required. The name of the job to delete.
  137. // Format: `projects/{project}/locations/{location}/jobs/{job}`
  138. string name = 1 [
  139. (google.api.field_behavior) = REQUIRED,
  140. (google.api.resource_reference) = {
  141. type: "transcoder.googleapis.com/Job"
  142. }
  143. ];
  144. }
  145. // Response message for `TranscoderService.ListJobs`.
  146. message ListJobsResponse {
  147. // List of jobs in the specified region.
  148. repeated Job jobs = 1;
  149. // The pagination token.
  150. string next_page_token = 2;
  151. }
  152. // Request message for `TranscoderService.CreateJobTemplate`.
  153. message CreateJobTemplateRequest {
  154. // Required. The parent location to create this job template.
  155. // Format: `projects/{project}/locations/{location}`
  156. string parent = 1 [
  157. (google.api.field_behavior) = REQUIRED,
  158. (google.api.resource_reference) = {
  159. type: "locations.googleapis.com/Location"
  160. }
  161. ];
  162. // Required. Parameters for creating job template.
  163. JobTemplate job_template = 2 [(google.api.field_behavior) = REQUIRED];
  164. // Required. The ID to use for the job template, which will become the final component
  165. // of the job template's resource name.
  166. //
  167. // This value should be 4-63 characters, and valid characters must match the
  168. // regular expression `[a-zA-Z][a-zA-Z0-9_-]*`.
  169. string job_template_id = 3 [(google.api.field_behavior) = REQUIRED];
  170. }
  171. // Request message for `TranscoderService.ListJobTemplates`.
  172. message ListJobTemplatesRequest {
  173. // Required. The parent location from which to retrieve the collection of job templates.
  174. // Format: `projects/{project}/locations/{location}`
  175. string parent = 1 [
  176. (google.api.field_behavior) = REQUIRED,
  177. (google.api.resource_reference) = {
  178. type: "locations.googleapis.com/Location"
  179. }
  180. ];
  181. // The maximum number of items to return.
  182. int32 page_size = 2;
  183. // The `next_page_token` value returned from a previous List request, if
  184. // any.
  185. string page_token = 3;
  186. }
  187. // Request message for `TranscoderService.GetJobTemplate`.
  188. message GetJobTemplateRequest {
  189. // Required. The name of the job template to retrieve.
  190. // Format:
  191. // `projects/{project}/locations/{location}/jobTemplates/{job_template}`
  192. string name = 1 [
  193. (google.api.field_behavior) = REQUIRED,
  194. (google.api.resource_reference) = {
  195. type: "transcoder.googleapis.com/JobTemplate"
  196. }
  197. ];
  198. }
  199. // Request message for `TranscoderService.DeleteJobTemplate`.
  200. message DeleteJobTemplateRequest {
  201. // Required. The name of the job template to delete.
  202. // `projects/{project}/locations/{location}/jobTemplates/{job_template}`
  203. string name = 1 [
  204. (google.api.field_behavior) = REQUIRED,
  205. (google.api.resource_reference) = {
  206. type: "transcoder.googleapis.com/JobTemplate"
  207. }
  208. ];
  209. }
  210. // Response message for `TranscoderService.ListJobTemplates`.
  211. message ListJobTemplatesResponse {
  212. // List of job templates in the specified region.
  213. repeated JobTemplate job_templates = 1;
  214. // The pagination token.
  215. string next_page_token = 2;
  216. }