mikufans-proto-intl 3.17.4+build.17106976

gRPC APIs for Mikufans (Intl)
Documentation
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
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
// This file is @generated by prost-build.
///
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BapiLiveRtcHealthProto {}
/// Nested message and enum types in `BAPILiveRTCHealthProto`.
pub mod bapi_live_rtc_health_proto {
    ///
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct Bandwidth {
        ///
        #[prost(int64, tag = "1")]
        pub tx_rate: i64,
        ///
        #[prost(int64, tag = "2")]
        pub rx_rate: i64,
    }
    ///
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct Cpu {
        ///
        #[prost(float, tag = "1")]
        pub usage: f32,
    }
    ///
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct Disk {
        ///
        #[prost(float, tag = "1")]
        pub usage: f32,
        ///
        #[prost(int64, tag = "2")]
        pub free: i64,
    }
    ///
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct HealthInfo {
        ///
        #[prost(string, tag = "1")]
        pub node_name: ::prost::alloc::string::String,
        ///
        #[prost(message, optional, tag = "2")]
        pub cpu: ::core::option::Option<Cpu>,
        ///
        #[prost(message, optional, tag = "3")]
        pub memory: ::core::option::Option<Memory>,
        ///
        #[prost(message, optional, tag = "4")]
        pub disk: ::core::option::Option<Disk>,
        ///
        #[prost(message, optional, tag = "5")]
        pub bandwidth: ::core::option::Option<Bandwidth>,
        ///
        #[prost(message, optional, tag = "6")]
        pub up_link: ::core::option::Option<ServiceQuality>,
        ///
        #[prost(message, optional, tag = "7")]
        pub dn_link: ::core::option::Option<ServiceQuality>,
        ///
        #[prost(bool, tag = "8")]
        pub offline: bool,
        ///
        #[prost(bool, tag = "9")]
        pub network_available: bool,
    }
    ///
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct Memory {
        ///
        #[prost(float, tag = "1")]
        pub usage: f32,
        ///
        #[prost(int64, tag = "2")]
        pub free: i64,
    }
    ///
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct ServiceQuality {
        ///
        #[prost(int64, tag = "1")]
        pub stream_num: i64,
        ///
        #[prost(int32, tag = "2")]
        pub score_average: i32,
        ///
        #[prost(float, tag = "3")]
        pub zero_score_ratio: f32,
    }
}
///
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BapiLiveRtcLegacyProto {}
/// Nested message and enum types in `BAPILiveRTCLegacyProto`.
pub mod bapi_live_rtc_legacy_proto {
    ///
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct MediaTypeField {
        ///
        #[prost(int32, repeated, tag = "1")]
        pub media_type: ::prost::alloc::vec::Vec<i32>,
    }
    ///
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct RtcSubscribe {
        ///
        #[prost(map = "int32, message", tag = "1")]
        pub subscribe: ::std::collections::HashMap<i32, MediaTypeField>,
    }
    ///
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum MediaType {
        ///
        Audio = 0,
        ///
        Video = 1,
        ///
        Data = 2,
        ///
        SmallVideo = 3,
        ///
        Other = 15,
    }
    impl MediaType {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Audio => "AUDIO",
                Self::Video => "VIDEO",
                Self::Data => "DATA",
                Self::SmallVideo => "SMALL_VIDEO",
                Self::Other => "OTHER",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "AUDIO" => Some(Self::Audio),
                "VIDEO" => Some(Self::Video),
                "DATA" => Some(Self::Data),
                "SMALL_VIDEO" => Some(Self::SmallVideo),
                "OTHER" => Some(Self::Other),
                _ => None,
            }
        }
    }
}
///
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BapiLiveRtcStreamProto {}
/// Nested message and enum types in `BAPILiveRTCStreamProto`.
pub mod bapi_live_rtc_stream_proto {
    ///
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct AudioMetaData {
        ///
        #[prost(int64, tag = "1")]
        pub channels: i64,
        ///
        #[prost(int64, tag = "2")]
        pub sample_rate: i64,
        ///
        #[prost(int64, tag = "3")]
        pub payload: i64,
        ///
        #[prost(int32, tag = "4")]
        pub ssrc: i32,
    }
    ///
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct StreamMeta {
        ///
        #[prost(enumeration = "Codec", tag = "1")]
        pub codec: i32,
        ///
        #[prost(oneof = "stream_meta::Metadata", tags = "2, 3")]
        pub metadata: ::core::option::Option<stream_meta::Metadata>,
    }
    /// Nested message and enum types in `StreamMeta`.
    pub mod stream_meta {
        ///
        #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
        pub enum Metadata {
            ///
            #[prost(message, tag = "2")]
            Audio(super::AudioMetaData),
            ///
            #[prost(message, tag = "3")]
            Video(super::VideoMetaData),
        }
    }
    ///
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct VideoMetaData {
        ///
        #[prost(int64, tag = "1")]
        pub payload: i64,
        ///
        #[prost(int32, tag = "2")]
        pub ssrc: i32,
    }
    ///
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Codec {
        ///
        Opus = 0,
        ///
        H264 = 1,
        ///
        H265 = 2,
        ///
        Av1 = 3,
    }
    impl Codec {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Opus => "Opus",
                Self::H264 => "H264",
                Self::H265 => "H265",
                Self::Av1 => "AV1",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "Opus" => Some(Self::Opus),
                "H264" => Some(Self::H264),
                "H265" => Some(Self::H265),
                "AV1" => Some(Self::Av1),
                _ => None,
            }
        }
    }
}
///
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BapiLiveRtcTokenProto {}
/// Nested message and enum types in `BAPILiveRTCTokenProto`.
pub mod bapi_live_rtc_token_proto {
    ///
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct AccessToken {
        ///
        #[prost(int64, tag = "1")]
        pub channel_id: i64,
        ///
        #[prost(int64, tag = "2")]
        pub uid: i64,
        ///
        #[prost(string, tag = "3")]
        pub token: ::prost::alloc::string::String,
        ///
        #[prost(string, repeated, tag = "4")]
        pub addr: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        ///
        #[prost(string, tag = "5")]
        pub fingerprint: ::prost::alloc::string::String,
        ///
        #[prost(string, tag = "6")]
        pub password: ::prost::alloc::string::String,
        ///
        #[prost(string, repeated, tag = "7")]
        pub http_dns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        ///
        #[prost(int32, tag = "8")]
        pub version: i32,
        ///
        #[prost(string, tag = "9")]
        pub business_name: ::prost::alloc::string::String,
        ///
        #[prost(message, optional, tag = "10")]
        pub turn_addr: ::core::option::Option<TurnAddr>,
    }
    ///
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct Token {
        ///
        #[prost(int64, tag = "1")]
        pub channel_id: i64,
        ///
        #[prost(int64, tag = "2")]
        pub uid: i64,
        ///
        #[prost(int64, tag = "3")]
        pub timestamp: i64,
        ///
        #[prost(enumeration = "super::bapi_live_rtc_user_proto::UserRole", tag = "4")]
        pub role: i32,
    }
    ///
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct TurnAddr {
        ///
        #[prost(string, tag = "1")]
        pub username: ::prost::alloc::string::String,
        ///
        #[prost(string, tag = "2")]
        pub password: ::prost::alloc::string::String,
        ///
        #[prost(string, repeated, tag = "3")]
        pub addr: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        ///
        #[prost(int32, repeated, tag = "4")]
        pub protocol: ::prost::alloc::vec::Vec<i32>,
        ///
        #[prost(bool, tag = "5")]
        pub turn_only: bool,
    }
    ///
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum TurnProtocol {
        ///
        Udp = 0,
        ///
        Tcp = 1,
        ///
        Tls = 2,
    }
    impl TurnProtocol {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Udp => "UDP",
                Self::Tcp => "TCP",
                Self::Tls => "TLS",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "UDP" => Some(Self::Udp),
                "TCP" => Some(Self::Tcp),
                "TLS" => Some(Self::Tls),
                _ => None,
            }
        }
    }
}
///
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BapiLiveRtcUserProto {}
/// Nested message and enum types in `BAPILiveRTCUserProto`.
pub mod bapi_live_rtc_user_proto {
    ///
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct CodecCapability {
        ///
        #[prost(bool, tag = "1")]
        pub av1: bool,
        ///
        #[prost(bool, tag = "2")]
        pub h265: bool,
    }
    ///
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct Stream {
        ///
        #[prost(bool, tag = "1")]
        pub has_video: bool,
        ///
        #[prost(bool, tag = "2")]
        pub has_audio: bool,
        ///
        #[prost(bool, tag = "3")]
        pub audio_muted: bool,
        ///
        #[prost(bool, tag = "4")]
        pub video_muted: bool,
        ///
        #[prost(int32, tag = "5")]
        pub video_count: i32,
        ///
        #[prost(int32, tag = "6")]
        pub temporal_count: i32,
    }
    ///
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct User {
        ///
        #[prost(int64, tag = "1")]
        pub uid: i64,
        ///
        #[prost(enumeration = "UserRole", tag = "2")]
        pub role: i32,
        ///
        #[prost(message, optional, tag = "3")]
        pub pub_stream: ::core::option::Option<Stream>,
        ///
        #[prost(string, tag = "4")]
        pub platform: ::prost::alloc::string::String,
        ///
        #[prost(string, tag = "5")]
        pub sdk_version: ::prost::alloc::string::String,
        ///
        #[prost(message, optional, tag = "6")]
        pub decode_capability: ::core::option::Option<CodecCapability>,
    }
    ///
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum UserLeaveReason {
        ///
        Normal = 0,
        ///
        Kicked = 1,
        ///
        Timeout = 2,
        ///
        Killed = 3,
        ///
        Reconnect = 4,
    }
    impl UserLeaveReason {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Normal => "NORMAL",
                Self::Kicked => "KICKED",
                Self::Timeout => "TIMEOUT",
                Self::Killed => "KILLED",
                Self::Reconnect => "RECONNECT",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "NORMAL" => Some(Self::Normal),
                "KICKED" => Some(Self::Kicked),
                "TIMEOUT" => Some(Self::Timeout),
                "KILLED" => Some(Self::Killed),
                "RECONNECT" => Some(Self::Reconnect),
                _ => None,
            }
        }
    }
    ///
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum UserRole {
        ///
        Normal = 0,
        ///
        Audience = 1,
        ///
        Monitor = 2,
        ///
        Relay = 3,
        ///
        App = 4,
        ///
        Mix = 5,
        ///
        Unknown = 99,
    }
    impl UserRole {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Normal => "Normal",
                Self::Audience => "Audience",
                Self::Monitor => "Monitor",
                Self::Relay => "Relay",
                Self::App => "App",
                Self::Mix => "Mix",
                Self::Unknown => "Unknown",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "Normal" => Some(Self::Normal),
                "Audience" => Some(Self::Audience),
                "Monitor" => Some(Self::Monitor),
                "Relay" => Some(Self::Relay),
                "App" => Some(Self::App),
                "Mix" => Some(Self::Mix),
                "Unknown" => Some(Self::Unknown),
                _ => None,
            }
        }
    }
}