aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/yandex-cloud-api-protos/yandex/cloud/video/v1/video_service.proto
blob: 84784c0c6b65ec040c99747764d5652d531a6d48 (plain) (blame)
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
syntax = "proto3";

package yandex.cloud.video.v1;

import "google/protobuf/field_mask.proto";
import "yandex/cloud/api/operation.proto";
import "yandex/cloud/operation/operation.proto";
import "yandex/cloud/video/v1/video.proto";

option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/video/v1;video";
option java_package = "yandex.cloud.api.video.v1";

// Video management service.
service VideoService {
  // Returns the specific video.
  rpc Get(GetVideoRequest) returns (Video) {}

  // List videos for channel.
  rpc List(ListVideoRequest) returns (ListVideoResponse) {}

  // Create video.
  rpc Create(CreateVideoRequest) returns (operation.Operation) {
    option (yandex.cloud.api.operation) = {
      metadata: "CreateVideoMetadata"
      response: "Video"
    };
  }

  // Update video.
  rpc Update(UpdateVideoRequest) returns (operation.Operation) {
    option (yandex.cloud.api.operation) = {
      metadata: "UpdateVideoMetadata"
      response: "Video"
    };
  }

  // Delete video.
  rpc Delete(DeleteVideoRequest) returns (operation.Operation) {
    option (yandex.cloud.api.operation) = {
      metadata: "DeleteVideoMetadata"
      response: "google.protobuf.Empty"
    };
  }

  // Perform an action on the episode.
  rpc PerformAction(PerformVideoActionRequest) returns (operation.Operation) {
    option (yandex.cloud.api.operation) = {
      metadata: "PerformVideoActionMetadata"
      response: "Video"
    };
  }

  // Returns url to the player.
  rpc GetPlayerURL(GetVideoPlayerURLRequest) returns (GetVideoPlayerURLResponse) {}
}

message GetVideoRequest {
  // ID of the video.
  string video_id = 1;
}

message ListVideoRequest {
  reserved 2 to 99;
  // ID of the channel.
  string channel_id = 1;

  // The maximum number of the results per page to return. Default value: 100.
  int64 page_size = 100;
  // Page token for getting the next page of the result.
  string page_token = 101;

  // By which column the listing should be ordered and in which direction,
  // format is "createdAt desc". "id asc" if omitted.
  // Possible fields: ["id", "createdAt", "updatedAt"]
  // Both snake_case and camelCase are supported for fields.
  string order_by = 102;

  // Filter expression that filters resources listed in the response.
  // Expressions are composed of terms connected by logic operators.
  // Value in quotes: `'` or `"`
  // Example: "key1='value' AND key2='value'"
  // Supported operators: ["AND"].
  // Supported fields: ["title", "status", "visibility_status"]
  // Both snake_case and camelCase are supported for fields.
  string filter = 103;
}

message ListVideoResponse {
  reserved 2 to 99;
  repeated Video videos = 1;

  // Token for getting the next page.
  string next_page_token = 100;
}

message CreateVideoRequest {
  reserved 201 to 999;
  reserved 1001 to 1999;
  reserved 2001;
  reserved 5 to 199;

  // ID of the channel.
  string channel_id = 1;

  // Video title.
  string title = 2;
  // Video description.
  string description = 3;
  // ID of the thumbnail.
  string thumbnail_id = 4;

  // Custom labels as `` key:value `` pairs. Maximum 64 per resource.
  map<string, string> labels = 200;

  // Source type.
  oneof source {
    // Upload video using the tus protocol.
    VideoTUSDParams tusd = 1000;
  }

  // Video access rights.
  oneof access_rights {
    // Video is available to everyone.
    VideoPublicAccessParams public_access = 2000;
    // Checking access rights using the authorization system.
    VideoAuthSystemAccessParams auth_system_access = 2002;
  }
}

message VideoTUSDParams {
  // File size.
  int64 file_size = 1;
  // File name.
  string file_name = 2;
}

message VideoPublicAccessParams {}

message VideoAuthSystemAccessParams {}

message CreateVideoMetadata {
  // ID of the video.
  string video_id = 1;
}

message UpdateVideoRequest {
  reserved 201 to 1999;
  reserved 2001;
  reserved 6 to 199;

  // ID of the video.
  string video_id = 1;
  // Field mask that specifies which fields of the video are going to be updated.
  google.protobuf.FieldMask field_mask = 2;

  // Video title.
  string title = 3;
  // Video description.
  string description = 4;
  // ID of the thumbnail.
  string thumbnail_id = 5;
  // Custom labels as `` key:value `` pairs. Maximum 64 per resource.
  map<string, string> labels = 200;

  oneof access_rights {
    VideoPublicAccessParams public_access = 2000;
    VideoAuthSystemAccessParams auth_system_access = 2002;
  }
}

message UpdateVideoMetadata {
  // ID of the video.
  string video_id = 1;
}

message DeleteVideoRequest {
  // ID of the video.
  string video_id = 1;
}

message DeleteVideoMetadata {
  // ID of the video.
  string video_id = 1;
}

message PerformVideoActionRequest {
  // ID of the video.
  string video_id = 1;
  reserved 2 to 999;
  oneof action {
    PublishVideoAction publish = 1000;
    UnpublishVideoAction unpublish = 1001;
  }
}

message PublishVideoAction {}

message UnpublishVideoAction {}

message PerformVideoActionMetadata {
  // ID of the video.
  string video_id = 1;
}

message GetVideoPlayerURLRequest {
  // ID of the video.
  string video_id = 1;
  VideoPlayerParams params = 2;
}

message VideoPlayerParams {
  // If true, a player will be muted by default.
  bool mute = 1;
  // If true, playback will start automatically.
  bool autoplay = 2;
  // If true, a player interface will be hidden by default.
  bool hidden = 3;
}

message GetVideoPlayerURLResponse {
  // Direct link to the video.
  string player_url = 1;
  // HTML embed code in Iframe format.
  string html = 2;
}